You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usbguard-daemon creates files in world-writable directories (/dev/shm, /tmp) with rather predictable file names (e.g. /dev/shm/qb-usbguard-request-7096-835-12-data). Also O_EXCL flag is not used when opening the files. This could be exploited by a local attacker to overwrite privileged system files (if not restricted by sandboxing, MAC or symlinking policies).
Maybe usbguard-daemon could initialize IPC server with qb_ipcs_create("usbguard-XXXXXX",,,,) to make libqb to use mkstemp() for the files, but the problem is also on libqb's side (for example not using O_EXCL). I would not use files for IPC.
The text was updated successfully, but these errors were encountered:
Addition of the "PrivateTmp=true" systemd profile setting as described in #231 would mitigate this issue.
Of course it'd be best if it's secured both inside the daemon as well as in the profile.
Usbguard-daemon creates files in world-writable directories (
/dev/shm
,/tmp
) with rather predictable file names (e.g./dev/shm/qb-usbguard-request-7096-835-12-data
). AlsoO_EXCL
flag is not used when opening the files. This could be exploited by a local attacker to overwrite privileged system files (if not restricted by sandboxing, MAC or symlinking policies).Maybe usbguard-daemon could initialize IPC server with
qb_ipcs_create("usbguard-XXXXXX",,,,)
to make libqb to usemkstemp()
for the files, but the problem is also on libqb's side (for example not usingO_EXCL
). I would not use files for IPC.The text was updated successfully, but these errors were encountered: