The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@kernel.org>
To: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Cc: cve@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: CVE-2023-53076: bpf: Adjust insufficient default bpf_jit_limit
Date: Mon, 5 May 2025 16:45:14 +0200	[thread overview]
Message-ID: <2025050506-clover-schematic-b174@gregkh> (raw)
In-Reply-To: <txekiviwb3to6dmpx24v7layiwspnsq4v3ycqce6t2huni2goe@25r4mcnexibm>

On Mon, May 05, 2025 at 03:56:51PM +0800, Shung-Hsi Yu wrote:
> On Fri, May 02, 2025 at 05:55:41PM +0200, Greg Kroah-Hartman wrote:
> > From: Greg Kroah-Hartman <gregkh@kernel.org>
> > 
> > Description
> > ===========
> > 
> > In the Linux kernel, the following vulnerability has been resolved:
> > 
> > bpf: Adjust insufficient default bpf_jit_limit
> > 
> > We've seen recent AWS EKS (Kubernetes) user reports like the following:
> > 
> >   After upgrading EKS nodes from v20230203 to v20230217 on our 1.24 EKS
> >   clusters after a few days a number of the nodes have containers stuck
> >   in ContainerCreating state or liveness/readiness probes reporting the
> >   following error:
> > 
> >     Readiness probe errored: rpc error: code = Unknown desc = failed to
> >     exec in container: failed to start exec "4a11039f730203ffc003b7[...]":
> >     OCI runtime exec failed: exec failed: unable to start container process:
> >     unable to init seccomp: error loading seccomp filter into kernel:
> >     error loading seccomp filter: errno 524: unknown
> > 
> >   However, we had not been seeing this issue on previous AMIs and it only
> >   started to occur on v20230217 (following the upgrade from kernel 5.4 to
> >   5.10) with no other changes to the underlying cluster or workloads.
> > 
> >   We tried the suggestions from that issue (sysctl net.core.bpf_jit_limit=452534528)
> >   which helped to immediately allow containers to be created and probes to
> >   execute but after approximately a day the issue returned and the value
> >   returned by cat /proc/vmallocinfo | grep bpf_jit | awk '{s+=$2} END {print s}'
> >   was steadily increasing.
> > 
> > I tested bpf tree to observe bpf_jit_charge_modmem, bpf_jit_uncharge_modmem
> > their sizes passed in as well as bpf_jit_current under tcpdump BPF filter,
> > seccomp BPF and native (e)BPF programs, and the behavior all looks sane
> > and expected, that is nothing "leaking" from an upstream perspective.
> > 
> > The bpf_jit_limit knob was originally added in order to avoid a situation
> > where unprivileged applications loading BPF programs (e.g. seccomp BPF
> > policies) consuming all the module memory space via BPF JIT such that loading
> > of kernel modules would be prevented. The default limit was defined back in
> > 2018 and while good enough back then, we are generally seeing far more BPF
> > consumers today.
> > 
> > Adjust the limit for the BPF JIT pool from originally 1/4 to now 1/2 of the
> > module memory space to better reflect today's needs and avoid more users
> > running into potentially hard to debug issues.
> > 
> > The Linux kernel CVE team has assigned CVE-2023-53076 to this issue.
> 
> I'd like to dispute this CVE.
> 
> The fix here is raising the (sysadmin adjustable) default of
> net.core.bpf_jit_limit to 50% of the module memory space from 25%
> before. It does not seem to have security implications on the Linux
> kernel side.

Thanks for the review, now rejected.

greg k-h

      reply	other threads:[~2025-05-05 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2025050215-CVE-2023-53076-d1a7@gregkh>
2025-05-05  7:56 ` CVE-2023-53076: bpf: Adjust insufficient default bpf_jit_limit Shung-Hsi Yu
2025-05-05 14:45   ` Greg Kroah-Hartman [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=2025050506-clover-schematic-b174@gregkh \
    --to=gregkh@kernel.org \
    --cc=cve@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shung-hsi.yu@suse.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