diff options
author | Kees Cook <keescook@chromium.org> | 2013-09-10 21:41:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 07:39:27 -0700 |
commit | 5418ae3188a9a57f318f51c3c26c0fedfea82f8b (patch) | |
tree | a9086ac41676733f1cefaa95d104323ef6d3bc14 | |
parent | 9edf0f670bdc8fa8b6676893b0a3bd2bf30a2362 (diff) | |
download | op-kernel-dev-5418ae3188a9a57f318f51c3c26c0fedfea82f8b.zip op-kernel-dev-5418ae3188a9a57f318f51c3c26c0fedfea82f8b.tar.gz |
staging: dgnc: fix potential format string flaw
Make sure that format strings cannot leak into printk() calls from the
msgbuf string.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index f8c1e22..71d2b83 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -454,7 +454,7 @@ static void dgnc_cleanup_board(struct board_t *brd) DGNC_LOCK(dgnc_global_lock, flags); brd->msgbuf = NULL; - printk(brd->msgbuf_head); + printk("%s", brd->msgbuf_head); kfree(brd->msgbuf_head); brd->msgbuf_head = NULL; DGNC_UNLOCK(dgnc_global_lock, flags); @@ -710,7 +710,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) DPR_INIT(("dgnc_scan(%d) - printing out the msgbuf\n", i)); DGNC_LOCK(dgnc_global_lock, flags); brd->msgbuf = NULL; - printk(brd->msgbuf_head); + printk("%s", brd->msgbuf_head); kfree(brd->msgbuf_head); brd->msgbuf_head = NULL; DGNC_UNLOCK(dgnc_global_lock, flags); |