Netdev List
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netdev@vger.kernel.org>, <syzkaller-bugs@googlegroups.com>,
	<syzbot+8cc27ace5f6972910b31@syzkaller.appspotmail.com>
Subject: Re: [PATCH ipsec] xfrm: policy: avoid warning splat when merging nodes
Date: Wed, 21 Aug 2019 08:41:30 +0200	[thread overview]
Message-ID: <20190821064130.GN2879@gauss3.secunet.de> (raw)
In-Reply-To: <20190812083213.5010-1-fw@strlen.de>

On Mon, Aug 12, 2019 at 10:32:13AM +0200, Florian Westphal wrote:
> syzbot reported a splat:
>  xfrm_policy_inexact_list_reinsert+0x625/0x6e0 net/xfrm/xfrm_policy.c:877
>  CPU: 1 PID: 6756 Comm: syz-executor.1 Not tainted 5.3.0-rc2+ #57
>  Call Trace:
>   xfrm_policy_inexact_node_reinsert net/xfrm/xfrm_policy.c:922 [inline]
>   xfrm_policy_inexact_node_merge net/xfrm/xfrm_policy.c:958 [inline]
>   xfrm_policy_inexact_insert_node+0x537/0xb50 net/xfrm/xfrm_policy.c:1023
>   xfrm_policy_inexact_alloc_chain+0x62b/0xbd0 net/xfrm/xfrm_policy.c:1139
>   xfrm_policy_inexact_insert+0xe8/0x1540 net/xfrm/xfrm_policy.c:1182
>   xfrm_policy_insert+0xdf/0xce0 net/xfrm/xfrm_policy.c:1574
>   xfrm_add_policy+0x4cf/0x9b0 net/xfrm/xfrm_user.c:1670
>   xfrm_user_rcv_msg+0x46b/0x720 net/xfrm/xfrm_user.c:2676
>   netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2477
>   xfrm_netlink_rcv+0x74/0x90 net/xfrm/xfrm_user.c:2684
>   netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
>   netlink_unicast+0x809/0x9a0 net/netlink/af_netlink.c:1328
>   netlink_sendmsg+0xa70/0xd30 net/netlink/af_netlink.c:1917
>   sock_sendmsg_nosec net/socket.c:637 [inline]
>   sock_sendmsg net/socket.c:657 [inline]
> 
> There is no reproducer, however, the warning can be reproduced
> by adding rules with ever smaller prefixes.
> 
> The sanity check ("does the policy match the node") uses the prefix value
> of the node before its updated to the smaller value.
> 
> To fix this, update the prefix earlier.  The bug has no impact on tree
> correctness, this is only to prevent a false warning.
> 
> Reported-by: syzbot+8cc27ace5f6972910b31@syzkaller.appspotmail.com
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied, thanks Florian!

      reply	other threads:[~2019-08-21  6:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 16:45 WARNING in xfrm_policy_inexact_list_reinsert syzbot
2019-08-12  8:32 ` [PATCH ipsec] xfrm: policy: avoid warning splat when merging nodes Florian Westphal
2019-08-21  6:41   ` 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=20190821064130.GN2879@gauss3.secunet.de \
    --to=steffen.klassert@secunet.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+8cc27ace5f6972910b31@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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