{"id":"CVE-2025-38617","state":"PUBLISHED","title":"net/packet: fix a race in packet_set_ring() and packet_notifier()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/packet: fix a race in packet_set_ring() and packet_notifier()\n\nWhen packet_set_ring() releases po->bind_lock, another thread can\nrun packet_notifier() and process an NETDEV_UP event.\n\nThis race and the fix are both similar to that of commit 15fe076edea7\n(\"net/packet: fix a race in packet_bind() and packet_notifier()\").\n\nThere too the packet_notifier NETDEV_UP event managed to run while a\npo->bind_lock critical section had to be temporarily released. And\nthe fix was similarly to temporarily set po->num to zero to keep\nthe socket unhooked until the lock is retaken.\n\nThe po->bind_lock in packet_set_ring and packet_notifier precede the\nintroduction of git history.","publishedAt":"2025-08-22T13:01:23.963Z","updatedAt":"2026-10-15T22:02:26.912Z","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":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"18f13f2a83eb81be349a9757ba2141ff1da9ad73","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7da733f117533e9b2ebbd530a22ae4028713955c","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ba2257034755ae773722f15f4c3ad1dcdad15ca9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7de07705007c7e34995a5599aaab1d23e762d7ca","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"88caf46db8239e6471413d28aabaa6b8bd552805","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"f2e8fcfd2b1bc754920108b7f2cd75082c5a18df","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"e50ccfaca9e3c671cae917dcb994831a859cf588","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"f1791fd7b845bea0ce9674fcf2febee7bc87a893","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"01d3c8417b9c1b884a8a981a3b886da556512f36","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/packet/af_packet.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.4.297","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.241","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.190","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.148","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.102","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.42","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/packet/af_packet.c"]}],"references":["https://git.kernel.org/stable/c/18f13f2a83eb81be349a9757ba2141ff1da9ad73","https://git.kernel.org/stable/c/7da733f117533e9b2ebbd530a22ae4028713955c","https://git.kernel.org/stable/c/ba2257034755ae773722f15f4c3ad1dcdad15ca9","https://git.kernel.org/stable/c/7de07705007c7e34995a5599aaab1d23e762d7ca","https://git.kernel.org/stable/c/88caf46db8239e6471413d28aabaa6b8bd552805","https://git.kernel.org/stable/c/f2e8fcfd2b1bc754920108b7f2cd75082c5a18df","https://git.kernel.org/stable/c/e50ccfaca9e3c671cae917dcb994831a859cf588","https://git.kernel.org/stable/c/f1791fd7b845bea0ce9674fcf2febee7bc87a893","https://git.kernel.org/stable/c/01d3c8417b9c1b884a8a981a3b886da556512f36","https://blog.calif.io/p/a-race-within-a-race-exploiting-cve","https://github.com/google/security-research/pull/339","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38617.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38617","state":"PUBLISHED","datePublished":"2025-08-22T13:01:23.963Z","dateUpdated":"2026-10-15T22:02:26.912Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.029Z"},"containers":{"cna":{"title":"net/packet: fix a race in packet_set_ring() and packet_notifier()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/packet: fix a race in packet_set_ring() and packet_notifier()\n\nWhen packet_set_ring() releases po->bind_lock, another thread can\nrun packet_notifier() and process an NETDEV_UP event.\n\nThis race and the fix are both similar to that of commit 15fe076edea7\n(\"net/packet: fix a race in packet_bind() and packet_notifier()\").\n\nThere too the packet_notifier NETDEV_UP event managed to run while a\npo->bind_lock critical section had to be temporarily released. And\nthe fix was similarly to temporarily set po->num to zero to keep\nthe socket unhooked until the lock is retaken.\n\nThe po->bind_lock in packet_set_ring and packet_notifier precede the\nintroduction of git history."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"18f13f2a83eb81be349a9757ba2141ff1da9ad73","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7da733f117533e9b2ebbd530a22ae4028713955c","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"ba2257034755ae773722f15f4c3ad1dcdad15ca9","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"7de07705007c7e34995a5599aaab1d23e762d7ca","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"88caf46db8239e6471413d28aabaa6b8bd552805","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"f2e8fcfd2b1bc754920108b7f2cd75082c5a18df","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"e50ccfaca9e3c671cae917dcb994831a859cf588","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"f1791fd7b845bea0ce9674fcf2febee7bc87a893","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"01d3c8417b9c1b884a8a981a3b886da556512f36","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/packet/af_packet.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.4.297","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.241","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.190","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.148","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.102","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.42","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/packet/af_packet.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/18f13f2a83eb81be349a9757ba2141ff1da9ad73"},{"url":"https://git.kernel.org/stable/c/7da733f117533e9b2ebbd530a22ae4028713955c"},{"url":"https://git.kernel.org/stable/c/ba2257034755ae773722f15f4c3ad1dcdad15ca9"},{"url":"https://git.kernel.org/stable/c/7de07705007c7e34995a5599aaab1d23e762d7ca"},{"url":"https://git.kernel.org/stable/c/88caf46db8239e6471413d28aabaa6b8bd552805"},{"url":"https://git.kernel.org/stable/c/f2e8fcfd2b1bc754920108b7f2cd75082c5a18df"},{"url":"https://git.kernel.org/stable/c/e50ccfaca9e3c671cae917dcb994831a859cf588"},{"url":"https://git.kernel.org/stable/c/f1791fd7b845bea0ce9674fcf2febee7bc87a893"},{"url":"https://git.kernel.org/stable/c/01d3c8417b9c1b884a8a981a3b886da556512f36"},{"url":"https://blog.calif.io/p/a-race-within-a-race-exploiting-cve"},{"url":"https://github.com/google/security-research/pull/339"}],"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 - Triggering the race requires local syscalls — creating an AF_PACKET socket, calling setsockopt(PACKET_RX_RING), and generating NETDEV_UP/NETDEV_DOWN events via netlink on a bound device. A remote peer can supply the packet data that lands in the freed ring, but cannot set up the race itself.\nAC:L - The attacker controls both sides of the race — one thread issues the PACKET_RX_RING setsockopt while another flaps the bound interface — and the unlocked window in packet_set_ring() spans a full synchronize_net() RCU grace period, making the race trivially winnable and repeatable.\nPR:L - packet_create() requires only ns_capable(net->user_ns, CAP_NET_RAW), which an unprivileged user obtains with `unshare -Urn`, along with CAP_NET_ADMIN in that namespace to create a veth/dummy device and bring it up and down. Containers with Docker's default capability set (which includes NET_RAW) also reach this directly.\nUI:N - The attacker performs every step — socket setup, ring teardown, interface flap, and packet injection — with no action from any other user.\nS:U - The corruption is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - tpacket_rcv() operates on the freed pg_vec pages and stale prb_bdqc pointers, and the reclaimed pages remain user-mmapped via packet_mmap(), giving the attacker a read window onto whatever kernel data is reallocated into them — an arbitrary kernel memory disclosure primitive.\nI:H - skb_copy_bits() and prb_fill_curr_block() write attacker-chosen packet contents and block metadata into freed ring pages after free_pg_vec(), yielding a controlled use-after-free write that is heap-sprayable into privilege escalation.\nA:H - In the simplest outcome, packet_lookup_frame() dereferences a NULL rb->pg_vec and test_bit() a NULL rx_owner_map from softirq context, causing an immediate kernel oops/panic that any local user can trigger at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:03:32.785Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.297"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.241"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.190"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1.148"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.6.102"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.12.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.15.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.16.1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.17"}]}]}],"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":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:40:28.543Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-38617","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:52:21.634455Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:26.912Z"}}]}}}