RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1773477 - file is recognized as "Linux Journalled Flash File system" if the beginning of the file content is "1984"
Summary: file is recognized as "Linux Journalled Flash File system" if the beginning...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: file
Version: 8.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: 8.2
Assignee: Kamil Dudka
QA Contact: Karel Volný
URL:
Whiteboard:
Depends On:
Blocks: 1771242
TreeView+ depends on / blocked
 
Reported: 2019-11-18 08:56 UTC by Kamil Dudka
Modified: 2023-02-12 22:58 UTC (History)
5 users (show)

Fixed In Version: file-5.33-13.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1771242
Environment:
Last Closed: 2020-04-28 16:40:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-29791 0 None None None 2023-02-12 22:58:19 UTC
Red Hat Product Errata RHBA-2020:1772 0 None None None 2020-04-28 16:40:29 UTC

Description Kamil Dudka 2019-11-18 08:56:04 UTC
+++ This bug was initially created as a clone of Bug #1771242 +++

Description of problem:

Version-Release number of selected component (if applicable):
RHEL 6, RHEL 7, RHEL 8

How reproducible:
I easily reproduced the issue on RHEL 6.7,RHEL 7.7, RHEL 8.0.

use RHEL 7.7 as example:

[root@vm77 tmp]# uname -a
Linux vm77 3.10.0-1062.el7.x86_64 #1 SMP Thu Jul 18 20:25:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@vm77 tmp]# rpm -qa file
file-5.11-35.el7.x86_64

Steps to Reproduce:
1.
create a file with content "1984"

[root@vm77 tmp]# vi test
[root@vm77 tmp]# cat test 
1984
[root@vm77 tmp]# file test 
test: Linux Journalled Flash File system, little endian

2.
change file content to "1985", the file is recognized as "ASCII text"

[root@vm77 tmp]# cat test 
1985
[root@vm77 tmp]# file test 
test: ASCII text

3.

Actual results:

[root@vm77 tmp]# cat test 
1984
[root@vm77 tmp]# file test 
test: Linux Journalled Flash File system, little endian

Expected results:

the text file should be recognized as "ASCII text"

[root@vm77 tmp]# cat test 
1985
[root@vm77 tmp]# file test 
test: ASCII text

Additional info:

--- Additional comment from Kamil Dudka on 2019-11-12 09:49:45 CET ---

I can see that 0x1984 is magic of an old JFFS2 file system format:

    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/uapi/linux/jffs2.h?h=v5.3.10#n24

I need to double check it but there might be a mistake in file's magic database that the pattern is ASCII encoded while it should be binary encoded.

--- Additional comment from Kamil Dudka on 2019-11-12 10:43:27 CET ---

I have proposed a patch upstream:

https://mailman.astron.com/pipermail/file/2019-November/000231.html

--- Additional comment from Kamil Dudka on 2019-11-17 00:02:09 CET ---

upstream commit:

https://github.com/file/file/commit/FILE5_37-108-g5ad78c72

Comment 1 Kamil Dudka 2019-11-18 10:43:35 UTC
fixed in file-5.37-9.fc32:

https://src.fedoraproject.org/rpms/file/c/ca697060

Comment 6 errata-xmlrpc 2020-04-28 16:40:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1772


Note You need to log in before you can comment on or make changes to this bug.