Bug 2020239

Summary: Avoid possible assert on D-Bus call
Product: Red Hat Enterprise Linux 8 Reporter: David Tardon <dtardon>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: dtardon, systemd-maint-list
Target Milestone: rcKeywords: Bugfix, Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-239-53.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 15:25:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Tardon 2021-11-04 12:13:22 UTC
This bug was initially created as a copy of Bug #2020236

I am copying this bug because: 
It is reproducible on RHEL-8 too.


Description of problem:
A malformed D-Bus call can hit an assert in systemd.

Version-Release number of selected component (if applicable):
systemd-249-4.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. busctl call --user \
  org.freedesktop.systemd1 \
  /org/freedesktop/systemd1 \
  org.freedesktop.systemd1.Manager \
  StartTransientUnit \
  "ssa(sv)a(sa(sv))"  \
  test.service \
  replace \
  1 ExecStart "a(sasb)" 1 /usr/bin/sleep 0 true 0
2. systemctl is-active user@$UID.service

Actual results:
systemd crashes:

systemd[61]: Assertion 'argv' failed at src/core/execute.c:5964, function exec_command_line(). Aborting.
systemd[1]: user: Main process exited, code=dumped, status=6/ABRT

Expected results:
The D-Bus call returns a validation error.

Comment 1 Plumber Bot 2021-11-19 14:35:25 UTC
fix merged to github master branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/232

Comment 7 errata-xmlrpc 2022-05-10 15:25:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (systemd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2069