linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	syzbot+79d18aac4bf1770dd050@syzkaller.appspotmail.com,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-media@vger.kernel.org
Subject: [PATCH AUTOSEL 5.3 095/203] media: hdpvr: add terminating 0 at end of string
Date: Sun, 22 Sep 2019 14:42:01 -0400	[thread overview]
Message-ID: <20190922184350.30563-95-sashal@kernel.org> (raw)
In-Reply-To: <20190922184350.30563-1-sashal@kernel.org>

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

[ Upstream commit 8b8900b729e4f31f12ac1127bde137c775c327e6 ]

dev->usbc_buf was passed as argument for %s, but it was not safeguarded
by a terminating 0.

This caused this syzbot issue:

https://syzkaller.appspot.com/bug?extid=79d18aac4bf1770dd050

Reported-and-tested-by: syzbot+79d18aac4bf1770dd050@syzkaller.appspotmail.com

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/media/usb/hdpvr/hdpvr-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c
index a0905c81d2cb2..b75c18a012a73 100644
--- a/drivers/media/usb/hdpvr/hdpvr-core.c
+++ b/drivers/media/usb/hdpvr/hdpvr-core.c
@@ -137,6 +137,7 @@ static int device_authorization(struct hdpvr_device *dev)
 
 	dev->fw_ver = dev->usbc_buf[1];
 
+	dev->usbc_buf[46] = '\0';
 	v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n",
 			  dev->fw_ver, &dev->usbc_buf[2]);
 
-- 
2.20.1


  parent reply	other threads:[~2019-09-22 18:46 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190922184350.30563-1-sashal@kernel.org>
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 015/203] media: dib0700: fix link error for dibx000_i2c_set_speed Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 016/203] media: mtk-cir: lower de-glitch counter for rc-mm protocol Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 018/203] media: exynos4-is: fix leaked of_node references Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 019/203] media: vivid:add sanity check to avoid divide error and set value to 1 if 0 Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 020/203] media: vb2: reorder checks in vb2_poll() Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 021/203] media: vivid: work around high stack usage with clang Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 022/203] media: hdpvr: Add device num check and handling Sasha Levin
2019-09-22 18:40 ` [PATCH AUTOSEL 5.3 023/203] media: i2c: ov5640: Check for devm_gpiod_get_optional() error Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 038/203] media: iguanair: add sanity checks Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 053/203] media: media/platform: fsl-viu.c: fix build for MICROBLAZE Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 054/203] media: staging: tegra-vde: Fix build error Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 067/203] media: gspca: zero usb_buf on error Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 070/203] media: mtk-mdp: fix reference count on old device tree Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 071/203] media: i2c: tda1997x: prevent potential NULL pointer access Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 072/203] media: fdp1: Reduce FCP not found message level to debug Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 073/203] media: em28xx: modules workqueue not inited for 2nd device Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 076/203] media: rc: imon: Allow iMON RC protocol for ffdc 7e device Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 082/203] media: vsp1: fix memory leak of dl on error return path Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 083/203] media: i2c: ov5645: Fix power sequence Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 084/203] media: omap3isp: Don't set streaming state on random subdevs Sasha Levin
2019-09-23  7:19   ` Sakari Ailus
2019-09-23  7:25     ` Laurent Pinchart
2019-09-23 13:35       ` Sasha Levin
2019-10-01 14:30     ` Sasha Levin
2019-09-22 18:41 ` [PATCH AUTOSEL 5.3 085/203] media: imx: mipi csi-2: Don't fail if initial state times-out Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 094/203] media: radio/si470x: kill urb on error Sasha Levin
2019-09-22 18:42 ` Sasha Levin [this message]
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 107/203] media: mceusb: fix (eliminate) TX IR signal length limit Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 108/203] media: dvb-frontends: use ida for pll number Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 110/203] media: dvb-core: fix a memory leak bug Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 123/203] media: cec-notifier: clear cec_adap in cec_notifier_unregister Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 124/203] media: saa7146: add cleanup in hexium_attach() Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 125/203] media: cpia2_usb: fix memory leaks Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 126/203] media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate() Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 130/203] media: aspeed-video: address a protential usage of an unitialized var Sasha Levin
2019-09-22 18:42 ` [PATCH AUTOSEL 5.3 131/203] media: ov9650: add a sanity check Sasha Levin
2019-09-22 18:43 ` [PATCH AUTOSEL 5.3 188/203] media: technisat-usb2: break out of loop at end of buffer Sasha Levin
2019-09-22 18:43 ` [PATCH AUTOSEL 5.3 194/203] media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() Sasha Levin

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=20190922184350.30563-95-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+79d18aac4bf1770dd050@syzkaller.appspotmail.com \
    /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).