[Drbd-dev] Potentially invalid memory accesses in file drivers/block/drbd/drbd_worker.c

Roland Kammerer roland.kammerer at linbit.com
Thu Jul 20 14:10:31 CEST 2017


On Wed, Jul 19, 2017 at 10:50:47PM -0600, Shaobo wrote:
> Hi there,
> 
> My name is Shaobo He and I am a graduate student at University of Utah. I am
> using a static analysis tool to search for null pointer dereferences and
> came across a couple of potentially invalid memory accesses in the file
> drivers/block/drbd/drbd_worker.c: in function `drbd_start_resync`, pointer
> variable `connection` in line 1727 can be NULL while is dereferenced at line
> 1767 (```if (current == connection->worker.task) {```).
> 
> Please let me know if it makes sense. I am looking forward to your reply.

Hi Shaobo,

While highly theoretical and unlikely, better be safe than sorry. Fixed
and we will send that to mainline Linux soon.

Regards, rck


More information about the drbd-dev mailing list