All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: cve@kernel.org, linux-kernel@vger.kernel.org,
	Joel Granados <j.granados@samsung.com>,
	Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: CVE-2023-52596: sysctl: Fix out of bounds access for empty sysctl registers
Date: Mon, 11 Mar 2024 09:11:27 +0100	[thread overview]
Message-ID: <Ze68r7_aTn6Vjbpj@tiehlicka> (raw)
In-Reply-To: <2024030645-CVE-2023-52596-b98e@gregkh>

On Wed 06-03-24 06:45:54, Greg KH wrote:
> Description
> ===========
> 
> In the Linux kernel, the following vulnerability has been resolved:
> 
> sysctl: Fix out of bounds access for empty sysctl registers
> 
> When registering tables to the sysctl subsystem there is a check to see
> if header is a permanently empty directory (used for mounts). This check
> evaluates the first element of the ctl_table. This results in an out of
> bounds evaluation when registering empty directories.
> 
> The function register_sysctl_mount_point now passes a ctl_table of size
> 1 instead of size 0. It now relies solely on the type to identify
> a permanently empty register.
> 
> Make sure that the ctl_table has at least one element before testing for
> permanent emptiness.

While this makes the code more robust and more future proof I do not think
this is fixing any real issue not to mention anything with security
implications. AFAIU there is no actual code that can generate empty
sysctl directories unless the kernel is heavily misconfigured.

Luis, Joel, what do you think?

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2024-03-11  8:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  6:45 CVE-2023-52596: sysctl: Fix out of bounds access for empty sysctl registers Greg Kroah-Hartman
2024-03-11  8:11 ` Michal Hocko [this message]
2024-03-11 21:57   ` Luis Chamberlain
2024-03-12  9:17     ` Lee Jones
2024-03-12  9:45       ` Michal Hocko
2024-03-12 15:11         ` Luis Chamberlain
2024-03-12 15:49           ` Lee Jones
2024-03-12 18:04             ` Luis Chamberlain
2024-03-12 21:47               ` Kees Cook
2024-03-13  8:01                 ` Lee Jones
2024-03-20 18:59                   ` Pavel Machek
2024-03-20 15:30                 ` Michal Hocko
2024-03-12 11:20     ` Joel Granados

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=Ze68r7_aTn6Vjbpj@tiehlicka \
    --to=mhocko@suse.com \
    --cc=cve@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=j.granados@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.