Re: [PATCH] can: check for null sk before deferencing it via the call to sock_net

2017-10-17 Thread Marc Kleine-Budde
On 09/08/2017 05:02 PM, Colin King wrote: > From: Colin Ian King > > The assignment of net via call sock_net will dereference sk. This > is performed before a sanity null check on sk, so there could be > a potential null dereference on the sock_net call if sk is null. > Fix this by assigning net

Re: [PATCH] can: check for null sk before deferencing it via the call to sock_net

2017-10-16 Thread Oliver Hartkopp
On 10/16/2017 06:37 PM, Josh Boyer wrote: On Fri, Sep 8, 2017 at 1:46 PM, Oliver Hartkopp wrote: On 09/08/2017 05:02 PM, Colin King wrote: From: Colin Ian King The assignment of net via call sock_net will dereference sk. This is performed before a sanity null check on sk, so there could b

Re: [PATCH] can: check for null sk before deferencing it via the call to sock_net

2017-10-16 Thread Josh Boyer
On Fri, Sep 8, 2017 at 1:46 PM, Oliver Hartkopp wrote: > > > On 09/08/2017 05:02 PM, Colin King wrote: >> >> From: Colin Ian King >> >> The assignment of net via call sock_net will dereference sk. This >> is performed before a sanity null check on sk, so there could be >> a potential null derefer

Re: [PATCH] can: check for null sk before deferencing it via the call to sock_net

2017-09-08 Thread Oliver Hartkopp
On 09/08/2017 05:02 PM, Colin King wrote: From: Colin Ian King The assignment of net via call sock_net will dereference sk. This is performed before a sanity null check on sk, so there could be a potential null dereference on the sock_net call if sk is null. Fix this by assigning net after th

[PATCH] can: check for null sk before deferencing it via the call to sock_net

2017-09-08 Thread Colin King
From: Colin Ian King The assignment of net via call sock_net will dereference sk. This is performed before a sanity null check on sk, so there could be a potential null dereference on the sock_net call if sk is null. Fix this by assigning net after the sk null check. Also replace the sk == NULL w