# CVE-2023-52889: apparmor: Fix null pointer deref when receiving skb during sock creation

> 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.31% (percentile 17, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-08-17T09:08:43.973Z
- **Modified:** 2026-06-17T06:43:51.990Z

## Who should check

- Anyone running Linux \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 347dcb84a4874b5fb375092c08d8cc4069b94f81; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 290a6b88e8c19b6636ed1acc733d1458206f7697; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< ead2ad1d9f045f26fdce3ef1644913b3a6cd38f2; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 6c920754f62cefc63fccdc38a062c7c3452e2961; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 46c17ead5b7389e22e7dc9903fd0ba865d05bda2; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< fce09ea314505a52f2436397608fa0a5d0934fb1
- Anyone running Linux 4.20

## Description

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

apparmor: Fix null pointer deref when receiving skb during sock creation

The panic below is observed when receiving ICMP packets with secmark set
while an ICMP raw socket is being created. SK\_CTX(sk)-\>label is updated
in apparmor\_socket\_post\_create(), but the packet is delivered to the
socket before that, causing the null pointer dereference.
Drop the packet if label context is not set.

    BUG: kernel NULL pointer dereference, address: 000000000000004c
    \#PF: supervisor read access in kernel mode
    \#PF: error\_code(0x0000) - not-present page
    PGD 0 P4D 0
    Oops: 0000 \[\#1\] PREEMPT SMP NOPTI
    CPU: 0 PID: 407 Comm: a.out Not tainted 6.4.12-arch1-1 \#1 3e6fa2753a2d75925c34ecb78e22e85a65d083df
    Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/28/2020
    RIP: 0010:aa\_label\_next\_confined+0xb/0x40
    Code: 00 00 48 89 ef e8 d5 25 0c 00 e9 66 ff ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 0f 1f 44 00 00 89 f0 \<8b\> 77 4c 39 c6 7e 1f 48 63 d0 48 8d 14 d7 eb 0b 83 c0 01 48 83 c2
    RSP: 0018:ffffa92940003b08 EFLAGS: 00010246
    RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000000e
    RDX: ffffa92940003be8 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: ffff8b57471e7800 R08: ffff8b574c642400 R09: 0000000000000002
    R10: ffffffffbd820eeb R11: ffffffffbeb7ff00 R12: ffff8b574c642400
    R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000
    FS:  00007fb092ea7640(0000) GS:ffff8b577bc00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000000000004c CR3: 00000001020f2005 CR4: 00000000007706f0
    PKRU: 55555554
    Call Trace:
     \<IRQ\>
     ? \_\_die+0x23/0x70
     ? page\_fault\_oops+0x171/0x4e0
     ? exc\_page\_fault+0x7f/0x180
     ? asm\_exc\_page\_fault+0x26/0x30
     ? aa\_label\_next\_confined+0xb/0x40
     apparmor\_secmark\_check+0xec/0x330
     security\_sock\_rcv\_skb+0x35/0x50
     sk\_filter\_trim\_cap+0x47/0x250
     sock\_queue\_rcv\_skb\_reason+0x20/0x60
     raw\_rcv+0x13c/0x210
     raw\_local\_deliver+0x1f3/0x250
     ip\_protocol\_deliver\_rcu+0x4f/0x2f0
     ip\_local\_deliver\_finish+0x76/0xa0
     \_\_netif\_receive\_skb\_one\_core+0x89/0xa0
     netif\_receive\_skb+0x119/0x170
     ? \_\_netdev\_alloc\_skb+0x3d/0x140
     vmxnet3\_rq\_rx\_complete+0xb23/0x1010 \[vmxnet3 56a84f9c97178c57a43a24ec073b45a9d6f01f3a\]
     vmxnet3\_poll\_rx\_only+0x36/0xb0 \[vmxnet3 56a84f9c97178c57a43a24ec073b45a9d6f01f3a\]
     \_\_napi\_poll+0x28/0x1b0
     net\_rx\_action+0x2a4/0x380
     \_\_do\_softirq+0xd1/0x2c8
     \_\_irq\_exit\_rcu+0xbb/0xf0
     common\_interrupt+0x86/0xa0
     \</IRQ\>
     \<TASK\>
     asm\_common\_interrupt+0x26/0x40
    RIP: 0010:apparmor\_socket\_post\_create+0xb/0x200
    Code: 08 48 85 ff 75 a1 eb b1 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 54 \<55\> 48 89 fd 53 45 85 c0 0f 84 b2 00 00 00 48 8b 1d 80 56 3f 02 48
    RSP: 0018:ffffa92940ce7e50 EFLAGS: 00000286
    RAX: ffffffffbc756440 RBX: 0000000000000000 RCX: 0000000000000001
    RDX: 0000000000000003 RSI: 0000000000000002 RDI: ffff8b574eaab740
    RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
    R10: ffff8b57444cec70 R11: 0000000000000000 R12: 0000000000000003
    R13: 0000000000000002 R14: ffff8b574eaab740 R15: ffffffffbd8e4748
     ? \_\_pfx\_apparmor\_socket\_post\_create+0x10/0x10
     security\_socket\_post\_create+0x4b/0x80
     \_\_sock\_create+0x176/0x1f0
     \_\_sys\_socket+0x89/0x100
     \_\_x64\_sys\_socket+0x17/0x20
     do\_syscall\_64+0x5d/0x90
     ? do\_syscall\_64+0x6c/0x90
     ? do\_syscall\_64+0x6c/0x90
     ? do\_syscall\_64+0x6c/0x90
     entry\_SYSCALL\_64\_after\_hwframe+0x72/0xdc

## Affected and fixed versions

- Linux: \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 347dcb84a4874b5fb375092c08d8cc4069b94f81; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 290a6b88e8c19b6636ed1acc733d1458206f7697; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< ead2ad1d9f045f26fdce3ef1644913b3a6cd38f2; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 6c920754f62cefc63fccdc38a062c7c3452e2961; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 46c17ead5b7389e22e7dc9903fd0ba865d05bda2; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< fce09ea314505a52f2436397608fa0a5d0934fb1 (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52889.md
Affected: Linux >= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, < 0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1; >= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, < 347dcb84a4874b5fb375092c08d8cc4069b94f81; >= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, < 290a6b88e8c19b6636ed1acc733d1458206f7697; >= ab9f2115081ab7ba63b77a7…
Fixed in: Linux 0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1, Linux 347dcb84a4874b5fb375092c08d8cc4069b94f81, Linux 290a6b88e8c19b6636ed1acc733d1458206f7697, Linux 6c920754f62cefc63fccdc38a062c7c3452e2961, Linux 46c17ead5b7389e22e7dc9903fd0ba865d05bda2

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-2023-52889 being exploited?

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

### How serious is CVE-2023-52889?

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

### Which versions are affected by CVE-2023-52889?

Linux \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 347dcb84a4874b5fb375092c08d8cc4069b94f81; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 290a6b88e8c19b6636ed1acc733d1458206f7697; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< ead2ad1d9f045f26fdce3ef1644913b3a6cd38f2; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 6c920754f62cefc63fccdc38a062c7c3452e2961; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< 46c17ead5b7389e22e7dc9903fd0ba865d05bda2; \>= ab9f2115081ab7ba63b77a759e0f3eb5d6463d7f, \< fce09ea314505a52f2436397608fa0a5d0934fb1; Linux 4.20.

### Is there a fix for CVE-2023-52889?

Yes. Fixed in Linux 0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1, Linux 347dcb84a4874b5fb375092c08d8cc4069b94f81, Linux 290a6b88e8c19b6636ed1acc733d1458206f7697, Linux 6c920754f62cefc63fccdc38a062c7c3452e2961, Linux 46c17ead5b7389e22e7dc9903fd0ba865d05bda2. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52889?

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/0abe35bc48d4ec80424b1f4b3560c0e082cbd5c1>
- patch: <https://git.kernel.org/stable/c/347dcb84a4874b5fb375092c08d8cc4069b94f81>
- patch: <https://git.kernel.org/stable/c/290a6b88e8c19b6636ed1acc733d1458206f7697>
- patch: <https://git.kernel.org/stable/c/ead2ad1d9f045f26fdce3ef1644913b3a6cd38f2>
- patch: <https://git.kernel.org/stable/c/6c920754f62cefc63fccdc38a062c7c3452e2961>
- patch: <https://git.kernel.org/stable/c/46c17ead5b7389e22e7dc9903fd0ba865d05bda2>
- patch: <https://git.kernel.org/stable/c/fce09ea314505a52f2436397608fa0a5d0934fb1>
- 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-2023-52889>

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