From: KaFai Wan <kafai.wan@linux.dev>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org,
yonghong.song@linux.dev, john.fastabend@gmail.com,
kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
jolsa@kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
hawk@kernel.org, shuah@kernel.org, aleksander.lobakin@intel.com,
bpf@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: Yinhao Hu <dddddd@hust.edu.cn>,
Kaiyan Mei <M202472210@hust.edu.cn>,
Dongliang Mu <dzm91@hust.edu.cn>
Subject: Re: [PATCH bpf-next 1/2] bpf, test_run: Fix user-memory-access vulnerability for LIVE_FRAMES
Date: Mon, 05 Jan 2026 21:22:54 +0800 [thread overview]
Message-ID: <38dd70d77f8207395206564063b0a1a07dd1c6e7.camel@linux.dev> (raw)
In-Reply-To: <87y0mc5obp.fsf@toke.dk>
On Mon, 2026-01-05 at 11:46 +0100, Toke Høiland-Jørgensen wrote:
> KaFai Wan <kafai.wan@linux.dev> writes:
>
> > This fix reverts to the original version and ensures data_hard_start
> > correctly points to the xdp_frame structure, eliminating the security
> > risk.
>
> This is wrong. We should just be checking the meta_len on input to
> account for the size of xdp_frame. I'll send a patch.
Current version the actual limit of the max input meta_len for live frames is
XDP_PACKET_HEADROOM - sizeof(struct xdp_frame), not XDP_PACKET_HEADROOM.
The original version not set xdp_buff->data_hard_start with xdp_frame,
I set it with the correct position by adding the headroom, so there is no need
for user to reduce the max input meta_len.
This patch is failed with the xdp_do_redirect test, I'll fix and send v2 if
you're ok with that.
>
> -Toke
>
--
Thanks,
KaFai
next prev parent reply other threads:[~2026-01-05 13:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa2be179-bad7-4ee3-8668-4903d1853461@hust.edu.cn>
2026-01-04 16:23 ` [PATCH bpf-next 0/2] bpf, test_run: Fix user-memory-access vulnerability for LIVE_FRAMES KaFai Wan
2026-01-04 16:23 ` [PATCH bpf-next 1/2] " KaFai Wan
2026-01-05 10:46 ` Toke Høiland-Jørgensen
2026-01-05 13:22 ` KaFai Wan [this message]
2026-01-05 16:43 ` Toke Høiland-Jørgensen
2026-01-06 13:53 ` KaFai Wan
2026-01-04 16:23 ` [PATCH bpf-next 2/2] selftests/bpf: Add test for xdp_md context with LIVE_FRAMES in BPF_PROG_TEST_RUN KaFai Wan
2026-01-05 8:07 ` [syzbot ci] Re: bpf, test_run: Fix user-memory-access vulnerability for LIVE_FRAMES syzbot ci
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=38dd70d77f8207395206564063b0a1a07dd1c6e7.camel@linux.dev \
--to=kafai.wan@linux.dev \
--cc=M202472210@hust.edu.cn \
--cc=aleksander.lobakin@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dddddd@hust.edu.cn \
--cc=dzm91@hust.edu.cn \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=toke@redhat.com \
--cc=yonghong.song@linux.dev \
/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