CVE-2026-12234

Source
https://cve.org/CVERecord?id=CVE-2026-12234
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-12234.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-12234
Aliases
  • GHSA-fcp3-vrr2-xfjv
Published
2026-08-12T04:39:23Z
Modified
2026-08-28T14:32:39Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H CVSS Calculator
Summary
TOCTOU double-fetch in `zsock_sendmsg`/`recvmsg` userspace verifiers allows kernel-heap out-of-bounds write
Details

The userspace syscall verifiers z_vrfy_zsock_sendmsg() and z_vrfy_zsock_recvmsg() in subsys/net/lib/sockets/sockets.c snapshot the caller-supplied struct net_msghdr into a kernel-side copy with k_usermode_from_copy(), but then re-read the still-live user struct for subsequent decisions. The kernel iovec shadow buffer is sized from one read of msg->msg_iovlen, while the population loop is bounded by a second, live read of the same field.

Because msg points into ordinary user memory, a cooperating second thread in the same memory domain can inflate msg->msg_iovlen in the window between the sizing read and the loop test (a classic double-fetch / TOCTOU). The population loop then iterates past the number of net_iovec slots actually allocated, writing attacker-influenced iov_base/iov_len values beyond the end of the kernel-heap shadow buffer. The recvmsg verifier has the same defect on both its inbound and result write-back loops.

The code is reachable from an unprivileged user thread whenever CONFIG_USERSPACE is enabled and the zsock_sendmsg/zsock_recvmsg syscalls are available. A successful race corrupts kernel-managed heap memory across the user-to-kernel privilege boundary, yielding a local privilege-escalation primitive or, at minimum, a kernel-fault denial of service. The fix copies the header once and derives every size, bound, and gate from the snapshot, copying each iovec entry atomically so its base and length can no longer be raced apart.

Database specific
{
    "cna_assigner": "zephyr",
    "cwe_ids": [
        "CWE-367"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12234.json"
}
References

Affected packages

Git / github.com/zephyrproject-rtos/zephyr

Affected ranges

Type
GIT
Repo
https://github.com/zephyrproject-rtos/zephyr
Events
Database specific
Show details
{
    "extracted_events": [
        {
            "introduced": "2.3.0"
        },
        {
            "fixed": "4.4.2"
        }
    ],
    "source": [
        "AFFECTED_FIELD",
        "REFERENCES"
    ]
}

Affected versions

v2.*
v2.3.0
v2.4.0
v2.4.0-rc1
v2.4.0-rc2
v2.4.0-rc3
v2.5.0
v2.5.0-rc1
v2.5.0-rc2
v2.5.0-rc3
v2.5.0-rc4
v2.6.0
v2.6.0-rc1
v2.6.0-rc2
v2.6.0-rc3
v2.7.0-rc1
v2.7.0-rc2
v2.7.0-rc3
v2.7.99
v3.*
v3.0.0
v3.0.0-rc1
v3.0.0-rc2
v3.0.0-rc3
v3.1.0
v3.1.0-rc1
v3.1.0-rc2
v3.1.0-rc3
v3.2.0
v3.2.0-rc1
v3.2.0-rc2
v3.2.0-rc3
v3.3.0
v3.3.0-rc1
v3.3.0-rc2
v3.3.0-rc3
v3.4.0
v3.4.0-rc1
v3.4.0-rc2
v3.4.0-rc3
v3.5.0
v3.5.0-rc1
v3.5.0-rc2
v3.5.0-rc3
v3.6.0
v3.6.0-rc1
v3.6.0-rc2
v3.6.0-rc3
v3.7.0
v3.7.0-rc1
v3.7.0-rc2
v3.7.0-rc3
v4.*
v4.0.0
v4.0.0-rc1
v4.0.0-rc2
v4.0.0-rc3
v4.1.0
v4.1.0-rc1
v4.1.0-rc2
v4.1.0-rc3
v4.2.0
v4.2.0-rc1
v4.2.0-rc2
v4.2.0-rc3
v4.3.0
v4.3.0-rc1
v4.3.0-rc2
v4.3.0-rc3
v4.4.0
v4.4.0-rc1
v4.4.0-rc2
v4.4.0-rc3
zephyr-v2.*
zephyr-v2.3.0
zephyr-v2.4.0
zephyr-v2.5.0
zephyr-v2.6.0
zephyr-v3.*
zephyr-v3.0.0
zephyr-v3.1.0
zephyr-v3.2.0
zephyr-v3.3.0
zephyr-v3.4.0
zephyr-v3.5.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-12234.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "function_hash": "251834611044644654704751037432312998859",
            "length": 3145
        },
        "id": "CVE-2026-12234-539e162b",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/zephyrproject-rtos/zephyr/commit/2e0f9cf05be61056ed1a94dab51b832fbad27e2c",
        "target": {
            "file": "subsys/net/lib/sockets/sockets.c",
            "function": "z_vrfy_zsock_recvmsg"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "187464672913409437797727492750405697091",
                "335069756431987646543771528192005923921",
                "131133764298904779200062625482622303956",
                "267789151858641903513848821511197340446",
                "203770667079704899234724903658806650768",
                "212898391643297145398865459196455961768",
                "140830397437804009056229862005252766434",
                "251266156996644497975716912361380935143",
                "67746980195272729677441193179883942419",
                "333292832343653229616232936414497554987",
                "301597436437203747117369966177930261159",
                "221096410844053561989392228153655495385",
                "226227886048056513630121661788392121206",
                "105765048964617961786448467955956131268",
                "98739492979253431469676650264182178694",
                "275160077092617668242427992814922229765",
                "65871956756358767669643949471808605448",
                "215016164978738948164982863648437466081",
                "299165068830046432172371999898705041689",
                "137172372040789432555886314587196187498",
                "230995136645391667455833890262176042987",
                "239158191770228858717608220254927655004",
                "203315274646310048469273139616829534754",
                "297272895391884178446062461272026999617",
                "151206445756390839463897779955149097526",
                "14521265629599285397324853184568972324",
                "199368998207723753565949951885937007870",
                "36218935539341890941946316642583921358",
                "144850697689823401963829697010687980108",
                "2245533170006158378790714082982418340",
                "33786347601500767538015718641051988987",
                "107377602204758236609650834311372205844",
                "5827978942408576887969846988021005105",
                "237838201940617216360625396374041232491",
                "18018233852122097944525937792376847123",
                "19696706055297975555329397524046358522",
                "298455092132270428076491594094788517486",
                "127810938541761957309777684972029953345",
                "88124116584246506537375632138145569706",
                "311679952487058557935002938679127602114",
                "153905442918829590871111735723226644378",
                "59141617215474369756724694443802318295",
                "333618997739284122596550779509172387180",
                "193453776273908018060892541387785786795",
                "93664827129369024613637884240785707669",
                "159551044133536429427604361488281941241",
                "282447616201953158810585031001222271133",
                "123758959944096993959790454654679487984",
                "112563620222200307349861145833932653371",
                "266292547537171331536768300116997234947",
                "166162803909655020794472593713503479118",
                "267899140510633571080516934385204684417",
                "251266156996644497975716912361380935143",
                "67746980195272729677441193179883942419",
                "333292832343653229616232936414497554987",
                "174374825002629001413964225758833284734",
                "336480402811669004696954628768312910768",
                "322232485492140911644667369710104102242",
                "277116551298068784014595581195368909175",
                "105765048964617961786448467955956131268",
                "98739492979253431469676650264182178694",
                "275160077092617668242427992814922229765",
                "26888621006231605335097766997529452149",
                "10475939121756459773554751436128012572",
                "261346938837056994269507951977714543396",
                "60742620776552309540707006913195935802",
                "239158191770228858717608220254927655004",
                "203315274646310048469273139616829534754",
                "297272895391884178446062461272026999617",
                "151206445756390839463897779955149097526",
                "14521265629599285397324853184568972324",
                "199368998207723753565949951885937007870",
                "36218935539341890941946316642583921358",
                "20177560201134819458708561568095008338",
                "112843744882393763169850602182204071035",
                "152236913976531222154266715028121382099",
                "240534574239446058576297032910995514043",
                "212772095130697060308579970608534999096",
                "5987277488936066660039094705927906720",
                "83037707395043305218265311329786247711",
                "282139842824203299988256952469391869092",
                "142374180868286918359200030584215862282",
                "154892499027780234939666670382591110898",
                "18018233852122097944525937792376847123",
                "19696706055297975555329397524046358522",
                "258682628659065289315922818305890750927",
                "298050537944679487824794611470177142691",
                "255793566379872129659118745893902605079",
                "284455233673021324985460622000354597460",
                "65997347603445499689192840467500542050",
                "237448983821479582633548167211332973510",
                "26623576603850688928635777303234866692",
                "158690282412312059506351959876077045034",
                "154005134567987929106002178260687493189",
                "19526093445726254721027195519425499205",
                "34469158646516231668785815412140669132",
                "81774942318786338572090446953068058156",
                "102278999244017859506062252790156802597",
                "245089509329542776812274456617581210999",
                "171313708620537292945205823083775213478",
                "175416370480907911051837021750487355141",
                "101191511649319654267935804728511718973",
                "197300399947919286371190309571040758894",
                "93976706246687380974945978112487744114",
                "284977432417977080399356684622914199339",
                "184558178843106452057239785391131039289",
                "266137088393466365253953594576342515212",
                "193863127539781899921541512341185925103",
                "302353668777585774990331014416930379269",
                "64920461065597743671663098323120348761",
                "262539966426232162374485815881954356658",
                "122192269167469085926162591176292845368",
                "97457991615415872469581391909872738665",
                "202446731224555273678350943717516219765",
                "99522927673297235106634637926905089147",
                "259884107339389440219265020035696879857",
                "100339521194810710378446395204937365361",
                "75525037238172325898032414156448619920",
                "152597817324454884418342188113589871179",
                "285198439350033942461921016404482554785",
                "267279140563601414865950236842045359443",
                "317339874385807107414841972294617604248",
                "322128517102943810759205942469683661602",
                "326369754159783902414115783160066943374",
                "108664042742109223833398154475008192971",
                "95976565688157859841288907099526872300",
                "320678641779130776499885956859959900872",
                "143018349616676639928466558212434729637",
                "255419307707305759375942404922717789093",
                "51903073592816891552340266809685637564",
                "254965979704825979794513990067192052454",
                "84127993406432437278792256657332372774"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2026-12234-6f0292ec",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/zephyrproject-rtos/zephyr/commit/2e0f9cf05be61056ed1a94dab51b832fbad27e2c",
        "target": {
            "file": "subsys/net/lib/sockets/sockets.c"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "function_hash": "159319577011055015143907594150441564952",
            "length": 1744
        },
        "id": "CVE-2026-12234-aedebddc",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/zephyrproject-rtos/zephyr/commit/2e0f9cf05be61056ed1a94dab51b832fbad27e2c",
        "target": {
            "file": "subsys/net/lib/sockets/sockets.c",
            "function": "z_vrfy_zsock_sendmsg"
        }
    }
]
vanir_signatures_modified
"2026-08-28T14:32:39Z"