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: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel’s CAN raw socket driver performs a read‑modify‑write on a shared bitfield when updating socket flags. Because this operation lacks proper locking, concurrent invocations of raw_setsockopt() can interleave and corrupt kernel state or produce inconsistent flag values. The weakness is a classic race condition tied to the use of bitfields for flag storage.

Affected Systems

All Linux kernel releases prior to the commit that introduced locking for raw CAN socket flags are affected. The commit that implements the fix is 890e5198a6e5, which adds a wrapper and locking around raw_setsockopt() to serialize concurrent access.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity. EPSS is <1%, and the vulnerability is not listed in CISA KEV. The race condition requires concurrent access to the raw CAN socket interface, typically available to users with the ability to open multiple sockets locally. No public exploitation data is available, and the risk is mainly limited to systems running unpatched kernels where privileged access is possible.

Generated by OpenCVE AI on August 14, 2026 at 01:07 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update kernel to a release that includes commit 890e5198a6e5, which adds locking to raw socket flag handling.
  • If an immediate kernel upgrade is not possible, cherry‑pick the commit that adds raw_setsockopt_locked() and associated protection from the provided git references into the current kernel source, rebuild, and install.
  • If disabling raw CAN sockets is feasible, block or restrict the device or socket interface for untrusted users via udev rules or policy settings to mitigate the race condition pending an update.

Generated by OpenCVE AI on August 14, 2026 at 01:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 13 Aug 2026 23:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Thu, 13 Aug 2026 04:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-362

Wed, 12 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-414
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


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-17T05:04:34.632Z

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

Link: CVE-2026-68387

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-10T13:20:31.950

Modified: 2026-08-17T06:17:47.277

Link: CVE-2026-68387

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-10T12:04:06Z

Links: CVE-2026-68387 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T01:15:17Z

Weaknesses