I reviewed dgx-desktop-defaults 1.1ubuntu as checked into stonking. This
shouldn't be considered a full audit but rather a quick gauge of
maintainability. However, this is a small configuration-only native package
(~224 lines, mostly shell and static config files) and the entire content was
read line by line.
dgx-desktop-defaults is a native package producing 20 binary packages
that tune NVIDIA DGX desktop machines (DGX Spark/GB10 and DGX Station
GB300). Two metapackages pull in 18 small config packages. Most ship
only static configuration. The active code is three bash scripts (~150
lines): dgx-desktop-pro-activation.sh, set-cuda-gb300.sh, and
dgx-desktop-docker-gpus.sh. Everything runs as root at boot or install
time; there are no daemons, no network listeners, and no D-Bus/polkit
surfaces.
- CVE History
- None.
- Build-Depends
- debhelper-compat (= 13), dh-modaliases, shellcheck. Notable
runtime dependencies: efivar, jq, network-manager,
ubuntu-pro-client, nvme-cli and pciutils.
- pre/post inst/rm scripts
- Mostly small, symmetric update-grub / sysctl-reload wrappers, properly
guarded and using `|| true`. A few small issues:
- dgx-desktop-nvme-interrupt-coalescing.postinst calls `sudo
udevadm trigger`; postinst already runs as root and sudo is not
a dependency;
- dgx-desktop-arp-configuration.postinst runs `sysctl -p`
unguarded under `set -e`, so a failing sysctl fails the install.
- init scripts
- None.
- systemd units
- Two units, two drop-ins, one sleep.conf.d snippet, one generator.
- dbus services
- None.
- setuid binaries
- None.
- binaries in PATH
- None.
- sudo fragments
- None.
- polkit files
- None.
- udev rules
- 99-dgx-nvme-interrupt-coalescing.rules: No issues to report.
- unit tests / autopkgtests
- The build runs `shellcheck --severity=error` over the three scripts
(passes). The autopkgtest requires the actual DGX hardware
(needs-root/reboot/internet, nvme devices, EFI token, NVIDIA stack), so
no meaningful check can be performed without it. The test is also
broken independently of the hardware: it checks
nvme-interrupt-coalescing.service, a unit that neither 1.1ubuntu nor
1.0ubuntu has ever shipped. The unit was converted to a udev rule in
packaging git before the initial release (commit 8ea3e79, "Turn the
interrupt coalescing enablement into a udev rule") but the test was not
updated. This is known and tracked in LP: #2159645.
- cron jobs
- None.
- Build logs
- Clean.
- Processes spawned
- All shell. No shell-injection paths found.
- Memory management
- N/A, no compiled code.
- File IO
- All writes go to root-owned locations under /etc; mktemp is used for
temporary files.
- Logging
- Plain echo to the journal; the Pro token value itself is never logged.
It is however visible on the `pro attach` command line (general
comment 1).
- Environment variable usage
- Nothing consumed from untrusted sources; the profile.d snippet sources
root-owned 0644 /etc/cuda-gpu-select/env.
- Use of privileged functions
- Everything runs as root by design (boot-time system configuration); no
privilege boundary is crossed by unprivileged input.
- Use of cryptography / random number sources etc
- None; TLS and token validation are delegated to ubuntu-pro-client.
- Use of temp files
- mktemp used throughout (0600 by default, plus explicit chmod 600);
names not predictable. Cleanup is missing: pro-activation leaves three
token files in /tmp, the docker-gpus generator leaks two files per run.
- Use of networking
- No listeners, no open ports. Only `nm-online` waiting and `pro attach`
through ubuntu-pro-client. The sysctl ARP tuning (arp_announce=2,
arp_ignore=1) is a tightening change and adds no exposure.
- Use of WebKit
- None.
- Use of PolicyKit
- None.
- Any significant cppcheck results
- None (no C/C++ code; cppcheck had nothing to scan).
- Any significant Coverity results
- None (nothing to analyze).
- Any significant shellcheck results
- None at error severity; shellcheck is enforced on the shipped scripts at
build time.
- Any significant bandit results
- None (no Python).
- Any significant govulncheck results
- None (no Go).
- Any significant Semgrep results
- None.
General comments:
The attack surface is minimal: root-context boot/install-time configuration,
no daemons, no listeners, no setuid, no D-Bus/polkit. None of the findings
below is exploitable by an unprivileged local or remote attacker to gain
privileges; the first one is an information disclosure of a credential to
local users.
1. Ubuntu Pro token exposed via argv (dgx-desktop-pro-activation.sh): the
token extracted from the UEFI variable is passed as a command-line
argument to `pro attach "${TOKEN}"`, making it readable by any local user
via /proc/<pid>/cmdline while the command runs. The retry loop can
re-run it for up to ~10 minutes per boot. These are multi-user desktop
machines and the preloaded contract token is a credential. Use
`pro attach --attach-config <file>` (or pass the token via stdin) instead.
2. Broken retry logic in the same script: with `set -e`, a non-zero exit
from `pro attach` aborts the script on the first attempt, so the 10x60s
retry loop only covers the "attach returned 0 but status not attached"
case. Likely related to the "failed exit code" fix mentioned in the
changelog; should be fixed regardless.
3. `sudo udevadm trigger` in dgx-desktop-nvme-interrupt-coalescing.postinst:
postinst already runs as root and sudo is not in Depends; drop the sudo.
4. The autopkgtest is currently broken (see above); already noted in the
MIR review and tracked in LP: #2159645, to be fixed in the next upload.
5. Orphaned source file: files/usr/lib/modprobe.d/realtek_blacklist.conf is
not installed by any package and references the load-realtek-driver
generator removed in 1.1; delete it. (The MIR bug description also still
mentions dgx-desktop-load-realtek-driver.sh, which no longer exists.)
6. Minor notes: dgx-desktop-limits raises nofile to 500000 for all users
system-wide (deliberate for GPU workloads, but affects every login);
Section: libs is an odd choice for config/metapackages.
Security team ACK for promoting dgx-desktop-defaults to main, provided that:
- Required: the Ubuntu Pro token no longer be passed on the `pro attach`
command line (finding 1).
- Recommended: findings 2-5 be addressed (retry logic, sudo in postinst,
autopkgtest refresh, orphaned realtek file).
** Changed in: dgx-desktop-defaults (Ubuntu)
Assignee: Ubuntu Security Team (ubuntu-security) => (unassigned)
** Changed in: dgx-desktop-defaults (Ubuntu)
Status: Confirmed => In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2154816
Title:
[MIR] dgx-desktop-defaults
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dgx-desktop-defaults/+bug/2154816/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs