{"id":"CVE-2025-38536","state":"PUBLISHED","title":"net: airoha: fix potential use-after-free in airoha_npu_get()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: airoha: fix potential use-after-free in airoha_npu_get()\n\nnp->name was being used after calling of_node_put(np), which\nreleases the node and can lead to a use-after-free bug.\nPreviously, of_node_put(np) was called unconditionally after\nof_find_device_by_node(np), which could result in a use-after-free if\npdev is NULL.\n\nThis patch moves of_node_put(np) after the error check to ensure\nthe node is only released after both the error and success cases\nare handled appropriately, preventing potential resource issues.","publishedAt":"2025-08-16T11:12:28.627Z","updatedAt":"2026-08-05T12:02:44.569Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"23290c7bc190def4e1ca61610992d9b7c32e33f3","status":"affected","lessThan":"df6bf96b41e547e350667bc4c143be53646d070d","versionType":"git"},{"version":"23290c7bc190def4e1ca61610992d9b7c32e33f3","status":"affected","lessThan":"3cd582e7d0787506990ef0180405eb6224fa90a6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/airoha/airoha_npu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.15.8","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/airoha/airoha_npu.c"]}],"references":["https://git.kernel.org/stable/c/df6bf96b41e547e350667bc4c143be53646d070d","https://git.kernel.org/stable/c/3cd582e7d0787506990ef0180405eb6224fa90a6"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38536.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38536","state":"PUBLISHED","datePublished":"2025-08-16T11:12:28.627Z","dateUpdated":"2026-08-05T12:02:44.569Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.024Z"},"containers":{"cna":{"title":"net: airoha: fix potential use-after-free in airoha_npu_get()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: airoha: fix potential use-after-free in airoha_npu_get()\n\nnp->name was being used after calling of_node_put(np), which\nreleases the node and can lead to a use-after-free bug.\nPreviously, of_node_put(np) was called unconditionally after\nof_find_device_by_node(np), which could result in a use-after-free if\npdev is NULL.\n\nThis patch moves of_node_put(np) after the error check to ensure\nthe node is only released after both the error and success cases\nare handled appropriately, preventing potential resource issues."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"23290c7bc190def4e1ca61610992d9b7c32e33f3","status":"affected","lessThan":"df6bf96b41e547e350667bc4c143be53646d070d","versionType":"git"},{"version":"23290c7bc190def4e1ca61610992d9b7c32e33f3","status":"affected","lessThan":"3cd582e7d0787506990ef0180405eb6224fa90a6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/airoha/airoha_npu.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.15.8","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/airoha/airoha_npu.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/df6bf96b41e547e350667bc4c143be53646d070d"},{"url":"https://git.kernel.org/stable/c/3cd582e7d0787506990ef0180405eb6224fa90a6"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached through the rtnetlink/tc flower hardware-offload configuration path (`ndo_setup_tc` → `airoha_ppe_setup_tc_block_cb`), which requires local access to issue netlink messages on the host. No remote peer data reaches `airoha_npu_get()`.\nAC:L - On an affected system the attacker triggers the faulty error path deterministically and repeatedly with a single `tc filter add ... flower` command — there is no race to win and no memory layout the attacker must guess to reach the dangling dereference.\nPR:L - Configuring tc clsact/flower offload on the GDM port requires CAP_NET_ADMIN, but the airoha netdevs are not netns-local and can be moved into a network namespace, where an unprivileged user obtains CAP_NET_ADMIN via `unshare -Urn`, so basic local user privileges suffice.\nUI:N - The attacker performs the entire sequence themselves via netlink; no victim action, no mount, and no interaction from another user is needed.\nS:U - The use-after-free occurs in kernel memory and its impact is confined to the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed `struct device_node` is dereferenced and the string at `np->name` is copied into the kernel log, so reallocated heap contents can be disclosed to userspace via dmesg — a use-after-free read primitive over kernel memory.\nI:H - Use-after-free of a slab object whose lifetime the attacker can influence through repeated triggering and heap grooming is treatable as a memory-corruption primitive; per kernel scoring practice a UAF is rated High for integrity.\nA:H - Dereferencing the released `device_node` and following its `name` pointer can fault on freed or unmapped memory, producing a kernel oops/panic on an embedded router with no recovery path."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:02:44.569Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.15.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}