mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: linux-kernel@vger.kernel.org, kadlec@netfilter.org, fw@strlen.de,
	davem@davemloft.net, kuba@kernel.org,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH linux-5.9 1/1] net: netfilter: fix KASAN: slab-out-of-bounds Read in nft_flow_rule_create
Date: Tue, 20 Oct 2020 09:45:57 -0700	[thread overview]
Message-ID: <28C74722-8F35-4397-B567-FA5BCF525891@oracle.com> (raw)
In-Reply-To: <20201020115047.GA15628@salvia>

Thanks! Yes, that looks good to me.

Saeed

> On Oct 20, 2020, at 4:50 AM, Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> 
> On Mon, Oct 19, 2020 at 10:25:32AM -0700, saeed.mirzamohammadi@oracle.com wrote:
>> From: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>
>> 
>> This patch fixes the issue due to:
>> 
>> BUG: KASAN: slab-out-of-bounds in nft_flow_rule_create+0x622/0x6a2
>> net/netfilter/nf_tables_offload.c:40
>> Read of size 8 at addr ffff888103910b58 by task syz-executor227/16244
>> 
>> The error happens when expr->ops is accessed early on before performing the boundary check and after nft_expr_next() moves the expr to go out-of-bounds.
>> 
>> This patch checks the boundary condition before expr->ops that fixes the slab-out-of-bounds Read issue.
> 
> Thanks. I made a slight variant of your patch.
> 
> I'm attaching it, it is also fixing the problem but it introduced
> nft_expr_more() and use it everywhere.
> 
> Let me know if this looks fine to you.
> <0001-netfilter-fix-KASAN-slab-out-of-bounds-Read-in-nft_f.patch>


  reply	other threads:[~2020-10-20 16:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 17:25 saeed.mirzamohammadi
2020-10-20 11:50 ` Pablo Neira Ayuso
2020-10-20 16:45   ` Saeed Mirzamohammadi [this message]
2020-10-21 20:08     ` Saeed Mirzamohammadi
2020-10-25 23:31       ` Saeed Mirzamohammadi
2020-10-27  6:21         ` Greg KH
2020-10-27  6:42           ` Florian Westphal
2020-10-27  6:49             ` Greg KH
2020-10-27  8:19           ` Pablo Neira Ayuso
2020-10-29 11:02             ` Greg KH
2020-10-29 11:06               ` Pablo Neira Ayuso

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=28C74722-8F35-4397-B567-FA5BCF525891@oracle.com \
    --to=saeed.mirzamohammadi@oracle.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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

all inboxes | Powered by JetHome®