Re:How I Found a 20-Year-Old Linux Kernel Bug
by metalliqaz on Wednesday June 14, 2017 @05:30PM
(#14556275)
I have not ready anything about this bug, other than the very short description in the linked blog, however this seems like a bug that would have been flagged by a static analysis tool. I know they've been used on the kernel (e.g. Coverity) Very surprised it survived until now.
[ Parent
| on HN ]
Re:How I Found a 20-Year-Old Linux Kernel Bug
by benmmurphy on Wednesday June 14, 2017 @05:47PM
(#14556370)
the syscall function takes a void* parameter then does a copy from user space into the kernel using the wrong target type/sizeof. i think it works because the incorrect type was a superset of the correct type. i don't think any static analyser could catch this.
proposed patch here:
https://bugzilla.kernel.org/attachment.cgi?id=256997&action=...
Re:How I Found a 20-Year-Old Linux Kernel Bug
by jjnoakes on Wednesday June 14, 2017 @07:37PM
(#14556865)
A static analyzer with sufficient inter-procedural analysis (i.e. across the user/kernel boundary) could certainly see the type of the allocated structure in userspace, and flag the kernel read of a larger type.