From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 25 Sep 2009 13:12:26 +0400 From: "Dmitry V. Levin" To: "Kirill A. Shutemov" Message-ID: <20090925091226.GC21891@wo.int.altlinux.org> Mail-Followup-To: "Kirill A. Shutemov" , ALT Linux Team development discussions , "Konstantin A. Lepikhov" , Michail Yakushin References: <20090925075819.GA12530@lks.home> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pk6IbRAofICFmK5e" Content-Disposition: inline In-Reply-To: X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Cc: Michail Yakushin , ALT Linux Team development discussions , "Konstantin A. Lepikhov" Subject: Re: [devel] suid binaries and ELF Auxiliary Vectors X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2009 09:12:26 -0000 Archived-At: List-Archive: List-Post: --Pk6IbRAofICFmK5e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 25, 2009 at 11:23:47AM +0300, Kirill A. Shutemov wrote: > On Fri, Sep 25, 2009 at 11:15 AM, Kirill A. Shutemov > wrote: > > 2009/9/25 Konstantin A. Lepikhov : > >> http://people.redhat.com/drepper/elftut1.ps - > > > > Thanks for link. > > > >> "The function create_elf_tables is responsible for > >> creating the user stack which includes creating the auxiliary vector." > > > > Yep, I see. It really creates auxv on suid binaries. At least it reaches > > copy_to_user(sp, elf_info, ei_index * sizeof(elf_addr_t)) > > But still there is no auxv in userspace. :( > > >=20 > It seems problem is in glibc. When I compiled similar code with > klibc, it works fine. >=20 > Dmitry, could you comment it? Probably, it's security-related > thing. What's the point? Every ELF executable gets an auxv, but when glibc detects that the running process is privileged, it mangles its environment and, besides all, sets __libc_enable_secure variable to 1. --=20 ldv --Pk6IbRAofICFmK5e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkq8iXkACgkQfKvmrJ41Nh543ACdHsxOywJ4Kk7opluiGOm26sbO YswAoMI3PpwlPW9a6kKpVJZbwfqUGCMY =yZV6 -----END PGP SIGNATURE----- --Pk6IbRAofICFmK5e--