CVE-2026-68186: binfmt_misc: set have_execfd only once the interpreter is opened
In the Linux kernel, the following vulnerability has been resolved:
binfmtmisc: set haveexecfd only once the interpreter is opened
loadmiscbinary() raises bprm->haveexecfd as soon as it sees the 'O' (or 'C') flag. This happens well before it opens the interpreter. If that open fails the flag stays set on the bprm. binfmtmisc is at the head of the format list so an interpreter open failure that returns -ENOEXEC lets the search fall through to a later format. This means it runs the matched binary directly having never staged an interpreter. So bprm->executable is NULL while haveexecfd falsely claims a descriptor is present.
Consequently, beginnewexec() dereferences the missing executable:
woulddump(bprm, bprm->executable);
and NULL derefs. Had it not, the hand-off later in the same function would have failed anyway. FDADD(0, bprm->executable) rejects a NULL file with -ENOMEM. Both sites are past the point of no return so the exec cannot be unwound either way.
This can be reached by unprivileged users as binfmtmisc can be mounted in user namespaces. So a user can register an 'O' entry whose interpreter lives on a FUSE mount, have the FUSE server fail the open with -ENOEXEC and execute a native ELF file that matches the entry.
haveexecfd only means anything alongside the executable it describes which is not set until the interpreter has been opened and staged. So lets raise it there, next to execfdcreds, which is already set at that point. An open failure now leaves it clear, so the fallback format derives credentials from the binary and emits no ATEXECFD, as it would for any native exec. The argv rewrite loadmiscbinary() performs before the open is still not undone. This means the binary sees the interpreter path in argv[0] and its own path in argv[1] but that predates this change and only became observable once the exec stopped faulting.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68186?
CVE-2026-68186 has a risk rating of 33, indicating a moderate severity level.
How do I fix CVE-2026-68186?
To fix CVE-2026-68186, ensure that your Linux kernel version is updated to the latest patch that addresses this vulnerability.
What component is affected by CVE-2026-68186?
CVE-2026-68186 affects the binfmt_misc component of the Linux kernel.
What type of vulnerability is CVE-2026-68186?
CVE-2026-68186 is an issue related to improper handling of flags during the loading of binary formats in the Linux kernel.
When was CVE-2026-68186 published?
CVE-2026-68186 was published on August 10, 2026.