[sudo-users] [BUG] Another system (solaris 10 sparc) requires --disable-pie flag

Christian Jullien eligis at orange.fr
Wed May 22 22:42:49 MDT 2013


Are you using the latest gnu toolchain? Gcc 4.8, binutils-2.23.2 ...

With PIE, it looks allocator using brk starts at a very very high address
which results to NOMEM

 

After around the same initialization sequence, when compiled with PIE I get:

 

...

/1:     schedctl()                                      = 0xFEF00000

/1:     lwp_continue(2)                                 = 0

/2:     lwp_create()    (returning as new lwp ...)      = 0

/2:     setustack(0xFEF10288)

/2:     schedctl()                                      = 0xFEF00010

/2:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF
[0x0000FFFF]

/2:     lwp_exit()

/1:     lwp_wait(2, 0xFFBFFA44)                         = 0

/1:     brk(0xFF3FD4E0)                                 Err#12 ENOMEM

 

While without PIE (and fully working sudo), I get

 

/1:     schedctl()                                      = 0xFF3F4000

/1:     lwp_continue(2)                                 = 0

/2:     lwp_create()    (returning as new lwp ...)      = 0

/2:     setustack(0xFEF20288)

/2:     schedctl()                                      = 0xFF3F4010

/2:     lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0x0000FFF7) = 0xFFBFFEFF
[0x0000FFFF]

/2:     lwp_exit()

/1:     lwp_wait(2, 0xFFBFFB1C)                         = 0

/1:     brk(0x0003B810)                                 = 0

 

What is the address of the first brk call on your UltraSPARC-IIi 440MHz
machine when you do a "truss src/sudo"?

Do you see why PIE results to this big address?

 

C.

 

-----Original Message-----
From: Todd C. Miller [mailto:Todd.Miller at courtesan.com] 
Sent: mercredi 22 mai 2013 23:01
To: Christian Jullien
Cc: sudo-users at sudo.ws
Subject: Re: [sudo-users] [BUG] Another system (solaris 10 sparc) requires
--disable-pie flag

 

I've been trying to reproduce this on an UltraSPARC-IIi 440MHz with 512MB
which should be similar to your UltraSparc 5.  It is running Solaris 10 5/08
s10s_u5wos_10 SPARC according to /etc/release.

 

However, with sudo 1.8.6p8 I have no problem with the PIE binary.

I've also tested the latest sudo 1.8.7 release candidate and it is also
fine.

 

- todd



More information about the sudo-users mailing list