# CVE-2024-56635: net: avoid potential UAF in default\_operstate()

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-362, CWE-416
- **Published:** 2024-12-27T15:02:38.213Z
- **Modified:** 2026-08-05T11:45:36.867Z

## Who should check

- Anyone running Linux \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 3265aab0736f78bb218200b06b1abb525c316269; \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 316183d58319f191e16503bc2dffa156c4442df2; \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 750e51603395e755537da08f745864c93e3ce741
- Anyone running Linux 6.2

## Description

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

net: avoid potential UAF in default\_operstate()

syzbot reported an UAF in default\_operstate() \[1\]

Issue is a race between device and netns dismantles.

After calling \_\_rtnl\_unlock() from netdev\_run\_todo(),
we can not assume the netns of each device is still alive.

Make sure the device is not in NETREG\_UNREGISTERED state,
and add an ASSERT\_RTNL() before the call to
\_\_dev\_get\_by\_index().

We might move this ASSERT\_RTNL() in \_\_dev\_get\_by\_index()
in the future.

\[1\]

BUG: KASAN: slab-use-after-free in \_\_dev\_get\_by\_index+0x5d/0x110 net/core/dev.c:852
Read of size 8 at addr ffff888043eba1b0 by task syz.0.0/5339

CPU: 0 UID: 0 PID: 5339 Comm: syz.0.0 Not tainted 6.12.0-syzkaller-10296-gaaf20f870da0 \#0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 \<TASK\>
  \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
  dump\_stack\_lvl+0x241/0x360 lib/dump\_stack.c:120
  print\_address\_description mm/kasan/report.c:378 \[inline\]
  print\_report+0x169/0x550 mm/kasan/report.c:489
  kasan\_report+0x143/0x180 mm/kasan/report.c:602
  \_\_dev\_get\_by\_index+0x5d/0x110 net/core/dev.c:852
  default\_operstate net/core/link\_watch.c:51 \[inline\]
  rfc2863\_policy+0x224/0x300 net/core/link\_watch.c:67
  linkwatch\_do\_dev+0x3e/0x170 net/core/link\_watch.c:170
  netdev\_run\_todo+0x461/0x1000 net/core/dev.c:10894
  rtnl\_unlock net/core/rtnetlink.c:152 \[inline\]
  rtnl\_net\_unlock include/linux/rtnetlink.h:133 \[inline\]
  rtnl\_dellink+0x760/0x8d0 net/core/rtnetlink.c:3520
  rtnetlink\_rcv\_msg+0x791/0xcf0 net/core/rtnetlink.c:6911
  netlink\_rcv\_skb+0x1e3/0x430 net/netlink/af\_netlink.c:2541
  netlink\_unicast\_kernel net/netlink/af\_netlink.c:1321 \[inline\]
  netlink\_unicast+0x7f6/0x990 net/netlink/af\_netlink.c:1347
  netlink\_sendmsg+0x8e4/0xcb0 net/netlink/af\_netlink.c:1891
  sock\_sendmsg\_nosec net/socket.c:711 \[inline\]
  \_\_sock\_sendmsg+0x221/0x270 net/socket.c:726
  \_\_\_\_sys\_sendmsg+0x52a/0x7e0 net/socket.c:2583
  \_\_\_sys\_sendmsg net/socket.c:2637 \[inline\]
  \_\_sys\_sendmsg+0x269/0x350 net/socket.c:2669
  do\_syscall\_x64 arch/x86/entry/common.c:52 \[inline\]
  do\_syscall\_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
RIP: 0033:0x7f2a3cb80809
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 \<48\> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2a3d9cd058 EFLAGS: 00000246 ORIG\_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f2a3cd45fa0 RCX: 00007f2a3cb80809
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000008
RBP: 00007f2a3cbf393e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f2a3cd45fa0 R15: 00007ffd03bc65c8
 \</TASK\>

Allocated by task 5339:
  kasan\_save\_stack mm/kasan/common.c:47 \[inline\]
  kasan\_save\_track+0x3f/0x80 mm/kasan/common.c:68
  poison\_kmalloc\_redzone mm/kasan/common.c:377 \[inline\]
  \_\_kasan\_kmalloc+0x98/0xb0 mm/kasan/common.c:394
  kasan\_kmalloc include/linux/kasan.h:260 \[inline\]
  \_\_kmalloc\_cache\_noprof+0x243/0x390 mm/slub.c:4314
  kmalloc\_noprof include/linux/slab.h:901 \[inline\]
  kmalloc\_array\_noprof include/linux/slab.h:945 \[inline\]
  netdev\_create\_hash net/core/dev.c:11870 \[inline\]
  netdev\_init+0x10c/0x250 net/core/dev.c:11890
  ops\_init+0x31e/0x590 net/core/net\_namespace.c:138
  setup\_net+0x287/0x9e0 net/core/net\_namespace.c:362
  copy\_net\_ns+0x33f/0x570 net/core/net\_namespace.c:500
  create\_new\_namespaces+0x425/0x7b0 kernel/nsproxy.c:110
  unshare\_nsproxy\_namespaces+0x124/0x180 kernel/nsproxy.c:228
  ksys\_unshare+0x57d/0xa70 kernel/fork.c:3314
  \_\_do\_sys\_unshare kernel/fork.c:3385 \[inline\]
  \_\_se\_sys\_unshare kernel/fork.c:3383 \[inline\]
  \_\_x64\_sys\_unshare+0x38/0x40 kernel/fork.c:3383
  do\_syscall\_x64 arch/x86/entry/common.c:52 \[inline\]
  do\_syscall\_64+0xf3/0x230 arch/x8
---truncated---

## Affected and fixed versions

- Linux: \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 3265aab0736f78bb218200b06b1abb525c316269; \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 316183d58319f191e16503bc2dffa156c4442df2; \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 750e51603395e755537da08f745864c93e3ce741 (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 750e51603395e755537da08f745864c93e3ce741 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-56635. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-56635.md
Affected: Linux >= 8c55facecd7ade835287298ce325f930d888d8ec, < 3265aab0736f78bb218200b06b1abb525c316269; >= 8c55facecd7ade835287298ce325f930d888d8ec, < 316183d58319f191e16503bc2dffa156c4442df2; >= 8c55facecd7ade835287298ce325f930d888d8ec, < 750e51603395e755537da08f745864c93e3ce741; Linux 6.2
Fixed in: Linux 3265aab0736f78bb218200b06b1abb525c316269, Linux 316183d58319f191e16503bc2dffa156c4442df2, Linux 750e51603395e755537da08f745864c93e3ce741

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-56635 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 3265aab0736f78bb218200b06b1abb525c316269; \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 316183d58319f191e16503bc2dffa156c4442df2; \>= 8c55facecd7ade835287298ce325f930d888d8ec, \< 750e51603395e755537da08f745864c93e3ce741; Linux 6.2.

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

Yes. Fixed in Linux 3265aab0736f78bb218200b06b1abb525c316269, Linux 316183d58319f191e16503bc2dffa156c4442df2, Linux 750e51603395e755537da08f745864c93e3ce741. Upgrade Linux to 750e51603395e755537da08f745864c93e3ce741 or later.

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

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/3265aab0736f78bb218200b06b1abb525c316269>
- patch: <https://git.kernel.org/stable/c/316183d58319f191e16503bc2dffa156c4442df2>
- patch: <https://git.kernel.org/stable/c/750e51603395e755537da08f745864c93e3ce741>

## 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-56635>

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