mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
This fixes the following error when a block device's PCI bus starts with a non-decimal hex character and `lsblk /dev/nvme2n1` is executed: ``` audit: type=1400 audit(1751394406.516:554): apparmor="DENIED" operation="open" class="file" profile="lsblk" name="/sys/devices/pci0000:a0/0000:a0:01.1/0000:a1:00.0/nvme/nvme2/nvme2n1/" pid=164652 comm="lsblk" requested_mask="r" denied_mask="r" fsuid=0 ouid=0 ``` I used hex4 and hex2 as it matches the example from https://docs.kernel.org/PCI/sysfs-pci.html and also because lspci(8) says: > domains are numbered from 0 to ffff > > bus (0 to ff) Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2111604 Signed-off-by: Louis Sautier <sautier.louis@gmail.com>