Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610281

Re: [PATCH] net: ipconfig: fix ic_close_devs() use-after-free

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] net: ipconfig: fix ic_close_devs() use-after-free
Date 2017-03-28 06:10 +0200
Message-ID <tpQCd-22m-3@gated-at.bofh.it> (permalink)
References <tpGjv-305-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Mark Rutland <mark.rutland@arm.com>
Date: Mon, 27 Mar 2017 18:00:14 +0100

> Our chosen ic_dev may be anywhere in our list of ic_devs, and we may
> free it before attempting to close others. When we compare d->dev and
> ic_dev->dev, we're potentially dereferencing memory returned to the
> allocator. This causes KASAN to scream for each subsequent ic_dev we
> check.
> 
> As there's a 1-1 mapping between ic_devs and netdevs, we can instead
> compare d and ic_dev directly, which implicitly handles the !ic_dev
> case, and avoids the use-after-free. The ic_dev pointer may be stale,
> but we will not dereference it.
> 
> Original splat:
 ...
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>

Applied, thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] net: ipconfig: fix ic_close_devs() use-after-free Mark Rutland <mark.rutland@arm.com> - 2017-03-27 19:10 +0200
  Re: [PATCH] net: ipconfig: fix ic_close_devs() use-after-free David Miller <davem@davemloft.net> - 2017-03-28 06:10 +0200

csiph-web