udev fails to make prctl() syscall with apparmor=0 (as used by maas by default)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
Fix Released
|
Undecided
|
Unassigned | ||
MAAS |
Fix Released
|
High
|
Alexsander de Souza | ||
maas-images |
Invalid
|
Undecided
|
Unassigned | ||
apparmor (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Lunar |
Invalid
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lunar |
Fix Released
|
Medium
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Lunar |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm assuming the image being used for these deploys is 20230417 or 20230417.1 based on the fact that I saw a 6.2 kernel being used which I don't believe was part of the 20230319 serial. I don't have access to the maas server, so I can't directly check any log files.
MAAS Version: 3.3.2
Here's where the serial log indicates it can't download the squashfs. The full log is attached as scobee-
no search or nameservers found in /run/net-
-*.conf
:: root=squash:http://
date/squa[ 206.804704] Btrfs loaded, crc32c=
=yes
shfs
:: mount_squash downloading http://
4/lunar/
Connecting to 10.229.32.21:5248 (10.229.32.21:5248)
wget: can't connect to remote host (10.229.32.21): Network is unreachable
:: mount -t squashfs -o loop '/root.tmp.img' '/root.tmp'
mount: mounting /root.tmp.img on /root.tmp failed: No such file or directory
done.
Still gathering logs and info and will update as I go.
----
Kernel Bug / Apparmor
reproducer
$ wget https:/
$ wget https:/
$ qemu-system-x86_64 -nographic -m 2G -kernel ./boot-kernel -initrd ./boot-initrd -append 'console=ttyS0 break=modules apparmor=0'
#start the VM
....
Starting systemd-udevd version 252.5-2ubuntu3
Spawning shell within the initramfs
BusyBox v1.35.0 (Ubuntu 1:1.35.0-4ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) udevadm info --export-db
Failed to set death signal: Invalid argument
Observe that udevadm fails to setup death signal, with in systemd code is this
if (flags & (FORK_DEATHSIG|
if (prctl(
}
workaround set kernel commandline to `apparmor=1`
----
MAAS bug
Why is maas setting `apparmor=0` ? Ubuntu shouldn't be used without apparmor. Even for deployment and commisioning.
Related branches
- MAAS Lander: Approve
- Adam Collard (community): Approve
- Dimitri John Ledkov (community): Approve (lgtm)
-
Diff: 103 lines (+47/-7)2 files modifiedsrc/provisioningserver/kernel_opts.py (+15/-3)
src/provisioningserver/tests/test_kernel_opts.py (+32/-4)
CVE References
description: | updated |
Changed in linux (Ubuntu): | |
status: | Incomplete → Triaged |
Changed in maas-images: | |
status: | Incomplete → Invalid |
Changed in systemd (Ubuntu): | |
status: | New → Invalid |
summary: |
- Unable to deploy hosts with lunar images after 20230319 - fails to - connect and download squashfs + udev fails to make prctl() syscall with apparmor=0 (as used by maas by + default) |
description: | updated |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu Lunar): | |
importance: | Undecided → Medium |
status: | New → In Progress |
Changed in linux (Ubuntu): | |
status: | Triaged → Fix Committed |
Changed in linux (Ubuntu Lunar): | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.0-beta2 |
tags: |
added: verification-done-jammy removed: verification-needed-jammy |
Changed in apparmor: | |
status: | New → Fix Committed |
Changed in apparmor (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in apparmor (Ubuntu Lunar): | |
status: | Confirmed → Invalid |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in apparmor: | |
status: | Fix Committed → Fix Released |
tags: |
added: verification-done-jammy-linux-lowlatency-hwe-6.5 removed: verification-needed-jammy-linux-lowlatency-hwe-6.5 |
From the logs:
cloud-initramfs -dyn-netconf: did no find a nic with 00:18:2d:04:00:c0
This kernel is failing to initialize the NICs