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: <CAM_iQpXkXs_RKewfyTKiTi33CH5P-QjfegEhyQG3XuCfU-aetg@mail.gmail.com>
Date:   Wed, 4 Dec 2019 09:24:04 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Taehee Yoo <ap420073@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        treeze.taeung@...il.com
Subject: Re: [net PATCH] hsr: fix a NULL pointer dereference in hsr_dev_xmit()

On Sun, Dec 1, 2019 at 8:08 AM Taehee Yoo <ap420073@...il.com> wrote:
> >
> > Does the following patch help anything? It just moves the list_del_rcu()
> > after synchronize_rcu() only for master port.
> >
>
> Thank you so much for providing the testing code.
> I have tested this patch, but I could still see the same panic.

Yeah, I think the RCU rule requires the "unpublish" to be done
before grace period. New RCU readers could still jump in after
synchronize_rcu()... :-/

IOW, checking NULL is the only way to fix it. So your patch is fine,
although the rcu_read_lock() is unnecessary, as the caller already
acquires RCU read lock. But it doesn't harm anything either.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ