BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: shivam tiwari <shivam.tiwari00021@gmail.com>, bpf@vger.kernel.org
Subject: Re: Vurnability in libbpf heap buffer attached with solution and Issue link
Date: Mon, 27 Jan 2025 12:44:57 -0800	[thread overview]
Message-ID: <84c9958a01420bc79290e959a1bf6f94463c57d1.camel@gmail.com> (raw)
In-Reply-To: <CALz0HOrGei1UTAkceBZqPjGkY=6pRhpjt=b63bhhgPjF7_E9Gg@mail.gmail.com>

On Fri, 2025-01-24 at 13:25 +0530, shivam tiwari wrote:
> Fix Heap Buffer Overflow in btf_ext_parse_info Function
> This pull request addresses a heap-buffer-overflow vulnerability detected in the btf_ext_parse_info function located in src/btf.c. The issue arises at line 3001, where an out-of-bounds memory access occurs, potentially leading to undefined behavior and memory corruption. This can happen if the function accesses data that exceeds the allocated buffer size without sufficient bounds checking.
> Fix:
>  * Added additional checks to ensure the buffer accesses remain within bounds.
>  * Improved memory validation to prevent overflows and ensure the integrity of the data being processed.
> This change mitigates the risk of a heap buffer overflow, improving the safety of the code and ensuring that all memory accesses are within valid ranges.
> 
> For further details, refer to the issue link: OSS-Fuzz Issue 388905046 https://issues.oss-fuzz.com/issues/388905046 
> attached below updated code file 
> If you have any specific resolution code or further details to include in the PR, please let me know.

Hi Shivam,

Please take a look at kernel contribution guidlines:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
Please consider sending a patch in accordance to these guidelines.

      parent reply	other threads:[~2025-01-27 20:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-24  7:55 Vurnability in libbpf heap buffer attached with solution and Issue link shivam tiwari
2025-01-25  6:52 ` [PATCH bpf v1] libbpf: fix accessing BTF.ext core_relo header Tony Ambardar
2025-01-27 22:30   ` patchwork-bot+netdevbpf
     [not found]   ` <CALz0HOqsN1VqK1WpmNE4jf+AoQ5Frsan7Ysk_R8LhKdRJxV7_Q@mail.gmail.com>
2025-01-28  2:33     ` Tony Ambardar
2025-01-27 20:44 ` Eduard Zingerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84c9958a01420bc79290e959a1bf6f94463c57d1.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=shivam.tiwari00021@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox