Netdev Archive on
help / color / mirror / Atom feed
From: Lorenz Bauer <>
To: Andrii Nakryiko <>
Cc: Alexei Starovoitov <>,
	Daniel Borkmann <>,
	Andrii Nakryiko <>,
	"David S. Miller" <>,
	Jakub Kicinski <>,
	Jesper Dangaard Brouer <>,
	John Fastabend <>,
	kernel-team <>,
	Andrii Nakryiko <>,
	Networking <>, bpf <>,
	open list <>
Subject: Re: [PATCH bpf] bpf: fix OOB read when printing XDP link fdinfo
Date: Mon, 19 Jul 2021 09:45:16 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, 16 Jul 2021 at 21:44, Andrii Nakryiko <> wrote:
> Well, oops. Thanks for the fix!
> Acked-by: Andrii Nakryiko <>
> It would be great to have a compilation error for something like this.
> I wonder if we can do something to detect this going forward?

I had a second patch that introduced MAX_BPF_LINK_TYPE, etc. and then
added explicit array initializers:


That turns the OOB read into a NULL read. But it has to be done for
every inclusion of bpf_types.h so it's
a bit cumbersome. Maybe add MAX_BPF_LINK_TYPE and then add an entry in
bpf_types.h for it as well?

Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

      parent reply	other threads:[~2021-07-19  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 10:04 Lorenz Bauer
2021-07-16 20:43 ` Andrii Nakryiko
2021-07-16 21:00   ` Daniel Borkmann
2021-07-19  8:48     ` Lorenz Bauer
2021-07-19  8:45   ` Lorenz Bauer [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:

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

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH bpf] bpf: fix OOB read when printing XDP link fdinfo' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).