NetBSD Problem Report #412
From gnats Fri Aug 12 20:59:29 1994
Received: from bloom-beacon.mit.edu (BLOOM-BEACON.MIT.EDU [18.181.0.26]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with SMTP id UAA08261 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 12 Aug 1994 20:59:27 -0700
Message-Id: <199408130347.XAA01225@orchard.medford.ma.us>
Date: Fri, 12 Aug 1994 23:47:56 -0400
From: sommerfeld@orchard.medford.ma.us (Bill Sommerfeld)
Reply-To: sommerfeld@orchard.medford.ma.us
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: possible to crash system by setting V86 mode.
X-Send-Pr-Version: 3.2
>Number: 412
>Category: port-i386
>Synopsis: can crash system by setting V86 mode.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin (GNATS administrator)
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Aug 12 21:05:04 +0000 1994
>Closed-Date: Sat Aug 13 08:39:29 +0000 1994
>Last-Modified:
>Originator: Bill Sommerfeld
>Release: 1.0BETA
>Organization:
none.
>Environment:
System: NetBSD orchard.medford.ma.us 1.0_BETA NetBSD 1.0_BETA (ORCHARD) #10: Fri Aug 12 20:56:51 EDT 1994 sommerfeld@orchard.medford.ma.us:/u1/nsys/sys/arch/i386/compile/ORCHARD i386
>Description:
A user process can set Virtual '86 mode in a signal handler
(by bashing the PSL_VM into scp->sc_efl) and returning from the
signal handler.
Subsequent code executed in V86 mode can then clobber CS to
a value such that ISPL(cs) != SEL_UPL.
(defined in <machine/segments.h>)
If the code then does something to prompt an interrupt or
syscall, you probably panic because the kernel thinks the trap in
question came from the kernel rather than user space.
This was discovered (the hard way) by experimentation with
setting V86 mode using sigreturn..
This is marked serious/high because an unpriviledged user
process can take down the system.
>How-To-Repeat:
>Fix:
Easy:
Prevent user space from setting PSL_VM in sc_efl (add
it to PSL_USRCLR in psl.h)
Better:
Correct the code in trap() and syscall() (and elsewhere in the
system?) which assumes we're never operating in VM86 mode.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Sat Aug 13 01:39:29 PDT 1994
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.