/* * udisks_libblockdev_cve_2025_6019 — SKELETONKEY module * * STATUS: 🟢 STRUCTURAL ESCAPE via polkit allow_active chain. No * offsets, no leaks, no race. Two cooperating logic bugs in udisks2 * + libblockdev let any console/session user (polkit allow_active=true) * mount an attacker-built filesystem image WITHOUT nosuid/nodev, then * execute the SUID-root binary it contains. * * The bug (Qualys, June 2025): * libblockdev's bd_fs_resize / bd_fs_repair code paths mount the * target filesystem internally so they can call resize2fs / xfs_growfs. * The mount is performed WITHOUT MS_NOSUID and MS_NODEV. udisks2 * exposes Resize() over D-Bus and gates it on polkit's * org.freedesktop.UDisks2.modify-device action, which by default * allow_active=yes (i.e. any logged-in console user can call it * without a password). * * Trigger: * 1. Build an ext4 image with a setuid-root /bin/sh inside. * 2. Attach as a loop device via udisks LoopSetup() over D-Bus. * 3. Call Filesystem.Resize() — udisks invokes libblockdev which * mounts the image at /run/media//