From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Kees Cook <keescook@chromium.org>,
Anton Vorontsov <cbou@mail.ru>,
David Woodhouse <dwmw2@infradead.org>,
Anton Vorontsov <anton@enomsg.org>
Subject: [ 03/11] charger-manager: Ensure event is not used as format string
Date: Thu, 11 Jul 2013 15:11:03 -0700 [thread overview]
Message-ID: <20130711220545.981905096@linuxfoundation.org> (raw)
In-Reply-To: <20130711220545.542911892@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <keescook@chromium.org>
commit 3594f4c0d7bc51e3a7e6d73c44e368ae079e42f3 upstream.
The exposed interface for cm_notify_event() could result in the event msg
string being parsed as a format string. Make sure it is only used as a
literal string.
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/power/charger-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -330,7 +330,7 @@ static void uevent_notify(struct charger
strncpy(env_str, event, UEVENT_BUF_SIZE);
kobject_uevent(&cm->dev->kobj, KOBJ_CHANGE);
- dev_info(cm->dev, event);
+ dev_info(cm->dev, "%s", event);
}
/**
next prev parent reply other threads:[~2013-07-11 22:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 22:11 [ 00/11] 3.4.53-stable review Greg Kroah-Hartman
2013-07-11 22:11 ` [ 01/11] libceph: Fix NULL pointer dereference in auth client code Greg Kroah-Hartman
2013-07-11 22:11 ` [ 02/11] drivers/cdrom/cdrom.c: use kzalloc() for failing hardware Greg Kroah-Hartman
2013-07-11 22:11 ` Greg Kroah-Hartman [this message]
2013-07-11 22:11 ` [ 04/11] hpfs: better test for errors Greg Kroah-Hartman
2013-07-11 22:11 ` [ 05/11] block: do not pass disk names as format strings Greg Kroah-Hartman
2013-07-11 22:11 ` [ 06/11] crypto: sanitize argument for format string Greg Kroah-Hartman
2013-07-11 22:11 ` [ 07/11] MAINTAINERS: add stable_kernel_rules.txt to stable maintainer information Greg Kroah-Hartman
2013-07-24 5:09 ` Ben Hutchings
2013-07-24 5:30 ` Greg Kroah-Hartman
2013-07-11 22:11 ` [ 08/11] Revert "serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller" Greg Kroah-Hartman
2013-07-11 22:11 ` [ 09/11] nfsd4: fix decoding of compounds across page boundaries Greg Kroah-Hartman
2013-07-11 22:11 ` [ 10/11] SCSI: sd: Fix parsing of temporary cache mode prefix Greg Kroah-Hartman
2013-07-11 22:11 ` [ 11/11] Revert "sched: Add missing call to calc_load_exit_idle()" Greg Kroah-Hartman
2013-07-12 0:24 ` [ 00/11] 3.4.53-stable review Paul Gortmaker
2013-07-12 0:33 ` Greg Kroah-Hartman
2013-07-12 2:17 ` Steven Rostedt
2013-07-12 14:58 ` Benjamin LaHaise
2013-07-12 15:08 ` Greg Kroah-Hartman
2013-07-12 17:21 ` Shuah Khan
2013-07-12 17:34 ` Guenter Roeck
2013-07-12 18:38 ` Greg Kroah-Hartman
2013-07-13 4:16 ` Satoru Takeuchi
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=20130711220545.981905096@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=anton@enomsg.org \
--cc=cbou@mail.ru \
--cc=dwmw2@infradead.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).