From: Steffen Klassert <steffen.klassert@secunet.com>
To: I Viswanath <viswanathiyyappan@gmail.com>
Cc: <nicholas@carlini.com>, <netdev@vger.kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
Milad Nasr <srxzr@anthropic.com>
Subject: Re: [PATCH v2] xfrm6: fix slab-out-of-bounds write in xfrm6_input_addr()
Date: Tue, 7 Apr 2026 10:15:24 +0200 [thread overview]
Message-ID: <adS9HIMGWPI7R5uk@secunet.com> (raw)
In-Reply-To: <CAPrAcgNbbcLrJDBs03=CQU0VzbqaEGi_h4gsrWY693ERsuTE1A@mail.gmail.com>
On Wed, Apr 01, 2026 at 09:56:40PM +0530, I Viswanath wrote:
> On Wed, 1 Apr 2026 at 10:26, <nicholas@carlini.com> wrote:
>
> > - if (1 + sp->len == XFRM_MAX_DEPTH) {
> > + if (1 + sp->len >= XFRM_MAX_DEPTH) {
> > XFRM_INC_STATS(net, LINUX_MIB_XFRMINBUFFERERROR);
> > goto drop;
> > }
>
> If you look at other places where sp->len is incremented, you will
> notice the guard condition is always (sp->len == XFRM_MAX_DEPTH). This
> bug exists because in xfrm6_input.c, the greatest valid index is taken
> to be XFRM_MAX_DEPTH - 2 when it should be XFRM_MAX_DEPTH - 1.
> Therefore, The correct fix should be using the common guard not
> changing the guard to use >=
>
> On a tangential note, There is no guard present before the increment
> in xfrm_output.c which is probably another OOB bug
Nicholas, please have a look if you can update your patch based
on these comments.
Thanks!
prev parent reply other threads:[~2026-04-07 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 16:35 [PATCH] xfrm6: fix slab-out-of-bounds write in xfrm6_input_addr() nicholas
2026-03-31 7:50 ` Steffen Klassert
2026-04-01 4:56 ` [PATCH v2] " nicholas
2026-04-01 16:26 ` I Viswanath
2026-04-07 8:15 ` Steffen Klassert [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=adS9HIMGWPI7R5uk@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
--cc=nicholas@carlini.com \
--cc=srxzr@anthropic.com \
--cc=viswanathiyyappan@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