From: "David Wang" <00107082@163.com>
To: "Thomas Gleixner" <tglx@linutronix.de>
Cc: kees@kernel.org, linux-kernel@vger.kernel.org, geert@linux-m68k.org
Subject: Re: [PATCH 2/3] irqchip: Fix a potential abuse of seq_printf() format string
Date: Tue, 3 Dec 2024 20:00:58 +0800 (CST) [thread overview]
Message-ID: <731ed569.b3e4.1938c652457.Coremail.00107082@163.com> (raw)
In-Reply-To: <87ttblt3i1.ffs@tglx>
At 2024-12-03 19:22:46, "Thomas Gleixner" <tglx@linutronix.de> wrote:
>On Wed, Nov 20 2024 at 17:17, David Wang wrote:
>> Using device name as format string of seq_printf() is prone to
>> "Format string attack", opens possibility for exploitation.
>> Seq_puts() is safer and more efficient.
>
>I agree that seq_puts() is more efficient, but this whole handwaving
>about format string attacks is far fetched.
>
>These strings originate from device tree or generated device/domain
>names. If they contain format strings, then that's either a plain bug in
>the kernel or the device tree, but far from a 'format string attack'.
Isn't it possible to change device name? The way I image it, if some low-privileged interface can
be used to change device name, (maybe some backdoor in the device firmware)
then reading /proc/... could be used by low-privileged user to gain more information.
And yes, It is all theoretical.
Thanks
David
next prev parent reply other threads:[~2024-12-03 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 9:14 [PATCH 1/3] gpio: " David Wang
2024-11-20 9:17 ` [PATCH 2/3] irqchip: " David Wang
2024-12-03 11:22 ` Thomas Gleixner
2024-12-03 12:00 ` David Wang [this message]
2024-11-20 9:18 ` [PATCH 3/3] pinctrl: " David Wang
2024-11-20 11:04 ` [PATCH 1/3] gpio: " Geert Uytterhoeven
2024-11-20 11:41 ` David Wang
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=731ed569.b3e4.1938c652457.Coremail.00107082@163.com \
--to=00107082@163.com \
--cc=geert@linux-m68k.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®