{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68387","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-07-30T09:28:09.388Z","datePublished":"2026-08-10T12:04:06.326Z","dateUpdated":"2026-08-17T05:04:34.632Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-17T05:04:34.632Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: raw: add locking for raw flags bitfield\n\nWith commit 890e5198a6e5 (\"can: raw: use bitfields to store flags in\nstruct raw_sock\") the formerly separate integer values have been integrated\ninto a single bitfield. This led to a read-modify-write operation when\nchanging a flag in raw_setsockopt() which now needs a locking to prevent\nconcurrent access.\n\nInstead of adding a lock/unlock hell in each of the flag manipulations this\npatch introduces a wrapper for a new raw_setsockopt_locked() function\nanalogue to the isotp_setsockopt[_locked]() approach in net/can/isotp.c\n\n[mkl: use Closes tag instead of Link]"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The race is driven entirely through local syscalls on an AF_CAN/CAN_RAW socket — one thread calling bind() while another calls setsockopt(SOL_CAN_RAW, CAN_RAW_LOOPBACK). No network packet is needed to trigger the corruption, so the attack vector is local.\nAC:L - The attacker controls both sides of the race, holding the same fd and issuing concurrent bind()/setsockopt() from two threads it pins itself, and can loop the attempt indefinitely until the unlocked read-modify-write on the shared bitfield word loses the update to ro->bound. No condition lies outside attacker control.\nPR:L - can_create() and raw_proto impose no capability check, so any unprivileged local user can open a CAN_RAW socket; a user namespace (unshare -Urn) additionally lets an unprivileged attacker create a vcan device to bind to, so only basic local user access is required.\nUI:N - The attacker performs every step itself — creating the socket, binding, and racing setsockopt — with no victim action or cooperation needed at any point.\nS:U - The corruption stays within the kernel's own memory and security authority, giving standard local privilege escalation rather than crossing a VM, IOMMU, or sandbox boundary.\nC:H - Losing the ro->bound update makes raw_release() skip raw_disable_allfilters(), leaving a receiver entry holding a raw sk pointer that can_rx_register() never refcounted; later frames drive raw_rcv() to read fd_frames, xl_frames, raw_vcid_opts and count out of freed memory, and the resulting UAF lets an attacker groom the freed slab to disclose kernel memory.\nI:H - The same dangling socket gives write primitives: raw_rcv() writes through this_cpu_ptr(ro->uniq) into already free_percpu'd memory and calls sock_queue_rcv_skb() on the freed sock, so a heap-sprayed replacement object yields attacker-influenced writes and control-flow hijack potential.\nA:H - The use-after-free reliably oopses or panics the kernel when CAN frames hit the stale receiver entry, and the clobber also skips netdev_put() (leaking a device reference that hangs unregistration) and can drive can_rx_unregister() into its \"receive list entry not found\" error path."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/raw.c"],"versions":[{"version":"890e5198a6e5b238627c245fafea1a92670a86cd","lessThan":"00ba4bf8798242253fefc1fa6a78db1d445fd024","status":"affected","versionType":"git"},{"version":"890e5198a6e5b238627c245fafea1a92670a86cd","lessThan":"57791aab1129c9405f84bb0882de58967d8b44cd","status":"affected","versionType":"git"},{"version":"890e5198a6e5b238627c245fafea1a92670a86cd","lessThan":"1e5185c090589f4146d728ab36417d8a5419f127","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/raw.c"],"versions":[{"version":"6.18","status":"affected"},{"version":"0","lessThan":"6.18","status":"unaffected","versionType":"semver"},{"version":"6.18.42","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.1.6","lessThanOrEqual":"7.1.*","status":"unaffected","versionType":"semver"},{"version":"7.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.2"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/00ba4bf8798242253fefc1fa6a78db1d445fd024"},{"url":"https://git.kernel.org/stable/c/57791aab1129c9405f84bb0882de58967d8b44cd"},{"url":"https://git.kernel.org/stable/c/1e5185c090589f4146d728ab36417d8a5419f127"}],"title":"can: raw: add locking for raw flags bitfield","x_generator":{"engine":"bippy-1.2.0"}}}}