# CVE-2026-31396: net: macb: fix use-after-free access to PTP clock

> 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.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-04-03T15:16:00.579Z
- **Modified:** 2026-11-10T13:18:50.640Z

## Who should check

- Anyone running Linux \>= c2594d804d5c8033861d44840673d852d98508c1, \< 8820ffe0975fd2efbe50453e9179c8e1c33a13d3; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 6b757f345eeea87ed5d8afd6de35b927a1a57a2f; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 341d01087f821aa0f165fb1ffc8bfe4e50776da7; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 5653af416a48f6c18f9626ae9df96f814f45ff34; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 0bb848d8c64938024e45780f8032f1f67d3a3607; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 1f4714065b2bcbb0a4013fd355b84b848e6cc345; \>= c2594d804d5c8033861d44840673d852d98508c1, \< eb652535e9ec795ef5c1078f7578eaaed755268b; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 8da13e6d63c1a97f7302d342c89c4a56a55c7015
- Anyone running Linux 4.11

## Description

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

net: macb: fix use-after-free access to PTP clock

PTP clock is registered on every opening of the interface and destroyed on
every closing.  However it may be accessed via get\_ts\_info ethtool call
which is possible while the interface is just present in the kernel.

BUG: KASAN: use-after-free in ptp\_clock\_index+0x47/0x50 drivers/ptp/ptp\_clock.c:426
Read of size 4 at addr ffff8880194345cc by task syz.0.6/948

CPU: 1 PID: 948 Comm: syz.0.6 Not tainted 6.1.164+ \#109
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
 dump\_stack\_lvl+0x8d/0xba lib/dump\_stack.c:106
 print\_address\_description mm/kasan/report.c:316 \[inline\]
 print\_report+0x17f/0x496 mm/kasan/report.c:420
 kasan\_report+0xd9/0x180 mm/kasan/report.c:524
 ptp\_clock\_index+0x47/0x50 drivers/ptp/ptp\_clock.c:426
 gem\_get\_ts\_info+0x138/0x1e0 drivers/net/ethernet/cadence/macb\_main.c:3349
 macb\_get\_ts\_info+0x68/0xb0 drivers/net/ethernet/cadence/macb\_main.c:3371
 \_\_ethtool\_get\_ts\_info+0x17c/0x260 net/ethtool/common.c:558
 ethtool\_get\_ts\_info net/ethtool/ioctl.c:2367 \[inline\]
 \_\_dev\_ethtool net/ethtool/ioctl.c:3017 \[inline\]
 dev\_ethtool+0x2b05/0x6290 net/ethtool/ioctl.c:3095
 dev\_ioctl+0x637/0x1070 net/core/dev\_ioctl.c:510
 sock\_do\_ioctl+0x20d/0x2c0 net/socket.c:1215
 sock\_ioctl+0x577/0x6d0 net/socket.c:1320
 vfs\_ioctl fs/ioctl.c:51 \[inline\]
 \_\_do\_sys\_ioctl fs/ioctl.c:870 \[inline\]
 \_\_se\_sys\_ioctl fs/ioctl.c:856 \[inline\]
 \_\_x64\_sys\_ioctl+0x18c/0x210 fs/ioctl.c:856
 do\_syscall\_x64 arch/x86/entry/common.c:46 \[inline\]
 do\_syscall\_64+0x35/0x80 arch/x86/entry/common.c:76
 entry\_SYSCALL\_64\_after\_hwframe+0x6e/0xd8
 \</TASK\>

Allocated by task 457:
 kmalloc include/linux/slab.h:563 \[inline\]
 kzalloc include/linux/slab.h:699 \[inline\]
 ptp\_clock\_register+0x144/0x10e0 drivers/ptp/ptp\_clock.c:235
 gem\_ptp\_init+0x46f/0x930 drivers/net/ethernet/cadence/macb\_ptp.c:375
 macb\_open+0x901/0xd10 drivers/net/ethernet/cadence/macb\_main.c:2920
 \_\_dev\_open+0x2ce/0x500 net/core/dev.c:1501
 \_\_dev\_change\_flags+0x56a/0x740 net/core/dev.c:8651
 dev\_change\_flags+0x92/0x170 net/core/dev.c:8722
 do\_setlink+0xaf8/0x3a80 net/core/rtnetlink.c:2833
 \_\_rtnl\_newlink+0xbf4/0x1940 net/core/rtnetlink.c:3608
 rtnl\_newlink+0x63/0xa0 net/core/rtnetlink.c:3655
 rtnetlink\_rcv\_msg+0x3c6/0xed0 net/core/rtnetlink.c:6150
 netlink\_rcv\_skb+0x15d/0x430 net/netlink/af\_netlink.c:2511
 netlink\_unicast\_kernel net/netlink/af\_netlink.c:1318 \[inline\]
 netlink\_unicast+0x6d7/0xa30 net/netlink/af\_netlink.c:1344
 netlink\_sendmsg+0x97e/0xeb0 net/netlink/af\_netlink.c:1872
 sock\_sendmsg\_nosec net/socket.c:718 \[inline\]
 \_\_sock\_sendmsg+0x14b/0x180 net/socket.c:730
 \_\_sys\_sendto+0x320/0x3b0 net/socket.c:2152
 \_\_do\_sys\_sendto net/socket.c:2164 \[inline\]
 \_\_se\_sys\_sendto net/socket.c:2160 \[inline\]
 \_\_x64\_sys\_sendto+0xdc/0x1b0 net/socket.c:2160
 do\_syscall\_x64 arch/x86/entry/common.c:46 \[inline\]
 do\_syscall\_64+0x35/0x80 arch/x86/entry/common.c:76
 entry\_SYSCALL\_64\_after\_hwframe+0x6e/0xd8

Freed by task 938:
 kasan\_slab\_free include/linux/kasan.h:177 \[inline\]
 slab\_free\_hook mm/slub.c:1729 \[inline\]
 slab\_free\_freelist\_hook mm/slub.c:1755 \[inline\]
 slab\_free mm/slub.c:3687 \[inline\]
 \_\_kmem\_cache\_free+0xbc/0x320 mm/slub.c:3700
 device\_release+0xa0/0x240 drivers/base/core.c:2507
 kobject\_cleanup lib/kobject.c:681 \[inline\]
 kobject\_release lib/kobject.c:712 \[inline\]
 kref\_put include/linux/kref.h:65 \[inline\]
 kobject\_put+0x1cd/0x350 lib/kobject.c:729
 put\_device+0x1b/0x30 drivers/base/core.c:3805
 ptp\_clock\_unregister+0x171/0x270 drivers/ptp/ptp\_clock.c:391
 gem\_ptp\_remove+0x4e/0x1f0 drivers/net/ethernet/cadence/macb\_ptp.c:404
 macb\_close+0x1c8/0x270 drivers/net/ethernet/cadence/macb\_main.c:2966
 \_\_dev\_close\_many+0x1b9/0x310 net/core/dev.c:1585
 \_\_dev\_close net/core/dev.c:1597 \[inline\]
 \_\_dev\_change\_flags+0x2bb/0x740 net/core/dev.c:8649
 dev\_change\_fl
---truncated---

## Affected and fixed versions

- Linux: \>= c2594d804d5c8033861d44840673d852d98508c1, \< 8820ffe0975fd2efbe50453e9179c8e1c33a13d3; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 6b757f345eeea87ed5d8afd6de35b927a1a57a2f; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 341d01087f821aa0f165fb1ffc8bfe4e50776da7; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 5653af416a48f6c18f9626ae9df96f814f45ff34; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 0bb848d8c64938024e45780f8032f1f67d3a3607; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 1f4714065b2bcbb0a4013fd355b84b848e6cc345; \>= c2594d804d5c8033861d44840673d852d98508c1, \< eb652535e9ec795ef5c1078f7578eaaed755268b; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 8da13e6d63c1a97f7302d342c89c4a56a55c7015 (cvelist)
- Linux: 4.11 (cvelist)

## Mitigation

- Upgrade Linux to 8da13e6d63c1a97f7302d342c89c4a56a55c7015 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-31396.md
Affected: Linux >= c2594d804d5c8033861d44840673d852d98508c1, < 8820ffe0975fd2efbe50453e9179c8e1c33a13d3; >= c2594d804d5c8033861d44840673d852d98508c1, < 6b757f345eeea87ed5d8afd6de35b927a1a57a2f; >= c2594d804d5c8033861d44840673d852d98508c1, < 341d01087f821aa0f165fb1ffc8bfe4e50776da7; >= c2594d804d5c8033861d448…
Fixed in: Linux 8820ffe0975fd2efbe50453e9179c8e1c33a13d3, Linux 6b757f345eeea87ed5d8afd6de35b927a1a57a2f, Linux 341d01087f821aa0f165fb1ffc8bfe4e50776da7, Linux 5653af416a48f6c18f9626ae9df96f814f45ff34, Linux 0bb848d8c64938024e45780f8032f1f67d3a3607, Linux 1f4714065b2bcbb0a4013fd355b84b848e6cc345, Linux 8da13…

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-2026-31396 being exploited?

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

### How serious is CVE-2026-31396?

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

### Which versions are affected by CVE-2026-31396?

Linux \>= c2594d804d5c8033861d44840673d852d98508c1, \< 8820ffe0975fd2efbe50453e9179c8e1c33a13d3; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 6b757f345eeea87ed5d8afd6de35b927a1a57a2f; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 341d01087f821aa0f165fb1ffc8bfe4e50776da7; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 5653af416a48f6c18f9626ae9df96f814f45ff34; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 0bb848d8c64938024e45780f8032f1f67d3a3607; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 1f4714065b2bcbb0a4013fd355b84b848e6cc345; \>= c2594d804d5c8033861d44840673d852d98508c1, \< eb652535e9ec795ef5c1078f7578eaaed755268b; \>= c2594d804d5c8033861d44840673d852d98508c1, \< 8da13e6d63c1a97f7302d342c89c4a56a55c7015; Linux 4.11.

### Is there a fix for CVE-2026-31396?

Yes. Fixed in Linux 8820ffe0975fd2efbe50453e9179c8e1c33a13d3, Linux 6b757f345eeea87ed5d8afd6de35b927a1a57a2f, Linux 341d01087f821aa0f165fb1ffc8bfe4e50776da7, Linux 5653af416a48f6c18f9626ae9df96f814f45ff34, Linux 0bb848d8c64938024e45780f8032f1f67d3a3607, Linux 1f4714065b2bcbb0a4013fd355b84b848e6cc345, Linux 8da13e6d63c1a97f7302d342c89c4a56a55c7015. Upgrade Linux to 8da13e6d63c1a97f7302d342c89c4a56a55c7015 or later.

### How do I check if I'm affected by CVE-2026-31396?

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/8820ffe0975fd2efbe50453e9179c8e1c33a13d3>
- patch: <https://git.kernel.org/stable/c/6b757f345eeea87ed5d8afd6de35b927a1a57a2f>
- patch: <https://git.kernel.org/stable/c/341d01087f821aa0f165fb1ffc8bfe4e50776da7>
- patch: <https://git.kernel.org/stable/c/5653af416a48f6c18f9626ae9df96f814f45ff34>
- patch: <https://git.kernel.org/stable/c/0bb848d8c64938024e45780f8032f1f67d3a3607>
- patch: <https://git.kernel.org/stable/c/1f4714065b2bcbb0a4013fd355b84b848e6cc345>
- patch: <https://git.kernel.org/stable/c/eb652535e9ec795ef5c1078f7578eaaed755268b>
- patch: <https://git.kernel.org/stable/c/8da13e6d63c1a97f7302d342c89c4a56a55c7015>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.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-2026-31396>

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