CVE-2025-38734: net/smc: fix UAF on smcsk after smc_listen_out()

Published Sep 5, 2025
·
Updated

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

net/smc: fix UAF on smcsk after smclistenout()

BPF CI testing report a UAF issue:

[ 16.446633] BUG: kernel NULL pointer dereference, address: 000000000000003 0 [ 16.447134] #PF: supervisor read access in kernel mod e [ 16.447516] #PF: errorcode(0x0000) - not-present pag e [ 16.447878] PGD 0 P4D 0 [ 16.448063] Oops: Oops: 0000 [#1] PREEMPT SMP NOPT I [ 16.448409] CPU: 0 UID: 0 PID: 9 Comm: kworker/0:1 Tainted: G OE 6.13.0-rc3-g89e8a75fda73-dirty #4 2 [ 16.449124] Tainted: [O]=OOTMODULE, [E]=UNSIGNEDMODUL E [ 16.449502] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/201 4 [ 16.450201] Workqueue: smchswq smclistenwor k [ 16.450531] RIP: 0010:smclistenwork+0xc02/0x159 0 [ 16.452158] RSP: 0018:ffffb5ab40053d98 EFLAGS: 0001024 6 [ 16.452526] RAX: 0000000000000001 RBX: 0000000000000002 RCX: 000000000000030 0 [ 16.452994] RDX: 0000000000000280 RSI: 00003513840053f0 RDI: 000000000000000 0 [ 16.453492] RBP: ffffa097808e3800 R08: ffffa09782dba1e0 R09: 000000000000000 5 [ 16.453987] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa0978274640 0 [ 16.454497] R13: 0000000000000000 R14: 0000000000000000 R15: ffffa09782d4092 0 [ 16.454996] FS: 0000000000000000(0000) GS:ffffa097bbc00000(0000) knlGS:000000000000000 0 [ 16.455557] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003 3 [ 16.455961] CR2: 0000000000000030 CR3: 0000000102788004 CR4: 0000000000770ef 0 [ 16.456459] PKRU: 5555555 4 [ 16.456654] Call Trace : [ 16.456832] <TASK > [ 16.456989] ? die+0x23/0x7 0 [ 16.457215] ? pagefaultoops+0x180/0x4c 0 [ 16.457508] ? lockacquire+0x3e6/0x249 0 [ 16.457801] ? excpagefault+0x68/0x20 0 [ 16.458080] ? asmexcpagefault+0x26/0x3 0 [ 16.458389] ? smclistenwork+0xc02/0x159 0 [ 16.458689] ? smclistenwork+0xc02/0x159 0 [ 16.458987] ? lockisheldtype+0x8f/0x10 0 [ 16.459284] processonework+0x1ea/0x6d 0 [ 16.459570] workerthread+0x1c3/0x38 0 [ 16.459839] ? pfxworkerthread+0x10/0x1 0 [ 16.460144] kthread+0xe0/0x11 0 [ 16.460372] ? pfxkthread+0x10/0x1 0 [ 16.460640] retfromfork+0x31/0x5 0 [ 16.460896] ? pfxkthread+0x10/0x1 0 [ 16.461166] retfromforkasm+0x1a/0x3 0 [ 16.461453] </TASK > [ 16.461616] Modules linked in: bpftestmod(OE) [last unloaded: bpftestmod(OE) ] [ 16.462134] CR2: 000000000000003 0 [ 16.462380] ---[ end trace 0000000000000000 ]--- [ 16.462710] RIP: 0010:smclistenwork+0xc02/0x1590

The direct cause of this issue is that after smclistenoutconnected(), newclcsock->sk may be NULL since it will releases the smcsk. Therefore, if the application closes the socket immediately after accept, newclcsock->sk can be NULL. A possible execution order could be as follows:

smclistenwork | userspace ----------------------------------------------------------------- locksock(sk) | smclistenoutconnected() | | \- smclistenout | | | \- releasesock | | |- sk->skdataready() | | fd = accept(); | close(fd); | \- socket->sk = NULL; / newclcsock->sk is NULL now / SMCSTATSERVSUCCINC(socknet(newclcsock->sk))

Since smclistenoutconnected() will not fail, simply swapping the order of the code can easily fix this issue.

Affected Software

10 affected componentsFixes available
Linux Linux kernel
Microsoft azl3 kernel 6.6.96.2-2
Microsoft azl3 kernel 6.6.96.2-1
Microsoft cbl2 kernel 5.15.186.1-1
Linux Linux kernel>=4.18<6.6.103
Linux Linux kernel>=6.7<6.12.44
Linux Linux kernel>=6.13<6.16.4
Linux Linux kernel=6.17-rc1
Linux Linux kernel=6.17-rc2
Microsoft azl3 kernel 6.6.96.2-2<6.6.104.2-1
6.6.104.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.6.104.2-1
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch net/smc: fix UAF on smcsk after smc_listen_out()
  3. Compensating control

    Isolate/limit exposure of the affected SMC path by avoiding triggering the race where the application closes the socket immediately after accept (i.e., prevent/serialize the close-after-accept behavior until the kernel fix is applied).

  4. Operational

    Reboot or otherwise reload the running Linux kernel to ensure the UAF fix for net/smc is active (the log shows an actual kernel NULL pointer dereference in smc_listen_work on kernel 6.13.0-rc3-g89e8a75fda73-dirty).

Event History

Sep 5, 2025
CVE Published
via MITRE·05:20 PM
Data Sourced
via MITRE·05:20 PM
DescriptionSeverity
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 7, 2025
Data Sourced
via Microsoft·01:09 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·01:09 AM
SeverityAffected Software
Updated
via Microsoft·08:09 AM
DescriptionSeverityWeakness
Updated
via Microsoft·08:09 AM
SeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38734?

CVE-2025-38734 is classified as a high-severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2025-38734?

To fix CVE-2025-38734, update your Linux kernel to the latest patched version provided by your distribution.

3

What systems are affected by CVE-2025-38734?

CVE-2025-38734 affects all versions of the Linux kernel prior to the fix being applied.

4

What type of vulnerability is CVE-2025-38734?

CVE-2025-38734 is a use-after-free (UAF) vulnerability related to the net/smc component in the Linux kernel.

5

What are the potential impacts of CVE-2025-38734?

Exploitation of CVE-2025-38734 could lead to system crashes or unauthorized access to sensitive data.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203