Bug 2219392

Summary: Bad magic format `version %#x (MVP)' (bad format char: #) for wasm files
Product: Red Hat Enterprise Linux 9 Reporter: Paul Dwyer <pdwyer>
Component: fileAssignee: Vincent Mihalkovič <vmihalko>
Status: ON_QA --- QA Contact: Karel Volný <kvolny>
Severity: high Docs Contact:
Priority: urgent    
Version: 9.2CC: fkrska, fsumsal, kdudka, kvolny, lzaoral
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: file-5.39-13.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2221659 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2221659    

Description Paul Dwyer 2023-07-03 12:43:42 UTC
Description of problem:
file cannot identify wasm (Web Assembly files)

Version-Release number of selected component (if applicable):
file-5.39-12.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1. download a sample wasm file e.g.
curl --max-time 60 -s -H "Accept:application/vnd.github.v3.raw" "https://api.github.com/repos/mozilla/source-map/contents/lib/mappings.wasm" -O
2. file ./mappings.wasm

Actual results:
./mappings.wasm: ERROR: Bad magic format `version %#x (MVP)' (bad format char: #)

Expected results:
Not to error

RHEL8 (file-5.33-8.el8.x86_64) produces the following but this does not look quite right either
$ file mappings.wasm 
mappings.wasm: , created: Fri Jul 10 18:08:00 2037, modified: Tue Apr 20 16:29:51 2021

Fedora 38 (file-5.44-3.fc38.x86_64) produces the following output
$ file mappings.wasm 
mappings.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)

Additional info:
Problem looks like the reported upstream issue, fixed in 5.40, however I cannot see the fix to test.

https://bugs.astron.com/view.php?id=170