Skip to content

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