Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572344 - sys-auth/polkit - pkcheck segfaults when run without action id
Summary: sys-auth/polkit - pkcheck segfaults when run without action id
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL: https://gitlab.freedesktop.org/polkit...
Whiteboard:
Keywords: NeedPatch, UPSTREAM
Depends on:
Blocks:
 
Reported: 2016-01-19 11:38 UTC by Binary Runner
Modified: 2024-01-22 21:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Binary Runner 2016-01-19 11:38:58 UTC
pkcheck throws segfault when run without the action argument - I don't think segfaulting should be a normal behaviour

Reproducible: Always

Steps to Reproduce:
1. list acrtion with pkaction, pick on, e.g. org.freedesktop.consolekit.system.restart
2. pick some process get its PID
3. run 'pkcheck -p $PID -a $ACTION' , it should work and works (for the restart action it will probably produce 'Not authorized.')
3. run 'pkcheck -p $PID' , it produces:
** (pkcheck:NNNN): CRITICAL **: polkit_authority_check_authorization_sync: assertion 'action_id != NULL' failed
Segmentation fault
Actual Results:  
segfaults - "see steps to reproduce"
NNNN - us a number that changes with every attempt 

Expected Results:  
prints error message about missing action id

Portage 2.2.26 (python 2.7.10-final-0, default/linux/amd64/13.0/developer, gcc-4.8.5, glibc-2.21-r1, 4.1.12-gentoo x86_64)
=================================================================
System uname: Linux-4.1.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-2.2
KiB Mem:    16309952 total,    365904 free
KiB Swap:    8965568 total,   8965568 free
Timestamp of repository gentoo: Thu, 14 Jan 2016 20:45:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.3.5-r2::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.4::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.at.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --timeout=1000 --delete-after

ovirt-overlay
    location: /var/lib/layman/ovirt-overlay
    masters: gentoo
    priority: 0

runner-s-overlay
    location: /opt/portage
    masters: gentoo
    priority: 1

gamerlay
    location: /var/lib/layman/gamerlay
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git

~~~~~~~~~~
java
    location: /var/lib/layman/java
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/java.git
    masters: gentoo
    priority: 50

nikai
    location: /var/lib/layman/nikai
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/user/nikai.git
    masters: gentoo
    priority: 50

tox-overlay
    location: /var/lib/layman/tox-overlay
    sync-type: git
    sync-uri: git@github.com:Tox/gentoo-overlay-tox.git
    masters: gentoo
    priority: 50


ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.2/conf /usr/
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-r
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy collision-protect config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafi
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=1000 --delete-after"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac accessibility acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdda cdr cjk cli consolekit cracklib crypt
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAG
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-09-30 09:57:31 UTC
Looks like an upstream bug, could you report it at https://bugs.freedesktop.org/enter_bug.cgi?product=PolicyKit&component=daemon and paste the link here ?
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2018-11-17 23:54:42 UTC
Should be a simple contribution to upstream should anyone want to do this.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-18 12:34:17 UTC
Not at computer to check but wonder if https://gitlab.freedesktop.org/polkit/polkit/-/commit/7550b683c0fe514d4cb8a173f4ee5b2410c7c3cd fixes this
Comment 4 Binary Runner 2024-01-22 21:17:12 UTC
I can confirm that the issue is gone now.
Insteald of a segfault pkcgeck now spits out this error message:

polkit_authority_check_authorization_sync: assertion 'action_id != NULL' failed
Error checking for authorization (null): Could not verify; error object not present.