lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E79EF019-0E7F-4935-87AB-6A543A134E35@oracle.com>
Date: Fri, 13 Oct 2023 23:00:31 +0000
From: Anjali Kulkarni <anjali.k.kulkarni@...cle.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: kernel test robot <oliver.sang@...el.com>,
        "oe-lkp@...ts.linux.dev"
	<oe-lkp@...ts.linux.dev>,
        "lkp@...el.com" <lkp@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "David S.
 Miller" <davem@...emloft.net>,
        Liam Howlett <liam.howlett@...cle.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [linus:master] [connector/cn_proc]  2aa1f7a1f4:
 BUG:kernel_NULL_pointer_dereference,address



> On Oct 4, 2023, at 8:40 AM, Jakub Kicinski <kuba@...nel.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:

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


Powered by blists - more mailing lists