{"api_version":"1","generated_at":"2026-10-26T13:01:12+00:00","cve":"CVE-2026-68387","urls":{"html":"https://cve.report/CVE-2026-68387","api":"https://cve.report/api/cve/CVE-2026-68387.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-68387","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-68387"},"summary":{"title":"can: raw: add locking for raw flags bitfield","description":"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]","state":"PUBLISHED","assigner":"Linux","published_at":"2026-08-10 13:20:31","updated_at":"2026-08-17 06:17:47"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/00ba4bf8798242253fefc1fa6a78db1d445fd024","name":"https://git.kernel.org/stable/c/00ba4bf8798242253fefc1fa6a78db1d445fd024","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1e5185c090589f4146d728ab36417d8a5419f127","name":"https://git.kernel.org/stable/c/1e5185c090589f4146d728ab36417d8a5419f127","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/57791aab1129c9405f84bb0882de58967d8b44cd","name":"https://git.kernel.org/stable/c/57791aab1129c9405f84bb0882de58967d8b44cd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-68387","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68387","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 890e5198a6e5b238627c245fafea1a92670a86cd 00ba4bf8798242253fefc1fa6a78db1d445fd024 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 890e5198a6e5b238627c245fafea1a92670a86cd 57791aab1129c9405f84bb0882de58967d8b44cd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 890e5198a6e5b238627c245fafea1a92670a86cd 1e5185c090589f4146d728ab36417d8a5419f127 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.42 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.1.6 7.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"68387","cve":"CVE-2026-68387","epss":"0.001730000","percentile":"0.070520000","score_date":"2026-08-17","updated_at":"2026-08-18 00:11:47"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["net/can/raw.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"00ba4bf8798242253fefc1fa6a78db1d445fd024","status":"affected","version":"890e5198a6e5b238627c245fafea1a92670a86cd","versionType":"git"},{"lessThan":"57791aab1129c9405f84bb0882de58967d8b44cd","status":"affected","version":"890e5198a6e5b238627c245fafea1a92670a86cd","versionType":"git"},{"lessThan":"1e5185c090589f4146d728ab36417d8a5419f127","status":"affected","version":"890e5198a6e5b238627c245fafea1a92670a86cd","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["net/can/raw.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.18"},{"lessThan":"6.18","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.42","versionType":"semver"},{"lessThanOrEqual":"7.1.*","status":"unaffected","version":"7.1.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.42","versionStartIncluding":"6.18","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.1.6","versionStartIncluding":"6.18","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2","versionStartIncluding":"6.18","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"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."}]}],"providerMetadata":{"dateUpdated":"2026-08-17T05:04:34.632Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-68387","datePublished":"2026-08-10T12:04:06.326Z","dateReserved":"2026-07-30T09:28:09.388Z","dateUpdated":"2026-08-17T05:04:34.632Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-08-10 13:20:31","lastModifiedDate":"2026-08-17 06:17:47","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"68387","Ordinal":"1","Title":"can: raw: add locking for raw flags bitfield","CVE":"CVE-2026-68387","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"68387","Ordinal":"1","NoteData":"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]","Type":"Description","Title":"can: raw: add locking for raw flags bitfield"}]}}}