Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 29 Oct 2012 22:17:48 +0400
From: Vasily Kulikov <segoon@...nwall.com>
To: owl-dev@...ts.openwall.com
Subject: Re: glibc

Hi,

Sorry for a delay.

On Mon, Oct 15, 2012 at 23:00 +0400, Dmitry V. Levin wrote:
> > Patch401: glibc-2.3.5-owl-alt-res_randomid.diff
> 
> This is problematic due to threading issues, needs work.

Left this unchanged.  I'd not touch this patch as I don't really
understand this crypto and might break something by mistake :)

> > Patch407: glibc-2.3.5-owl-alt-resolv-QFIXEDSZ-underfills.diff
> 
> Don't remember the fate of this one, will check later.

Looks like the patch needs update.  If I understand it correctly, it
explicitly fails to treat undersized responses (IOW, incorrect for sure
DNS answer) as a normal output not to confuse its users.


Also I've failed to update env-sanitize because of some weird linking
problem on i686.  The error itself:

    gcc   -nostdlib -nostartfiles -r -o /usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/librtld.os '-Wl,-(' /usr/src/world/rp
    m-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/dl-allobjs.os /usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/rtld-libc.
    a -lgcc '-Wl,-)' \
              -Wl,-Map,/usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/librtld.os.map
    gcc   -nostdlib -nostartfiles -shared -o /usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/ld.so                        \
              -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,now    \
              /usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/librtld.os -Wl,--version-script=/usr/src/world/rpm-work-1/BUILD
    /glibc-2.16.0/build-i686-linux/ld.map           \
              -Wl,-soname=ld-linux.so.2                     \
              -Wl,-defsym=_begin=0
    /usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/librtld.os: In function `getenv':
    /usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/stdlib/getenv.c:89: undefined reference to `strncmp'
    collect2: ld returned 1 exit status
    make[3]: *** [/usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux/elf/ld.so] Error 1
    make[3]: Leaving directory `/usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/elf'
    make[2]: *** [elf/subdir_lib] Error 2
    make[2]: Leaving directory `/usr/src/world/rpm-work-1/BUILD/glibc-2.16.0'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/world/rpm-work-1/BUILD/glibc-2.16.0/build-i686-linux'
    error: Bad exit status from /usr/src/world/tmp-work/rpm-tmp.58546 (%build)


'strncmp' symbol is present on x86_64, but absent on i686:

    $ readelf -s logs/glibc-build-i386/elf/rtld-libc.a | grep strncmp
        22: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND strncmp
    File: logs/glibc-build-i386/elf/rtld-libc.a(rtld-strncmp-c.os)
         1: 00000000     0 FILE    LOCAL  DEFAULT  ABS strncmp-c.c
        15: 00000000   279 FUNC    GLOBAL DEFAULT    1 __strncmp_ia32
        16: 00000000   279 FUNC    GLOBAL DEFAULT    1 __GI_strncmp

    $ readelf -s logs/glibc-build-x86_64/elf/rtld-libc.a | grep strncmp
        19: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND strncmp
    File: logs/glibc-build-x86_64/elf/rtld-libc.a(rtld-strncmp.os)
        10: 0000000000000000    33 FUNC    GLOBAL DEFAULT    1 strncmp
    File: logs/glibc-build-x86_64/elf/rtld-libc.a(rtld-strncmp-ssse3.os)
        11: 0000000000000000    33 FUNC    GLOBAL DEFAULT    4 __strncmp_ssse3

The direct using of 'getenv' adds the dependency.  Commenting 2 usages
of 'getenv' in the patch removed the linking problem.

I'm a bit lost in glibc make files, probably someone already has an
answer?

Thanks,

-- 
Vasiliy

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.