aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/image/fsck.go
Commit message (Collapse)AuthorAgeFilesLines
* all: enable run_fsck by defaultAleksandr Nogikh2025-02-061-0/+26
| | | | | Check for the existence of fsck binaries and report their absence only once.
* fsck: fix permissions of the temp fs image when a sandbox is usedFlorent Revest2025-01-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | My dev environment skips the osutil_linux sandbox because it doesn't have a "syzkaller" user and group. The CI environment also skips the sandbox because it sets the "CI" environment variable. Therefore, nothing caught that, when run in the syzbot docker container, (which has a "syzkaller" user) the sandbox actually starts to be used and breaks fsck commands. Syz-manager, which is run as root, writes the image to /tmp/1234.img with permissions 0600 and then tries to run fsck under the "syzkaller" user which doesn't have read permissions on the file, so fsck fails: fsck.ext4 -n exited with status code 8 e2fsck 1.47.0 (5-Feb-2023) fsck.ext4: Permission denied while trying to open /tmp/1234.img You must have r/o access to the filesystem or be root Changing the owner of the file to the "syzkaller" user before attempting to run fsck under that user fixes the problem.
* prog: annotate image assets with fsck logsFlorent Revest2024-12-091-0/+59
Syscall attributes are extended with a fsck command field which lets file system mount definitions specify a fsck-like command to run. This is required because all file systems have a custom fsck command invokation style. When uploading a compressed image asset to the dashboard, syz-manager also runs the fsck command and logs its output over the dashapi. The dashboard logs these fsck logs into the database. This has been requested by fs maintainer Ted Tso who would like to quickly understand whether a filesystem is corrupted or not before looking at a reproducer in more details. Ultimately, this could be used as an early triage sign to determine whether a bug is obviously critical.