From: alexander.levin@verizon.com
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
alexander.levin@verizon.com
Subject: [PATCH AUTOSEL for 3.18 27/59] fbdev: controlfb: Add missing modes to fix out of bounds access
Date: Thu, 7 Dec 2017 15:51:29 +0000 [thread overview]
Message-ID: <20171207155116.6013-27-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171207155116.6013-1-alexander.levin@verizon.com>
From: Geert Uytterhoeven <geert@linux-m68k.org>
[ Upstream commit ac831a379d34109451b3c41a44a20ee10ecb615f ]
Dan's static analysis says:
drivers/video/fbdev/controlfb.c:560 control_setup()
error: buffer overflow 'control_mac_modes' 20 <= 21
Indeed, control_mac_modes[] has only 20 elements, while VMODE_MAX is 22,
which may lead to an out of bounds read when parsing vmode commandline
options.
The bug was introduced in v2.4.5.6, when 2 new modes were added to
macmodes.h, but control_mac_modes[] wasn't updated:
https://kernel.opensuse.org/cgit/kernel/diff/include/video/macmodes.h?h=v2.5.2&id=29f279c764808560eaceb88fef36cbc35c529aad
Augment control_mac_modes[] with the two new video modes to fix this.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/video/fbdev/controlfb.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/controlfb.h b/drivers/video/fbdev/controlfb.h
index 6026c60fc100..261522fabdac 100644
--- a/drivers/video/fbdev/controlfb.h
+++ b/drivers/video/fbdev/controlfb.h
@@ -141,5 +141,7 @@ static struct max_cmodes control_mac_modes[] = {
{{ 1, 2}}, /* 1152x870, 75Hz */
{{ 0, 1}}, /* 1280x960, 75Hz */
{{ 0, 1}}, /* 1280x1024, 75Hz */
+ {{ 1, 2}}, /* 1152x768, 60Hz */
+ {{ 0, 1}}, /* 1600x1024, 60Hz */
};
--
2.11.0
next prev parent reply other threads:[~2017-12-07 16:24 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 15:51 [PATCH AUTOSEL for 3.18 01/59] usb: phy: isp1301: Add OF device ID table alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 02/59] net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 06/59] NFSD: fix nfsd_reset_versions for NFSv4 alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 03/59] net: bcmgenet: correct MIB access of UniMAC RUNT counters alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 05/59] NFSD: fix nfsd_minorversion(.., NFSD_AVAIL) alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 04/59] net: bcmgenet: Power up the internal PHY before probing the MII alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 07/59] Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 08/59] net: wimax/i2400m: fix NULL-deref at probe alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 10/59] net: Resend IGMP memberships upon peer notification alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 09/59] dmaengine: Fix array index out of bounds warning in __get_unmap_pool() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 12/59] drm/radeon/si: add dpm quirk for Oland alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 13/59] sched/deadline: Use deadline instead of period when calculating overflow alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 14/59] drm/radeon: reinstate oland workaround for sclk alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 11/59] openrisc: fix issue handling 8 byte get_user calls alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 16/59] afs: Populate group ID from vnode status alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 15/59] afs: Fix missing put_page() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 17/59] afs: Adjust mode bits processing alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 19/59] afs: Fix the maths in afs_fs_store_data() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 20/59] afs: Populate and use client modification time alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 21/59] afs: Fix page leak in afs_write_begin() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 18/59] afs: Flush outstanding writes when an fd is closed alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 22/59] afs: Fix afs_kill_pages() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 24/59] NFSv4.1 respect server's max size in CREATE_SESSION alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 25/59] btrfs: add missing memset while reading compressed inline extents alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 23/59] perf symbols: Fix symbols__fixup_end heuristic for corner cases alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 28/59] video: udlfb: Fix read EDID timeout alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 26/59] target: Use system workqueue for ALUA transitions alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 29/59] video: fbdev: au1200fb: Release some resources if a memory allocation fails alexander.levin
2017-12-07 15:51 ` alexander.levin [this message]
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 31/59] ASoC: cs42l56: Fix reset GPIO name in example DT binding alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 30/59] video: fbdev: au1200fb: Return an error code if a memory allocation fails alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 32/59] PCI/PME: Handle invalid data when reading Root Status alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 33/59] powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 34/59] powerpc/opal: Fix EBUSY bug in acquiring tokens alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 36/59] platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 35/59] powerpc/ipic: Fix status get and status clear alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 37/59] target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 41/59] arm-ccn: perf: Prevent module unload while PMU is in use alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 39/59] target:fix condition return in core_pr_dump_initiator_port() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 40/59] target/file: Do not return error for UNMAP if length is zero alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 38/59] iscsi-target: fix memory leak in lio_target_tiqn_addtpg() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 42/59] mm: Handle 0 flags in _calc_vm_trans() macro alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 45/59] thermal/drivers/step_wise: Fix temperature regulation misbehavior alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 44/59] ppp: Destroy the mutex when cleanup alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 43/59] clk: tegra: Fix cclk_lp divisor register alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 47/59] bcache: explicitly destroy mutex while exiting alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 46/59] GFS2: Take inode off order_write list when setting jdata flag alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 49/59] xfs: fix log block underflow during recovery cycle verification alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 51/59] tty fix oops when rmmod 8250 alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 52/59] pinctrl: adi2: Fix Kconfig build problem alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 50/59] PCI: Detach driver before procfs & sysfs teardown on device remove alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 54/59] scsi: scsi_devinfo: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 53/59] raid5: Set R5_Expanded on parity devices as well as data alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 56/59] scsi: bfa: integer overflow in debugfs alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 55/59] ASoC: samsung: i2s: disable secondary DAI until it gets fixed alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 58/59] macvlan: Only deliver one copy of the frame to the macvlan interface alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 59/59] ath9k: fix tx99 potential info leak alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 57/59] udf: Avoid overflow when session starts at large offset alexander.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=20171207155116.6013-27-alexander.levin@verizon.com \
--to=alexander.levin@verizon.com \
--cc=b.zolnierkie@samsung.com \
--cc=benh@kernel.crashing.org \
--cc=dan.carpenter@oracle.com \
--cc=geert@linux-m68k.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
all inboxes | Powered by JetHome®