{"id":"CVE-2026-68186","aliases":["CVE-2026-68186"],"related":[],"kind":"vulnerability","state":"published","title":"binfmt_misc: set have_execfd only once the interpreter is opened","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbinfmt_misc: set have_execfd only once the interpreter is opened\n\nload_misc_binary() raises bprm->have_execfd as soon as it sees the 'O'\n(or 'C') flag. This happens well before it opens the interpreter. If\nthat open fails the flag stays set on the bprm. binfmt_misc is at the\nhead of the format list so an interpreter open failure that returns\n-ENOEXEC lets the search fall through to a later format. This means it\nruns the matched binary directly having never staged an interpreter. So\nbprm->executable is NULL while have_execfd falsely claims a descriptor\nis present.\n\nConsequently, begin_new_exec() dereferences the missing executable:\n\n  would_dump(bprm, bprm->executable);\n\nand NULL derefs. Had it not, the hand-off later in the same function\nwould have failed anyway. FD_ADD(0, bprm->executable) rejects a NULL\nfile with -ENOMEM. Both sites are past the point of no return so the\nexec cannot be unwound either way.\n\nThis can be reached by unprivileged users as binfmt_misc can be mounted\nin user namespaces. So a user can register an 'O' entry whose\ninterpreter lives on a FUSE mount, have the FUSE server fail the open\nwith -ENOEXEC and execute a native ELF file that matches the entry.\n\nhave_execfd only means anything alongside the executable it describes\nwhich is not set until the interpreter has been opened and staged.\nSo lets raise it there, next to execfd_creds, which is already set at\nthat point. An open failure now leaves it clear, so the fallback format\nderives credentials from the binary and emits no AT_EXECFD, as it would\nfor any native exec. The argv rewrite load_misc_binary() performs before\nthe open is still not undone. This means the binary sees the interpreter\npath in argv[0] and its own path in argv[1] but that predates this\nchange and only became observable once the exec stopped faulting.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbinfmt_misc: set have_execfd only once the interpreter is opened\n\nload_misc_binary() raises bprm->have_execfd as soon as it sees the 'O'\n(or 'C') flag. This happens well before it opens the interpreter. If\nthat open fails the flag stays set on the bprm. binfmt_misc is at the\nhead of the format list so an interpreter open failure that returns\n-ENOEXEC lets the search fall through to a later format. This means it\nruns the matched binary directly having never staged an interpreter. So\nbprm->executable is NULL while have_execfd falsely claims a descriptor\nis present.\n\nConsequently, begin_new_exec() dereferences the missing executable:\n\n  would_dump(bprm, bprm->executable);\n\nand NULL derefs. Had it not, the hand-off later in the same function\nwould have failed anyway. FD_ADD(0, bprm->executable) rejects a NULL\nfile with -ENOMEM. Both sites are past the point of no return so the\nexec cannot be unwound either way.\n\nThis can be reached by unprivileged users as binfmt_misc can be mounted\nin user namespaces. So a user can register an 'O' entry whose\ninterpreter lives on a FUSE mount, have the FUSE server fail the open\nwith -ENOEXEC and execute a native ELF file that matches the entry.\n\nhave_execfd only means anything alongside the executable it describes\nwhich is not set until the interpreter has been opened and staged.\nSo lets raise it there, next to execfd_creds, which is already set at\nthat point. An open failure now leaves it clear, so the fallback format\nderives credentials from the binary and emits no AT_EXECFD, as it would\nfor any native exec. The argv rewrite load_misc_binary() performs before\nthe open is still not undone. This means the binary sees the interpreter\npath in argv[0] and its own path in argv[1] but that predates this\nchange and only became observable once the exec stopped faulting.","source":"cvelist"}],"published":"2026-08-10T11:59:58.299Z","modified":"2026-11-30T16:13:21.673Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"a8e9e9450df44e9dd529ec5beff283f48f4f4b97","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"a261dc49d99681c9c71f38d16e31812dc3e30412","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"40c09b7a1d4e0a4866042c87c2bd911bb57566c8","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"0f19d54e2524f0bf183b82f365ae4e49b4a2f788","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"2dd0298905e97795a9c5ec30cf5b41975f821632","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"1cd4e9b7967dab48c9f79a00b06ffff7208c0993","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"5ccc99d58f94fad258c9c375715b3974e48620e8","status":"affected"},{"type":"git","introduced":"bc2bf338d54b7aadaed49bb45b9e10d4592b2a46","fixed":"bbf5f639918dc011aaf60aab8480218758ee68c5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.8","status":"unaffected"},{"type":"semver","introduced":"5.10.265","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.216","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.183","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.148","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.101","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.42","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.1.6","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/a8e9e9450df44e9dd529ec5beff283f48f4f4b97","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a261dc49d99681c9c71f38d16e31812dc3e30412","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/40c09b7a1d4e0a4866042c87c2bd911bb57566c8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0f19d54e2524f0bf183b82f365ae4e49b4a2f788","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2dd0298905e97795a9c5ec30cf5b41975f821632","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1cd4e9b7967dab48c9f79a00b06ffff7208c0993","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5ccc99d58f94fad258c9c375715b3974e48620e8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bbf5f639918dc011aaf60aab8480218758ee68c5","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T16:43:58.814Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-68186","url":"https://www.cve.org/CVERecord?id=CVE-2026-68186","licence":"CVE Terms of Use","modified":"2026-11-06T16:45:00.927Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-68186","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68186","licence":"Public domain","modified":"2026-11-30T16:13:21.673Z"}],"updatedAt":"2026-11-30T16:17:20.976Z","epss":{"score":0.00217,"percentile":0.12945,"date":"2026-12-01T12:00:22.000Z"}}