Archive-only list for patches
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: gregkh@linuxfoundation.org,jack@suse.cz,libaokun1@huawei.com,libaokun@huaweicloud.com,patches@lists.linux.dev,sashal@kernel.org,tytso@mit.edu,yangerkun@huawei.com,yi.zhang@huawei.com
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "ext4: avoid ptr null pointer dereference" has been added to the 6.9-stable tree
Date: Tue, 16 Jul 2024 15:15:34 +0200	[thread overview]
Message-ID: <2024071633-verse-doctrine-a562@gregkh> (raw)
In-Reply-To: <20240716092929.864207-1-libaokun@huaweicloud.com>


This is a note to let you know that I've just added the patch titled

    ext4: avoid ptr null pointer dereference

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-avoid-ptr-null-pointer-dereference.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


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 <libaokun1@huawei.com>
Message-ID: <20240716092929.864207-1-libaokun@huaweicloud.com>

From: Baokun Li <libaokun1@huawei.com>

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.

Fixes: b829687ae122 ("ext4: fix slab-out-of-bounds in ext4_mb_find_good_group_avg_frag_lists()")
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/ext4/sysfs.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/ext4/sysfs.c
+++ b/fs/ext4/sysfs.c
@@ -473,6 +473,8 @@ static ssize_t ext4_attr_store(struct ko
 			*((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;


Patches currently in stable-queue which might be from libaokun@huaweicloud.com are

queue-6.9/cachefiles-propagate-errors-from-vfs_getxattr-to-avo.patch
queue-6.9/cachefiles-cancel-all-requests-for-the-object-that-i.patch
queue-6.9/cachefiles-add-missing-lock-protection-when-polling.patch
queue-6.9/cachefiles-cyclic-allocation-of-msg_id-to-avoid-reus.patch
queue-6.9/cachefiles-stop-sending-new-request-when-dropping-ob.patch
queue-6.9/ext4-avoid-ptr-null-pointer-dereference.patch
queue-6.9/cachefiles-wait-for-ondemand_object_worker-to-finish.patch

  reply	other threads:[~2024-07-16 13:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  9:29 [PATCH 6.6/6.9] ext4: avoid ptr null pointer dereference libaokun
2024-07-16 13:15 ` gregkh [this message]
2024-07-16 13:29 ` Patch "ext4: avoid ptr null pointer dereference" has been added to the 5.4-stable tree gregkh
2024-07-16 13:30 ` Patch "ext4: avoid ptr null pointer dereference" has been added to the 6.6-stable tree gregkh
2024-07-16 14:07 ` [PATCH 6.6/6.9] ext4: avoid ptr null pointer dereference Greg KH
2024-07-16 14:18   ` Baokun Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2024071633-verse-doctrine-a562@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=libaokun1@huawei.com \
    --cc=libaokun@huaweicloud.com \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox