]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysext: validate work directory metadata before removal 42978/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 10 Jul 2026 18:08:57 +0000 (19:08 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 15 Jul 2026 20:13:24 +0000 (21:13 +0100)
commit9d4cb85cf5fb71242d705363812adebf92720c79
tree6b4397a66438ae34ccdbb000fb91cf54a6ec07f5
parentc3eafb10a0b886876316bca6f9af06db67308ad0
sysext: validate work directory metadata before removal

unmerge_hierarchy() joined the persisted work_dir value directly with
--root=. An empty value therefore resolved to the root itself and was passed
to rm_rf().

Require the decoded metadata to name a non-empty, safe, normalized relative
path before constructing the removal target. Add coverage using a disposable
root with deliberately emptied metadata.

Follow-up for 9cfad502f4aa103ef0d2191cbb6b82fecfbc5044
src/sysext/sysext.c
test/units/TEST-50-DISSECT.sysext.sh