# CVE-2024-46721: apparmor: fix possible NULL pointer dereference

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2024-09-18T06:32:19.327Z
- **Modified:** 2026-06-17T07:55:47.743Z

## Who should check

- Anyone running Linux \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< 59f742e55a469ef36c5c1533b6095a103b61eda8; \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< c49bbe69ee152bd9c1c1f314c0f582e76c578f64; \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< 3dd384108d53834002be5630132ad5c3f32166ad
- Anyone running Linux 6.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

apparmor: fix possible NULL pointer dereference

profile-\>parent-\>dents\[AAFS\_PROF\_DIR\] could be NULL only if its parent is made
from \_\_create\_missing\_ancestors(..) and 'ent-\>old' is NULL in
aa\_replace\_profiles(..).
In that case, it must return an error code and the code, -ENOENT represents
its state that the path of its parent is not existed yet.

BUG: kernel NULL pointer dereference, address: 0000000000000030
PGD 0 P4D 0
PREEMPT SMP PTI
CPU: 4 PID: 3362 Comm: apparmor\_parser Not tainted 6.8.0-24-generic \#24
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
RIP: 0010:aafs\_create.constprop.0+0x7f/0x130
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 \<4d\> 8b 55 30 4d 8d ba a0 00 00 00 4c 89 55 c0 4c 89 ff e8 7a 6a ae
RSP: 0018:ffffc9000b2c7c98 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000041ed RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000b2c7cd8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff82baac10
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  00007be9f22cf740(0000) GS:ffff88817bc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 0000000134b08000 CR4: 00000000000006f0
Call Trace:
 \<TASK\>
 ? show\_regs+0x6d/0x80
 ? \_\_die+0x24/0x80
 ? page\_fault\_oops+0x99/0x1b0
 ? kernelmode\_fixup\_or\_oops+0xb2/0x140
 ? \_\_bad\_area\_nosemaphore+0x1a5/0x2c0
 ? find\_vma+0x34/0x60
 ? bad\_area\_nosemaphore+0x16/0x30
 ? do\_user\_addr\_fault+0x2a2/0x6b0
 ? exc\_page\_fault+0x83/0x1b0
 ? asm\_exc\_page\_fault+0x27/0x30
 ? aafs\_create.constprop.0+0x7f/0x130
 ? aafs\_create.constprop.0+0x51/0x130
 \_\_aafs\_profile\_mkdir+0x3d6/0x480
 aa\_replace\_profiles+0x83f/0x1270
 policy\_update+0xe3/0x180
 profile\_load+0xbc/0x150
 ? rw\_verify\_area+0x47/0x140
 vfs\_write+0x100/0x480
 ? \_\_x64\_sys\_openat+0x55/0xa0
 ? syscall\_exit\_to\_user\_mode+0x86/0x260
 ksys\_write+0x73/0x100
 \_\_x64\_sys\_write+0x19/0x30
 x64\_sys\_call+0x7e/0x25c0
 do\_syscall\_64+0x7f/0x180
 entry\_SYSCALL\_64\_after\_hwframe+0x78/0x80
RIP: 0033:0x7be9f211c574
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 \<48\> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 55 48 89 e5 48 83 ec 20 48 89
RSP: 002b:00007ffd26f2b8c8 EFLAGS: 00000202 ORIG\_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00005d504415e200 RCX: 00007be9f211c574
RDX: 0000000000001fc1 RSI: 00005d504418bc80 RDI: 0000000000000004
RBP: 0000000000001fc1 R08: 0000000000001fc1 R09: 0000000080000000
R10: 0000000000000000 R11: 0000000000000202 R12: 00005d504418bc80
R13: 0000000000000004 R14: 00007ffd26f2b9b0 R15: 00007ffd26f2ba30
 \</TASK\>
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
CR2: 0000000000000030
---\[ end trace 0000000000000000 \]---
RIP: 0010:aafs\_create.constprop.0+0x7f/0x130
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 \<4d\> 8b 55 30 4d 8d ba a0 00 00 00 4c 89 55 c0 4c 89 ff e8 7a 6a ae
RSP: 0018:ffffc9000b2c7c98 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 00000000000041ed RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000b2c7cd8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000
---truncated---

## Affected and fixed versions

- Linux: \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< 59f742e55a469ef36c5c1533b6095a103b61eda8; \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< c49bbe69ee152bd9c1c1f314c0f582e76c578f64; \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< 3dd384108d53834002be5630132ad5c3f32166ad (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 3dd384108d53834002be5630132ad5c3f32166ad or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-46721. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46721.md
Affected: Linux >= 665b1856dc2399828d8ee07a18d4fd79868e729a, < 59f742e55a469ef36c5c1533b6095a103b61eda8; >= 665b1856dc2399828d8ee07a18d4fd79868e729a, < c49bbe69ee152bd9c1c1f314c0f582e76c578f64; >= 665b1856dc2399828d8ee07a18d4fd79868e729a, < 3dd384108d53834002be5630132ad5c3f32166ad; Linux 6.2
Fixed in: Linux 59f742e55a469ef36c5c1533b6095a103b61eda8, Linux 3dd384108d53834002be5630132ad5c3f32166ad

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-46721 being exploited?

There is no confirmed exploitation: CVE-2024-46721 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-46721?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-46721?

Linux \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< 59f742e55a469ef36c5c1533b6095a103b61eda8; \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< c49bbe69ee152bd9c1c1f314c0f582e76c578f64; \>= 665b1856dc2399828d8ee07a18d4fd79868e729a, \< 3dd384108d53834002be5630132ad5c3f32166ad; Linux 6.2.

### Is there a fix for CVE-2024-46721?

Yes. Fixed in Linux 59f742e55a469ef36c5c1533b6095a103b61eda8, Linux 3dd384108d53834002be5630132ad5c3f32166ad. Upgrade Linux to 3dd384108d53834002be5630132ad5c3f32166ad or later.

### How do I check if I'm affected by CVE-2024-46721?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/59f742e55a469ef36c5c1533b6095a103b61eda8>
- patch: <https://git.kernel.org/stable/c/c49bbe69ee152bd9c1c1f314c0f582e76c578f64>
- patch: <https://git.kernel.org/stable/c/3dd384108d53834002be5630132ad5c3f32166ad>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-46721>

HTML: <https://flawdb.com/CVE-2024-46721> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-46721>
