From: Simon Horman <horms@kernel.org>
To: Edward Adam Davis <eadavis@qq.com>
Cc: syzbot+be97dd4da14ae88b6ba4@syzkaller.appspotmail.com,
davem@davemloft.net, edumazet@google.com,
herbert@gondor.apana.org.au, kuba@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, steffen.klassert@secunet.com,
syzkaller-bugs@googlegroups.com,
Shaurya Rane <ssrane_b23@ee.vjti.ac.in>,
clingfei <clf700383@gmail.com>
Subject: Re: [PATCH] key: No support for family zero
Date: Mon, 27 Oct 2025 21:00:57 +0000 [thread overview]
Message-ID: <20251027210057.GA4072277@horms.kernel.org> (raw)
In-Reply-To: <tencent_57525DE2DDF41911CFDB8DF525A08D9D9207@qq.com>
+ Shaurya Rane, clingfei
On Sun, Oct 19, 2025 at 10:34:11AM +0800, Edward Adam Davis wrote:
> When setting the extended skb data for sadb_x_ipsecrequest, the requested
> extended data size exceeds the allocated skb data length, triggering the
> reported bug.
>
> Because family only supports AF_INET and AF_INET6, other values will cause
> pfkey_sockaddr_fill() to fail, which in turn causes set_ipsecrequest() to
> fail.
>
> Therefore, a workaround is available here: using a family value of 0 to
> resolve the issue of excessively large extended data length.
>
> syzbot reported:
> kernel BUG at net/core/skbuff.c:212!
> Call Trace:
> skb_over_panic net/core/skbuff.c:217 [inline]
> skb_put+0x159/0x210 net/core/skbuff.c:2583
> skb_put_zero include/linux/skbuff.h:2788 [inline]
> set_ipsecrequest+0x73/0x680 net/key/af_key.c:3532
>
> Fixes: 08de61beab8a ("[PFKEYV2]: Extension for dynamic update of endpoint address(es)")
> Reported-by: syzbot+be97dd4da14ae88b6ba4@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=be97dd4da14ae88b6ba4
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Hi,
There are several patches relating to this issue. And they seem
to take one of two approaches.
1. As with this patch [a] and [b]: check the return value of
pfkey_sockaddr_len()
2. As in [c]: correct the type of the family argument to set_ipsecrequest()
[a] key: No support for family zero
https://lore.kernel.org/all/tencent_57525DE2DDF41911CFDB8DF525A08D9D9207@qq.com/
[b] net: key: Validate address family in set_ipsecrequest()
https://lore.kernel.org/all/CANNWa05pX3ratdawb2A6AUBocUgYo+EKZeHBZohQWuBC6_W1AA@mail.gmail.com/
[c] fix integer overflow in set_ipsecrequest
https://lore.kernel.org/all/20251021030035.1424912-1-1599101385@qq.com/
I would appreciate it if the patch authors could coordinate creating a
patch(set) to address this issue. And look over the more detailed response
I provided to [c].
Thanks!
--
pw-bot: changes-requested
next prev parent reply other threads:[~2025-10-27 21:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 5:53 [syzbot] [net?] kernel BUG in set_ipsecrequest syzbot
2025-10-17 10:53 ` syzbot
2025-10-19 2:34 ` [PATCH] key: No support for family zero Edward Adam Davis
2025-10-27 21:00 ` Simon Horman [this message]
2025-10-19 18:29 ` [syzbot] [net?] kernel BUG in set_ipsecrequest shaurya
2025-10-19 18:32 ` syzbot
2025-10-21 3:00 ` [PATCH] fix integer overflow " clingfei
2025-10-23 12:24 ` [PATCH net] net: key: Fix potential " clingfei
2025-10-27 20:37 ` Simon Horman
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=20251027210057.GA4072277@horms.kernel.org \
--to=horms@kernel.org \
--cc=clf700383@gmail.com \
--cc=davem@davemloft.net \
--cc=eadavis@qq.com \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ssrane_b23@ee.vjti.ac.in \
--cc=steffen.klassert@secunet.com \
--cc=syzbot+be97dd4da14ae88b6ba4@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;
as well as URLs for NNTP newsgroup(s).