NetBSD-Bugs archive

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

kern/49287: something wrong between exec_script and compat32



>Number:         49287
>Category:       kern
>Synopsis:       something wrong between exec_script and compat32
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 14 23:35:00 +0000 2014
>Originator:     David A. Holland
>Release:        NetBSD 7.99.1 (20140819)
>Organization:
>Environment:
System: NetBSD macaran 7.99.1 NetBSD 7.99.1 (MACARAN) #21: Tue Aug 19 20:08:43 EDT 2014 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:

Something causes exec arguments to get scrambled when running scripts
with COMPAT_32. It's not entirely clear yet if this is when execing
from a 32-bit process or when execing a 32-bit interpreter; probably
the latter as it seems to be connected to execing scripts.

>How-To-Repeat:

Enter a 32-bit chroot, and then:
   % true
   /usr/bin/true: Bad address.
   Exit 1
   % 

   % ktrace -d -tav true
   [run kdump from outside the chroot]
   [observe that the environment strings have made their way into argv]

kdump inside a 32-bit chroot does not work, but that's probably
unrelated.

It looks to me like the NULL at the end of argv is not being handled
right, and it's probably related to the shifting around that execing
scripts requires.

>Fix:



Home | Main Index | Thread Index | Old Index