commit | 81aee4b8f3642a8dfb76d877d4b552aa765bf9ea | [log] [tgz] |
---|---|---|
author | Haimin Zhang <[email protected]> | Wed Feb 16 16:40:38 2022 +0800 |
committer | Nobel Barakat <[email protected]> | Tue May 17 00:33:49 2022 +0000 |
tree | ab91f0e94e8bdea96b6fe11dd5d29322fd7eae61 | |
parent | 57560230be4ca340fe1dd53ea5e29c591f21832a [diff] |
block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern commit cc8f7fe1f5eab010191aa4570f27641876fa1267 upstream. Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize the buffer of a bio. BUG=b/228583025 TEST=cusky RELEASE_NOTE=This commit fixes CVE-2022-0494 by forcing bio_copy_kern to initialize newly created pages. Creating initialized pages in alloc_page prevents a possible kernel info leak from occuring. Signed-off-by: Haimin Zhang <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]> [nobelbarakat: Backported to 5.4: Manually added __GFP_ZERO flag] Signed-off-by: Nobel Barakat <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> cos-patch: security-moderate Change-Id: Ic599bb282a98929fbc994a7d8ad0404cddb81f70 Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/32882 Reviewed-by: Meena Shanmugam <[email protected]> Tested-by: Cusky Presubmit Bot <[email protected]>