From: Greg Kroah-Hartman Date: Tue, 16 Jul 2024 14:32:52 +0000 (+0200) Subject: drop queue-5.4/ext4-avoid-ptr-null-pointer-dereference.patch X-Git-Tag: v4.19.318~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15374530434e87c51ce5e99c7d81407191040f1b;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.4/ext4-avoid-ptr-null-pointer-dereference.patch Accidentally applied it to the wrong branch --- diff --git a/queue-5.4/ext4-avoid-ptr-null-pointer-dereference.patch b/queue-5.4/ext4-avoid-ptr-null-pointer-dereference.patch deleted file mode 100644 index 350b56a3d17..00000000000 --- a/queue-5.4/ext4-avoid-ptr-null-pointer-dereference.patch +++ /dev/null @@ -1,39 +0,0 @@ -From libaokun@huaweicloud.com Tue Jul 16 15:13:28 2024 -From: libaokun@huaweicloud.com -Date: Tue, 16 Jul 2024 17:29:29 +0800 -Subject: ext4: avoid ptr null pointer dereference -To: stable@vger.kernel.org, gregkh@linuxfoundation.org -Cc: sashal@kernel.org, tytso@mit.edu, jack@suse.cz, patches@lists.linux.dev, yi.zhang@huawei.com, yangerkun@huawei.com, libaokun@huaweicloud.com, Baokun Li -Message-ID: <20240716092929.864207-1-libaokun@huaweicloud.com> - -From: Baokun Li - -When commit 13df4d44a3aa ("ext4: fix slab-out-of-bounds in -ext4_mb_find_good_group_avg_frag_lists()") was backported to stable, the -commit f536808adcc3 ("ext4: refactor out ext4_generic_attr_store()") that -uniformly determines if the ptr is null is not merged in, so it needs to -be judged whether ptr is null or not in each case of the switch, otherwise -null pointer dereferencing may occur. - -Signed-off-by: Baokun Li -Signed-off-by: Greg Kroah-Hartman ---- - fs/ext4/sysfs.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/fs/ext4/sysfs.c b/fs/ext4/sysfs.c -index 63cbda3700ea..d65dccb44ed5 100644 ---- a/fs/ext4/sysfs.c -+++ b/fs/ext4/sysfs.c -@@ -473,6 +473,8 @@ static ssize_t ext4_attr_store(struct kobject *kobj, - *((unsigned int *) ptr) = t; - return len; - case attr_clusters_in_group: -+ if (!ptr) -+ return 0; - ret = kstrtouint(skip_spaces(buf), 0, &t); - if (ret) - return ret; --- -2.39.2 - diff --git a/queue-5.4/series b/queue-5.4/series index 0b63c5321b9..b92d491ad74 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -75,5 +75,4 @@ net-tcp-fix-unexcepted-socket-die-when-snd_wnd-is-0.patch tcp-use-signed-arithmetic-in-tcp_rtx_probe0_timed_out.patch tcp-avoid-too-many-retransmit-packets.patch nilfs2-fix-kernel-bug-on-rename-operation-of-broken-directory.patch -ext4-avoid-ptr-null-pointer-dereference.patch i2c-rcar-bring-hardware-to-known-state-when-probing.patch