mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: CVE-2024-50063: bpf: Prevent tail call between progs attached to different hooks
       [not found] <2024102136-CVE-2024-50063-1a59@gregkh>
@ 2024-10-24  4:04 ` Shung-Hsi Yu
  2024-10-24  9:55   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Shung-Hsi Yu @ 2024-10-24  4:04 UTC (permalink / raw)
  To: cve; +Cc: Greg Kroah-Hartman, linux-kernel

On Mon, Oct 21, 2024 at 09:40:04PM GMT, Greg Kroah-Hartman wrote:
> Description
> ===========
> 
> In the Linux kernel, the following vulnerability has been resolved:
> 
> bpf: Prevent tail call between progs attached to different hooks
> 
> bpf progs can be attached to kernel functions, and the attached functions
> can take different parameters or return different return values. If
> prog attached to one kernel function tail calls prog attached to another
> kernel function, the ctx access or return value verification could be
> bypassed.
...
> This patch adds restriction for tail call to prevent such bypasses.
> 
> The Linux kernel CVE team has assigned CVE-2024-50063 to this issue.
> 
> 
> Affected and fixed versions
> ===========================

I do not know that exact commit that introduced the issue, but given
that the fix addresses the following BPF program types:
- BPF_PROG_TYPE_TRACING (v5.5)
- BPF_PROG_TYPE_EXT (v5.6)
- BPF_PROG_TYPE_STRUCT_OPS (v5.6)
- BPF_PROG_TYPE_LSM (v5.7)

The earliest affected version possible should be v5.5.

> 	Fixed in 6.6.57 with commit 5d5e3b4cbe8e
> 	Fixed in 6.11.4 with commit 88c2a10e6c17
> 	Fixed in 6.12-rc1 with commit 28ead3eaabc1
...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CVE-2024-50063: bpf: Prevent tail call between progs attached to different hooks
  2024-10-24  4:04 ` CVE-2024-50063: bpf: Prevent tail call between progs attached to different hooks Shung-Hsi Yu
@ 2024-10-24  9:55   ` Greg Kroah-Hartman
  2024-11-08  5:21     ` Shung-Hsi Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-10-24  9:55 UTC (permalink / raw)
  To: Shung-Hsi Yu; +Cc: cve, linux-kernel

On Thu, Oct 24, 2024 at 12:04:45PM +0800, Shung-Hsi Yu wrote:
> On Mon, Oct 21, 2024 at 09:40:04PM GMT, Greg Kroah-Hartman wrote:
> > Description
> > ===========
> > 
> > In the Linux kernel, the following vulnerability has been resolved:
> > 
> > bpf: Prevent tail call between progs attached to different hooks
> > 
> > bpf progs can be attached to kernel functions, and the attached functions
> > can take different parameters or return different return values. If
> > prog attached to one kernel function tail calls prog attached to another
> > kernel function, the ctx access or return value verification could be
> > bypassed.
> ...
> > This patch adds restriction for tail call to prevent such bypasses.
> > 
> > The Linux kernel CVE team has assigned CVE-2024-50063 to this issue.
> > 
> > 
> > Affected and fixed versions
> > ===========================
> 
> I do not know that exact commit that introduced the issue, but given
> that the fix addresses the following BPF program types:
> - BPF_PROG_TYPE_TRACING (v5.5)
> - BPF_PROG_TYPE_EXT (v5.6)
> - BPF_PROG_TYPE_STRUCT_OPS (v5.6)
> - BPF_PROG_TYPE_LSM (v5.7)
> 
> The earliest affected version possible should be v5.5.

So what commit id should we use?  Can you send a patch adding the
".vulnerable" file to the vulns.git repo for us to mark this properly?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: CVE-2024-50063: bpf: Prevent tail call between progs attached to different hooks
  2024-10-24  9:55   ` Greg Kroah-Hartman
@ 2024-11-08  5:21     ` Shung-Hsi Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Shung-Hsi Yu @ 2024-11-08  5:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: cve, linux-kernel

On Thu, Oct 24, 2024 at 11:55:46AM GMT, Greg Kroah-Hartman wrote:
> On Thu, Oct 24, 2024 at 12:04:45PM +0800, Shung-Hsi Yu wrote:
> > On Mon, Oct 21, 2024 at 09:40:04PM GMT, Greg Kroah-Hartman wrote:
> > > Description
> > > ===========
> > > 
> > > In the Linux kernel, the following vulnerability has been resolved:
> > > 
> > > bpf: Prevent tail call between progs attached to different hooks
> > > 
> > > bpf progs can be attached to kernel functions, and the attached functions
> > > can take different parameters or return different return values. If
> > > prog attached to one kernel function tail calls prog attached to another
> > > kernel function, the ctx access or return value verification could be
> > > bypassed.
> > ...
> > > This patch adds restriction for tail call to prevent such bypasses.
> > > 
> > > The Linux kernel CVE team has assigned CVE-2024-50063 to this issue.
> > > 
> > > 
> > > Affected and fixed versions
> > > ===========================
> > 
> > I do not know that exact commit that introduced the issue, but given
> > that the fix addresses the following BPF program types:
> > - BPF_PROG_TYPE_TRACING (v5.5)
> > - BPF_PROG_TYPE_EXT (v5.6)
> > - BPF_PROG_TYPE_STRUCT_OPS (v5.6)
> > - BPF_PROG_TYPE_LSM (v5.7)
> > 
> > The earliest affected version possible should be v5.5.
> 
> So what commit id should we use? 

I looked at it more carefully, and commit 9e15db66136a ("bpf: Implement
accurate raw_tp context access via BTF") should be marked as the first
vulnerable commit. This commit introduced BTF-based tracing
functionality which was later renamed to BPF_PROG_TYPE_TRACING.

> ... Can you send a patch adding the
> ".vulnerable" file to the vulns.git repo for us to mark this properly?

Yes, will prepare and send a patch.

Thanks,
Shung-Hsi Yu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-08  5:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2024102136-CVE-2024-50063-1a59@gregkh>
2024-10-24  4:04 ` CVE-2024-50063: bpf: Prevent tail call between progs attached to different hooks Shung-Hsi Yu
2024-10-24  9:55   ` Greg Kroah-Hartman
2024-11-08  5:21     ` Shung-Hsi Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®