public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Takashi Iwai <tiwai@suse.de>,
	Jonghwa Lee <jonghwa3.lee@samsung.com>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 2/3] PM / devfreq: Fix buffer overflow in trans_stat_show
Date: Thu, 2 Nov 2023 18:26:22 +0100	[thread overview]
Message-ID: <6543dbc0.df0a0220.21766.ef29@mx.google.com> (raw)
In-Reply-To: <20231024183016.14648-2-ansuelsmth@gmail.com>

On Tue, Oct 24, 2023 at 08:30:15PM +0200, Christian Marangi wrote:
> Fix buffer overflow in trans_stat_show().
> 
> Convert simple snprintf to the more secure scnprintf with size of
> PAGE_SIZE.
> 
> Add condition checking if we are exceeding PAGE_SIZE and exit early from
> loop. Also add at the end a warning that we exceeded PAGE_SIZE and that
> stats is disabled.
> 
> Return -EFBIG in the case where we don't have enough space to write the
> full transition table.
> 
> Also document in the ABI that this function can return -EFBIG error.
> 
> Cc: stable@vger.kernel.org
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218041
> Fixes: e552bbaf5b98 ("PM / devfreq: Add sysfs node for representing frequency transition information.")
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

Any news for this?

-- 
	Ansuel

  reply	other threads:[~2023-11-02 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 18:30 [PATCH 1/3] cpufreq: fix broken buffer overflow detection in trans_stats Christian Marangi
2023-10-24 18:30 ` [PATCH 2/3] PM / devfreq: Fix buffer overflow in trans_stat_show Christian Marangi
2023-11-02 17:26   ` Christian Marangi [this message]
2023-10-24 20:03 ` [PATCH 1/3] cpufreq: fix broken buffer overflow detection in trans_stats Rafael J. Wysocki
2023-10-26 10:53   ` Christian Marangi
2023-10-26 11:22     ` Rafael J. Wysocki

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=6543dbc0.df0a0220.21766.ef29@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=cw00.choi@samsung.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox