[Bug 1908438] [NEW] When specifying wrong syntax in sudoers.d include files sudo throws a segmentation fault
Jacobus Erasmus
1908438 at bugs.launchpad.net
Wed Dec 16 20:29:21 UTC 2020
Public bug reported:
I made a mistake and used a relative rather than absolute path to the
application:
The following file placed in the /etc/sudoers.d causes a segmentation
fault in when and sudo command is run.
/etc/sudoers.d/reset_database
#Allows reset_database to be called as user jacobus
jacobus ALL=NOPASSWD: systemctl stop freeradius
jacobus ALL=NOPASSWD: systemctl start freeradius
jacobus ALL=NOPASSWD: systemctl restart postgresql
ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: sudo 1.9.1-1ubuntu1
ProcVersionSignature: Ubuntu 5.8.0-33.36-generic 5.8.17
Uname: Linux 5.8.0-33-generic x86_64
ApportVersion: 2.20.11-0ubuntu50.2
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Dec 16 22:19:05 2020
InstallationDate: Installed on 2019-06-04 (561 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
SourcePackage: sudo
UpgradeStatus: Upgraded to groovy on 2020-10-25 (52 days ago)
VisudoCheck:
Error: command ['pkexec', '/usr/sbin/visudo', '-c'] failed with exit code 1: /etc/sudoers.d/reset_database: bad permissions, should be mode 0440
/etc/sudoers: parsed OK
/etc/sudoers.d/README: parsed OK
/etc/sudoers.d/cephadm: parsed OK
/etc/sudoers.d/openfortigui: parsed OK
modified.conffile..etc.sudoers: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers']
modified.conffile..etc.sudoers.d.README: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/README']
** Affects: sudo (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug groovy
--
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/1908438
Title:
When specifying wrong syntax in sudoers.d include files sudo throws a
segmentation fault
Status in sudo package in Ubuntu:
New
Bug description:
I made a mistake and used a relative rather than absolute path to the
application:
The following file placed in the /etc/sudoers.d causes a segmentation
fault in when and sudo command is run.
/etc/sudoers.d/reset_database
#Allows reset_database to be called as user jacobus
jacobus ALL=NOPASSWD: systemctl stop freeradius
jacobus ALL=NOPASSWD: systemctl start freeradius
jacobus ALL=NOPASSWD: systemctl restart postgresql
ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: sudo 1.9.1-1ubuntu1
ProcVersionSignature: Ubuntu 5.8.0-33.36-generic 5.8.17
Uname: Linux 5.8.0-33-generic x86_64
ApportVersion: 2.20.11-0ubuntu50.2
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Dec 16 22:19:05 2020
InstallationDate: Installed on 2019-06-04 (561 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
SourcePackage: sudo
UpgradeStatus: Upgraded to groovy on 2020-10-25 (52 days ago)
VisudoCheck:
Error: command ['pkexec', '/usr/sbin/visudo', '-c'] failed with exit code 1: /etc/sudoers.d/reset_database: bad permissions, should be mode 0440
/etc/sudoers: parsed OK
/etc/sudoers.d/README: parsed OK
/etc/sudoers.d/cephadm: parsed OK
/etc/sudoers.d/openfortigui: parsed OK
modified.conffile..etc.sudoers: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers']
modified.conffile..etc.sudoers.d.README: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/README']
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1908438/+subscriptions
More information about the foundations-bugs
mailing list