[Bug 1565567] Re: segv in sudo_getgrgid

Rafael David Tinoco rafael.tinoco at canonical.com
Wed May 4 05:45:10 UTC 2016


This patch was exposed by:

"also_check_sudo_group.diff"

(since user was in "sudo" group and should have stopped user_in_group
before)

Right after being caused by:

commit a1663632dc5ab7e7c01e17206854b6f0ba0347dd
Author: Todd C. Miller <Todd.Miller at courtesan.com>
Date:   Fri Jan 22 17:04:59 2016 -0700

    Additional debugging for pwutil functions.

When debug messages accessed non-referenced pointer (struct passwd)
inside the node.

---

Note:

Users that can't have "struct passwd" solved should explore something
like:

---

commit d0c0662fda02260f8ffa4f59133bfe19ccd075a2
Author: Todd C. Miller <Todd.Miller at courtesan.com>
Date:   Sun Sep 25 06:35:40 2011 -0400

    If the invoking user cannot be resolved by uid fake the struct
    passwd and store it in the cache so we can delref it on exit.

---

Faking it, so any other function relying on accessing the node's
structure will succeed.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/1565567

Title:
  segv in sudo_getgrgid

Status in sudo package in Ubuntu:
  Confirmed

Bug description:
  If the user is in a group with no name (because libnss-db got removed
  and the group was defined there, for example...) then:

  the call to sudo_debug_printf in sudo_getgrgid
  (plugins/sudoers/pwutil.c, line 462) causes a SEGV when trying to get
  item->d.gr->gr_name (since item->d.gr is NULL).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1565567/+subscriptions



More information about the foundations-bugs mailing list