CVE-2026-68186

Source
https://cve.org/CVERecord?id=CVE-2026-68186
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68186.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-68186
Downstream
Published
2026-08-10T11:59:58.299Z
Modified
2026-08-18T03:31:09.808127812Z
Summary
binfmt_misc: set have_execfd only once the interpreter is opened
Details

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 have_execfd falsely claims a descriptor is present.

Consequently, beginnewexec() dereferences the missing executable:

would_dump(bprm, bprm->executable);

and NULL derefs. Had it not, the hand-off later in the same function would have failed anyway. FD_ADD(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 binfmt_misc 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 loadmisc_binary() 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/68xxx/CVE-2026-68186.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
bc2bf338d54b7aadaed49bb45b9e10d4592b2a46
Fixed
0f19d54e2524f0bf183b82f365ae4e49b4a2f788
Fixed
2dd0298905e97795a9c5ec30cf5b41975f821632
Fixed
1cd4e9b7967dab48c9f79a00b06ffff7208c0993
Fixed
5ccc99d58f94fad258c9c375715b3974e48620e8
Fixed
bbf5f639918dc011aaf60aab8480218758ee68c5

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68186.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.8.0
Fixed
6.6.148
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.101
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.42
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-68186.json"