Test with bionic-proposed (4.15.0-162.170) ---
Original:
# ../openat Killed
[ 442.526300] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 ... [ 442.539854] CPU: 1 PID: 5644 Comm: openat Not tainted 4.15.0-162-generic #170-Ubuntu [ 442.540733] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 [ 442.541755] RIP: 0010:aa_path_name+0x55/0x370 ... [ 442.549808] Call Trace: [ 442.550211] path_name+0x60/0xe0 [ 442.550687] profile_path_perm.part.7+0x57/0xa0 [ 442.551293] aa_path_perm+0xe2/0x130 [ 442.551819] common_perm+0x59/0x130 [ 442.552323] common_perm_cond+0x4c/0x70 [ 442.552856] apparmor_inode_getattr+0x1d/0x20 [ 442.553444] security_inode_getattr+0x47/0x60 [ 442.554038] vfs_getattr+0x21/0x40 [ 442.554538] vfsub_update_h_iattr+0x95/0xb0 [aufs] [ 442.555172] ? __lookup_hash+0x22/0xa0 [ 442.555697] ? lookup_one_len+0x113/0x120 [ 442.556323] vfsub_lookup_one_len+0x50/0x70 [aufs] [ 442.557065] au_wh_test+0x25/0xe0 [aufs] [ 442.557615] au_lkup_dentry+0x484/0x620 [aufs] [ 442.558225] aufs_lookup.part.33+0x11c/0x210 [aufs] [ 442.562787] aufs_atomic_open+0x102/0x3b0 [aufs] [ 442.563427] ? aufs_permission+0x190/0x2d0 [aufs] [ 442.564098] ? __inode_permission+0x5b/0x160 [ 442.564689] path_openat+0xde1/0x18b0 [ 442.565214] ? path_openat+0xde1/0x18b0 [ 442.565756] do_filp_open+0x9b/0x110 [ 442.566266] ? __check_object_size+0xc8/0x1b0 [ 442.566862] ? __alloc_fd+0xb2/0x170 [ 442.567376] do_sys_open+0x1ba/0x2c0 [ 442.567908] ? do_sys_open+0x1ba/0x2c0 [ 442.568453] SyS_openat+0x14/0x20 [ 442.568939] do_syscall_64+0x73/0x130 [ 442.569458] entry_SYSCALL_64_after_hwframe+0x41/0xa6 [ 442.570117] RIP: 0033:0x7f079564af83
Patched:
# ../openat # echo $? 0
# uname -rv 4.15.0-162-generic #170+test20211022b1 SMP Fri Oct 22 10:59:39 -03 2021
Test with bionic-proposed (4.15.0-162.170)
---
Original:
# ../openat
Killed
[ 442.526300] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 path_name+ 0x55/0x370 path_perm. part.7+ 0x57/0xa0 perm+0xe2/ 0x130 perm+0x59/ 0x130 perm_cond+ 0x4c/0x70 inode_getattr+ 0x1d/0x20 inode_getattr+ 0x47/0x60 0x21/0x40 h_iattr+ 0x95/0xb0 [aufs] hash+0x22/ 0xa0 one_len+ 0x113/0x120 one_len+ 0x50/0x70 [aufs] 0x25/0xe0 [aufs] dentry+ 0x484/0x620 [aufs] part.33+ 0x11c/0x210 [aufs] open+0x102/ 0x3b0 [aufs] +0x190/ 0x2d0 [aufs] permission+ 0x5b/0x160 0xde1/0x18b0 0xde1/0x18b0 open+0x9b/ 0x110 object_ size+0xc8/ 0x1b0 fd+0xb2/ 0x170 open+0x1ba/ 0x2c0 open+0x1ba/ 0x2c0 0x14/0x20 64+0x73/ 0x130 64_after_ hwframe+ 0x41/0xa6
...
[ 442.539854] CPU: 1 PID: 5644 Comm: openat Not tainted 4.15.0-162-generic #170-Ubuntu
[ 442.540733] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[ 442.541755] RIP: 0010:aa_
...
[ 442.549808] Call Trace:
[ 442.550211] path_name+0x60/0xe0
[ 442.550687] profile_
[ 442.551293] aa_path_
[ 442.551819] common_
[ 442.552323] common_
[ 442.552856] apparmor_
[ 442.553444] security_
[ 442.554038] vfs_getattr+
[ 442.554538] vfsub_update_
[ 442.555172] ? __lookup_
[ 442.555697] ? lookup_
[ 442.556323] vfsub_lookup_
[ 442.557065] au_wh_test+
[ 442.557615] au_lkup_
[ 442.558225] aufs_lookup.
[ 442.562787] aufs_atomic_
[ 442.563427] ? aufs_permission
[ 442.564098] ? __inode_
[ 442.564689] path_openat+
[ 442.565214] ? path_openat+
[ 442.565756] do_filp_
[ 442.566266] ? __check_
[ 442.566862] ? __alloc_
[ 442.567376] do_sys_
[ 442.567908] ? do_sys_
[ 442.568453] SyS_openat+
[ 442.568939] do_syscall_
[ 442.569458] entry_SYSCALL_
[ 442.570117] RIP: 0033:0x7f079564af83
Patched:
# ../openat
# echo $?
0
# uname -rv
4.15.0-162-generic #170+test20211022b1 SMP Fri Oct 22 10:59:39 -03 2021