From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Dave Jones <davej@fedoraproject.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 3.5 06/60] [media] mxl111sf: Fix unintentional garbage stack read
Date: Fri, 21 Feb 2014 13:00:33 +0000 [thread overview]
Message-ID: <1392987687-15367-7-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1392987687-15367-1-git-send-email-luis.henriques@canonical.com>
3.5.7.31 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jones <davej@fedoraproject.org>
commit 866e8d8a9dc1ebb4f9e67197e264ac2df81f7d4b upstream.
mxl111sf_read_reg takes an address of a variable to write to as an argument.
drivers/media/usb/dvb-usb-v2/mxl111sf-gpio.c:mxl111sf_config_pin_mux_modes
passes several uninitialized stack variables to this routine, expecting
them to be filled in. In the event that something unexpected happens when
reading from the chip, we end up doing a pr_debug of the value passed in,
revealing whatever garbage happened to be on the stack.
Change the pr_debug to match what happens in the 'success' case, where we
assign buf[1] to *data.
Spotted with Coverity (Bugs 731910 through 731917)
Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
[ luis: backported to 3.5:
- file rename: drivers/media/usb/dvb-usb-v2/mxl111sf.c ->
drivers/media/dvb/dvb-usb/mxl111sf.c
- replaced pr_debug() by deb_reg() ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/media/dvb/dvb-usb/mxl111sf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb/dvb-usb/mxl111sf.c b/drivers/media/dvb/dvb-usb/mxl111sf.c
index cd84279..086fb8a 100644
--- a/drivers/media/dvb/dvb-usb/mxl111sf.c
+++ b/drivers/media/dvb/dvb-usb/mxl111sf.c
@@ -101,7 +101,7 @@ int mxl111sf_read_reg(struct mxl111sf_state *state, u8 addr, u8 *data)
ret = -EINVAL;
}
- deb_reg("R: (0x%02x, 0x%02x)\n", addr, *data);
+ deb_reg("R: (0x%02x, 0x%02x)\n", addr, buf[1]);
fail:
return ret;
}
--
1.9.0
next prev parent reply other threads:[~2014-02-21 13:01 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 13:00 [3.5.y.z extended stable] Linux 3.5.7.31 stable review Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 01/60] PCI: Enable ARI if dev and upstream bridge support it; disable otherwise Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 02/60] crypto: s390 - fix concurrency issue in aes-ctr mode Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 03/60] crypto: s390 - fix des and des3_ede cbc concurrency issue Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 04/60] crypto: s390 - fix des and des3_ede ctr " Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 05/60] ALSA: usb-audio: Add missing kconfig dependecy Luis Henriques
2014-02-21 13:00 ` Luis Henriques [this message]
2014-02-21 13:00 ` [PATCH 3.5 07/60] [media] mxl111sf: Fix compile when CONFIG_DVB_USB_MXL111SF is unset Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 08/60] drm/mgag200: fix typo causing bw limits to be ignored on some chips Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 09/60] ALSA: hda - Improve loopback path lookups for AD1983 Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 10/60] SELinux: Fix kernel BUG on empty security contexts Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 11/60] pinctrl: do not init debugfs entries for unimplemented functionalities Luis Henriques
2014-02-25 9:24 ` Linus Walleij
2014-02-25 9:38 ` Luís Henriques
2014-02-21 13:00 ` [PATCH 3.5 12/60] x86, hweight: Fix BUG when booting with CONFIG_GCOV_PROFILE_ALL=y Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 13/60] mm/swap: fix race on swap_info reuse between swapoff and swapon Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 14/60] mm: __set_page_dirty_nobuffers() uses spin_lock_irqsave() instead of spin_lock_irq() Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 15/60] mm: __set_page_dirty uses spin_lock_irqsave instead of spin_lock_irq Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 16/60] sched,rt: fix isolated CPUs leaving root_task_group indefinitely throttled Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 17/60] sched: Unthrottle rt runqueues in __disable_runtime() Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 18/60] sched/rt: Avoid updating RT entry timeout twice within one tick period Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 19/60] rtc-cmos: Add an alarm disable quirk Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 20/60] timekeeping: Avoid possible deadlock from clock_was_set_delayed Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 21/60] timekeeping: fix 32-bit overflow in get_monotonic_boottime Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 22/60] ahci: Use PCI_VENDOR_ID_MARVELL_EXT for 0x1b4b Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 23/60] ahci: add an observed PCI ID for Marvell 88se9172 SATA controller Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 24/60] ftrace: Synchronize setting function_trace_op with ftrace_trace_function Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 25/60] ftrace: Fix synchronization location disabling and freeing ftrace_ops Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 26/60] ftrace: Have function graph only trace based on global_ops filters Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 27/60] printk: Fix scheduling-while-atomic problem in console_cpu_notify() Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 28/60] staging:iio:ad799x fix error_free_irq which was freeing an irq that may not have been requested Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 29/60] xhci: Fix resume issues on Renesas chips in Samsung laptops Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 30/60] KVM: return an error code in kvm_vm_ioctl_register_coalesced_mmio() Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 31/60] power: max17040: Fix NULL pointer dereference when there is no platform_data Luis Henriques
2014-02-21 13:00 ` [PATCH 3.5 32/60] s390/dump: Fix dump memory detection Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 33/60] ath9k_htc: Do not support PowerSave by default Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 34/60] ath9k: " Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 35/60] spi: nuc900: Set SPI_LSB_FIRST for master->mode_bits if hw->pdata->lsb is true Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 36/60] usb: ftdi_sio: add Mindstorms EV3 console adapter Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 37/60] usb-storage: restrict bcdDevice range for Super Top in Cypress ATACB Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 38/60] usb-storage: add unusual-devs entry for BlackBerry 9000 Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 39/60] usb-storage: enable multi-LUN scanning when needed Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 40/60] USB: ftdi_sio: add Tagsys RFID Reader IDs Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 41/60] mac80211: fix fragmentation code, particularly for encryption Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 42/60] time: Fix overflow when HZ is smaller than 60 Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 43/60] VME: Correct read/write alignment algorithm Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 44/60] raw: test against runtime value of max_raw_minors Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 45/60] tty: n_gsm: Fix for modems with brk in modem status control Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 46/60] staging: comedi: adv_pci1710: fix analog output readback value Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 47/60] xen-blkfront: handle backend CLOSED without CLOSING Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 48/60] Modpost: fixed USB alias generation for ranges including 0x9 and 0xA Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 49/60] iio: ak8975: Fix calculation formula for convert micro tesla to gauss unit Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 50/60] fs/file.c:fdtable: avoid triggering OOMs from alloc_fdmem Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 51/60] genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 52/60] ring-buffer: Fix first commit on sub-buffer having non-zero delta Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 53/60] usb: option: blacklist ZTE MF667 net interface Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 54/60] md/raid5: Fix CPU hotplug callback registration Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 55/60] lockd: send correct lock when granting a delayed lock Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 56/60] IB/qib: Add missing serdes init sequence Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 57/60] EDAC: Correct workqueue setup path Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 58/60] dm sysfs: fix a module unload race Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 59/60] s390: fix kernel crash due to linkage stack instructions Luis Henriques
2014-02-21 13:01 ` [PATCH 3.5 60/60] block: add cond_resched() to potentially long running ioctl discard loop Luis Henriques
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=1392987687-15367-7-git-send-email-luis.henriques@canonical.com \
--to=luis.henriques@canonical.com \
--cc=davej@fedoraproject.org \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=mkrufky@linuxtv.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
all inboxes | Powered by JetHome®