lkml.org 
[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: hiddev: Fix race in in hiddev_disconnect()
On Wed, 15 Jan 2020, Dan Carpenter wrote:

> Syzbot reports that "hiddev" is used after it's free in hiddev_disconnect().
> The hiddev_disconnect() function sets "hiddev->exist = 0;" so
> hiddev_release() can free it as soon as we drop the "existancelock"
> lock. This patch moves the mutex_unlock(&hiddev->existancelock) until
> after we have finished using it.
>
> Reported-by: syzbot+784ccb935f9900cc7c9e@syzkaller.appspotmail.com
> Fixes: 7f77897ef2b6 ("HID: hiddev: fix potential use-after-free")
> Suggested-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied to for-5.6/upstream-fixes. Thanks,

--
Jiri Kosina
SUSE Labs

\
 
 \ /
  Last update: 2020-02-12 14:48    [W:0.074 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site