Bug 2020236

Summary: Avoid possible assert on D-Bus call
Product: Red Hat Enterprise Linux 9 Reporter: David Tardon <dtardon>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED CURRENTRELEASE QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, dtardon, jwboyer, systemd-maint-list
Target Milestone: rcKeywords: Bugfix, Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-08 11:59:12 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:09:43 UTC
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 11:43:02 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/51