Skip to content

Update fsck_minix.c#105

Open
HackingRepo wants to merge 1 commit intomirror:masterfrom
HackingRepo:patch-1
Open

Update fsck_minix.c#105
HackingRepo wants to merge 1 commit intomirror:masterfrom
HackingRepo:patch-1

Conversation

@HackingRepo
Copy link
Copy Markdown

This PR fixes a potential vulnerability in util-linux/fsck_minix.c where the return value of sprintf() is not checked. sprintf() may return a negative value on failure, which could be misused in pointer arithmetic or array indexing, leading to memory safety issues.

  • Replaced sprintf() with snprintf() for prevent buffer overflow

  • Added checks for return value and buffer limits

  • risk Level Low — fix is non-breaking and adds sanity checks.

  • Identified using Snyk

  • CWE-120: Buffer Copy without Checking Size of Input

  • High Confidence (Score 801)


@robang74
Copy link
Copy Markdown
Contributor

This repository is rarely updated as you have seen by yourself.

I have cloned the busybox.net repo when their webgit was still running, and I have fix the buffer overflow in this commit:

I hope this helps, R-

@HackingRepo
Copy link
Copy Markdown
Author

thank's

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

Successfully merging this pull request may close these issues.

2 participants