From: Jiri Slaby <jslaby@suse.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>,
mathieu.poirier@linaro.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Out-of-bound access in sysrq
Date: Thu, 28 Mar 2013 11:34:03 +0100 [thread overview]
Message-ID: <51541C9B.4000802@suse.cz> (raw)
Guys,
how is this supposed to work?
#define SYSRQ_KEY_RESET_MAX 20 /* Should be plenty */
static unsigned short sysrq_reset_seq[SYSRQ_KEY_RESET_MAX];
...
unsigned short platform_sysrq_reset_seq[] __weak = { KEY_RESERVED };
...
static inline void sysrq_register_handler(void)
{
...
for (i = 0; i < ARRAY_SIZE(sysrq_reset_seq); i++) {
key = platform_sysrq_reset_seq[i];
if (key == KEY_RESERVED || key > KEY_MAX)
...
i runs from 0 to 19 incl., but platform_sysrq_reset_seq, if not
overriden, is of size 1, so?
thanks,
--
js
suse labs
next reply other threads:[~2013-03-28 10:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 10:34 Jiri Slaby [this message]
2013-03-28 13:19 ` Mathieu Poirier
2013-03-28 13:28 ` Jiri Slaby
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=51541C9B.4000802@suse.cz \
--to=jslaby@suse.cz \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome