Skip to content

erd --long crashes when attempting to display user/group info for nonexistant group/user #189

Closed

Description

@nwoythal

I have a file on my filesystem that is owned by a GID that doesn't exist locally (but does inside a container) -- when erd attempts to fetch the data from this file, a SIGSEGV is generated:

$ touch foo
$ sudo chown :9999 foo
$ ls -plaht foo
-rw-rw-r-- 1 natewo 9999 0 Jun  7 11:54 foo
$ erd --no-config --long foo
[1]    1025586 segmentation fault (core dumped)  erd foo
$ sudo chown 9999:natewo foo
$ ls -plaht foo
-rw-rw-r-- 1 9999 natewo 0 Jun  7 11:54 foo
$ erd --no-config --long foo
[1]    1025644 segmentation fault (core dumped)  erd fo

FWIW I know very little about rust, but it seems to be coming from src/fs/ug.rs:try_get_user/src/fs/ug.rs:try_get_group

Activity

  1. changed the title [-]`erd --long` crashes when attempting to display user/group info for nonexistant group[/-] [+]`erd --long` crashes when attempting to display user/group info for nonexistant group/user[/+] on Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions