[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200123.114421.1414769180741959285.davem@davemloft.net>
Date: Thu, 23 Jan 2020 11:44:21 +0100 (CET)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
syzkaller@...glegroups.com, ppenkov@...gle.com, willemb@...gle.com
Subject: Re: [PATCH net] tun: add mutex_unlock() call and napi.skb clearing
in tun_get_user()
From: Eric Dumazet <edumazet@...gle.com>
Date: Wed, 22 Jan 2020 09:07:35 -0800
> If both IFF_NAPI_FRAGS mode and XDP are enabled, and the XDP program
> consumes the skb, we need to clear the napi.skb (or risk
> a use-after-free) and release the mutex (or risk a deadlock)
>
> WARNING: lock held when returning to user space!
> 5.5.0-rc6-syzkaller #0 Not tainted
> ------------------------------------------------
> syz-executor.0/455 is leaving the kernel with locks still held!
> 1 lock held by syz-executor.0/455:
> #0: ffff888098f6e748 (&tfile->napi_mutex){+.+.}, at: tun_get_user+0x1604/0x3fc0 drivers/net/tun.c:1835
>
> Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzbot <syzkaller@...glegroups.com>
Applied and queued up for -stable, thanks Eric.
Powered by blists - more mailing lists