From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] tst_kconfig: Avoid buffer overflow when parsing /proc/cmdline
Date: Wed, 19 Jun 2024 09:47:03 +0200 [thread overview]
Message-ID: <20240619074703.GA410266@pevik> (raw)
In-Reply-To: <20240619073345.326108-1-liwang@redhat.com>
> When the test is run with a kernel booting with many parameters, the
> buffer size is often not large enough to store the complete command
> line. This results in a buffer overflow and the test complains with
> the following message:
> tst_kconfig.c:609: TWARN: Buffer overflowed while parsing /proc/cmdline
Thanks for the fix!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Fixes: 180834982 ("kconfig: add funtion to parse /proc/cmdline")
NOTE tst_kconfig_read() has char line[128], also struct tst_kcmdline_var member
has this length. The longest line on some on my systems is 109, it's still OK,
hopefully it stays :).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-06-19 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 7:33 [LTP] [PATCH] tst_kconfig: Avoid buffer overflow when parsing /proc/cmdline Li Wang
2024-06-19 7:47 ` Petr Vorel [this message]
2024-06-19 10:20 ` Li Wang
2024-06-19 13:30 ` Petr Vorel
2024-06-20 1:45 ` Li 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=20240619074703.GA410266@pevik \
--to=pvorel@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/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