Comment 2 for bug 1948470

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test with focal-proposed (5.4.0-90.101)
---

Original:

# ../openat
Killed

[ 286.989830] BUG: kernel NULL pointer dereference, address: 0000000000000010
...
[ 286.996507] CPU: 2 PID: 5529 Comm: openat Not tainted 5.4.0-90-generic #101-Ubuntu
[ 286.997358] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[ 286.998397] RIP: 0010:d_namespace_path.constprop.0+0x48/0x300
...
[ 287.008418] Call Trace:
[ 287.016112] aa_path_name+0x42/0xb0
[ 287.016616] path_name.isra.0+0x5f/0xe0
[ 287.017153] profile_path_perm.part.0+0x58/0xa0
[ 287.017768] aa_path_perm+0xdd/0x130
[ 287.018293] common_perm+0x96/0x110
[ 287.018795] common_perm_cond+0x4c/0x70
[ 287.019353] apparmor_inode_getattr+0x1d/0x20
[ 287.019948] security_inode_getattr+0x35/0x50
[ 287.020542] vfs_getattr+0x22/0x50
[ 287.021042] vfsub_update_h_iattr+0x95/0xb0 [aufs]
[ 287.021687] ? lookup_dcache+0x46/0x70
[ 287.022216] ? lookup_one_len+0x68/0x90
[ 287.022755] vfsub_lookup_one_len+0x61/0x70 [aufs]
[ 287.023413] au_wh_test+0x26/0xa0 [aufs]
[ 287.023978] au_lkup_dentry+0x1ba/0x670 [aufs]
[ 287.024598] aufs_lookup.part.0+0x119/0x200 [aufs]
[ 287.025250] aufs_atomic_open+0x19d/0x400 [aufs]
[ 287.025881] ? aufs_permission+0x1a9/0x2f0 [aufs]
[ 287.026536] ? security_path_mknod+0x4c/0x70
[ 287.027130] lookup_open+0x364/0x6e0
[ 287.027658] do_last+0x2cb/0x900
[ 287.028141] ? __alloc_file+0x94/0x110
[ 287.028678] path_openat+0x8d/0x290
[ 287.029184] ? do_async_page_fault+0x39/0x70
[ 287.029773] do_filp_open+0x91/0x100
[ 287.030292] ? strncpy_from_user+0xbd/0x150
[ 287.030879] ? __alloc_fd+0xb8/0x150
[ 287.031402] do_sys_open+0x17e/0x290
[ 287.031920] __x64_sys_openat+0x20/0x30
[ 287.032469] do_syscall_64+0x57/0x190
[ 287.032997] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 287.033682] RIP: 0033:0x7f299dccf026

Patched:

# ../openat
# echo $?
0

# uname -rv
5.4.0-90-generic #101+test20211022b2 SMP Fri Oct 22 10:34:51 -03 2021