lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <55671A40-B122-4723-B412-B52E30ABA56F@gmail.com>
Date:   Wed, 9 Aug 2023 21:02:52 -0400
From:   Sishuai Gong <sishuai.system@...il.com>
To:     gregkh@...uxfoundation.org, jirislaby@...nel.org
Cc:     linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Racy kb->ledflagstate and kb->default_ledflagstate

Hi,

We observed a race over kb->ledflagstate and kb->default_ledflagstate
when two threads are running vt_do_kdskled() in parallel:

Thread-1                        Thread-2
// holding led_lock             // holding kbd_event_lock
kb->ledflagstate = (arg & 7);
                                ucval = kb->ledflagstate |
                                        (kb->default_ledflagstate << 4);
kb->default_ledflagstate = ((arg >> 4) & 7);

Is it better to hold both led_lock and kbd_event_lock under case KDGKBLED?
We are happy to submit the patch if it makes sense.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ