# CVE-2024-50067: uprobe: avoid out-of-bounds memory access of fetching args

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-787, CWE-416
- **Published:** 2024-10-28T00:57:05.734Z
- **Modified:** 2026-08-05T11:41:22.544Z

## Who should check

- Anyone running Linux \>= dcad1a204f72624796ae83359403898d10393b9c, \< 0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 9e5f93788c9dd4309e75a56860a1ac44a8e117b9; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 537ad4a431f6dddbf15d40d19f24bb9ee12b55cb; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 373b9338c9722a368925d83bc622c596896b328e
- Anyone running Linux 3.14

## Description

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

uprobe: avoid out-of-bounds memory access of fetching args

Uprobe needs to fetch args into a percpu buffer, and then copy to ring
buffer to avoid non-atomic context problem.

Sometimes user-space strings, arrays can be very large, but the size of
percpu buffer is only page size. And store\_trace\_args() won't check
whether these data exceeds a single page or not, caused out-of-bounds
memory access.

It could be reproduced by following steps:
1. build kernel with CONFIG\_KASAN enabled
2. save follow program as test.c

\`\`\`
\\\#include \<stdio.h\>
\\\#include \<stdlib.h\>
\\\#include \<string.h\>

// If string length large than MAX\_STRING\_SIZE, the fetch\_store\_strlen()
// will return 0, cause \_\_get\_data\_size() return shorter size, and
// store\_trace\_args() will not trigger out-of-bounds access.
// So make string length less than 4096.
\\\#define STRLEN 4093

void generate\_string(char \*str, int n)
{
    int i;
    for (i = 0; i \< n; ++i)
    {
        char c = i % 26 + 'a';
        str\[i\] = c;
    }
    str\[n-1\] = '\\0';
}

void print\_string(char \*str)
{
    printf("%s\\n", str);
}

int main()
{
    char tmp\[STRLEN\];

    generate\_string(tmp, STRLEN);
    print\_string(tmp);

    return 0;
}
\`\`\`
3. compile program
\`gcc -o test test.c\`

4. get the offset of \`print\_string()\`
\`\`\`
objdump -t test \| grep -w print\_string
0000000000401199 g     F .text  000000000000001b              print\_string
\`\`\`

5. configure uprobe with offset 0x1199
\`\`\`
off=0x1199

cd /sys/kernel/debug/tracing/
echo "p /root/test:${off} arg1=+0(%di):ustring arg2=\\$comm arg3=+0(%di):ustring"
 \> uprobe\_events
echo 1 \> events/uprobes/enable
echo 1 \> tracing\_on
\`\`\`

6. run \`test\`, and kasan will report error.
==================================================================
BUG: KASAN: use-after-free in strncpy\_from\_user+0x1d6/0x1f0
Write of size 8 at addr ffff88812311c004 by task test/499CPU: 0 UID: 0 PID: 499 Comm: test Not tainted 6.12.0-rc3+ \#18
Hardware name: Red Hat KVM, BIOS 1.16.0-4.al8 04/01/2014
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x55/0x70
 print\_address\_description.constprop.0+0x27/0x310
 kasan\_report+0x10f/0x120
 ? strncpy\_from\_user+0x1d6/0x1f0
 strncpy\_from\_user+0x1d6/0x1f0
 ? rmqueue.constprop.0+0x70d/0x2ad0
 process\_fetch\_insn+0xb26/0x1470
 ? \_\_pfx\_process\_fetch\_insn+0x10/0x10
 ? \_raw\_spin\_lock+0x85/0xe0
 ? \_\_pfx\_\_raw\_spin\_lock+0x10/0x10
 ? \_\_pte\_offset\_map+0x1f/0x2d0
 ? unwind\_next\_frame+0xc5f/0x1f80
 ? arch\_stack\_walk+0x68/0xf0
 ? is\_bpf\_text\_address+0x23/0x30
 ? kernel\_text\_address.part.0+0xbb/0xd0
 ? \_\_kernel\_text\_address+0x66/0xb0
 ? unwind\_get\_return\_address+0x5e/0xa0
 ? \_\_pfx\_stack\_trace\_consume\_entry+0x10/0x10
 ? arch\_stack\_walk+0xa2/0xf0
 ? \_raw\_spin\_lock\_irqsave+0x8b/0xf0
 ? \_\_pfx\_\_raw\_spin\_lock\_irqsave+0x10/0x10
 ? depot\_alloc\_stack+0x4c/0x1f0
 ? \_raw\_spin\_unlock\_irqrestore+0xe/0x30
 ? stack\_depot\_save\_flags+0x35d/0x4f0
 ? kasan\_save\_stack+0x34/0x50
 ? kasan\_save\_stack+0x24/0x50
 ? mutex\_lock+0x91/0xe0
 ? \_\_pfx\_mutex\_lock+0x10/0x10
 prepare\_uprobe\_buffer.part.0+0x2cd/0x500
 uprobe\_dispatcher+0x2c3/0x6a0
 ? \_\_pfx\_uprobe\_dispatcher+0x10/0x10
 ? \_\_kasan\_slab\_alloc+0x4d/0x90
 handler\_chain+0xdd/0x3e0
 handle\_swbp+0x26e/0x3d0
 ? \_\_pfx\_handle\_swbp+0x10/0x10
 ? uprobe\_pre\_sstep\_notifier+0x151/0x1b0
 irqentry\_exit\_to\_user\_mode+0xe2/0x1b0
 asm\_exc\_int3+0x39/0x40
RIP: 0033:0x401199
Code: 01 c2 0f b6 45 fb 88 02 83 45 fc 01 8b 45 fc 3b 45 e4 7c b7 8b 45 e4 48 98 48 8d 50 ff 48 8b 45 e8 48 01 d0 ce
RSP: 002b:00007ffdf00576a8 EFLAGS: 00000206
RAX: 00007ffdf00576b0 RBX: 0000000000000000 RCX: 0000000000000ff2
RDX: 0000000000000ffc RSI: 0000000000000ffd RDI: 00007ffdf00576b0
RBP: 00007ffdf00586b0 R08: 00007feb2f9c0d20 R09: 00007feb2f9c0d20
R10: 0000000000000001 R11: 0000000000000202 R12: 0000000000401040
R13: 00007ffdf0058780 R14: 0000000000000000 R15: 0000000000000000
 \</TASK\>

This commit enforces the buffer's maxlen less than a page-size to avoid
store\_trace\_args() out-of-memory access.

## Affected and fixed versions

- Linux: \>= dcad1a204f72624796ae83359403898d10393b9c, \< 0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 9e5f93788c9dd4309e75a56860a1ac44a8e117b9; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 537ad4a431f6dddbf15d40d19f24bb9ee12b55cb; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 373b9338c9722a368925d83bc622c596896b328e (cvelist)
- Linux: 3.14 (cvelist)

## Mitigation

- Upgrade Linux to 373b9338c9722a368925d83bc622c596896b328e or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-50067.md
Affected: Linux >= dcad1a204f72624796ae83359403898d10393b9c, < 0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f; >= dcad1a204f72624796ae83359403898d10393b9c, < 9e5f93788c9dd4309e75a56860a1ac44a8e117b9; >= dcad1a204f72624796ae83359403898d10393b9c, < 537ad4a431f6dddbf15d40d19f24bb9ee12b55cb; >= dcad1a204f72624796ae833…
Fixed in: Linux 0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f, Linux 9e5f93788c9dd4309e75a56860a1ac44a8e117b9, Linux 537ad4a431f6dddbf15d40d19f24bb9ee12b55cb, Linux 373b9338c9722a368925d83bc622c596896b328e

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-2024-50067 being exploited?

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

### How serious is CVE-2024-50067?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-50067?

Linux \>= dcad1a204f72624796ae83359403898d10393b9c, \< 0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 9e5f93788c9dd4309e75a56860a1ac44a8e117b9; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 537ad4a431f6dddbf15d40d19f24bb9ee12b55cb; \>= dcad1a204f72624796ae83359403898d10393b9c, \< 373b9338c9722a368925d83bc622c596896b328e; Linux 3.14.

### Is there a fix for CVE-2024-50067?

Yes. Fixed in Linux 0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f, Linux 9e5f93788c9dd4309e75a56860a1ac44a8e117b9, Linux 537ad4a431f6dddbf15d40d19f24bb9ee12b55cb, Linux 373b9338c9722a368925d83bc622c596896b328e. Upgrade Linux to 373b9338c9722a368925d83bc622c596896b328e or later.

### How do I check if I'm affected by CVE-2024-50067?

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

- patch: <https://git.kernel.org/stable/c/0dc3ad9ad2188da7f090b3dbe4d2fcd9ae8ae64f>
- patch: <https://git.kernel.org/stable/c/9e5f93788c9dd4309e75a56860a1ac44a8e117b9>
- patch: <https://git.kernel.org/stable/c/537ad4a431f6dddbf15d40d19f24bb9ee12b55cb>
- patch: <https://git.kernel.org/stable/c/373b9338c9722a368925d83bc622c596896b328e>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## 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-2024-50067>

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