Jann Horn
373c4557d2
mm/pagewalk.c: report holes in hugetlb ranges
...
This matters at least for the mincore syscall, which will otherwise copy
uninitialized memory from the page allocator to userspace. It is
probably also a correctness error for /proc/$pid/pagemap, but I haven't
tested that.
Removing the `walk->hugetlb_entry` condition in walk_hugetlb_range() has
no effect because the caller already checks for that.
This only reports holes in hugetlb ranges to callers who have specified
a hugetlb_entry callback.
This issue was found using an AFL-based fuzzer.
v2:
- don't crash on ->pte_hole==NULL (Andrew Morton)
- add Cc stable (Andrew Morton)
Fixes: 1e25a271c8 ("mincore: apply page table walker on do_mincore()")
Signed-off-by: Jann Horn <jannh@google.com >
Cc: <stable@vger.kernel.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2017-11-15 13:12:08 -08:00
..
2017-11-02 11:10:55 +01:00
2017-10-06 08:15:15 -06:00
2017-09-08 18:26:46 -07:00
2017-11-02 11:10:55 +01:00
2017-06-05 16:59:12 +02:00
2017-11-02 11:10:55 +01:00
2017-10-13 16:18:32 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-02-27 18:43:47 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-03 17:54:24 -07:00
2017-11-02 11:10:55 +01:00
2016-07-26 16:19:19 -07:00
2017-10-20 13:06:52 +02:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:46 -07:00
2017-11-15 10:14:11 -08:00
2016-05-20 17:58:30 -07:00
2017-11-03 07:39:19 -07:00
2017-05-03 15:52:12 -07:00
2017-11-02 11:10:55 +01:00
2017-09-06 17:27:30 -07:00
2017-09-08 18:26:49 -07:00
2017-09-08 18:26:46 -07:00
2017-05-03 15:52:10 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-06 16:24:34 -07:00
2017-10-03 17:54:23 -07:00
2017-10-03 17:54:25 -07:00
2016-05-22 17:21:27 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-25 16:12:46 -07:00
2017-10-09 20:55:01 -07:00
2017-10-03 17:54:26 -07:00
2017-08-17 10:30:49 +02:00
2017-10-25 11:01:06 +02:00
2017-10-13 16:18:32 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:49 -07:00
2017-03-02 08:42:38 +01:00
2017-08-31 16:13:00 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-14 18:13:32 -07:00
2017-10-03 17:54:24 -07:00
2017-11-07 11:16:08 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-14 15:32:19 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-14 09:14:35 -06:00
2017-11-15 13:12:08 -08:00
2017-11-02 11:10:55 +01:00
2017-07-26 17:41:05 -04:00
2017-09-27 14:45:57 -07:00
2017-06-29 11:23:38 -04:00
2017-10-19 13:13:49 +01:00
2017-11-02 11:10:55 +01:00
2017-03-02 08:42:28 +01:00
2017-11-02 11:10:55 +01:00
2016-12-12 18:55:08 -08:00
2017-09-08 18:26:49 -07:00
2017-10-03 17:54:24 -07:00
2017-09-13 18:53:16 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-07 10:32:44 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-10 08:05:30 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-03 17:54:24 -07:00
2017-11-03 07:39:19 -07:00
2017-07-10 16:32:32 -07:00
2017-04-05 12:30:18 -07:00
2017-09-06 17:27:28 -07:00
2017-09-06 17:27:29 -07:00
2017-11-02 11:10:55 +01:00
2017-10-13 16:18:32 -07:00
2017-07-10 16:32:31 -07:00
2017-11-14 15:32:19 -08:00
2017-09-08 18:26:47 -07:00
2017-11-02 11:10:55 +01:00
2017-10-03 17:54:24 -07:00
2017-09-08 18:26:47 -07:00
2017-07-06 16:24:35 -07:00