{"id":"CVE-2024-40920","state":"PUBLISHED","title":"net: bridge: mst: fix suspicious rcu usage in br_mst_set_state","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: bridge: mst: fix suspicious rcu usage in br_mst_set_state\n\nI converted br_mst_set_state to RCU to avoid a vlan use-after-free\nbut forgot to change the vlan group dereference helper. Switch to vlan\ngroup RCU deref helper to fix the suspicious rcu usage warning.","publishedAt":"2024-07-12T12:25:02.222Z","updatedAt":"2026-08-05T11:34:00.976Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8ca9a750fc711911ef616ceb627d07357b04545e","status":"affected","lessThan":"caaa2129784a04dcade0ea92c12e6ff90bbd23d8","versionType":"git"},{"version":"4488617e5e995a09abe4d81add5fb165674edb59","status":"affected","lessThan":"7caefa2771722e65496d85b62e1dc4442b7d1345","versionType":"git"},{"version":"e43dd2b1ec746e105b7db5f9ad6ef14685a615a4","status":"affected","lessThan":"406bfc04b01ee47e4c626f77ecc7d9f85135b166","versionType":"git"},{"version":"3a7c1661ae1383364cd6092d851f5e5da64d476b","status":"affected","lessThan":"546ceb1dfdac866648ec959cbc71d9525bd73462","versionType":"git"},{"version":"a2b01e65d9ba8af2bb086d3b7288ca53a07249ac","status":"affected","versionType":"git"},{"version":"6.8.12","status":"affected","lessThan":"6.9","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bridge/br_mst.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6.1.93","status":"affected","lessThan":"6.1.95","versionType":"semver"},{"version":"6.6.33","status":"affected","lessThan":"6.6.35","versionType":"semver"},{"version":"6.9.3","status":"affected","lessThan":"6.9.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bridge/br_mst.c"]}],"references":["https://git.kernel.org/stable/c/caaa2129784a04dcade0ea92c12e6ff90bbd23d8","https://git.kernel.org/stable/c/7caefa2771722e65496d85b62e1dc4442b7d1345","https://git.kernel.org/stable/c/406bfc04b01ee47e4c626f77ecc7d9f85135b166","https://git.kernel.org/stable/c/546ceb1dfdac866648ec959cbc71d9525bd73462","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/40xxx/CVE-2024-40920.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-40920","state":"PUBLISHED","datePublished":"2024-07-12T12:25:02.222Z","dateUpdated":"2026-08-05T11:34:00.976Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-12T12:17:45.582Z"},"containers":{"cna":{"title":"net: bridge: mst: fix suspicious rcu usage in br_mst_set_state","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: bridge: mst: fix suspicious rcu usage in br_mst_set_state\n\nI converted br_mst_set_state to RCU to avoid a vlan use-after-free\nbut forgot to change the vlan group dereference helper. Switch to vlan\ngroup RCU deref helper to fix the suspicious rcu usage warning."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8ca9a750fc711911ef616ceb627d07357b04545e","status":"affected","lessThan":"caaa2129784a04dcade0ea92c12e6ff90bbd23d8","versionType":"git"},{"version":"4488617e5e995a09abe4d81add5fb165674edb59","status":"affected","lessThan":"7caefa2771722e65496d85b62e1dc4442b7d1345","versionType":"git"},{"version":"e43dd2b1ec746e105b7db5f9ad6ef14685a615a4","status":"affected","lessThan":"406bfc04b01ee47e4c626f77ecc7d9f85135b166","versionType":"git"},{"version":"3a7c1661ae1383364cd6092d851f5e5da64d476b","status":"affected","lessThan":"546ceb1dfdac866648ec959cbc71d9525bd73462","versionType":"git"},{"version":"a2b01e65d9ba8af2bb086d3b7288ca53a07249ac","status":"affected","versionType":"git"},{"version":"6.8.12","status":"affected","lessThan":"6.9","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bridge/br_mst.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"6.1.93","status":"affected","lessThan":"6.1.95","versionType":"semver"},{"version":"6.6.33","status":"affected","lessThan":"6.6.35","versionType":"semver"},{"version":"6.9.3","status":"affected","lessThan":"6.9.6","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bridge/br_mst.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/caaa2129784a04dcade0ea92c12e6ff90bbd23d8"},{"url":"https://git.kernel.org/stable/c/7caefa2771722e65496d85b62e1dc4442b7d1345"},{"url":"https://git.kernel.org/stable/c/406bfc04b01ee47e4c626f77ecc7d9f85135b166"},{"url":"https://git.kernel.org/stable/c/546ceb1dfdac866648ec959cbc71d9525bd73462"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The buggy dereference is reached from the STP BPDU receive path (`br_stp_rcv` → `br_port_state_selection` → `br_set_state` → `br_mst_set_state`), so an attacker on the same L2 segment can drive port state transitions into it; STP BPDUs use the link-local `01:80:C2:00:00:00` LLC group address and are not routable, so this is adjacent rather than network.\nAC:L - On an MST-enabled bridge running kernel STP the unannotated dereference is hit deterministically on every port state transition, and the attacker drives both sides — flapping BPDUs force repeated transitions while port add/remove concurrently republishes `p->vlgrp` — with no timing window or memory layout that must be won.\nPR:N - STP BPDU processing in `br_stp_rcv()` has no authentication whatsoever — a frame from the segment is accepted on any non-disabled, non-BPDU-guarded port — so the adjacent attacker needs no credentials on the target host.\nUI:N - Port state transitions occur automatically from received BPDUs and from the forward-delay timer; no administrator or user action is needed once the bridge is in MST mode.\nS:U - The faulty dereference, the resulting fault, and the log disclosure are all confined to the kernel that owns the bridge; no VM, IOMMU, or sandbox boundary is crossed.\nC:L - The `lockdep_rcu_suspicious()` report dumps a full kernel backtrace with raw stack and register addresses (as seen in the syzbot trace) into the kernel log, disclosing text and stack layout useful for defeating KASLR; there is no bulk or arbitrary memory read.\nI:N - The defect is a read-side annotation mismatch — no attacker-controlled data is written and no out-of-bounds or freed memory is modified, so no write or control-flow-hijack primitive results.\nA:H - Without the RCU dereference the load of `p->vlgrp` carries no `READ_ONCE()` or dependency ordering, so a softirq reader racing a concurrent `nbp_vlan_flush()`/`nbp_vlan_init()` can traverse `vg->vlan_list` and write `vg->pvid_state` on a NULL or not-yet-published group, oopsing the kernel and taking down the bridging host."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:34:00.976Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.93","versionEndExcluding":"6.1.95"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.33","versionEndExcluding":"6.6.35"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9.3","versionEndExcluding":"6.9.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.8.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/caaa2129784a04dcade0ea92c12e6ff90bbd23d8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/7caefa2771722e65496d85b62e1dc4442b7d1345","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/406bfc04b01ee47e4c626f77ecc7d9f85135b166","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/546ceb1dfdac866648ec959cbc71d9525bd73462","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T21:57:50.802Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-40920","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:05:33.673278Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:03.619Z"}}]}}}