Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Chen Yu <xnguchen@sina.cn>
Cc: s.shtylyov@omp.ru, ulf.hansson@linaro.org, stable@vger.kernel.org
Subject: Re: [PATCH 5.15.y] mmc: core: use sysfs_emit() instead of sprintf()
Date: Fri, 12 Dec 2025 17:51:25 +0100	[thread overview]
Message-ID: <2025121205-wool-undesired-0609@gregkh> (raw)
In-Reply-To: <20251212081959.5633-1-xnguchen@sina.cn>

On Fri, Dec 12, 2025 at 04:19:59PM +0800, Chen Yu wrote:
> From: Sergey Shtylyov <s.shtylyov@omp.ru>
> 
> [ Upstream commit f5d8a5fe77ce933f53eb8f2e22bb7a1a2019ea11 ]
> 
> sprintf() (still used in the MMC core for the sysfs output) is vulnerable
> to the buffer overflow.  Use the new-fangled sysfs_emit() instead.
> 
> Found by Linux Verification Center (linuxtesting.org) with the SVACE static
> analysis tool.
> 
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/r/717729b2-d65b-c72e-9fac-471d28d00b5a@omp.ru
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Chen Yu <xnguchen@sina.cn>
> ---
>  drivers/mmc/core/bus.c      |  9 +++++----
>  drivers/mmc/core/bus.h      |  3 ++-
>  drivers/mmc/core/mmc.c      | 16 ++++++++--------
>  drivers/mmc/core/sd.c       | 25 ++++++++++++-------------
>  drivers/mmc/core/sdio.c     |  5 +++--
>  drivers/mmc/core/sdio_bus.c |  7 ++++---
>  6 files changed, 34 insertions(+), 31 deletions(-)

Why is this needed for stable kernels?  I see no real bugfix here, do
you?

      reply	other threads:[~2025-12-12 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  8:19 [PATCH 5.15.y] mmc: core: use sysfs_emit() instead of sprintf() Chen Yu
2025-12-12 16:51 ` Greg KH [this message]

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=2025121205-wool-undesired-0609@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=s.shtylyov@omp.ru \
    --cc=stable@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=xnguchen@sina.cn \
    /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