{"id":"CVE-2026-31657","state":"PUBLISHED","title":"batman-adv: hold claim backbone gateways by reference","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbatman-adv: hold claim backbone gateways by reference\n\nbatadv_bla_add_claim() can replace claim->backbone_gw and drop the old\ngateway's last reference while readers still follow the pointer.\n\nThe netlink claim dump path dereferences claim->backbone_gw->orig and\ntakes claim->backbone_gw->crc_lock without pinning the underlying\nbackbone gateway. batadv_bla_check_claim() still has the same naked\npointer access pattern.\n\nReuse batadv_bla_claim_get_backbone_gw() in both readers so they operate\non a stable gateway reference until the read-side work is complete.\nThis keeps the dump and claim-check paths aligned with the lifetime\nrules introduced for the other BLA claim readers.","publishedAt":"2026-04-24T14:45:08.867Z","updatedAt":"2026-10-19T18:56:01.882Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/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":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"5202f071b367ffbc8e279fc7a00db14f5e587f52","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"69d1ce9c72eca91203ffdb8d08bacd511100aec6","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"f4858832ddef2f39f21e30b7226bbcd3c4b2bc96","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"2f55b58b5a0bbed192d60c444a45a49cdf1b545f","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"7962b522222628596ca9ecc8722efc95367aadbd","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"4dee4c0688443aaf5bbec74aa203c851d1d53c35","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"1f2dc36c297d27733f1b380ea644cf15a361bd7b","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"82d8701b2c930d0e96b0dbc9115a218d791cb0d2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/batman-adv/bridge_loop_avoidance.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.5","versionType":"semver"},{"version":"5.10.258","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.209","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.169","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.135","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.82","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.23","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.13","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/batman-adv/bridge_loop_avoidance.c"]}],"references":["https://git.kernel.org/stable/c/5202f071b367ffbc8e279fc7a00db14f5e587f52","https://git.kernel.org/stable/c/69d1ce9c72eca91203ffdb8d08bacd511100aec6","https://git.kernel.org/stable/c/f4858832ddef2f39f21e30b7226bbcd3c4b2bc96","https://git.kernel.org/stable/c/2f55b58b5a0bbed192d60c444a45a49cdf1b545f","https://git.kernel.org/stable/c/7962b522222628596ca9ecc8722efc95367aadbd","https://git.kernel.org/stable/c/4dee4c0688443aaf5bbec74aa203c851d1d53c35","https://git.kernel.org/stable/c/1f2dc36c297d27733f1b380ea644cf15a361bd7b","https://git.kernel.org/stable/c/82d8701b2c930d0e96b0dbc9115a218d791cb0d2"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/31xxx/CVE-2026-31657.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-31657","state":"PUBLISHED","datePublished":"2026-04-24T14:45:08.867Z","dateUpdated":"2026-10-19T18:56:01.882Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-03-09T15:48:24.129Z"},"containers":{"cna":{"title":"batman-adv: hold claim backbone gateways by reference","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbatman-adv: hold claim backbone gateways by reference\n\nbatadv_bla_add_claim() can replace claim->backbone_gw and drop the old\ngateway's last reference while readers still follow the pointer.\n\nThe netlink claim dump path dereferences claim->backbone_gw->orig and\ntakes claim->backbone_gw->crc_lock without pinning the underlying\nbackbone gateway. batadv_bla_check_claim() still has the same naked\npointer access pattern.\n\nReuse batadv_bla_claim_get_backbone_gw() in both readers so they operate\non a stable gateway reference until the read-side work is complete.\nThis keeps the dump and claim-check paths aligned with the lifetime\nrules introduced for the other BLA claim readers."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"5202f071b367ffbc8e279fc7a00db14f5e587f52","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"69d1ce9c72eca91203ffdb8d08bacd511100aec6","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"f4858832ddef2f39f21e30b7226bbcd3c4b2bc96","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"2f55b58b5a0bbed192d60c444a45a49cdf1b545f","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"7962b522222628596ca9ecc8722efc95367aadbd","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"4dee4c0688443aaf5bbec74aa203c851d1d53c35","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"1f2dc36c297d27733f1b380ea644cf15a361bd7b","versionType":"git"},{"version":"23721387c409087fd3b97e274f34d3ddc0970b74","status":"affected","lessThan":"82d8701b2c930d0e96b0dbc9115a218d791cb0d2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/batman-adv/bridge_loop_avoidance.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.5","versionType":"semver"},{"version":"5.10.258","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.209","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.169","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.135","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.82","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.23","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.13","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/batman-adv/bridge_loop_avoidance.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5202f071b367ffbc8e279fc7a00db14f5e587f52"},{"url":"https://git.kernel.org/stable/c/69d1ce9c72eca91203ffdb8d08bacd511100aec6"},{"url":"https://git.kernel.org/stable/c/f4858832ddef2f39f21e30b7226bbcd3c4b2bc96"},{"url":"https://git.kernel.org/stable/c/2f55b58b5a0bbed192d60c444a45a49cdf1b545f"},{"url":"https://git.kernel.org/stable/c/7962b522222628596ca9ecc8722efc95367aadbd"},{"url":"https://git.kernel.org/stable/c/4dee4c0688443aaf5bbec74aa203c851d1d53c35"},{"url":"https://git.kernel.org/stable/c/1f2dc36c297d27733f1b380ea644cf15a361bd7b"},{"url":"https://git.kernel.org/stable/c/82d8701b2c930d0e96b0dbc9115a218d791cb0d2"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable BLA claim state is reachable through received batman-adv mesh packets carrying claim and ARP/DAT traffic, not through a local-only syscall path. In a multi-hop batman-adv deployment, a remote mesh peer can drive the packet paths that update and read the claim.\nAC:L - Although this is a race, the attacker can control both sides by flooding claim ownership changes and packets that trigger the claim readers. No special memory layout or victim timing condition beyond attacker-induced concurrency is required.\nPR:N - The packet receive path has no authentication or privilege check for a peer already able to send batman-adv mesh traffic. The netlink dump path has a CAP_NET_ADMIN-in-netns gate, but the packet-triggered path does not require local privileges.\nUI:N - No user action is required once the affected batman-adv mesh interface and default BLA/DAT features are active. The attacker only needs to send crafted/concurrent network traffic.\nS:U - The impact is within the Linux kernel on the vulnerable host. It does not cross a separate hypervisor, guest/host, or hardware-enforced security authority boundary.\nC:H - This is a use-after-free of a kernel heap `batadv_bla_backbone_gw` object, with readers accessing fields after the object can be freed and reused. Such UAF conditions are defensibly treated as enabling high confidentiality impact.\nI:H - The stale object includes a spinlock and mutable state, so dereferencing and locking freed/reused memory can corrupt kernel heap state. A kernel UAF is also potentially exploitable for write/control-flow primitives.\nA:H - The stale pointer can lead to invalid dereferences or spinlock operations on freed memory, causing kernel oops, panic, or hang. Repeated network traffic can retrigger the condition."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:24:10.743Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.10.258"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"5.15.209"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.1.169"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.6.135"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.12.82"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.18.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"6.19.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.5","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-31657","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:11:37.875669Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T18:56:01.882Z"}}]}}}