You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PATH_MAX is not enough to have as buffer size as it may be the reason of overflow in fgets used below
There is no buffer overflow. Because fgets writes at most PATH_MAX bytes to buf even when one line is longer than PATH_MAX. However when a line is too long and the line after PATH_MAX bytes is accidentally similar format with the beginning of a line, plthook may read it as memory protection mode of a memory region. I fixed it by ecb60c6.
plthook/plthook_elf.c
Line 383 in a1bbcea
PATH_MAX
is not enough to have as buffer size as it may be the reason of overflow infgets
used belowProbably, it's better to use something like
char buf[PATH_MAX + 128]
...UPDATE:
Here is the kernel part which generates content of
/proc/self/maps
and there are no explicit limits in line length: https://elixir.bootlin.com/linux/latest/source/fs/proc/task_mmu.c#L300The text was updated successfully, but these errors were encountered: