Created attachment 1701153 [details]
Docx demonstrating the issue
Description of problem:
The version of `file` RHEL 7.8 (version 5.11) does not detect all Word docx files properly. It detects some docx files as zip files.
The problem is apparently fixed in file 5.19.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Take the attached file and run `file` on it.
It will report "Zip archive data, at least v1.0 to extract"
It should report "Microsoft OOXML"
It seems the bug is not present in CentOS 6
[wolfy@wolfy ~]$ file /tmp/docx-test-zip.docx
/tmp/docx-test-zip.docx: Zip archive data, at least v1.0 to extract
[wolfy@wolfy ~]$ rpm -q file
[wolfy@wolfy2 tmp]$ file docx-test-zip.docx
docx-test-zip.docx: Microsoft OOXML
[wolfy@wolfy2 tmp]$ rpm -q file
It is too late to fix this bug in RHEL-7 but it is going to be fixed in RHEL-8 (bug #1845169). If you are a customer of Red Hat, please contact Product Support and tell them about this bug report.
Why can't it be fixed in RHEL-7? Isn't it a supported platform? This bug causes issues with software that uses `file`, such as amavisd.
Technically, this can be fixed but it needs a strong business justification. The deadline for putting this into RHEL-7.9 is already missed and no further minor updates of RHEL-7 are planned.
It is too late to fix this in RHEL-7. The bug in question is fixed in RHEL-8 though. Closing NEXTRELEASE.
I just tried this on Centos 8 Stream. As I understand all the messaging around Stream, if this is fixed in RHEL-8, this should be fixed in Steam also. However:
# cat /etc/os-release
PRETTY_NAME="CentOS Stream 8"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
# file --version
# file docx-test-zip.docx
docx-test-zip.docx: Zip archive data, at least v1.0 to extract
The same test file detects corretly on Fedora 32 with file version 5.38.
Indeed, the reproducer for this bug is different and the fix for bug #1845169 does not address it. Thank you for pointing it out! Let's move this bug to RHEL-8 to get it fixed eventually.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.
What, why? This is clearly a bug with a simple reproducer -- why in the world would it not be fixed?
Because not all reported bugs are fixed in Red Hat Enterprise Linux. We prioritize bugs reported by our customers. If you are a customer of Red Hat, please contact Product Support and tell them about this bug report.