[File] [SECURITY] Integer Overflow in .mgc File nmagic Validation Leading to SIGSEGV (file-5.17)
Christos Zoulas
christos at zoulas.com
Fri Apr 17 10:55:43 EDT 2026
Added validation as suggested.
Thanks,
christos
> On Apr 1, 2026, at 11:16 AM, Kerwin <kerwinxia66001 at gmail.com> wrote:
>
> Hi maintainers,
>
> I am reporting an integer overflow vulnerability in libmagic (file-5.17) where a crafted `.mgc` file exploits a `uint32_t` wraparound in the `nmagic` sum validation in `apprentice_map()` (apprentice.c:2716-2733), causing an out-of-bounds pointer and a SIGSEGV crash on the next access.
>
> Please find the detailed vulnerability report and proof-of-concept files attached.
>
> Best regards
>
> <POC.tar>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.astron.com/pipermail/file/attachments/20260417/57cb2431/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <http://mailman.astron.com/pipermail/file/attachments/20260417/57cb2431/attachment.asc>
More information about the File
mailing list