From: Petr Mladek <pmladek@suse.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v1 1/1] lib/vsprintf: Check pointer before dereferencing in time_and_date()
Date: Mon, 10 Nov 2025 15:44:18 +0100 [thread overview]
Message-ID: <aRH6QqRPf7XrYTDg@pathway.suse.cz> (raw)
In-Reply-To: <20251110132118.4113976-1-andriy.shevchenko@linux.intel.com>
On Mon 2025-11-10 14:21:18, Andy Shevchenko wrote:
> The pointer may be invalid when gets to the printf(). In particular
> the time_and_date() dereferencing it in some cases without checking.
>
> Move the check from rtc_str() to time_and_date() to cover all cases.
>
> Fixes: 7daac5b2fdf8 ("lib/vsprintf: Print time64_t in human readable format")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Great catch!
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
next prev parent reply other threads:[~2025-11-10 14:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 13:21 [PATCH v1 1/1] lib/vsprintf: Check pointer before dereferencing in time_and_date() Andy Shevchenko
2025-11-10 14:44 ` Petr Mladek [this message]
2025-11-12 10:59 ` Petr Mladek
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=aRH6QqRPf7XrYTDg@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.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