From: Oliver Sang <oliver.sang@intel.com>
To: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
"oe-lkp@lists.linux.dev" <oe-lkp@lists.linux.dev>,
"lkp@intel.com" <lkp@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Liam Howlett <liam.howlett@oracle.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
<oliver.sang@intel.com>
Subject: Re: [linus:master] [connector/cn_proc] 2aa1f7a1f4: BUG:kernel_NULL_pointer_dereference,address
Date: Tue, 17 Oct 2023 15:12:22 +0800 [thread overview]
Message-ID: <ZS4z1mxtTIEpFZI/@xsang-OptiPlex-9020> (raw)
In-Reply-To: <E79EF019-0E7F-4935-87AB-6A543A134E35@oracle.com>
hi, Anjali Kulkarni,
On Fri, Oct 13, 2023 at 11:00:31PM +0000, Anjali Kulkarni wrote:
>
>
> > On Oct 4, 2023, at 8:40 AM, Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Wed, 20 Sep 2023 14:51:32 +0800 kernel test robot wrote:
> >> kernel test robot noticed "BUG:kernel_NULL_pointer_dereference,address" on:
> >>
> >> commit: 2aa1f7a1f47ce8dac7593af605aaa859b3cf3bb1 ("connector/cn_proc: Add filtering to fix some bugs")
> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
> >
> > Anjali, have you had the chance to look into this?
>
> Hi,
> I was unable to reproduce the issues with the steps given - many packages are missing, etc. - I am still trying though - however, the stack trace of this issue shows it is a NULL pointer de-reference (it looks like in cn_filter() function) - and I found a potential suspect where a check for NULL pointer was missing. So I’ve sent out the patch fix for this - is it possible for someone to please test with this fix and let me know if the issue is resolved? The fix looks like:
I applied below patch upon v6.6-rc6, the issue reported by original report was
gone.
(and I confirmed the issue still can be reproduced on v6.6-rc6)
Tested-by: kernel test robot <oliver.sang@intel.com>
>
> diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
> index 05d562e9c8b1..a8e55569e4f5 100644
> --- a/drivers/connector/cn_proc.c
> +++ b/drivers/connector/cn_proc.c
> @@ -54,7 +54,7 @@ static int cn_filter(struct sock *dsk, struct sk_buff *skb, void *data)
> enum proc_cn_mcast_op mc_op;
> uintptr_t val;
>
> - if (!dsk || !data)
> + if (!dsk || !data || !dsk->sk_user_data)
> return 0;
>
> ptr = (__u32 *)data;
> -- 2.42.0
>
>
next prev parent reply other threads:[~2023-10-17 7:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 6:51 [linus:master] [connector/cn_proc] 2aa1f7a1f4: BUG:kernel_NULL_pointer_dereference,address kernel test robot
2023-10-04 15:40 ` Jakub Kicinski
2023-10-04 16:39 ` Anjali Kulkarni
2023-10-10 21:37 ` Anjali Kulkarni
2023-10-13 23:00 ` Anjali Kulkarni
2023-10-17 7:12 ` Oliver Sang [this message]
2023-10-17 18:24 ` Anjali Kulkarni
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=ZS4z1mxtTIEpFZI/@xsang-OptiPlex-9020 \
--to=oliver.sang@intel.com \
--cc=anjali.k.kulkarni@oracle.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=liam.howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=oe-lkp@lists.linux.dev \
/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