]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: reiserfs: add block size validation for reiser4
authorKarel Zak <kzak@redhat.com>
Wed, 15 Apr 2026 18:59:15 +0000 (20:59 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Apr 2026 12:07:45 +0000 (14:07 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/reiserfs.c

index dac5f0ce8ffdc90614d7d90f3b1c7d5c8db0517f..5459c82fdbb9f06b9f58d45fc9c678014c5f9ef3 100644 (file)
@@ -91,6 +91,10 @@ static int probe_reiser4(blkid_probe pr, const struct blkid_idmag *mag)
 
        blocksize = rs4->rs4_blocksize * 256;
 
+       /* The blocksize must be at least 512 */
+       if (blocksize < 512)
+               return BLKID_PROBE_NONE;
+
        if (*rs4->rs4_label)
                blkid_probe_set_label(pr, rs4->rs4_label, sizeof(rs4->rs4_label));
        blkid_probe_set_uuid(pr, rs4->rs4_uuid);