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: <ZS4z1mxtTIEpFZI/@xsang-OptiPlex-9020>
Date:   Tue, 17 Oct 2023 15:12:22 +0800
From:   Oliver Sang <oliver.sang@...el.com>
To:     Anjali Kulkarni <anjali.k.kulkarni@...cle.com>
CC:     Jakub Kicinski <kuba@...nel.org>,
        "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>,
        <oliver.sang@...el.com>
Subject: Re: [linus:master] [connector/cn_proc]  2aa1f7a1f4:
 BUG:kernel_NULL_pointer_dereference,address

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@...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:

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@...el.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
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ