Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack smashing vulnerability in f2fs dump_file function #265

Open
enriktigasna opened this issue Mar 3, 2025 · 0 comments
Open

Stack smashing vulnerability in f2fs dump_file function #265

enriktigasna opened this issue Mar 3, 2025 · 0 comments

Comments

@enriktigasna
Copy link

When dumping file, and it fails and prompts you into writing to ./lost_found there is a stash smashing vulnerability.

It allocates 255 bytes on the stack for ans

char ans[255] = {0};

Then, without any bounds checking feeds user input into it.

printf("Do you want to dump this file into ./lost_found/? [Y/N] ");
ret = scanf("%s", ans);

Under certain conditions, this can lead to an arbitrary code execution.

Vulnerable files:
src/f2fs/dump.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant