From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: GenWQE Character device and DDCB queue
Date: Fri, 20 Dec 2013 21:01:40 +0000 [thread overview]
Message-ID: <20131220210140.GA32504@elgon.mountain> (raw)
Hello Frank Haverkamp,
The patch eaf4722d4645: "GenWQE Character device and DDCB queue" from
Dec 9, 2013, leads to the following
static checker warning: "drivers/misc/genwqe/card_dev.c:657
do_flash_update()
warn: maybe return -EFAULT instead of the bytes remaining?"
drivers/misc/genwqe/card_dev.c
564 tocopy = min_t(size_t, load->size, FLASH_BLOCK);
565
566 rc = copy_from_user(xbuf, buf, tocopy);
567 if (rc) {
568 dev_err(&pci_dev->dev,
569 "err: could not copy all data rc=%d\n", rc);
There should be an "rc = -EFAULT" here. Also printing lots of user
triggerable dev_errs() is a DoS vector. The caller doesn't check the
error immediately; is that an information leak bug?
570 goto free_buffer;
571 }
572 crc = genwqe_crc32(xbuf, tocopy, 0xffffffff);
573
574 dev_info(&pci_dev->dev,
575 "[%s] DMA: 0x%llx CRC: %08x SZ: %ld %d\n",
576 __func__, dma_addr, crc, tocopy, blocks_to_flash);
577
regards,
dan carpenter
next reply other threads:[~2013-12-20 21:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 21:01 Dan Carpenter [this message]
2013-12-21 19:40 ` GenWQE Character device and DDCB queue Frank Haverkamp
2013-12-21 21:37 ` Dan Carpenter
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=20131220210140.GA32504@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.