aboutsummaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2020-08-31 09:34:10 +0200
committerSalvatore Bonaccorso <carnil@debian.org>2020-08-31 09:34:42 +0200
commitfa1721ec92176de9f038c84a19a6f967599c6ec9 (patch)
tree6779f8090401a9c8a0e6657b8a571819caffa18c /debian
parent87cdd30a3f12ab635f0d3890c87acc29a3e0deb5 (diff)
downloadkernel_replicant_linux-fa1721ec92176de9f038c84a19a6f967599c6ec9.tar.gz
kernel_replicant_linux-fa1721ec92176de9f038c84a19a6f967599c6ec9.tar.bz2
kernel_replicant_linux-fa1721ec92176de9f038c84a19a6f967599c6ec9.zip
nfsd: fix oops on mixed NFSv4/NFSv3 client access
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/bugfix/all/nfsd-fix-oops-on-mixed-NFSv4-NFSv3-client-access.patch40
-rw-r--r--debian/patches/series1
3 files changed, 42 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 94a6421b3c07..238df902a5df 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ linux (5.8.5-1~exp1) UNRELEASED; urgency=medium
[ Salvatore Bonaccorso ]
* iwlwifi: yoyo: don't print failure if debug firmware is missing
(Closes: #966218)
+ * nfsd: fix oops on mixed NFSv4/NFSv3 client access
-- Ben Hutchings <benh@debian.org> Tue, 25 Aug 2020 19:33:26 +0100
diff --git a/debian/patches/bugfix/all/nfsd-fix-oops-on-mixed-NFSv4-NFSv3-client-access.patch b/debian/patches/bugfix/all/nfsd-fix-oops-on-mixed-NFSv4-NFSv3-client-access.patch
new file mode 100644
index 000000000000..bc88447af702
--- /dev/null
+++ b/debian/patches/bugfix/all/nfsd-fix-oops-on-mixed-NFSv4-NFSv3-client-access.patch
@@ -0,0 +1,40 @@
+From: "J. Bruce Fields" <bfields@redhat.com>
+Date: Wed, 5 Aug 2020 15:10:11 -0400
+Subject: nfsd: fix oops on mixed NFSv4/NFSv3 client access
+Origin: https://git.kernel.org/linus/34b09af4f54e6485e28f138ccad159611a240cc1
+
+If an NFSv2/v3 client breaks an NFSv4 client's delegation, it will hit a
+NULL dereference in nfsd_breaker_owns_lease().
+
+Easily reproduceable with for example
+
+ mount -overs=4.2 server:/export /mnt/
+ sleep 1h </mnt/file &
+ mount -overs=3 server:/export /mnt2/
+ touch /mnt2/file
+
+Reported-by: Robert Dinse <nanook@eskimo.com>
+Fixes: 28df3d1539de50 ("nfsd: clients don't need to break their own delegations")
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208807
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
+---
+ fs/nfsd/nfs4state.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
+index 81ed8e8bab3f..1ea9bbcc7c24 100644
+--- a/fs/nfsd/nfs4state.c
++++ b/fs/nfsd/nfs4state.c
+@@ -4597,6 +4597,8 @@ static bool nfsd_breaker_owns_lease(struct file_lock *fl)
+ if (!i_am_nfsd())
+ return NULL;
+ rqst = kthread_data(current);
++ if (!rqst->rq_lease_breaker)
++ return NULL;
+ clp = *(rqst->rq_lease_breaker);
+ return dl->dl_stid.sc_client == clp;
+ }
+--
+2.28.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 8666e75cd300..d0a77d34fa8a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -87,6 +87,7 @@ debian/revert-objtool-fix-config_stack_validation-y-warning.patch
bugfix/all/partially-revert-net-socket-implement-64-bit-timestamps.patch
bugfix/all/usbip-tools-fix-build-error-for-multiple-definition.patch
bugfix/all/iwlwifi-yoyo-don-t-print-failure-if-debug-firmware-i.patch
+bugfix/all/nfsd-fix-oops-on-mixed-NFSv4-NFSv3-client-access.patch
# Miscellaneous features