|
|
cdd3f9 |
From cec4ee812b7c642c552c64c488a299323d622638 Mon Sep 17 00:00:00 2001
|
|
|
cdd3f9 |
From: Joe Lawrence <joe.lawrence@redhat.com>
|
|
|
cdd3f9 |
Date: Fri, 7 Jan 2022 14:11:20 -0500
|
|
|
cdd3f9 |
Subject: [KPATCH CVE-2021-4155] xfs: kpatch fixes for CVE-2021-4155
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Kernels:
|
|
|
cdd3f9 |
4.18.0-348.el8
|
|
|
cdd3f9 |
4.18.0-348.2.1.el8_5
|
|
|
cdd3f9 |
4.18.0-348.7.1.el8_5
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Changes since last build:
|
|
|
cdd3f9 |
arches: x86_64 ppc64le
|
|
|
cdd3f9 |
xfs_ioctl.o: changed function: xfs_ioc_space
|
|
|
cdd3f9 |
---------------------------
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Kpatch-MR: https://gitlab.com/redhat/prdsc/rhel/src/kpatch/rhel-8/-/merge_requests/12
|
|
|
cdd3f9 |
Approved-by: Artem Savkov (@artem.savkov)
|
|
|
cdd3f9 |
Kernels:
|
|
|
cdd3f9 |
4.18.0-348.el8
|
|
|
cdd3f9 |
4.18.0-348.2.1.el8_5
|
|
|
cdd3f9 |
4.18.0-348.7.1.el8_5
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Modifications: none
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Z-MR: https://gitlab.com/redhat/prdsc/rhel/src/kernel-private/rhel-8/-/merge_requests/28
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
KT0 test PASS: https://beaker.engineering.redhat.com/jobs/6173055
|
|
|
cdd3f9 |
for kpatch-patch-4_18_0-348-1-2.el8 scratch build:
|
|
|
cdd3f9 |
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=42267085
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
commit 374251004418783ae2e1e191b957cf63e3796d5e
|
|
|
cdd3f9 |
Author: Bruno Meneguele <bmeneg@redhat.com>
|
|
|
cdd3f9 |
Date: Thu Jan 6 17:19:24 2022 -0300
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Bugzilla: https://bugzilla.redhat.com/2034864
|
|
|
cdd3f9 |
CVE: CVE-2021-4155
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
O-Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2034865
|
|
|
cdd3f9 |
O-CVE: CVE-2021-4155
|
|
|
cdd3f9 |
Tested: xfstests and specific reproducer
|
|
|
cdd3f9 |
Upstream status: Posted privately due to embargo
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at
|
|
|
cdd3f9 |
the end of files, just like fallocate and RESVSP. Make the behavior
|
|
|
cdd3f9 |
consistent with the other ioctls.
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com>
|
|
|
cdd3f9 |
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
|
|
|
cdd3f9 |
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
|
cdd3f9 |
Reviewed-by: Dave Chinner <dchinner@redhat.com>
|
|
|
cdd3f9 |
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
|
|
|
cdd3f9 |
(cherry picked from commit 983d8e60f50806f90534cc5373d0ce867e5aaf79)
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
|
|
|
cdd3f9 |
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
|
|
|
cdd3f9 |
---
|
|
|
cdd3f9 |
fs/xfs/xfs_ioctl.c | 3 ++-
|
|
|
cdd3f9 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
|
|
|
cdd3f9 |
index 2a68819e4fe5..7d9c76c5cfb0 100644
|
|
|
cdd3f9 |
--- a/fs/xfs/xfs_ioctl.c
|
|
|
cdd3f9 |
+++ b/fs/xfs/xfs_ioctl.c
|
|
|
cdd3f9 |
@@ -686,7 +686,8 @@ xfs_ioc_space(
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
if (bf->l_start > XFS_ISIZE(ip)) {
|
|
|
cdd3f9 |
error = xfs_alloc_file_space(ip, XFS_ISIZE(ip),
|
|
|
cdd3f9 |
- bf->l_start - XFS_ISIZE(ip), 0);
|
|
|
cdd3f9 |
+ bf->l_start - XFS_ISIZE(ip),
|
|
|
cdd3f9 |
+ XFS_BMAPI_PREALLOC);
|
|
|
cdd3f9 |
if (error)
|
|
|
cdd3f9 |
goto out_unlock;
|
|
|
cdd3f9 |
}
|
|
|
cdd3f9 |
--
|
|
|
cdd3f9 |
2.26.3
|
|
|
cdd3f9 |
|
|
|
cdd3f9 |
|