PR: 267334 Reported by: Robert Morris <rtm@lcs.mit.edu> Sponsored by: The FreeBSD Foundation
Details
Details
- Reviewers
donner glebius - Commits
- rGae4f39464c61: ng_parse: disallow negative length for malloc
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Looking at 267334. IMHO, we should return the error for invalid message as close as possible to the userland. Don't let the invalid data travel this down.
Comment Actions
Of course we should also check for num nonnegative and too large; there's probably more to be covered here too.
Comment Actions
Can we return unsigned value from ng_get_composite_len() instead?
We should, but I think there are ABI considerations to take into account and we really need someone who understands netgraph well.
Comment Actions
I'm going to commit this as an interim improvement. We can revisit ng_get_composite_len's return type and error handling later on.