Comment 9 for bug 2031304

Revision history for this message
Nishit Majithia (0xnishit) wrote :

I reviewed dracut 059-4ubuntu2 as checked into mantic. This shouldn't be
considered a full audit but rather a quick gauge of maintainability.

dracut is used to create an initramfs image by copying tools and files from
an installed system and combining it with the dracut framework, usually
found in /usr/lib/dracut/modules.d.

- CVE History
  - CVE-2010-4176(high) - Ubuntu package not-affected
  - CVE-2012-4453(low) - Ubuntu package not-affected
  - CVE-2015-0794(low) - Ubuntu package not-affected
  - CVE-2016-8637(medium) - Ubuntu package not-affected
- Build-Depends (from debian/control)
  - debhelper-compat (= 12), debhelper, asciidoc-base, xsltproc, docbook-xsl,
    docbook-xml, quilt, libkmod-dev, pkg-config, cpio, kmod, udev, kpartx,
    libkmod2, e2fsprogs
- pre/post inst/rm scripts
  - There are two scripts found
  a) postinst script: This script is designed to regenerate initramfs for
     all installed Linux kernel versions on a Debian-based system. It uses
     trigger mechanisms to do so, and it can be manually invoked as well.
     This kind of script is typically used to ensure that the initramfs is
     updated when new kernels are installed or updated on the system,
     ensuring a smooth boot process.
  b) postrm script: This script is designed to clean up log files
     associated with the "dracut" process when invoked with the "purge"
     argument. It removes log files matching the pattern /var/log/dracut.log
     and then exits with a success status. This type of script can be useful
     for maintenance tasks related to package management or log file
     management.
- init scripts
  - NA
- systemd units
  - dracut-core and dracut-network
    - `/usr/lib/dracut/modules.d/` dir contains various modules used by
      dracut during the initramfs generation process. Each subdirectory
      represents a module, and these modules can add specific functionality
      or configurations to the initramfs.
    - `/lib/systemd/system/` dir contains systemd service unit files. These
      service unit files are symlinked to specific services and targets
      related to dracut. They define how systemd manages dracut related
      services during the system boot process.
    - `/usr/lib/dracut/modules.d/*` directory appears to be a dracut module
      related to systemd integration
    - `module-setup.sh` files are shell scripts used by the dracut modules
      to configure and set up specific functionalities in the initramfs.
      The scripts likely define how the modules should behave during the
      initramfs generation process.
    - Overall, these files and directories are part of the integration of
      dracut and systemd, and they contribute to the generation and
      management of the initramfs during the system boot process. Each
      module and service has a specific role in ensuring that the initramfs
      is correctly configured and functions as needed during the boot
      sequence.
- dbus services
  - NA
- setuid binaries
  - NA
- binaries in PATH
  - -rwxr-xr-x root/root 98202 2023-08-22 20:04 ./usr/bin/dracut
    -rwxr-xr-x root/root 3693 2023-08-22 20:04 ./usr/bin/dracut-catimages
    -rwxr-xr-x root/root 12127 2023-08-22 20:04 ./usr/bin/lsinitrd
- sudo fragments
  - NA
- polkit files
  - NA
- udev rules
  - NA
- unit tests / autopkgtests
  - All good
- cron jobs
  - NA
- Build logs
  - Few warnings
W: dracut-core: groff-message troff:<standard input>:193: warning: macro 'an-trap' not defined [usr/share/man/man5/dracut.conf.5.gz:1]
W: dracut-core: groff-message troff:<standard input>:216: warning: macro 'an-trap' not defined [usr/share/man/man8/dracut.8.gz:1]
W: dracut-core: groff-message troff:<standard input>:532: warning: macro 'an-trap' not defined [usr/share/man/man7/dracut.cmdline.7.gz:1]
W: dracut-core: groff-message troff:<standard input>:532: warning: macro 'an-trap' not defined [usr/share/man/man7/dracut.kernel.7.gz:1]
W: dracut-core: groff-message troff:<standard input>:68: warning: macro 'an-trap' not defined [usr/share/man/man7/dracut.modules.7.gz:1]

- Processes spawned
  - looks good
- Memory management
  - nothing suspicious, looks fine
- File IO
  - not much, happens for logging in util.c
- Logging
  - ferror() and log_error() majorly used
- Environment variable usage
  - looks good
- Use of privileged functions
  - looks good
- Use of cryptography / random number sources etc
  - NA
- Use of temp files
  - NA
- Use of networking
  - fine
- Use of WebKit
  - NA
- Use of PolicyKit
  - NA

- Any significant cppcheck results
  - nothing
- Any significant Coverity results
  - nothing, all issues are from tests/ folder
- Any significant shellcheck results
  - looks good
- Any significant bandit results
  - nothing
- Any significant govulncheck results
  - nothing
- Any significant Semgrep results
  - looks good

Security team ACK for promoting dracut to main