oss-sec mailing list archives

Re: Linux Kernel 4.20(21) deadlock vulnerability.


From: Greg KH <gregkh () linuxfoundation org>
Date: Tue, 8 Jan 2019 16:26:27 +0100

On Tue, Jan 08, 2019 at 07:08:14PM +0400, Entropy Moe wrote:
Hello,
I wanted to let you know that there seem to be a deadlock vulnerability on
the linux kernel 4.20.
I am attaching the result report from syzkaller which also got the c code
for replication.

thank you,

Syzkaller hit 'possible deadlock in console_unlock' bug.

RBP: 00000000006cb018 R08: 0000000000000001 R09: 0000000000000031
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
R13: ffffffffffffffff R14: 0000000000000000 R15: 0000000000000000

======================================================
WARNING: possible circular locking dependency detected
4.20.0-rc7+ #8 Not tainted
------------------------------------------------------
syz-executor579/2028 is trying to acquire lock:
00000000e478796d (console_owner){-.-.}, at: log_next kernel/printk/printk.c:489 [inline]
00000000e478796d (console_owner){-.-.}, at: console_unlock+0x33d/0xd30 kernel/printk/printk.c:2401

but task is already holding lock:
0000000030388923 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xcd/0x1d0 drivers/tty/pty.c:120

which lock already depends on the new lock.


Are you sure this is a real problem?  Can you deadlock this when
running?

Also, try 5.0-rc1, a number of tty core changes went in there to try to
resolve these types of issues.  They have not been backported to 4.20.y
yet as they need to get more testing.  If you could run your same test
suite on that kernel, it would be great to find out your results.

thanks,

greg k-h


Current thread: