<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://vulnerability.circl.lu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Tue, 29 Sep 2026 15:41:25 +0000</lastBuildDate>
    <item>
      <title>CVE-2024-50067 — uprobe: avoid out-of-bounds memory access of fetching args</title>
      <link>https://vulnerability.circl.lu/vuln/cve-2024-50067</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;uprobe: avoid out-of-bounds memory access of fetching args&lt;/p&gt;
&lt;p&gt;Uprobe needs to fetch args into a percpu buffer, and then copy to ring
buffer to avoid non-atomic context problem.&lt;/p&gt;
&lt;p&gt;Sometimes user-space strings, arrays can be very large, but the size of
percpu buffer is only page size. And store_trace_args() won&amp;#39;t check
whether these data exceeds a single page or not, caused out-of-bounds
memory access.&lt;/p&gt;
&lt;p&gt;It could be reproduced by following steps:
1. build kernel with CONFIG_KASAN enabled
2. save follow program as test.c&lt;/p&gt;
&lt;p&gt;```
\#include &amp;lt;stdio.h&amp;gt;
\#include &amp;lt;stdlib.h&amp;gt;
\#include &amp;lt;string.h&amp;gt;&lt;/p&gt;
&lt;p&gt;// 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&lt;/p&gt;
&lt;p&gt;void generate_string(char *str, int n)
{
    int i;
    for (i = 0; i &amp;lt; n; ++i)
    {
        char c = i % 26 + &amp;#39;a&amp;#39;;
        str[i] = c;
    }
    str[n-1] = &amp;#39;\0&amp;#39;;
}&lt;/p&gt;
&lt;p&gt;void print_string(char *str)
{
    printf(&amp;#34;%s\n&amp;#34;, str);
}&lt;/p&gt;
&lt;p&gt;int main()
{
    char tmp[STRLEN];&lt;/p&gt;
&lt;p&gt;generate_string(tmp, STRLEN);
    print_string(tmp);&lt;/p&gt;
&lt;p&gt;return 0;
}
```
3. compile program
`gcc -o test test.c`&lt;/p&gt;
&lt;p&gt;4. get the offset of `print_string()`
```
objdump -t test | grep -w print_string
0000000000401199 g     F .text  000000000000001b              print_string
```&lt;/p&gt;
&lt;p&gt;5. configure uprobe with offset 0x11…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; Linux&lt;/p&gt;
&lt;p&gt;In the Linux kernel, the following vulnerability has been resolved:&lt;/p&gt;
&lt;p&gt;uprobe: avoid out-of-bounds memory access of fetching args&lt;/p&gt;
&lt;p&gt;Uprobe needs to fetch args into a percpu buffer, and then copy to ring
buffer to avoid non-atomic context problem.&lt;/p&gt;
&lt;p&gt;Sometimes user-space strings, arrays can be very large, but the size of
percpu buffer is only page size. And store_trace_args() won&amp;#39;t check
whether these data exceeds a single page or not, caused out-of-bounds
memory access.&lt;/p&gt;
&lt;p&gt;It could be reproduced by following steps:
1. build kernel with CONFIG_KASAN enabled
2. save follow program as test.c&lt;/p&gt;
&lt;p&gt;```
\#include &amp;lt;stdio.h&amp;gt;
\#include &amp;lt;stdlib.h&amp;gt;
\#include &amp;lt;string.h&amp;gt;&lt;/p&gt;
&lt;p&gt;// 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&lt;/p&gt;
&lt;p&gt;void generate_string(char *str, int n)
{
    int i;
    for (i = 0; i &amp;lt; n; ++i)
    {
        char c = i % 26 + &amp;#39;a&amp;#39;;
        str[i] = c;
    }
    str[n-1] = &amp;#39;\0&amp;#39;;
}&lt;/p&gt;
&lt;p&gt;void print_string(char *str)
{
    printf(&amp;#34;%s\n&amp;#34;, str);
}&lt;/p&gt;
&lt;p&gt;int main()
{
    char tmp[STRLEN];&lt;/p&gt;
&lt;p&gt;generate_string(tmp, STRLEN);
    print_string(tmp);&lt;/p&gt;
&lt;p&gt;return 0;
}
```
3. compile program
`gcc -o test test.c`&lt;/p&gt;
&lt;p&gt;4. get the offset of `print_string()`
```
objdump -t test | grep -w print_string
0000000000401199 g     F .text  000000000000001b              print_string
```&lt;/p&gt;
&lt;p&gt;5. configure uprobe with offset 0x11…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://vulnerability.circl.lu/vuln/cve-2024-50067</guid>
    </item>
  </channel>
</rss>
