[Cryptography] Ah, the wonders of complexity

Jerry Leichter leichter at lrw.com
Wed Jun 20 11:15:58 EDT 2018

We have to build on the abstractions handed to us by, e.g., our hardware designers.  When those abstractions are too complex, no one can understand the implications.

The following description is from CVE-2018-8897 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-8897).  It reminds me, in a general way, of classic security bugs going back to the 1960's, e.g., a Tenex bug in which a user-written page fault handler could turn an O(N^k) search for the characters in a k-character password into an O(Nk) search by using page faults as an oracle for individual matching characters.

"A statement in the System Programming Guide of the Intel 64 and IA-32 Architectures Software Developer's Manual (SDM) was mishandled in the development of some or all operating-system kernels, resulting in unexpected behavior for #DB exceptions that are deferred by MOV SS or POP SS, as demonstrated by (for example) privilege escalation in Windows, macOS, some Xen configurations, or FreeBSD, or a Linux kernel crash. The MOV to SS and POP SS instructions inhibit interrupts (including NMIs), data breakpoints, and single step trap exceptions until the instruction boundary following the next instruction (SDM Vol. 3A; section 6.8.3). (The inhibited data breakpoints are those on memory accessed by the MOV to SS or POP to SS instruction itself.) Note that debug exceptions are not inhibited by the interrupt enable (EFLAGS.IF) system flag (SDM Vol. 3A; section 2.3). If the instruction following the MOV to SS or POP to SS instruction is an instruction like SYSCALL, SYSENTER, INT 3, etc. that transfers control to the operating system at CPL < 3, the debug exception is delivered after the transfer to CPL < 3 is complete. OS kernels may not expect this order of events and may therefore experience unexpected behavior when it occurs."

                                                        -- Jerry

More information about the cryptography mailing list