Skip to contentSkip to conversation

FAILED: patch "[PATCH] fuse: reject internal errno" failed to apply to 4.19-stable tree

PATCH [email protected] 2 participants 3 messages Jul 11, 2021 – Jul 15, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <[email protected]>
Date: Tue, 22 Jun 2021 09:15:35 +0200
Subject: [PATCH] fuse: reject internal errno

Don't allow userspace to report errors that could be kernel-internal.

Fixes 334f485df85a ("[PATCH] FUSE - device functions")
Cc <[email protected]> # v2.6.14
fs/fuse/dev.c +1 -1
index 6e63bcba2a40..b8d58aa08206 100644
@@ -1867,7 +1867,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
 	}
 
 	err = -EINVAL;
-	if (oh.error <= -1000 || oh.error > 0)
+	if (oh.error <= -512 || oh.error > 0)
 		goto copy_finish;
 
 	spin_lock(&fpq->lock);
#1 lore raw

Hi Greg,

Please apply with --fuzz=3 (though I don't really see why this is needed, since there's just a single line of difference in the context).

Should work for backports to all previous versions.

Thanks,
Miklos

Quoted 39 lines · On Sun, Jul 11, 2021 at 3:20 PM <[email protected]> wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 49221cf86d18bb66fe95d3338cb33bd4b9880ca5 Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <[email protected]>
Date: Tue, 22 Jun 2021 09:15:35 +0200
Subject: [PATCH] fuse: reject internal errno

Don't allow userspace to report errors that could be kernel-internal.

Fixes 334f485df85a ("[PATCH] FUSE - device functions")
Cc <[email protected]> # v2.6.14
fs/fuse/dev.c +1 -1
index 6e63bcba2a40..b8d58aa08206 100644
@@ -1867,7 +1867,7 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
        }
 
        err = -EINVAL;
-       if (oh.error <= -1000 || oh.error > 0)
+       if (oh.error <= -512 || oh.error > 0)
                goto copy_finish;
 
        spin_lock(&fpq->lock);
author maintainer
#2 lore raw
Quoted 7 lines · Miklos Szeredi

Hi Greg,

Please apply with --fuzz=3 (though I don't really see why this is needed, since there's just a single line of difference in the context).

Should work for backports to all previous versions.

Ok, that worked better, the context did not allow it to apply cleanly as-is.

thanks,

greg k-h