netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Timo Teras <timo.teras@iki.fi>,
	Eric Dumazet <edumazet@google.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH v2] ipsec: Fix aborted xfrm policy dump crash
Date: Mon, 23 Oct 2017 13:08:50 +0200	[thread overview]
Message-ID: <20171023110849.GF3323@secunet.com> (raw)
In-Reply-To: <20171019125109.GA13775@gondor.apana.org.au>

On Thu, Oct 19, 2017 at 08:51:10PM +0800, Herbert Xu wrote:
> On Thu, Oct 19, 2017 at 02:33:20PM +0300, Timo Teras wrote:
> >
> > > Fixes: 4c563f7669c1 ("[XFRM]: Speed up xfrm_policy and xfrm_state...")
> > 
> > This is not correct. The original commit works just fine.
> 
> OK, I'll change it.
> 
> > At that time there was no .start which got added just few years ago. I
> > suggest to do the same fix for SA side since it had same issue fixed on
> > the other commit. Your approach with defining the .start is cleaner.
> 
> No we can't use the start on the SA side because as it is start
> is not allowed to fail.
> 
> Thanks,
> 
> ---8<---
> An independent security researcher, Mohamed Ghannam, has reported
> this vulnerability to Beyond Security's SecuriTeam Secure Disclosure
> program.
> 
> The xfrm_dump_policy_done function expects xfrm_dump_policy to
> have been called at least once or it will crash.  This can be
> triggered if a dump fails because the target socket's receive
> buffer is full.
> 
> This patch fixes it by using the cb->start mechanism to ensure that
> the initialisation is always done regardless of the buffer situation.
> 
> Fixes: 12a169e7d8f4 ("ipsec: Put dumpers on the dump list")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Applied, thanks a lot Herbert!

      reply	other threads:[~2017-10-23 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHqykcSO0vQvh0uXwDNgXr0ZpP8m4AGZ=ks9FNshJZw0=GWHpw@mail.gmail.com>
     [not found] ` <CANn89iLBO2RzqMzb61Qn=HFncsfYLnXLcUfSqFsDTPakQ2o4FQ@mail.gmail.com>
     [not found]   ` <20171017061832.GA3323@secunet.com>
     [not found]     ` <CANn89iJmtPQ=HV6xLjTaLS6WnVmiN+PgaObmWWnevcEzLitRTQ@mail.gmail.com>
     [not found]       ` <20171018151159.GA5188@gondor.apana.org.au>
     [not found]         ` <CANn89iL_QRZUTDXdci+Nsn=oM471N4r6im0zLgHkJANx_X6wbQ@mail.gmail.com>
     [not found]           ` <20171019092625.GA12863@gondor.apana.org.au>
2017-10-19  9:57             ` Fwd: Netlink XFRM socket subsystem NULL pointer dereference Herbert Xu
2017-10-19 11:33               ` Timo Teras
2017-10-19 12:51                 ` [PATCH v2] ipsec: Fix aborted xfrm policy dump crash Herbert Xu
2017-10-23 11:08                   ` 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=20171023110849.GF3323@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=timo.teras@iki.fi \
    /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;
as well as URLs for NNTP newsgroup(s).