View Issue Details

IDProjectCategoryView StatusLast Update
0000433fileGeneralpublic2023-03-14 19:48
Reporternix Assigned Tochristos  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Fixed in Version5.45 
Summary0000433: Since f7a65db, ELF file magic is broken for all ELF files with a note section
DescriptionThe symptoms are simple:

compiler@loom 7897 /usr/src/file/x86_64-silk/shai-build.silk% src/file src/.libs/libmagic.so.1.0.0
src/.libs/libmagic.so.1.0.0: ERROR: , dynamically linked Note section size too big (48 > 0) (Invalid argument)
Steps To Reproduce(see above)
Additional InformationCaused by missing initialization of recently added ms->elf_shsize_max. Patch attached.
TagsNo tags attached.

Activities

nix

2023-03-14 12:58

reporter  

shsize-max.diff (442 bytes)   
diff --git a/src/apprentice.c b/src/apprentice.c
index db217875..0a20b668 100644
--- a/src/apprentice.c
+++ b/src/apprentice.c
@@ -578,6 +578,7 @@ file_ms_alloc(int flags)
 	ms->indir_max = FILE_INDIR_MAX;
 	ms->name_max = FILE_NAME_MAX;
 	ms->elf_shnum_max = FILE_ELF_SHNUM_MAX;
+	ms->elf_shsize_max = FILE_ELF_SHSIZE_MAX;
 	ms->elf_phnum_max = FILE_ELF_PHNUM_MAX;
 	ms->elf_notes_max = FILE_ELF_NOTES_MAX;
 	ms->regex_max = FILE_REGEX_MAX;
shsize-max.diff (442 bytes)   

christos

2023-03-14 19:48

manager   ~0003917

Fixed, thanks!

Issue History

Date Modified Username Field Change
2023-03-14 12:58 nix New Issue
2023-03-14 12:58 nix File Added: shsize-max.diff
2023-03-14 19:48 christos Assigned To => christos
2023-03-14 19:48 christos Status new => assigned
2023-03-14 19:48 christos Status assigned => resolved
2023-03-14 19:48 christos Resolution open => fixed
2023-03-14 19:48 christos Fixed in Version => 5.45
2023-03-14 19:48 christos Note Added: 0003917