A flaw was discovered in the linux kernel tty subsystem which allows for disclosure of uncontrolled memory location and possible kernel panic. The information leak is caused by a race condition when attempting to set and read the tty line discipline. An attacker can use the TIOCSETD (via tty_set_ldisc ) to switch to a new line discipline, a concurrent call to with a TIOCGETD ioctl performs a read on a given tty may be able to access memory previously allocated. Up to 4 bytes may leaked when querying the line discipline. The problematic code: case TIOCGETD: return put_user(tty->ldisc->ops->num, (int __user *)p); The flaw is triggered when ldisc's address is loaded before the new address is set and the access is performed after the old is freed, which results to crash due to the kernel accessing an invalid address. If an attacker prepares the kernel slab by setting up the ldisc struct at the correct offset they can effectively read 4 bytes from any kernel memory. Invalid data at the ldisc address may also panic the machine if it is not pointing to valid mappable memory. Upstream fix: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c17c861a357e9458001f021a7afa7aab9937439 Original proposed fix: https://bugzilla.redhat.com/attachment.cgi?id=1112221&action=diff
Created attachment 1112221 [details] Proposed patch
Created kernel tracking bugs for this issue: Affects: fedora-all [bug 1300224]
This issue went public via this correspondence: http://lkml.iu.edu/hypermail/linux/kernel/1511.3/03045.html
kernel-4.3.4-300.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
kernel-4.3.4-200.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Statement: This issue affects kernels in Red Hat Enterprise Linux 5, 6 and 7. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.