{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39827","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.140Z","datePublished":"2025-09-16T13:00:25.555Z","dateUpdated":"2026-08-05T12:05:29.203Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:05:29.203Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: rose: include node references in rose_neigh refcount\n\nCurrent implementation maintains two separate reference counting\nmechanisms: the 'count' field in struct rose_neigh tracks references from\nrose_node structures, while the 'use' field (now refcount_t) tracks\nreferences from rose_sock.\n\nThis patch merges these two reference counting systems using 'use' field\nfor proper reference management. Specifically, this patch adds incrementing\nand decrementing of rose_neigh->use when rose_neigh->count is incremented\nor decremented.\n\nThis patch also modifies rose_rt_free(), rose_rt_device_down() and\nrose_clear_route() to properly release references to rose_neigh objects\nbefore freeing a rose_node through rose_remove_node().\n\nThese changes ensure rose_neigh structures are properly freed only when\nall references, including those from rose_node structures, are released.\nAs a result, this resolves a slab-use-after-free issue reported by Syzbot."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The dangling `rose_node->neighbour[]` entries are consumed by `rose_route_frame()` → `rose_get_neigh(..., route_frame=1)` and `rose_rx_call_request()`, which run entirely on ROSE frames received from unauthenticated AX.25 peers. AX.25 rides radio links, KISS/serial TNCs, or bpqether (ETH_P_BPQ) on the local Ethernet segment, so the attacker must be link-adjacent rather than internet-routable.\nAC:L - The attacker drives both sides — flooding CALL_REQUEST/CLEAR_REQUEST frames to force the frame-driven `rose_neigh_put()` paths in `rose_in.c`/`rose_link_failed()` while route/device churn tears down `rose_node`s that never held a `use` reference — and per guidance a use-after-free the attacker creates is Low.\nPR:N - ROSE and AX.25 have no authentication, so a peer injecting frames on the segment needs no credentials to reach `rose_route_frame()`/`rose_rx_call_request()` and dereference the freed `rose_neigh`; unprivileged local `connect()` and `/proc/net/rose_nodes` reach the same stale pointers.\nUI:N - Only received frames and ordinary ROSE connection/route churn on a host with ROSE routing configured are needed; no local user has to open a file, mount anything, or take any other action.\nS:U - The corruption is confined to kernel heap objects within the kernel's own security authority, with no VM, IOMMU, or sandbox boundary crossed.\nC:H - The freed `rose_neigh` slot is demonstrably recycled by unrelated kmalloc allocations (KASAN shows the slot reused by kernfs buffers), so an attacker can spray controlled data and have the kernel read it back through `node->neighbour[i]`, `rose->neighbour`, and `rose_route->neigh1/2`, yielding kernel memory disclosure.\nI:H - `rose_neigh_hold()`/`rose_neigh_put()` on the dangling pointer perform refcount read-modify-writes into a reclaimed object, and stale `rose->neighbour`/`rose_route->neigh` plus the object's embedded `timer_list` function pointers and `sk_buff_head` give write and double-free primitives with plausible control-flow hijack.\nA:H - The freed neighbour still has armed `ftimer`/`t0timer` and live pointers from routes, nodes and sockets, so the UAF reliably produces a kernel oops/panic — as syzbot reproduced thousands of times — and can be re-triggered at will."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/rose/rose_route.c"],"versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"4cce478c3e82a5fc788d72adb2f4c4e983997639","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"9c547c8eee9d1cf6e744611d688b9f725cf9a115","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"d7563b456ed44151e1a82091d96f60166daea89b","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"384210cceb1873a4c8218b27ba0745444436b728","status":"affected","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","lessThan":"da9c9c877597170b929a6121a68dcd3dd9a80f45","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/rose/rose_route.c"],"versions":[{"version":"2.6.12","status":"affected"},{"version":"0","lessThan":"2.6.12","status":"unaffected","versionType":"semver"},{"version":"6.1.150","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.104","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.45","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.5","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","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":"2.6.12","versionEndExcluding":"6.1.150"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.6.104"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.12.45"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.16.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.17"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/4cce478c3e82a5fc788d72adb2f4c4e983997639"},{"url":"https://git.kernel.org/stable/c/9c547c8eee9d1cf6e744611d688b9f725cf9a115"},{"url":"https://git.kernel.org/stable/c/d7563b456ed44151e1a82091d96f60166daea89b"},{"url":"https://git.kernel.org/stable/c/384210cceb1873a4c8218b27ba0745444436b728"},{"url":"https://git.kernel.org/stable/c/da9c9c877597170b929a6121a68dcd3dd9a80f45"}],"title":"net: rose: include node references in rose_neigh refcount","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"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T17:43:48.138Z"}},{"x_adpType":"supplier","providerMetadata":{"orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","shortName":"siemens-SADP","dateUpdated":"2026-07-14T12:42:59.741Z"},"affected":[{"vendor":"Siemens","product":"SIMATIC CN 4100","versions":[{"status":"affected","version":"0","lessThan":"V5.0","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","versions":[{"status":"affected","version":"V3.1.6","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","versions":[{"status":"affected","version":"V3.1.6","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","versions":[{"status":"affected","version":"V3.1.6","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","versions":[{"status":"affected","version":"V3.1.6","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","versions":[{"status":"affected","version":"V3.1.6","lessThan":"*","versionType":"custom"}],"defaultStatus":"unknown"}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html"}]}]}}