Where
-Infinity
0

Vendor Risk Score

See how libvirt project compares to other vendors in security performance

View Risk Score →
Severity
5.5
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

A symlink-following flaw was found in libvirt's qemuTPMEmulatorPrepareHost() function (src/qemu/qemutpm.c). The function uses a path-based chown() to set ownership of the swtpm logfile without verifying that the path is not a symbolic link. Since the log directory is writable by the swtpm user, a local attacker with access to the swtpm account can replace the logfile with a symlink pointing to an arbitrary file. When libvirtd (running as root) starts a QEMU domain with an emulated TPM, it follows the symlink and transfers ownership of the target file to swtpm:swtpm, allowing the attacker to then modify that file.

The upstream fix replaces the path-based chown() with open(ONOFOLLOW) + fchown() on the file descriptor.

External reference: https://gitlab.com/libvirt/libvirt/-/workitems/909

1 / 2
Source: Red Hat
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203