Masami Hiramatsu
6bbfa44116
kprobes: Limit max data_size of the kretprobe instances
...
The 'kprobe::data_size' is unsigned, thus it can not be negative. But if
user sets it enough big number (e.g. (size_t)-8), the result of 'data_size
+ sizeof(struct kretprobe_instance)' becomes smaller than sizeof(struct
kretprobe_instance) or zero. In result, the kretprobe_instance are
allocated without enough memory, and kretprobe accesses outside of
allocated memory.
To avoid this issue, introduce a max limitation of the
kretprobe::data_size. 4KB per instance should be OK.
Link: https://lkml.kernel.org/r/163836995040.432120.10322772773821182925.stgit@devnote2
Cc: stable@vger.kernel.org
Fixes: f47cd9b553aa ("kprobes: kretprobe user entry-handler")
Reported-by: zhangyue <zhangyue1@kylinos.cn>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2021-12-01 21:04:34 -05:00
..
2021-11-15 20:47:07 -08:00
2021-11-06 14:08:17 -07:00
2021-05-07 00:26:34 -07:00
2021-11-03 17:21:37 +00:00
2021-11-09 10:56:41 -08:00
2021-11-19 09:15:58 -06:00
2021-11-23 09:45:37 +01:00
2021-10-19 17:27:05 +02:00
2021-06-22 11:07:18 -07:00
2021-11-11 09:50:30 +01:00
2021-09-13 16:41:20 -07:00
2021-11-01 20:05:19 -07:00
2021-11-23 09:45:36 +01:00
2021-11-24 13:50:18 +01:00
2021-11-18 10:50:45 -08:00
2021-11-01 20:25:38 -07:00
2021-11-24 12:20:27 +01:00
2021-11-02 12:52:17 +01:00
2021-12-01 21:04:34 -05:00
2021-05-02 00:43:35 +09:00
2021-10-18 06:17:01 -06:00
2021-05-07 00:26:33 -07:00
2021-10-27 12:32:34 +02:00
2021-11-01 21:17:39 -07:00
2021-11-06 16:43:20 -07:00
2021-03-22 15:23:32 -04:00
2021-11-01 21:17:39 -07:00
2021-09-19 22:34:38 -04:00
2021-11-01 21:17:39 -07:00
2021-01-24 14:27:16 +01:00
2021-08-11 13:11:12 -07:00
2021-09-08 15:32:35 -07:00
2021-08-16 18:55:32 +02:00
2021-11-24 12:20:27 +01:00
2021-07-08 11:48:22 -07:00
2021-10-20 10:45:34 -05:00
2021-05-12 11:43:25 +02:00
2021-11-03 12:15:29 -07:00
2021-11-09 10:02:51 -08:00
2020-12-15 22:46:19 -08:00
2021-11-14 10:43:38 -08:00
2021-06-18 11:43:08 +02:00
2021-05-27 04:01:50 +09:00
2021-02-26 09:41:03 -08:00
2021-07-02 12:08:10 -07:00
2021-10-15 11:25:18 +02:00
2021-07-05 10:46:20 +02:00
2021-10-04 10:58:25 -07:00
2020-12-15 19:36:48 -08:00
2021-08-17 17:50:51 +02:00
2021-11-11 13:09:33 +01:00
2021-11-09 10:02:52 -08:00
2021-08-30 16:36:10 +02:00
2021-11-06 13:30:42 -07:00
2021-02-22 12:33:26 +00:00
2021-09-08 15:32:34 -07:00
2021-05-07 00:26:33 -07:00
2021-12-01 21:04:34 -05:00
2021-11-10 16:15:54 -08:00
2021-11-01 20:05:19 -07:00
2021-01-19 10:24:45 +01:00
2021-01-19 10:24:45 +01:00
2021-11-05 15:13:10 -07:00
2021-08-16 18:55:32 +02:00
2021-09-03 09:58:12 -07:00
2021-08-27 16:30:18 +08:00
2021-08-30 16:36:10 +02:00
2021-08-16 14:42:22 +02:00
2021-09-03 09:58:12 -07:00
2021-10-14 13:29:18 +02:00
2021-09-08 11:50:26 -07:00
2021-06-18 11:43:09 +02:00
2020-10-16 11:11:19 -07:00
2021-11-12 11:53:16 -08:00
2020-12-15 22:46:18 -08:00
2020-11-25 18:52:35 +01:00
2021-11-09 10:02:52 -08:00
2021-09-22 10:24:01 -04:00
2021-09-16 10:27:48 -07:00
2021-09-30 09:37:27 +01:00
2021-09-01 14:52:05 -07:00
2021-11-19 09:15:58 -06:00
2021-10-22 15:32:46 +02:00
2021-08-10 14:57:42 +02:00
2021-08-10 22:50:07 +02:00
2021-11-06 13:30:43 -07:00
2021-07-05 10:46:33 +02:00
2021-03-23 16:01:58 +01:00
2021-10-07 13:51:11 +02:00
2021-09-08 12:55:35 -07:00
2021-06-23 16:41:24 -06:00
2021-09-03 10:08:28 -07:00
2021-04-30 11:20:42 -07:00
2020-11-16 08:08:54 -08:00
2021-08-10 10:48:07 -07:00
2021-08-16 11:39:51 -04:00
2021-11-06 13:30:35 -07:00
2021-10-20 10:45:34 -05:00
2021-05-07 00:26:34 -07:00
2021-05-09 13:07:03 -07:00
2021-09-03 09:58:12 -07:00
2021-09-08 11:50:27 -07:00
2021-07-03 11:41:14 -07:00
2021-01-26 11:16:34 +00:00
2021-06-29 10:53:46 -07:00
2021-08-17 07:49:10 -10:00
2021-11-06 14:08:17 -07:00