Neal Cardwell
5e1f54201c
inet_diag: validate port comparison byte code to prevent unsafe reads
...
Add logic to verify that a port comparison byte code operation
actually has the second inet_diag_bc_op from which we read the port
for such operations.
Previously the code blindly referenced op[1] without first checking
whether a second inet_diag_bc_op struct could fit there. So a
malicious user could make the kernel read 4 bytes beyond the end of
the bytecode array by claiming to have a whole port comparison byte
code (2 inet_diag_bc_op structs) when in fact the bytecode was not
long enough to hold both.
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-09 19:00:48 -05:00
..
2012-10-28 22:43:34 +01:00
2012-09-20 17:12:27 -04:00
2012-07-11 21:27:49 -07:00
2012-09-18 15:44:34 -04:00
2012-07-18 09:01:12 -07:00
2011-05-08 13:48:57 -07:00
2012-09-28 14:40:49 -04:00
2012-07-11 21:27:49 -07:00
2012-10-08 17:42:35 -04:00
2012-10-06 03:04:45 +09:00
2012-10-08 17:42:35 -04:00
2012-09-18 15:44:34 -04:00
2012-03-12 17:05:21 -07:00
2012-11-26 17:24:41 -05:00
2012-10-01 18:39:44 -04:00
2012-10-08 17:42:36 -04:00
2012-12-09 19:00:48 -05:00
2012-09-19 17:23:28 -04:00
2012-04-15 12:37:19 -04:00
2011-10-19 03:10:46 -04:00
2012-05-16 01:01:03 -04:00
2012-10-02 09:54:49 -07:00
2012-10-08 17:42:36 -04:00
2012-09-19 17:23:28 -04:00
2012-10-01 17:35:31 -04:00
2012-07-30 14:53:21 -07:00
2012-07-19 08:30:49 -07:00
2012-10-08 17:42:36 -04:00
2012-11-11 17:53:13 -05:00
2012-11-14 21:40:21 -05:00
2012-07-11 21:27:49 -07:00
2012-09-25 13:22:30 -04:00
2012-09-27 18:12:37 -04:00
2012-11-26 17:36:59 -05:00
2012-07-18 09:36:12 -07:00
2012-07-31 18:42:43 -07:00
2012-09-03 13:56:04 +02:00
2012-08-14 21:49:10 -07:00
2012-08-31 20:02:18 -04:00
2012-06-19 18:56:21 -07:00
2012-10-02 11:11:09 -07:00
2012-11-22 16:06:49 -05:00
2012-08-31 20:02:19 -04:00
2012-10-11 15:12:33 -04:00
2012-01-20 14:17:26 -05:00
2012-08-02 00:19:17 -07:00
2012-01-20 14:17:26 -05:00
2012-01-11 12:56:06 -08:00
2012-08-31 20:02:18 -04:00
2012-05-17 14:59:59 -04:00
2012-11-01 11:55:59 -04:00
2012-12-07 14:39:28 -05:00
2012-10-22 15:16:06 -04:00
2012-05-29 16:22:28 -07:00
2012-11-16 13:36:27 -05:00
2012-10-22 15:16:06 -04:00
2012-12-07 14:39:28 -05:00
2012-04-15 12:44:40 -04:00
2012-10-23 02:42:56 -04:00
2012-12-01 20:39:16 -05:00
2012-03-11 23:42:51 -07:00
2012-09-10 15:30:41 -04:00
2012-04-15 12:37:19 -04:00
2012-10-02 11:11:09 -07:00
2012-03-12 17:05:21 -07:00
2012-07-26 15:50:39 -07:00
2012-02-23 16:50:45 -05:00
2012-07-18 09:36:12 -07:00
2011-07-01 17:33:19 -07:00
2012-11-13 09:15:07 +01:00
2011-10-31 19:30:30 -04:00
2012-03-12 17:05:21 -07:00