NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-i386/50245: i386 multiboot kernel assumes ss:esp is valid



>Number:         50245
>Category:       port-i386
>Synopsis:       i386 multiboot kernel assumes ss:esp is valid
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 14 16:50:01 +0000 2015
>Originator:     Quentin Garnier
>Release:        current
>Organization:
>Environment:
>Description:
https://www.gnu.org/software/grub/manual/multiboot/multiboot.html

says this:

?ESP?
    The OS image must create its own stack as soon as it needs one. 

However, sys/arch/i386/i386/locore.S does this:

/*
 * Indeed, a multiboot-compliant boot loader executed us.  We copy
 * the received Multiboot information structure into kernel's data
 * space to process it later -- after we are relocated.  It will
 * be safer to run complex C code than doing it at this point.
 */
pushl	%ebx		# Address of Multiboot information

which assumes that ss:esp points to something usable, when there is no guarantee for that.
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index