Your message dated Mon, 31 Jan 2022 18:37:09 +0100
with message-id <2fc04dff-10c2-53d0-7d7c-49fffdc04...@debian.org>
and subject line Re: Bug#1004674: libnss-systemd: SIGABRT on getgrent pass 2 ( 
with dynamic user)
has caused the Debian Bug report #1004674,
regarding libnss-systemd: SIGABRT on getgrent pass 2 ( with dynamic user)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1004674: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004674
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libnss-systemd
Version: 247.3-6
Severity: normal
X-Debbugs-Cc: aeru...@aerusso.net


Dear maintainer,

I discovered this issue when running "metastore -s":

Assertion 'name' failed at src/basic/strv.c:22, function strv_find(). Aborting.

The source in metastore is this block of code (src/utils.c:) :

/* Initial setup of the gid table */
static void
create_group_table()
{
        struct group *tmp;
        int count, index;

        for (count = 0; getgrent(); count++) /* Do nothing */;

        gtable = xmalloc(sizeof(struct group) * (count + 1));
        memset(gtable, 0, sizeof(struct group) * (count + 1));
        setgrent();

        for (index = 0; (tmp = getgrent()) && index < count; index++) {   // 
<--- SIGABRT on getgrent()
                gtable[index].gr_gid = tmp->gr_gid;
                gtable[index].gr_name = xstrdup(tmp->gr_name);
        }

        endgrent();
}

I have a dynamic user:

getent passwd 

#other users
earlyoom:x:61876:61876:Dynamic User:/:/usr/sbin/nologin
#EOF

The first pass through the group table with getgrent goes fine (and earlyoom's 
group shows up no problem).

The second pass, it bugs out at the last group entry (which is also 
earlyoom's).  The issue disappears after

# systemctl stop earlyoom

(and the earlyoom passwd entry goes away, as expected).

- The following reproduces the problem (as the body of create_group_table):

        for (count = 0; getgrent(); count++) /* Do nothing */;
        setgrent();
        for (count = 0; getgrent(); count++) /* Do nothing */;

(ABRT on last line). 

I don't know if this reproduces on other non-Debian systems. The only related 
upstream bug I could find 
is [1] which is resolved by [2], and is apparently included as of 247.3-6 (by 
inspection of source).

Best,
Antonio

[1] https://github.com/systemd/systemd/issues/17870
[2] https://github.com/systemd/systemd/pull/17873

-- System Information:
Debian Release: 11.2
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990,
'stable'), (600, 'proposed-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-172-amd64 (SMP w/16 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not
set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libnss-systemd depends on:
ii  libc6    2.31-13+deb11u2
ii  systemd  247.3-6

libnss-systemd recommends no packages.

libnss-systemd suggests no packages.

--- End Message ---
--- Begin Message ---
Version: 250.3-2

Am 31.01.22 um 17:26 schrieb Michael Biebl:

Control: tags -1 + moreinfo

Am 31.01.22 um 16:31 schrieb Antonio Russo:

I discovered this issue when running "metastore -s":

Assertion 'name' failed at src/basic/strv.c:22, function strv_find(). Aborting.

..

I don't know if this reproduces on other non-Debian systems. The only related upstream bug I could find is [1] which is resolved by [2], and is apparently included as of 247.3-6 (by inspection of source).


Since we don't ship any Debian specific modifications in that regard, it would be great if you can try with systemd v250 from unstable/testing and if it's still reproducible there, report the issue at
https://github.com/systemd/systemd/issues

I could easily reproduce the issue by install earlyoom and metastore in bullseye VM.

After only upgrading systemd/libnss-systemd to 250.3-2, the issue was gone. Marking as fixed for that version.
Given that, there is no need to forward this to upstream.

Michael

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---

Reply via email to