{"id":"CVE-2026-72118","summary":"can: bcm: fix CAN frame rx/tx statistics","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: bcm: fix CAN frame rx/tx statistics\n\nKCSAN detected a data race within the bcm_rx_handler() when two CAN frames\nhave been simultaneously received and processed in a single rx op by two\ndifferent CPUs.\n\nUse atomic operations with (signed) long data types to access the\nstatistics in the hot path to fix the KCSAN complaint.\n\nAdditionally simplify the update and check of statistics overflow by\nusing the atomic operations in separate bcm_update_[rx|tx]_stats()\nfunctions. The rx variant runs under bcm_rx_update_lock to prevent\nraces when resetting the two rx counters; the tx variant runs under\nbcm_tx_lock and only needs to guard its own counter's overflow.\n\nAs the rx path resets its values already at LONG_MAX / 100, there is\nno conflict between the two locking domains (bcm_rx_update_lock vs.\nbcm_tx_lock) even for ops that use both paths.\n\nThe rx statistics update and the frames_filtered update in\nbcm_rx_changed() were previously performed in two separate\nbcm_rx_update_lock sections. For an rx op subscribed on all interfaces\n(ifindex == 0), bcm_rx_handler() can run concurrently on different\nCPUs, so a counter reset by one CPU between these two sections could\nleave frames_filtered larger than frames_abs on another CPU, producing\na bogus (even negative) reduction percentage in procfs. Update the\nstatistics in the same critical section as bcm_rx_changed() to close\nthis gap, which also removes the now unneeded extra lock/unlock pair\naround the traffic_flags calculation.","modified":"2026-08-20T03:54:42.882133440Z","published":"2026-08-15T05:52:57.734Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72118.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/47fca0d1620f2d4fab0677564989ef2b9c225c66"},{"type":"WEB","url":"https://git.kernel.org/stable/c/640acf3566fc897065127001be875ebc5401c218"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8104bcdb2612fdda95169ddc3b49747b2ff98d24"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8b2783172d92edd650de6006ebd1c800937021ab"},{"type":"WEB","url":"https://git.kernel.org/stable/c/970caff5c1a63702c80e08d920256bcb5f88ecc5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/df47f07cdc801a6afe05a486b5a343c3e532a93c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e6c24ba95fc3f1b5e1dcd28b1c6e59ef61a9daa5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fd75884eae40a7be47867cbfc9fc84a80bb8ddb4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72118.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-72118"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ffd980f976e7fd666c2e61bf8ab35107efd11828"},{"fixed":"640acf3566fc897065127001be875ebc5401c218"},{"fixed":"47fca0d1620f2d4fab0677564989ef2b9c225c66"},{"fixed":"fd75884eae40a7be47867cbfc9fc84a80bb8ddb4"},{"fixed":"8b2783172d92edd650de6006ebd1c800937021ab"},{"fixed":"970caff5c1a63702c80e08d920256bcb5f88ecc5"},{"fixed":"8104bcdb2612fdda95169ddc3b49747b2ff98d24"},{"fixed":"df47f07cdc801a6afe05a486b5a343c3e532a93c"},{"fixed":"e6c24ba95fc3f1b5e1dcd28b1c6e59ef61a9daa5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72118.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.6.25"},{"fixed":"5.10.265"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.216"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.183"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.148"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.101"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.42"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.1.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72118.json"}}],"schema_version":"1.9.0"}