Re: [PATCH v3] tun: bail out from tun_get_user() if the skb is empty

2017-09-28 Thread David Miller
From: Alexander Potapenko Date: Thu, 28 Sep 2017 11:32:37 +0200 > KMSAN (https://github.com/google/kmsan) reported accessing uninitialized > skb->data[0] in the case the skb is empty (i.e. skb->len is 0): ... > Make sure tun_get_user() doesn't touch skb->data[0] unless there is > actual data. .

[PATCH v3] tun: bail out from tun_get_user() if the skb is empty

2017-09-28 Thread Alexander Potapenko
KMSAN (https://github.com/google/kmsan) reported accessing uninitialized skb->data[0] in the case the skb is empty (i.e. skb->len is 0): BUG: KMSAN: use of uninitialized memory in tun_get_user+0x19ba/0x3770 CPU: 0 PID: 3051 Comm: probe Not tainted 4