|
|
79a518 |
From 01df9f93baafe0243264cf24f42d84e124c9ee0a Mon Sep 17 00:00:00 2001
|
|
|
79a518 |
From: Joe Lawrence <joe.lawrence@redhat.com>
|
|
|
79a518 |
Date: Tue, 4 Jan 2022 13:53:44 -0500
|
|
|
79a518 |
Subject: [KPATCH CVE-2021-4155] xfs: kpatch fixes for CVE-2021-4155
|
|
|
79a518 |
|
|
|
79a518 |
Kernels:
|
|
|
79a518 |
3.10.0-1160.15.2.el7
|
|
|
79a518 |
3.10.0-1160.21.1.el7
|
|
|
79a518 |
3.10.0-1160.24.1.el7
|
|
|
79a518 |
3.10.0-1160.25.1.el7
|
|
|
79a518 |
3.10.0-1160.31.1.el7
|
|
|
79a518 |
3.10.0-1160.36.2.el7
|
|
|
79a518 |
3.10.0-1160.41.1.el7
|
|
|
79a518 |
3.10.0-1160.42.2.el7
|
|
|
79a518 |
3.10.0-1160.45.1.el7
|
|
|
79a518 |
3.10.0-1160.49.1.el7
|
|
|
79a518 |
3.10.0-1160.53.1.el7
|
|
|
79a518 |
|
|
|
79a518 |
Changes since last build:
|
|
|
79a518 |
arches: x86_64 ppc64le
|
|
|
79a518 |
xfs_ioctl.o: changed function: xfs_ioc_space
|
|
|
79a518 |
---------------------------
|
|
|
79a518 |
|
|
|
79a518 |
Kpatch-MR: https://gitlab.com/redhat/prdsc/rhel/src/kpatch/rhel-7/-/merge_requests/15
|
|
|
79a518 |
Approved-by: Yannick Cote (@ycote1)
|
|
|
79a518 |
Approved-by: Artem Savkov (@artem.savkov)
|
|
|
79a518 |
Kernels:
|
|
|
79a518 |
3.10.0-1160.21.1.el7
|
|
|
79a518 |
3.10.0-1160.24.1.el7
|
|
|
79a518 |
3.10.0-1160.25.1.el7
|
|
|
79a518 |
3.10.0-1160.31.1.el7
|
|
|
79a518 |
3.10.0-1160.36.2.el7
|
|
|
79a518 |
3.10.0-1160.41.1.el7
|
|
|
79a518 |
3.10.0-1160.42.2.el7
|
|
|
79a518 |
3.10.0-1160.45.1.el7
|
|
|
79a518 |
3.10.0-1160.49.1.el7
|
|
|
79a518 |
3.10.0-1160.53.1.el7
|
|
|
79a518 |
|
|
|
79a518 |
Modifications: none
|
|
|
79a518 |
|
|
|
79a518 |
Z-MR: https://gitlab.com/redhat/prdsc/rhel/src/kernel-private/rhel-7/-/merge_requests/18
|
|
|
79a518 |
|
|
|
79a518 |
KT0 test PASS: https://beaker.engineering.redhat.com/jobs/6164756
|
|
|
79a518 |
for kpatch-patch-3_10_0-1160_15_2-1-11.el7 scratch build:
|
|
|
79a518 |
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=42181339
|
|
|
79a518 |
|
|
|
79a518 |
commit 65cb42abca9a5a600cbbdbbef8ddbafd028b7b5d
|
|
|
79a518 |
Author: Carlos Maiolino <cmaiolino@redhat.com>
|
|
|
79a518 |
Date: Tue Jan 4 08:29:12 2022 +0100
|
|
|
79a518 |
|
|
|
79a518 |
xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
|
|
|
79a518 |
|
|
|
79a518 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2034857
|
|
|
79a518 |
CVE: CVE-2021-4155
|
|
|
79a518 |
Tested: xfstests and specific reproducer
|
|
|
79a518 |
Upstream status: Posted privately due to embargo
|
|
|
79a518 |
|
|
|
79a518 |
Conflicts:
|
|
|
79a518 |
- el7 required small adjustment to the patch, to fit the old
|
|
|
79a518 |
code.
|
|
|
79a518 |
|
|
|
79a518 |
The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at
|
|
|
79a518 |
the end of files, just like fallocate and RESVSP. Make the behavior
|
|
|
79a518 |
consistent with the other ioctls.
|
|
|
79a518 |
|
|
|
79a518 |
Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com>
|
|
|
79a518 |
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
|
|
|
79a518 |
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
|
79a518 |
Reviewed-by: Dave Chinner <dchinner@redhat.com>
|
|
|
79a518 |
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
|
|
|
79a518 |
(cherry picked from commit 983d8e60f50806f90534cc5373d0ce867e5aaf79)
|
|
|
79a518 |
|
|
|
79a518 |
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
|
|
|
79a518 |
|
|
|
79a518 |
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
|
|
|
79a518 |
---
|
|
|
79a518 |
fs/xfs/xfs_ioctl.c | 3 ++-
|
|
|
79a518 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
79a518 |
|
|
|
79a518 |
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
|
|
|
79a518 |
index 722396680482..8f1c795c8765 100644
|
|
|
79a518 |
--- a/fs/xfs/xfs_ioctl.c
|
|
|
79a518 |
+++ b/fs/xfs/xfs_ioctl.c
|
|
|
79a518 |
@@ -773,7 +773,8 @@ xfs_ioc_space(
|
|
|
79a518 |
flags |= XFS_PREALLOC_CLEAR;
|
|
|
79a518 |
if (bf->l_start > XFS_ISIZE(ip)) {
|
|
|
79a518 |
error = xfs_alloc_file_space(ip, XFS_ISIZE(ip),
|
|
|
79a518 |
- bf->l_start - XFS_ISIZE(ip), 0);
|
|
|
79a518 |
+ bf->l_start - XFS_ISIZE(ip),
|
|
|
79a518 |
+ XFS_BMAPI_PREALLOC);
|
|
|
79a518 |
if (error)
|
|
|
79a518 |
goto out_unlock;
|
|
|
79a518 |
}
|
|
|
79a518 |
--
|
|
|
79a518 |
2.26.3
|
|
|
79a518 |
|
|
|
79a518 |
|