{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2025-38052", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-04-16T04:51:23.979Z", "datePublished": "2025-06-18T09:33:33.427Z", "dateUpdated": "2026-08-05T11:59:06.330Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:59:06.330Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done\n\nSyzbot reported a slab-use-after-free with the following call trace:\n\n ==================================================================\n BUG: KASAN: slab-use-after-free in tipc_aead_encrypt_done+0x4bd/0x510 net/tipc/crypto.c:840\n Read of size 8 at addr ffff88807a733000 by task kworker/1:0/25\n\n Call Trace:\n kasan_report+0xd9/0x110 mm/kasan/report.c:601\n tipc_aead_encrypt_done+0x4bd/0x510 net/tipc/crypto.c:840\n crypto_request_complete include/crypto/algapi.h:266\n aead_request_complete include/crypto/internal/aead.h:85\n cryptd_aead_crypt+0x3b8/0x750 crypto/cryptd.c:772\n crypto_request_complete include/crypto/algapi.h:266\n cryptd_queue_worker+0x131/0x200 crypto/cryptd.c:181\n process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231\n\n Allocated by task 8355:\n kzalloc_noprof include/linux/slab.h:778\n tipc_crypto_start+0xcc/0x9e0 net/tipc/crypto.c:1466\n tipc_init_net+0x2dd/0x430 net/tipc/core.c:72\n ops_init+0xb9/0x650 net/core/net_namespace.c:139\n setup_net+0x435/0xb40 net/core/net_namespace.c:343\n copy_net_ns+0x2f0/0x670 net/core/net_namespace.c:508\n create_new_namespaces+0x3ea/0xb10 kernel/nsproxy.c:110\n unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:228\n ksys_unshare+0x419/0x970 kernel/fork.c:3323\n __do_sys_unshare kernel/fork.c:3394\n\n Freed by task 63:\n kfree+0x12a/0x3b0 mm/slub.c:4557\n tipc_crypto_stop+0x23c/0x500 net/tipc/crypto.c:1539\n tipc_exit_net+0x8c/0x110 net/tipc/core.c:119\n ops_exit_list+0xb0/0x180 net/core/net_namespace.c:173\n cleanup_net+0x5b7/0xbf0 net/core/net_namespace.c:640\n process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231\n\nAfter freed the tipc_crypto tx by delete namespace, tipc_aead_encrypt_done\nmay still visit it in cryptd_queue_worker workqueue.\n\nI reproduce this issue by:\n ip netns add ns1\n ip link add veth1 type veth peer name veth2\n ip link set veth1 netns ns1\n ip netns exec ns1 tipc bearer enable media eth dev veth1\n ip netns exec ns1 tipc node set key this_is_a_master_key master\n ip netns exec ns1 tipc bearer disable media eth dev veth1\n ip netns del ns1\n\nThe key of reproduction is that, simd_aead_encrypt is interrupted, leading\nto crypto_simd_usable() return false. Thus, the cryptd_queue_worker is\ntriggered, and the tipc_crypto tx will be visited.\n\n tipc_disc_timeout\n tipc_bearer_xmit_skb\n tipc_crypto_xmit\n tipc_aead_encrypt\n crypto_aead_encrypt\n // encrypt()\n simd_aead_encrypt\n // crypto_simd_usable() is false\n child = &ctx->cryptd_tfm->base;\n\n simd_aead_encrypt\n crypto_aead_encrypt\n // encrypt()\n cryptd_aead_encrypt_enqueue\n cryptd_aead_enqueue\n cryptd_enqueue_request\n // trigger cryptd_queue_worker\n queue_work_on(smp_processor_id(), cryptd_wq, &cpu_queue->work)\n\nFix this by holding net reference count before encrypt." } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "AV:N - The vulnerable encrypt path is bound to the TIPC network stack and is driven by remote peer traffic — an inbound DSC_REQ_MSG forces an encrypted DSC_RESP_MSG through tipc_crypto_xmit()/tipc_aead_encrypt() before any node is established, and TIPC bearers include IP/UDP media (CONFIG_TIPC_MEDIA_UDP default y), which is routable across the internet.\nAC:L - The attacker controls both sides of the race — flooding discovery/link-protocol traffic keeps many async cryptd encryptions in flight while the namespace teardown that frees tipc_crypto is issued on demand, and the sequence can be retried without limit; on platforms with asynchronous AEAD accelerators the -EINPROGRESS callback path is taken unconditionally rather than being a race at all.\nPR:L - No real root is needed: the TIPC v2 generic-netlink ops carry no GENL_ADMIN_PERM (the only capability check in net/tipc is the legacy compat path), and `unshare -Urn` grants CAP_NET_ADMIN inside a fresh netns for veth/bearer/key setup, with namespace exit performing the free — matching the syzbot trace via ksys_unshare → copy_net_ns → tipc_crypto_start.\nUI:N - The entire sequence (bearer enable, key set, packet flood, namespace teardown) is performed by the attacker; no victim action or cooperation is required.\nS:U - The use-after-free corrupts kernel heap memory within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - The callback reads 8 bytes of freed slab memory (tx->net at crypto.c:840) and then uses tx->stats and that stale struct net pointer; once the ~320-byte kmalloc object is reclaimed with attacker-chosen data, the resulting pointer dereferences give a path to disclose arbitrary kernel memory.\nI:H - A reclaimed tipc_crypto yields a fully attacker-controlled tx->stats, so this_cpu_inc(tx->stats->stat[STAT_ASYNC_OK]) becomes a repeatable arbitrary-address increment, and the controlled struct net * is passed into b->media->send_msg() — both are standard building blocks for kernel privilege escalation.\nA:H - Dereferencing the freed per-netns tipc_crypto from the cryptd worker reliably oopses or panics the kernel, and the trigger can be repeated to keep the system down." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "net/tipc/crypto.c" ], "versions": [ { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "d42ed4de6aba232d946d20653a70f79158a6535b", "status": "affected", "versionType": "git" }, { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "f5c2c4eaaa5a8e7e0685ec031d480e588e263e59", "status": "affected", "versionType": "git" }, { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "b8fcae6d2e93c54cacb8f579a77d827c1c643eb5", "status": "affected", "versionType": "git" }, { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "b19fc1d0be3c3397e5968fe2627f22e7f84673b1", "status": "affected", "versionType": "git" }, { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "689a205cd968a1572ab561b0c4c2d50a10e9d3b0", "status": "affected", "versionType": "git" }, { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "4a0fddc2c0d5c28aec8c262ad4603be0bef1938c", "status": "affected", "versionType": "git" }, { "version": "fc1b6d6de2208774efd2a20bf0daddb02d18b1e0", "lessThan": "e279024617134c94fd3e37470156534d5f2b3472", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "net/tipc/crypto.c" ], "versions": [ { "version": "5.5", "status": "affected" }, { "version": "0", "lessThan": "5.5", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.238", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.185", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.141", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.93", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.31", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.14.9", "lessThanOrEqual": "6.14.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.15", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "5.10.238" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "5.15.185" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "6.1.141" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "6.6.93" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "6.12.31" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "6.14.9" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.5", "versionEndExcluding": "6.15" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/d42ed4de6aba232d946d20653a70f79158a6535b" }, { "url": "https://git.kernel.org/stable/c/f5c2c4eaaa5a8e7e0685ec031d480e588e263e59" }, { "url": "https://git.kernel.org/stable/c/b8fcae6d2e93c54cacb8f579a77d827c1c643eb5" }, { "url": "https://git.kernel.org/stable/c/b19fc1d0be3c3397e5968fe2627f22e7f84673b1" }, { "url": "https://git.kernel.org/stable/c/689a205cd968a1572ab561b0c4c2d50a10e9d3b0" }, { "url": "https://git.kernel.org/stable/c/4a0fddc2c0d5c28aec8c262ad4603be0bef1938c" }, { "url": "https://git.kernel.org/stable/c/e279024617134c94fd3e37470156534d5f2b3472" } ], "title": "net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html" }, { "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T17:33:25.090Z" } } ] } }