CVE-2026-68187

Updated on 10 Aug 2026

Severity

7.8 High severity

Details

CVSS score
7.8

Overview

About vulnerability

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.

Details

Fixes

KernelCare state

Live-patch status from KernelCare for each operating system.

Operating system Status Covered kernels
Debian 12 Will Not Fix
43 kernels
  • 6.1.38-1
  • 6.1.38-2
  • 6.1.38-4
  • 6.1.52-1
  • 6.1.55-1
  • 6.1.64-1
  • 6.1.66-1
  • 6.1.69-1
  • 6.1.76-1
  • 6.1.27-1
  • 6.1.67-1
  • 6.1.85-1
  • 6.1.90-1
  • 6.1.94-1
  • 6.1.99-1
  • 6.1.106-3
  • 6.1.112-1
  • 6.1.115-1
  • 6.1.119-1
  • 6.1.123-1
  • 6.1.128-1
  • 6.1.124-1
  • 6.1.129-1
  • 6.1.133-1
  • 6.1.135-1
  • 6.1.137-1
  • 6.1.140-1
  • 6.1.139-1
  • 6.1.147-1
  • 6.1.148-1
  • 6.1.153-1
  • 6.1.158-1
  • 6.1.159-1
  • 6.1.162-1
  • 6.1.164-1
  • 6.1.170-1
  • 6.1.170-3
  • 6.1.172-1
  • 6.1.174-1
  • 6.1.170-2
  • 6.1.176-1
  • 6.1.177-1
  • 6.1.180-1
Debian 13 Will Not Fix
14 kernels
  • 6.12.85-1
  • 6.12.86-1
  • 6.12.88-1
  • 6.12.74-2
  • 6.12.73-1
  • 6.12.63-1
  • 6.12.69-1
  • 6.12.74-1
  • 6.12.90-1
  • 6.12.90-2
  • 6.12.94-1
  • 6.12.95-1
  • 6.12.96-1
  • 6.12.100-1
Oracle Linux 8 UEK 7 Planned —
Oracle Linux 9 UEK 7 Will Not Fix
112 kernels
  • 5.15.0-101.103.2.1.el9uek
  • 5.15.0-8.91.4.1.el9uek
  • 5.15.0-7.86.6.1.el9uek
  • 5.15.0-5.76.5.1.el9uek
  • 5.15.0-6.80.3.1.el9uek
  • 5.15.0-3.60.5.1.el9uek
  • 5.15.0-0.30.20.el9uek
  • 5.15.0-100.96.32.el9uek
  • 5.15.0-1.43.4.2.el9uek
  • 5.15.0-2.52.3.el9uek
  • 5.15.0-4.70.5.2.el9uek
  • 5.15.0-1.43.4.1.el9uek
  • 5.15.0-0.30.20.1.el9uek
  • 5.15.0-102.110.5.el9uek
  • 5.15.0-102.110.5.1.el9uek
  • 5.15.0-103.114.4.el9uek
  • 5.15.0-104.119.4.2.el9uek
  • 5.15.0-0.30.19.el9uek
  • 5.15.0-105.125.6.2.el9uek
  • 5.15.0-105.125.6.2.1.el9uek
  • 5.15.0-105.125.6.2.2.el9uek
  • 5.15.0-106.131.4.el9uek
  • 5.15.0-200.131.27.el9uek
  • 5.15.0-200.131.27.1.el9uek
  • 5.15.0-201.135.6.el9uek
  • 5.15.0-202.135.2.el9uek
  • 5.15.0-203.146.5.1.el9uek
  • 5.15.0-204.147.6.2.el9uek
  • 5.15.0-204.147.6.3.el9uek
  • 5.15.0-205.149.5.1.el9uek
  • 5.15.0-205.149.5.4.el9uek
  • 5.15.0-206.153.7.el9uek
  • 5.15.0-206.153.7.1.el9uek
  • 5.15.0-207.156.6.el9uek
  • 5.15.0-208.159.3.el9uek
  • 5.15.0-208.159.3.2.el9uek
  • 5.15.0-209.161.7.el9uek
  • 5.15.0-209.161.7.1.el9uek
  • 5.15.0-209.161.7.2.el9uek
  • 5.15.0-210.163.7.el9uek
  • 5.15.0-300.163.18.el9uek
  • 5.15.0-300.163.18.1.el9uek
  • 5.15.0-300.163.18.1.1.el9uek
  • 5.15.0-301.163.5.2.el9uek
  • 5.15.0-302.167.6.el9uek
  • 5.15.0-300.163.18.7.el9uek
  • 5.15.0-302.167.6.1.el9uek
  • 5.15.0-303.171.5.2.el9uek
  • 5.15.0-303.171.5.2.1.el9uek
  • 5.15.0-304.171.4.el9uek
  • 5.15.0-304.171.4.1.el9uek
  • 5.15.0-304.171.4.3.el9uek
  • 5.15.0-303.171.5.2.2.el9uek
  • 5.15.0-305.176.4.el9uek
  • 5.15.0-306.177.4.el9uek
  • 5.15.0-306.177.4.1.el9uek
  • 5.15.0-307.178.5.el9uek
  • 5.15.0-308.179.6.el9uek
  • 5.15.0-308.179.6.2.el9uek
  • 5.15.0-308.179.6.3.el9uek
  • 5.15.0-309.180.4.el9uek
  • 5.15.0-308.179.6.7.el9uek
  • 5.15.0-309.180.4.2.el9uek
  • 5.15.0-308.179.6.11.el9uek
  • 5.15.0-310.184.5.2.el9uek
  • 5.15.0-310.184.5.3.el9uek
  • 5.15.0-311.185.9.el9uek
  • 5.15.0-308.179.6.14.el9uek
  • 5.15.0-312.187.5.el9uek
  • 5.15.0-312.187.5.1.el9uek
  • 5.15.0-312.187.5.2.el9uek
  • 5.15.0-312.187.5.3.el9uek
  • 5.15.0-308.179.6.16.el9uek
  • 5.15.0-313.189.5.1.el9uek
  • 5.15.0-313.189.5.2.el9uek
  • 5.15.0-313.189.5.3.el9uek
  • 5.15.0-314.193.5.3.el9uek
  • 5.15.0-314.193.5.4.el9uek
  • 5.15.0-314.193.5.5.el9uek
  • 5.15.0-315.196.5.1.el9uek
  • 5.15.0-315.196.5.2.el9uek
  • 5.15.0-316.196.4.1.el9uek
  • 5.15.0-316.196.4.2.el9uek
  • 5.15.0-317.197.5.1.el9uek
  • 5.15.0-317.197.5.2.el9uek
  • 5.15.0-318.199.3.2.el9uek
  • 5.15.0-318.199.3.2.1.el9uek
  • 5.15.0-319.201.4.2.el9uek
  • 5.15.0-319.201.4.3.el9uek
  • 5.15.0-319.201.4.4.el9uek
  • 5.15.0-319.201.4.6.el9uek
  • 5.15.0-320.202.8.2.el9uek
  • 5.15.0-320.202.8.3.el9uek
  • 5.15.0-320.202.8.4.el9uek
  • 5.15.0-320.202.8.5.el9uek
  • 5.15.0-318.199.3.6.el9uek
  • 5.15.0-321.202.5.el9uek
  • 5.15.0-321.202.5.1.el9uek
  • 5.15.0-321.202.5.2.el9uek
  • 5.15.0-321.202.5.3.el9uek
  • 5.15.0-322.203.3.2.el9uek
  • 5.15.0-322.203.3.3.el9uek
  • 5.15.0-322.203.3.4.el9uek
  • 5.15.0-322.203.3.4.5.el9uek
  • 5.15.0-308.179.6.18.el9uek
  • 5.15.0-318.199.3.7.el9uek
  • 5.15.0-322.203.3.5.el9uek
  • 5.15.0-322.203.3.4.1.el9uek
  • 5.15.0-323.211.3.3.el9uek
  • 5.15.0-323.211.3.4.el9uek
  • 5.15.0-308.179.6.19.el9uek
  • 5.15.0-323.211.3.5.el9uek
Ubuntu 22.04 Planned —
Ubuntu 22.04 AWS Planned —
Ubuntu 22.04 Azure Planned —
Ubuntu 24.04 Planned —
Ubuntu 24.04 AWS Planned —
Ubuntu 26.04 Will Not Fix —