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

Fix checking sscanf return value as the value can be 0 causing undefined behavior in snprintf #146

Open
wants to merge 1 commit into
base: fedora-39
Choose a base branch
from

Conversation

PwnVerse
Copy link

Since device is taken as an argument (argv[1]), in ofcpath.c, a seemingly malicious device for instance the string /pci@1f,0/pci@1/scsi@8/sd@0,0 can cause sscanf to return 0 and in turn cause part to become negative in snprintf and cause undefined behaviour.

@PwnVerse PwnVerse changed the title Fix checking sscanf return value as the value can be 0 causing overflow in snprintf Fix checking sscanf return value as the value can be 0 causing undefined behavior in snprintf Nov 25, 2023
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.

1 participant