View Issue Details

IDProjectCategoryView StatusLast Update
0000372fileGeneralpublic2022-10-09 18:54
ReporterLevilJiang Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version5.44 
Summary0000372: allocation-size-too-big for file with ASAN
DescriptionHi dev

I test the file with the latest commit (3d8a991) with AddressSanitizer. Unfortunately, it incurred a crash with the following error information. Any help would be greatly appreciated from you :D

```
=================================================================
==123037==ERROR: AddressSanitizer: requested allocation size 0xffffffffffffff06 (0x708 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T0)
    #0 0x55a7d202447e in __interceptor_malloc (/workspace/file/src/file+0xbf47e) (BuildId: 39c0b201f6cf154ce3a6ce6f762fe5e98224e3f3)
    0000001 0x55a7d20bc640 in doshn readelf.c
    0000002 0x55a7d20b865b in file_tryelf (/workspace/file/src/file+0x15365b) (BuildId: 39c0b201f6cf154ce3a6ce6f762fe5e98224e3f3)
    0000003 0x55a7d208fdef in file_buffer (/workspace/file/src/file+0x12adef) (BuildId: 39c0b201f6cf154ce3a6ce6f762fe5e98224e3f3)
    0000004 0x55a7d2064462 in file_or_fd magic.c
    0000005 0x55a7d2064636 in magic_file (/workspace/file/src/file+0xff636) (BuildId: 39c0b201f6cf154ce3a6ce6f762fe5e98224e3f3)
    0000006 0x55a7d2062232 in process file.c
    0000007 0x55a7d205fed0 in main (/workspace/file/src/file+0xfaed0) (BuildId: 39c0b201f6cf154ce3a6ce6f762fe5e98224e3f3)
    0000008 0x7f74af057d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) (BuildId: 89c3cb85f9e55046776471fed05ec441581d1969)

==123037==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big (/workspace/file/src/file+0xbf47e) (BuildId: 39c0b201f6cf154ce3a6ce6f762fe5e98224e3f3) in __interceptor_malloc
==123037==ABORTING
```

Thanks & Best regards!
Steps To Reproduce1. clone and build the file with AddressSanitizer from the Github repository

2. run the file binary with the attached crash input
TagsNo tags attached.

Activities

LevilJiang

2022-07-30 14:24

reporter  

crash_input (516 bytes)   
ELF����0

@m0pC���Nݿ� ���@� ?4�2Tͫ61.0-beWa.2���Ed�Fqc�itp�t���19:03:38�Dec� 3 2020v4.3-����������������@m0C|��Nݿ� ��@�elf ?42Tͫ6.	�!�������������������q���������������������thT��6.���������Fqc�itp����
crash_input (516 bytes)   

christos

2022-07-30 18:12

manager   ~0003792

What are you trying to do? Are you giving it a big elf file to identify?

LevilJiang

2022-07-31 05:29

reporter   ~0003793

Actually, I adopted fuzzing testing to the file program and it generates the crash input. I'm not sure of the cause of allocation-size-too-big with the crash input.

christos

2022-07-31 16:01

manager   ~0003794

Ok, I committed a change to limit it to 128M. Does this work for you?

LevilJiang

2022-08-01 03:06

reporter   ~0003795

Thanks very much!

Issue History

Date Modified Username Field Change
2022-07-30 14:24 LevilJiang New Issue
2022-07-30 14:24 LevilJiang File Added: crash_input
2022-07-30 18:11 christos Assigned To => christos
2022-07-30 18:11 christos Status new => assigned
2022-07-30 18:12 christos Status assigned => feedback
2022-07-30 18:12 christos Note Added: 0003792
2022-07-31 05:29 LevilJiang Note Added: 0003793
2022-07-31 05:29 LevilJiang Status feedback => assigned
2022-07-31 16:01 christos Note Added: 0003794
2022-08-01 03:06 LevilJiang Note Added: 0003795
2022-10-09 18:54 christos Status assigned => resolved
2022-10-09 18:54 christos Resolution open => fixed
2022-10-09 18:54 christos Fixed in Version => 5.44