dbus/bus
Jeremi Piotrowski 52b73d511b bus/selinux: Move vsnprintf call to avoid va_list reuse
In log_callback() the same va_list is reused for a call to vsnprintf and
vsyslog. A va_list can't be reused in this manner, such use is undefined
behavior that changes depending on glibc version.

In current glibc versions a segfault can be observed from the callsite at
bus/selinux.c:412. When trying to log a non-auditable event, the segfault
happens in strlen inside vsyslog.

Moving the call to vsnprintf closer to audit_log_user_avc_message (which is
followed by a 'goto out') avoids the reuse and segfault.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-01-09 20:03:29 +00:00
..
legacy-config build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
systemd-user build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
sysusers.d build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
tmpfiles.d build: Add machine-readable licensing markers to the Meson build system 2022-07-13 20:36:13 +01:00
.gitignore .gitignore: Ignore many more generated files 2018-12-14 13:28:50 +00:00
CMakeLists.txt Use project relative paths in CMake files 2022-07-25 14:14:57 -05:00
Makefile.am build: Put system bus socket in runstatedir by default 2022-10-11 17:14:11 +01:00
activation-exit-codes.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation-helper-bin.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation-helper.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation-helper.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
activation.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
apparmor.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
apparmor.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
audit.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
audit.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
bus.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
bus.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-loader-expat.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-common.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-common.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-trivial.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser-trivial.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
config-parser.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
connection.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
connection.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
containers.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
containers.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dbus.service.in bus: Notify systemd when we are ready 2018-03-02 14:48:49 +00:00
dbus.socket.in
desktop-file.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
desktop-file.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch-default.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch-inotify.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch-kqueue.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dir-watch.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dispatch.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
dispatch.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
driver.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
driver.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
example-session-disable-stats.conf.in
example-system-enable-stats.conf.in
example-system-hardening-without-traditional-activation.conf Configure option to disable traditional activation 2019-03-25 21:51:33 +02:00
expirelist.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
expirelist.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
main.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
meson.build build: Put system bus socket in runstatedir by default 2022-10-11 17:14:11 +01:00
org.freedesktop.dbus-session.plist.in
policy.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
policy.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
selinux.c bus/selinux: Move vsnprintf call to avoid va_list reuse 2023-01-09 20:03:29 +00:00
selinux.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
services.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
services.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
session.conf.in Disable the Containers interface 2021-12-10 16:48:51 +00:00
signals.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
signals.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
stats.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
stats.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
system.conf.in Disable the Containers interface 2021-12-10 16:48:51 +00:00
test.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
test.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
utils.c Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00
utils.h Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later license 2023-01-04 07:53:44 +00:00