All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Sabrina Dubroca <sd@queasysnail.net>
Cc: <netdev@vger.kernel.org>,
	<syzbot+cc39f136925517aed571@syzkaller.appspotmail.com>
Subject: Re: [PATCH ipsec] xfrm: validate new SA's prefixlen using SA family when sel.family is unset
Date: Wed, 9 Oct 2024 10:33:33 +0200	[thread overview]
Message-ID: <ZwY/3SegtYrbcSLd@gauss3.secunet.de> (raw)
In-Reply-To: <c8e8f0326a3993792a65125fa200965e8a4580e4.1727795385.git.sd@queasysnail.net>

On Tue, Oct 01, 2024 at 06:48:14PM +0200, Sabrina Dubroca wrote:
> This expands the validation introduced in commit 07bf7908950a ("xfrm:
> Validate address prefix lengths in the xfrm selector.")
> 
> syzbot created an SA with
>     usersa.sel.family = AF_UNSPEC
>     usersa.sel.prefixlen_s = 128
>     usersa.family = AF_INET
> 
> Because of the AF_UNSPEC selector, verify_newsa_info doesn't put
> limits on prefixlen_{s,d}. But then copy_from_user_state sets
> x->sel.family to usersa.family (AF_INET). Do the same conversion in
> verify_newsa_info before validating prefixlen_{s,d}, since that's how
> prefixlen is going to be used later on.
> 
> Reported-by: syzbot+cc39f136925517aed571@syzkaller.appspotmail.com
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>

Applied, thanks a lot Sabrina!

      reply	other threads:[~2024-10-09  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 16:48 [PATCH ipsec] xfrm: validate new SA's prefixlen using SA family when sel.family is unset Sabrina Dubroca
2024-10-09  8:33 ` 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=ZwY/3SegtYrbcSLd@gauss3.secunet.de \
    --to=steffen.klassert@secunet.com \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    --cc=syzbot+cc39f136925517aed571@syzkaller.appspotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.