# CVE-2026-68187: exec: fix unsigned loop counter wrap in transfer\_args\_to\_stack()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.22% (percentile 7, 2026-11-26)
- **Published:** 2026-08-10T11:59:59.303Z
- **Modified:** 2026-11-06T17:19:21.343Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< a9eb5c4949008034909bc34ecfa0843ecc1d0ab3; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 67cf5cdad823afb0530d6d0341fbf4ca07e93a09; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 66e20942890a383eb39b2009a2ceb4c2ebec37ef; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< c62bb00caba66e01fb578d5f0302f247dc64930a; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< dfc2a00742af4cb7251c1a8fbce4fbae3cc0de4e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 2bc6bf70d41055377f390d06f0f3521deb62fd3b; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 55fa2c7f2b15583d1a2fe1b5abcc24377359339f; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 16cc4f5c1c4b9e45eca7f7deefa5410a292db599
- Anyone running Linux 2.6.12

## Description

In the Linux kernel, the following vulnerability has been resolved:

exec: fix unsigned loop counter wrap in transfer\_args\_to\_stack()

The stop value is derived from bprm-\>p \>\> PAGE\_SHIFT. The index variable
is an unsigned long. If bprm-\>p drops below PAGE\_SIZE and stop becomes
zero the loop condition index \>= stop is always true.

After the index == 0 iteration the decrement wraps to ULONG\_MAX and
bprm-\>page\[ULONG\_MAX\] reads sizeof(void \*) bytes in front of the array.
The pointer has wrapped to -1. That garbage pointer is then passed to
kmap\_local\_page() and PAGE\_SIZE bytes are copied from wherever that
lands into the stack of the process being created. And the loop doesn't
terminate either...

Getting there only requires bprm-\>p \< PAGE\_SIZE. On !MMU
bprm\_set\_stack\_limit() and bprm\_hit\_stack\_limit() are empty. So the only
constraint on how far bprm-\>p is pushed down is valid\_arg\_len(), i.e.
that each individual string still fits in what is left.

bprm-\>p starts at PAGE\_SIZE \* MAX\_ARG\_PAGES - sizeof(void \*) so a
single argument or environment string of a little over 31 pages leaves
it in the first page:

  Oops - load access fault \[\#1\]
  CPU: 0 UID: 0 PID: 1 Comm: victim Not tainted 7.2.0-rc4 \#1
  epc : \_\_memcpy+0xd4/0xf8
   ra : transfer\_args\_to\_stack+0xaa/0xae
   s4 : ffffffffffffffff   s2 : 0000000000000000
   a1 : ffffffdc98000000   a2 : 0000000000001000
  status: 0000000a00001880 badaddr: ffffffdc98000000 cause: 0000000000000005
  \[\<801a5324\>\] \_\_memcpy+0xd4/0xf8
  \[\<800d5f6a\>\] load\_flat\_binary+0x43a/0x65e
  \[\<800a2de4\>\] bprm\_execve+0x1d4/0x316
  \[\<800a351a\>\] do\_execveat\_common+0x12e/0x138
  \[\<800a3d44\>\] \_\_riscv\_sys\_execve+0x38/0x4e
  Kernel panic - not syncing: Fatal exception in interrupt

This is an arcane bug but we should still fix it.

Count down from MAX\_ARG\_PAGES so the loop ends when index reaches stop,
stop == 0 included. The iterations performed are unchanged for every
other value of stop.

Only CONFIG\_MMU=n builds are affected, transfer\_args\_to\_stack() is used
by binfmt\_flat and binfmt\_elf\_fdpic on nommu only.

The loop predates git history. commit 7e7ec6a93434
("elf\_fdpic\_transfer\_args\_to\_stack(): make it generic") only moved it
from binfmt\_elf\_fdpic.c into fs/exec.c and narrowed the copy to the used
part of the first page. The condition and the decrement are unchanged
from 2.6.12-rc2.

## Affected and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< a9eb5c4949008034909bc34ecfa0843ecc1d0ab3; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 67cf5cdad823afb0530d6d0341fbf4ca07e93a09; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 66e20942890a383eb39b2009a2ceb4c2ebec37ef; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< c62bb00caba66e01fb578d5f0302f247dc64930a; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< dfc2a00742af4cb7251c1a8fbce4fbae3cc0de4e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 2bc6bf70d41055377f390d06f0f3521deb62fd3b; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 55fa2c7f2b15583d1a2fe1b5abcc24377359339f; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 16cc4f5c1c4b9e45eca7f7deefa5410a292db599 (cvelist)
- Linux: 2.6.12 (cvelist)

## Mitigation

- Upgrade Linux to 16cc4f5c1c4b9e45eca7f7deefa5410a292db599 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-68187. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-68187.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < a9eb5c4949008034909bc34ecfa0843ecc1d0ab3; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 67cf5cdad823afb0530d6d0341fbf4ca07e93a09; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 66e20942890a383eb39b2009a2ceb4c2ebec37ef; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 67cf5cdad823afb0530d6d0341fbf4ca07e93a09, Linux 66e20942890a383eb39b2009a2ceb4c2ebec37ef, Linux 2bc6bf70d41055377f390d06f0f3521deb62fd3b, Linux 55fa2c7f2b15583d1a2fe1b5abcc24377359339f, Linux 16cc4f5c1c4b9e45eca7f7deefa5410a292db599

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-68187 being exploited?

There is no confirmed exploitation: CVE-2026-68187 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-68187?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-68187?

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< a9eb5c4949008034909bc34ecfa0843ecc1d0ab3; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 67cf5cdad823afb0530d6d0341fbf4ca07e93a09; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 66e20942890a383eb39b2009a2ceb4c2ebec37ef; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< c62bb00caba66e01fb578d5f0302f247dc64930a; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< dfc2a00742af4cb7251c1a8fbce4fbae3cc0de4e; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 2bc6bf70d41055377f390d06f0f3521deb62fd3b; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 55fa2c7f2b15583d1a2fe1b5abcc24377359339f; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 16cc4f5c1c4b9e45eca7f7deefa5410a292db599; Linux 2.6.12.

### Is there a fix for CVE-2026-68187?

Yes. Fixed in Linux 67cf5cdad823afb0530d6d0341fbf4ca07e93a09, Linux 66e20942890a383eb39b2009a2ceb4c2ebec37ef, Linux 2bc6bf70d41055377f390d06f0f3521deb62fd3b, Linux 55fa2c7f2b15583d1a2fe1b5abcc24377359339f, Linux 16cc4f5c1c4b9e45eca7f7deefa5410a292db599. Upgrade Linux to 16cc4f5c1c4b9e45eca7f7deefa5410a292db599 or later.

### How do I check if I'm affected by CVE-2026-68187?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/a9eb5c4949008034909bc34ecfa0843ecc1d0ab3>
- other: <https://git.kernel.org/stable/c/67cf5cdad823afb0530d6d0341fbf4ca07e93a09>
- other: <https://git.kernel.org/stable/c/66e20942890a383eb39b2009a2ceb4c2ebec37ef>
- other: <https://git.kernel.org/stable/c/c62bb00caba66e01fb578d5f0302f247dc64930a>
- other: <https://git.kernel.org/stable/c/dfc2a00742af4cb7251c1a8fbce4fbae3cc0de4e>
- other: <https://git.kernel.org/stable/c/2bc6bf70d41055377f390d06f0f3521deb62fd3b>
- other: <https://git.kernel.org/stable/c/55fa2c7f2b15583d1a2fe1b5abcc24377359339f>
- other: <https://git.kernel.org/stable/c/16cc4f5c1c4b9e45eca7f7deefa5410a292db599>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-68187>

HTML: <https://flawdb.com/CVE-2026-68187> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-68187>
