Description
In the Linux kernel, the following vulnerability has been resolved:

can: raw: add locking for raw flags bitfield

With commit 890e5198a6e5 ("can: raw: use bitfields to store flags in
struct raw_sock") the formerly separate integer values have been integrated
into a single bitfield. This led to a read-modify-write operation when
changing a flag in raw_setsockopt() which now needs a locking to prevent
concurrent access.

Instead of adding a lock/unlock hell in each of the flag manipulations this
patch introduces a wrapper for a new raw_setsockopt_locked() function
analogue to the isotp_setsockopt[_locked]() approach in net/can/isotp.c

[mkl: use Closes tag instead of Link]
Published: 2026-08-10
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel's CAN raw socket driver suffered from a race condition caused by adding a bitfield for flag storage without proper locking. Concurrent calls to raw_setsockopt() performed read-modify-write operations on the shared bitfield, allowing two threads to interleave in a way that could lose updates or corrupt kernel memory. This flaw could lead to kernel data corruption, service disruption, or potentially privilege escalation if exploited. The weakness is a classic concurrency issue and is aligned with the CWE-362 "Race Condition" vulnerability class.

Affected Systems

All Linux kernel releases prior to the commit that introduced locking for the raw CAN socket flag bitfield are affected. The vulnerability is specific to the plain CAN driver (can: raw). As the commit referenced by the CVE integrates sub‑components of the kernel, the issue spans the Linux kernel as a whole rather than a single module, so any system running an unpatched kernel version is potentially impacted.

Risk and Exploitability

No EPSS score is available, indicating that public exploitation data is not currently in the database, and the vulnerability is not listed in CISA's KEV catalog. Nonetheless, the lack of synchronization creates a medium‑to‑high risk scenario. An attacker with the ability to open multiple raw CAN sockets (for example, running as a privileged user or exploiting local privilege escalation) could trigger the race condition, causing corruption or denial of service. Because the flaw resides in kernel code, its exploitation requires local or specialized access; it is unlikely to be remotely exploitable without additional vectors.

Generated by OpenCVE AI on August 10, 2026 at 16:16 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a kernel version that includes the commit introducing locking for raw CAN socket flags; the most recent patches stack on commit 890e5198a6e5.
  • If an immediate kernel upgrade is not possible, cherry‑pick the relevant patches from the listed git references into the current kernel tree, recompile, and verify the locking functionality. These patches add the raw_setsockopt_locked() wrapper and surrounding protects for flag changes.
  • Consider disabling raw CAN sockets temporarily if the application does not require them, or limiting the reach of raw CAN sockets to trusted users by tightening udev or policy rules, to mitigate the race condition until the kernel can be updated.

Generated by OpenCVE AI on August 10, 2026 at 16:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Mon, 10 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: can: raw: add locking for raw flags bitfield With commit 890e5198a6e5 ("can: raw: use bitfields to store flags in struct raw_sock") the formerly separate integer values have been integrated into a single bitfield. This led to a read-modify-write operation when changing a flag in raw_setsockopt() which now needs a locking to prevent concurrent access. Instead of adding a lock/unlock hell in each of the flag manipulations this patch introduces a wrapper for a new raw_setsockopt_locked() function analogue to the isotp_setsockopt[_locked]() approach in net/can/isotp.c [mkl: use Closes tag instead of Link]
Title can: raw: add locking for raw flags bitfield
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-10T12:04:06.326Z

Reserved: 2026-07-30T09:28:09.388Z

Link: CVE-2026-68387

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T16:30:05Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')