Package: libnss-ldap
Version: 251-7
Severity: grave

I noticed my postfix bouncing mail when 'deliver' failed with a glibc malloc checking memory error. Investigation showed it to always occur in a getpwnam() call. The following test program fails in something like 100-400 calls on my libnss-ldap system but works correctly through 70k calls (all of /usr/share/dict/words) on 'normal' systems. (Deliver bug is #408406)

This bug causes email systems to randomly bounce mail. If the bug is not limited to unrecognized users it will effect the stability of the whole system. I only have 160 users, not enough to test using
only valid names, they all get cached.

#include <string.h>
#include <stdio.h>
#include <pwd.h>

main()
{
    char buf[10240], *b;
    struct passwd *p;
    int c = 0;

    while( b = fgets( buf, sizeof(buf)-1, stdin)) {
        char *n = strchr(buf,'\n');

        if( n) *n = 0;
        p = getpwnam(buf);
        fprintf(stderr,".");
        if ( c++ > 72) {
            c = 0;
            fprintf(stderr,"\n");
        }
    }
}

That program will look up each line of standard input.
A good test is...
        fgrep -v \' /usr/share/dict/words | ./ut
... to send in all the words without apostrophes, like so...

[EMAIL PROTECTED]:~$ fgrep -v \' /usr/share/dict/words | ./ut
........................................................................ .. ................................................*** glibc detected *** free(): invalid pointer: 0xb7f17d14 ***
Aborted (core dumped)



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to