View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000253 | file | General | public | 2021-03-31 11:46 | 2021-04-19 19:04 |
Reporter | rwmjones | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 5.40 | ||||
Fixed in Version | 5.41 | ||||
Summary | 0000253: file 5.40 can no longer print ext4 filesystem UUIDs correctly. | ||||
Description | file 5.40 can no longer print ext4 filesystem UUIDs correctly. Reported in Fedora: file-5.40-1.fc35.x86_64 Downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1945122 | ||||
Steps To Reproduce | 1. Prepare a disk image in a file: $ rm /var/tmp/test.img $ truncate -s 1G /var/tmp/test.img $ mkfs.ext4 /var/tmp/test.img 2. Run 'file' against it to display the UUID. With the previous version of file it would display the UUID correcctly, eg: $ file /var/tmp/test.img /var/tmp/test.img: Linux rev 1.0 ext4 filesystem data, UUID=b1bc22cc-7392-4780-8b50-77dac556236d (extents) (64bit) (large files) (huge files) With the current version of file it displays it incorrectly, eg: $ file /var/tmp/test.img /var/tmp/test.img: Linux rev 1.0 ext4 filesystem data, UUID=b1bc22cc-7392-4780-ffff8b50-77dac556236d (extents) (64bit) (large files) (huge files) Notice that some parts of the UUID are sign-extended. | ||||
Additional Information | I bisected this to the following upstream commit: 0478d9251abafd0876cdb3121ef2c07af6c99513 is the first bad commit commit 0478d9251abafd0876cdb3121ef2c07af6c99513 Author: Christos Zoulas <christos@zoulas.com> Date: Sat Aug 22 18:27:42 2020 +0000 Treat printf numbers as signed. src/softmagic.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) | ||||
Tags | No tags attached. | ||||
|
The magic entry (magic/Magdir/filesystems) specifies %08x and %04x for the fields of the UUID. Normally %x would be unsigned (eg. the printf(3) man page documents this). So I think this is a regression in "file" itself, not a bug in the magic data. |
|
Thanks! The type and sign-ness of argument is determined by the magic type field and this has been fixed to be unsigned now. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-03-31 11:46 | rwmjones | New Issue | |
2021-03-31 11:57 | rwmjones | Note Added: 0003580 | |
2021-04-19 19:03 | christos | Assigned To | => christos |
2021-04-19 19:03 | christos | Status | new => assigned |
2021-04-19 19:04 | christos | Status | assigned => resolved |
2021-04-19 19:04 | christos | Resolution | open => fixed |
2021-04-19 19:04 | christos | Fixed in Version | => 5.41 |
2021-04-19 19:04 | christos | Note Added: 0003592 |