]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix handling of one more possible exception on return to usermode.
authorKonstantin Belousov <kib@FreeBSD.org>
Sat, 8 Jul 2017 11:07:39 +0000 (11:07 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 8 Jul 2017 11:07:39 +0000 (11:07 +0000)
commitf2c18deb0e21aa32c7400e204f7746d67a821153
tree33aea03f5d0dda0cccb8116e6bc27887ac7aecdb
parent1f3aded0669b74605c87e2646440737f2ef425e3
Fix handling of one more possible exception on return to usermode.

If %ss is loaded with a segment pointing to a non-present descriptor
by the IRETD instruction, a kernel-mode #SS exception is generated.
Resulting T_STKFLT trap must be checked against doreti_iret_fault
location and handled, otherwise userspace may panic the kernel.

Note that this is i386 variant of FreeBSD-SA-15:21.amd64, but unlike
amd64, there is no swapgs on i386 and the issue is arguably not
exploitable.

Reported by: Maxime Villard <max@m00nbsd.net>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/i386/i386/trap.c