Re: [PATCH] can: etas_es58x: fix null pointer dereference when handling error frames

2021-04-13 Thread Marc Kleine-Budde
On 13.04.2021 20:42:42, Vincent Mailhol wrote: > During the handling of CAN bus errors, a CAN error SKB is allocated > using alloc_can_err_skb(). Even if the allocation of the SKB fails, > the function continues in order to do the stats handling. > > All access to the can_frame pointer (cf) should

[PATCH] can: etas_es58x: fix null pointer dereference when handling error frames

2021-04-13 Thread Vincent Mailhol
During the handling of CAN bus errors, a CAN error SKB is allocated using alloc_can_err_skb(). Even if the allocation of the SKB fails, the function continues in order to do the stats handling. All access to the can_frame pointer (cf) should be guarded by an if statement: if (cf) However,