CVE-2026-68387

can: raw: add locking for raw flags bitfield

Published Aug 10, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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]

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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

Source ID Title
Ubuntu USN Ubuntu USN USN-8887-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8889-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-2 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9003-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9043-1 Linux kernel (NVIDIA) vulnerabilities
History
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'}

Type Values Removed Values Added
Weaknesses CWE-362
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

Type Values Removed Values Added
Weaknesses CWE-362
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
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Aug 17, 2026, 5:04 AM
Reserved
Jul 30, 2026, 9:28 AM
Status
Received
Published
Aug 10, 2026, 1:20 PM
Modified
Aug 17, 2026, 6:17 AM
Severity
Moderate
Public date
Aug 10, 2026, 12:04 PM