Searched hist:"405 c005949e47b6e91359159c24753519ded0c67" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/ipv4/ |
H A D | inet_diag.c | diff 405c005949e47b6e91359159c24753519ded0c67 Sat Dec 08 13:43:22 CST 2012 Neal Cardwell <ncardwell@google.com> inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
Add logic to validate INET_DIAG_BC_S_COND and INET_DIAG_BC_D_COND operations.
Previously we did not validate the inet_diag_hostcond, address family, address length, and prefix length. So a malicious user could make the kernel read beyond the end of the bytecode array by claiming to have a whole inet_diag_hostcond when the bytecode was not long enough to contain a whole inet_diag_hostcond of the given address family. Or they could make the kernel read up to about 27 bytes beyond the end of a connection address by passing a prefix length that exceeded the length of addresses of the given family.
Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|