linux-postmarketos-allwinner: patch dirtypipe (MR 3086)

This commit is contained in:
Oliver Smith 2022-04-24 14:12:43 +02:00
parent 207e9fa1b0
commit 1cc273fead
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 48 additions and 1 deletions

View file

@ -0,0 +1,44 @@
From 9d2231c5d74e13b2a0546fee6737ee4446017903 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@ionos.com>
Date: Mon, 21 Feb 2022 11:03:13 +0100
Subject: lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
To: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
lib/iov_iter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index b0e0acdf96c15..6dd5330f7a995 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -414,6 +414,7 @@ static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t by
return 0;
buf->ops = &page_cache_pipe_buf_ops;
+ buf->flags = 0;
get_page(page);
buf->page = page;
buf->offset = offset;
@@ -577,6 +578,7 @@ static size_t push_pipe(struct iov_iter *i, size_t size,
break;
buf->ops = &default_pipe_buf_ops;
+ buf->flags = 0;
buf->page = page;
buf->offset = 0;
buf->len = min_t(ssize_t, left, PAGE_SIZE);
--
cgit

View file

@ -7,7 +7,7 @@ _flavor=postmarketos-allwinner
_config="config-$_flavor.$CARCH"
pkgname=linux-$_flavor
pkgver=5.16.4_git20220131
pkgrel=2
pkgrel=3
_tag="orange-pi-5.16-20220131-0002"
pkgdesc="Kernel fork with Pine64 patches (megi's tree, slightly patched)"
arch="aarch64 armv7"
@ -51,6 +51,7 @@ source="$pkgname-$_tag.tar.gz::https://github.com/megous/linux/archive/$_tag.tar
0011-ARM-dts-sun6i-Add-Lark-FreeMe-70.2S-tablet.patch
0012-sunxi-mmc-h6-fix.patch
0013-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch
cve-2022-0847-dirty-pipe.patch
"
subpackages="$pkgname-dev"
builddir="$srcdir/linux-$_tag"
@ -114,4 +115,5 @@ c61d4f86eddecca99df1ea1323f988e575f9c49130b64a0c50d61028ff96e24aaa3131fb3731e62e
902708a5a8dd8a815d3d1793933d307c551e3c10368d1805431b70691ee5d4438b7146c466549f457468e365f94073a35ae3304928af7581e5dc91ba5c8fa682 0011-ARM-dts-sun6i-Add-Lark-FreeMe-70.2S-tablet.patch
2feeab0a6c3db46e514d45c9708f351c6d7dfb0bf951a5cb6f2dc01b4bdc8d4c46931000758a819a6d7317b16cb1933bb3946e6a78cbf448cc77f57a56c503bf 0012-sunxi-mmc-h6-fix.patch
22af33264090dac027ee054b4345a07f0b2ee077e2ae1620e83960bfeea096169aec710973fdd50531ed4f1db6cfd59b5796cd235316cb3512aee034f741a694 0013-arm64-dts-allwinner-orangepi-3-fix-ethernet.patch
bfba2e4a4ac9639dc1a3aa0d4779748b62c8efaf8a533e30a4431571115d4356e6e54e00d2508928405ce3607e63aba61a9bad7a0f1712b46ff5706589ccbbfa cve-2022-0847-dirty-pipe.patch
"

View file

@ -0,0 +1 @@
../../.shared-patches/linux/cve-2022-0847-dirty-pipe.patch