CVE-2025-38464

Source
https://cve.org/CVERecord?id=CVE-2025-38464
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38464.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38464
Downstream
Related
Published
2025-07-25T15:27:46.708Z
Modified
2026-03-12T02:14:32.713074Z
Summary
tipc: Fix use-after-free in tipc_conn_close().
Details

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

tipc: Fix use-after-free in tipcconnclose().

syzbot reported a null-ptr-deref in tipcconnclose() during netns dismantle. [0]

tipctopsrvstop() iterates tipcnet(net)->topsrv->connidr and calls tipcconnclose() for each tipc_conn.

The problem is that tipcconnclose() is called after releasing the IDR lock.

At the same time, there might be tipcconnrecvwork() running and it could call tipcconnclose() for the same tipcconn and release its last ->kref.

Once we release the IDR lock in tipctopsrvstop(), there is no guarantee that the tipc_conn is alive.

Let's hold the ref before releasing the lock and put the ref after tipcconnclose() in tipctopsrvstop().

Read of size 8 at addr ffff888099305a08 by task kworker/u4:3/435

CPU: 0 PID: 435 Comm: kworker/u4:3 Not tainted 4.19.204-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dumpstack lib/dumpstack.c:77 [inline] dumpstack+0x1fc/0x2ef lib/dumpstack.c:118 printaddressdescription.cold+0x54/0x219 mm/kasan/report.c:256 kasanreporterror.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] _asanreportload8noabort+0x88/0x90 mm/kasan/report.c:433 tipcconnclose+0x122/0x140 net/tipc/topsrv.c:165 tipctopsrvstop net/tipc/topsrv.c:701 [inline] tipctopsrvexitnet+0x27b/0x5c0 net/tipc/topsrv.c:722 opsexitlist+0xa5/0x150 net/core/netnamespace.c:153 cleanupnet+0x3b4/0x8b0 net/core/netnamespace.c:553 processonework+0x864/0x1570 kernel/workqueue.c:2153 workerthread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 retfromfork+0x24/0x30 arch/x86/entry/entry64.S:415

Allocated by task 23: kmemcachealloctrace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] tipcconnalloc+0x43/0x4f0 net/tipc/topsrv.c:192 tipctopsrvaccept+0x1b5/0x280 net/tipc/topsrv.c:470 processonework+0x864/0x1570 kernel/workqueue.c:2153 workerthread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 retfromfork+0x24/0x30 arch/x86/entry/entry_64.S:415

Freed by task 23: __cachefree mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 tipcconnkrefrelease net/tipc/topsrv.c:150 [inline] krefput include/linux/kref.h:70 [inline] connput+0x2cd/0x3a0 net/tipc/topsrv.c:155 processonework+0x864/0x1570 kernel/workqueue.c:2153 workerthread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 retfromfork+0x24/0x30 arch/x86/entry/entry64.S:415

The buggy address belongs to the object at ffff888099305a00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff888099305a00, ffff888099305c00) The buggy address belongs to the page: page:ffffea000264c140 count:1 mapcount:0 mapping:ffff88813bff0940 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00028b6b88 ffffea0002cd2b08 ffff88813bff0940 raw: 0000000000000000 ffff888099305000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected

Memory state around the buggy address: ffff888099305900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099305980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc

ffff888099305a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888099305a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888099305b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38464.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c5fa7b3cf3cb22e4ac60485fc2dc187fe012910f
Fixed
03dcdd2558e1e55bf843822fe4363dcb48743f2b
Fixed
15a6f4971e2f157d57e09ea748d1fbc714277aa4
Fixed
dab8ded2e5ff41012a6ff400b44dbe76ccf3592a
Fixed
1dbf7cd2454a28b1da700085b99346b5445aeabb
Fixed
be4b8392da7978294f2f368799d29dd509fb6c4d
Fixed
50aa2d121bc2cfe2d825f8a331ea75dfaaab6a50
Fixed
3b89e17b2fd64012682bed158d9eb3d2e96dec42
Fixed
667eeab4999e981c96b447a4df5f20bdf5c26f13

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38464.json"