CVE-2024-46721
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
18/09/2024
Last modified:
20/09/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
apparmor: fix possible NULL pointer dereference<br />
<br />
profile->parent->dents[AAFS_PROF_DIR] could be NULL only if its parent is made<br />
from __create_missing_ancestors(..) and &#39;ent->old&#39; is NULL in<br />
aa_replace_profiles(..).<br />
In that case, it must return an error code and the code, -ENOENT represents<br />
its state that the path of its parent is not existed yet.<br />
<br />
BUG: kernel NULL pointer dereference, address: 0000000000000030<br />
PGD 0 P4D 0<br />
PREEMPT SMP PTI<br />
CPU: 4 PID: 3362 Comm: apparmor_parser Not tainted 6.8.0-24-generic #24<br />
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014<br />
RIP: 0010:aafs_create.constprop.0+0x7f/0x130<br />
Code: 4c 63 e0 48 83 c4 18 4c 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 c9 45 31 d2 c3 cc cc cc cc 8b 55 30 4d 8d ba a0 00 00 00 4c 89 55 c0 4c 89 ff e8 7a 6a ae<br />
RSP: 0018:ffffc9000b2c7c98 EFLAGS: 00010246<br />
RAX: 0000000000000000 RBX: 00000000000041ed RCX: 0000000000000000<br />
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000<br />
RBP: ffffc9000b2c7cd8 R08: 0000000000000000 R09: 0000000000000000<br />
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82baac10<br />
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000<br />
FS: 00007be9f22cf740(0000) GS:ffff88817bc00000(0000) knlGS:0000000000000000<br />
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br />
CR2: 0000000000000030 CR3: 0000000134b08000 CR4: 00000000000006f0<br />
Call Trace:<br />
<br />
? show_regs+0x6d/0x80<br />
? __die+0x24/0x80<br />
? page_fault_oops+0x99/0x1b0<br />
? kernelmode_fixup_or_oops+0xb2/0x140<br />
? __bad_area_nosemaphore+0x1a5/0x2c0<br />
? find_vma+0x34/0x60<br />
? bad_area_nosemaphore+0x16/0x30<br />
? do_user_addr_fault+0x2a2/0x6b0<br />
? exc_page_fault+0x83/0x1b0<br />
? asm_exc_page_fault+0x27/0x30<br />
? aafs_create.constprop.0+0x7f/0x130<br />
? aafs_create.constprop.0+0x51/0x130<br />
__aafs_profile_mkdir+0x3d6/0x480<br />
aa_replace_profiles+0x83f/0x1270<br />
policy_update+0xe3/0x180<br />
profile_load+0xbc/0x150<br />
? rw_verify_area+0x47/0x140<br />
vfs_write+0x100/0x480<br />
? __x64_sys_openat+0x55/0xa0<br />
? syscall_exit_to_user_mode+0x86/0x260<br />
ksys_write+0x73/0x100<br />
__x64_sys_write+0x19/0x30<br />
x64_sys_call+0x7e/0x25c0<br />
do_syscall_64+0x7f/0x180<br />
entry_SYSCALL_64_after_hwframe+0x78/0x80<br />
RIP: 0033:0x7be9f211c574<br />
Code: c7 00 16 00 00 00 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 80 3d d5 ea 0e 00 00 74 13 b8 01 00 00 00 0f 05 3d 00 f0 ff ff 77 54 c3 0f 1f 00 55 48 89 e5 48 83 ec 20 48 89<br />
RSP: 002b:00007ffd26f2b8c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001<br />
RAX: ffffffffffffffda RBX: 00005d504415e200 RCX: 00007be9f211c574<br />
RDX: 0000000000001fc1 RSI: 00005d504418bc80 RDI: 0000000000000004<br />
RBP: 0000000000001fc1 R08: 0000000000001fc1 R09: 0000000080000000<br />
R10: 0000000000000000 R11: 0000000000000202 R12: 00005d504418bc80<br />
R13: 0000000000000004 R14: 00007ffd26f2b9b0 R15: 00007ffd26f2ba30<br />
<br />
Modules linked in: snd_seq_dummy snd_hrtimer qrtr snd_hda_codec_generic snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device i2c_i801 snd_timer i2c_smbus qxl snd soundcore drm_ttm_helper lpc_ich ttm joydev input_leds serio_raw mac_hid binfmt_misc msr parport_pc ppdev lp parport efi_pstore nfnetlink dmi_sysfs qemu_fw_cfg ip_tables x_tables autofs4 hid_generic usbhid hid ahci libahci psmouse virtio_rng xhci_pci xhci_pci_renesas<br />
CR2: 0000000000000030<br />
---[ end trace 0000000000000000 ]---<br />
RIP: 0010:aafs_create.constprop.0+0x7f/0x130<br />
Code: 4c 63 e0 48 83 c4 18 4c 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 c9 45 31 d2 c3 cc cc cc cc 8b 55 30 4d 8d ba a0 00 00 00 4c 89 55 c0 4c 89 ff e8 7a 6a ae<br />
RSP: 0018:ffffc9000b2c7c98 EFLAGS: 00010246<br />
RAX: 0000000000000000 RBX: 00000000000041ed RCX: 0000000000000000<br />
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000<br />
RBP: ffffc9000b2c7cd8 R08: 0000000000000000 R09: 0000000000000000<br />
R10: 0000<br />
---truncated---
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
CPE | From | Up to |
---|---|---|
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19.322 (excluding) | |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.284 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.226 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.167 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.109 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.50 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.10.9 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/09b2d107fe63e55b6ae643f9f26bf8eb14a261d9
- https://git.kernel.org/stable/c/3dd384108d53834002be5630132ad5c3f32166ad
- https://git.kernel.org/stable/c/52338a3aa772762b8392ce7cac106c1099aeab85
- https://git.kernel.org/stable/c/59f742e55a469ef36c5c1533b6095a103b61eda8
- https://git.kernel.org/stable/c/730ee2686af0d55372e97a2695005ff142702363
- https://git.kernel.org/stable/c/8d9da10a392a32368392f7a16775e1f36e2a5346
- https://git.kernel.org/stable/c/c49bbe69ee152bd9c1c1f314c0f582e76c578f64
- https://git.kernel.org/stable/c/e3c7d23f7a5c0b11ba0093cea32261ab8098b94e