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
When in f2fs, it checks for if a device is mounted, it reaches this code. This code opens the file /sys/dev/block/%u:%u/uevent, and unsafely reads into ptr, which is the size of how much is left from the file after DEVNAME. If you construct it so that DEVNAME is at the end of the file, then it will not allocate enough for the buffer, and it will be overflown.
This can be exploited if an attacker can corrupt headers of a mounted system, or write arbitrary files into this directory in for example a non-FHS compliant system. Under certain conditions this can lead to arbitrary code execution or control of dynamic allocation.
Affected files:
src/f2fs/libf2fs.c
The text was updated successfully, but these errors were encountered:
enriktigasna
changed the title
OOB stack write vulnerability in f2fs get_rootdev
Heap overflow in get_rootdev
Mar 3, 2025
Vulnerable code:
When in f2fs, it checks for if a device is mounted, it reaches this code. This code opens the file
/sys/dev/block/%u:%u/uevent
, and unsafely reads into ptr, which is the size of how much is left from the file after DEVNAME. If you construct it so that DEVNAME is at the end of the file, then it will not allocate enough for the buffer, and it will be overflown.This can be exploited if an attacker can corrupt headers of a mounted system, or write arbitrary files into this directory in for example a non-FHS compliant system. Under certain conditions this can lead to arbitrary code execution or control of dynamic allocation.
Affected files:
The text was updated successfully, but these errors were encountered: