From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Siddh Raman Pant <siddh.raman.pant@oracle.com>
Cc: "cve@kernel.org" <cve@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: CVE-2025-39751: ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control
Date: Mon, 6 Oct 2025 11:53:59 +0200 [thread overview]
Message-ID: <2025100643-tarot-gender-4430@gregkh> (raw)
In-Reply-To: <b12d18b040c39eb361c0f5aabf290236e3d0da66.camel@oracle.com>
On Mon, Oct 06, 2025 at 09:19:42AM +0000, Siddh Raman Pant wrote:
> On Mon, Oct 06 2025 at 13:44:23 +0530, gregkh@linuxfoundation.org
> wrote:
> > On Mon, Oct 06, 2025 at 07:07:00AM +0000, Siddh Raman Pant wrote:
> > > On Thu, 11 Sep 2025 18:52:52 +0200, Greg Kroah-Hartman wrote:
> > > > ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control
> > > >
> > > > The 'sprintf' call in 'add_tuning_control' may exceed the 44-byte
> > > > buffer if either string argument is too long. This triggers a compiler
> > > > warning.
> > > > Replaced 'sprintf' with 'snprintf' to limit string lengths to prevent
> > > > overflow.
> > > >
> > > > The Linux kernel CVE team has assigned CVE-2025-39751 to this issue.
> > >
> > > While the change is good for defensive reasons, there isn't actually
> > > any buffer overflow as it is to "fix".
> > >
> > > The largest string possible is "Wedge Angle Playback Volume", whose
> > > length is less than 44.
> >
> > Thanks for the info. What was the compiler warning about then if it
> > could detect just how big the string would always be as these are static
> > values?
>
> Probably a false positive.
>
> GCC docs does say:
>
> -Wformat-overflow
> -Wformat-overflow=level
>
> Warn about calls to formatted input/output functions such
> as sprintf and vsprintf that might overflow the
> destination
> buffer. When the exact number of bytes written by a format
> directive cannot be determined at compile-time it is
> estimated based on heuristics that depend on the level
> argument and on optimization. While enabling optimization
> will in most cases improve the accuracy of the warning, it
> may also result in false positives.
I can't seem to duplicate this warning on a newer version of gcc than
the original test used:
https://lore.kernel.org/oe-kbuild-all/202506100642.95jpuMY1-lkp@intel.com/
But that value of "767" is very specific, which feels odd to me.
> > Should this CVE be rejected?
>
> Yes.
Ok, will do, but this still seems odd, you should patch your kernel just
to be safe :)
thanks,
greg k-h
prev parent reply other threads:[~2025-10-06 9:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 16:52 CVE-2025-39751: ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control Greg Kroah-Hartman
2025-10-06 7:07 ` Siddh Raman Pant
2025-10-06 8:14 ` gregkh
2025-10-06 9:19 ` Siddh Raman Pant
2025-10-06 9:53 ` gregkh [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=2025100643-tarot-gender-4430@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=cve@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=siddh.raman.pant@oracle.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 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.