From b55a6deb27aa3ec53ac5f6f1a26bfd81f4e1456d Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 26 Mar 2017 21:16:08 +0100 Subject: [PATCH] Fix null pointer dereference in bcm2835 MMC driver, Minor updates --- baseconfig/CONFIG_MOUSE_PS2_VMMOUSE | 1 - .../arm/armv7/armv7/CONFIG_RTC_DRV_OMAP | 2 +- baseconfig/{ => x86}/CONFIG_I2C_PXA | 0 baseconfig/{ => x86}/CONFIG_I2C_PXA_SLAVE | 0 bcm283x-mmc-bcm2835.patch | 39 +++++++++++++++++++ kernel-aarch64-debug.config | 1 - kernel-aarch64.config | 1 - kernel-armv7hl-debug.config | 3 +- kernel-armv7hl-lpae-debug.config | 1 - kernel-armv7hl-lpae.config | 1 - kernel-armv7hl.config | 3 +- kernel-ppc64-debug.config | 3 -- kernel-ppc64.config | 3 -- kernel-ppc64le-debug.config | 3 -- kernel-ppc64le.config | 3 -- kernel-ppc64p7-debug.config | 3 -- kernel-ppc64p7.config | 3 -- kernel-s390x-debug.config | 3 -- kernel-s390x.config | 3 -- kernel.spec | 4 ++ 20 files changed, 46 insertions(+), 34 deletions(-) delete mode 100644 baseconfig/CONFIG_MOUSE_PS2_VMMOUSE rename baseconfig/{ => x86}/CONFIG_I2C_PXA (100%) rename baseconfig/{ => x86}/CONFIG_I2C_PXA_SLAVE (100%) diff --git a/baseconfig/CONFIG_MOUSE_PS2_VMMOUSE b/baseconfig/CONFIG_MOUSE_PS2_VMMOUSE deleted file mode 100644 index 3941478c7..000000000 --- a/baseconfig/CONFIG_MOUSE_PS2_VMMOUSE +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_MOUSE_PS2_VMMOUSE is not set diff --git a/baseconfig/arm/armv7/armv7/CONFIG_RTC_DRV_OMAP b/baseconfig/arm/armv7/armv7/CONFIG_RTC_DRV_OMAP index 7679dbb81..479a6f546 100644 --- a/baseconfig/arm/armv7/armv7/CONFIG_RTC_DRV_OMAP +++ b/baseconfig/arm/armv7/armv7/CONFIG_RTC_DRV_OMAP @@ -1 +1 @@ -CONFIG_RTC_DRV_OMAP=y +CONFIG_RTC_DRV_OMAP=m diff --git a/baseconfig/CONFIG_I2C_PXA b/baseconfig/x86/CONFIG_I2C_PXA similarity index 100% rename from baseconfig/CONFIG_I2C_PXA rename to baseconfig/x86/CONFIG_I2C_PXA diff --git a/baseconfig/CONFIG_I2C_PXA_SLAVE b/baseconfig/x86/CONFIG_I2C_PXA_SLAVE similarity index 100% rename from baseconfig/CONFIG_I2C_PXA_SLAVE rename to baseconfig/x86/CONFIG_I2C_PXA_SLAVE diff --git a/bcm283x-mmc-bcm2835.patch b/bcm283x-mmc-bcm2835.patch index 59916d82c..d9591b438 100644 --- a/bcm283x-mmc-bcm2835.patch +++ b/bcm283x-mmc-bcm2835.patch @@ -1891,3 +1891,42 @@ index c309633..972f14d 100644 + status = "okay"; + bus-width = <4>; +}; +From patchwork Sat Mar 25 13:17:00 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_request +From: Stefan Wahren +X-Patchwork-Id: 9644591 +Message-Id: <1490447820-751-1-git-send-email-stefan.wahren@i2se.com> +To: Ulf Hansson , Eric Anholt , + Gerd Hoffmann +Cc: Jaehoon Chung , + Dan Carpenter , + linux-rpi-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, + Stefan Wahren +Date: Sat, 25 Mar 2017 13:17:00 +0000 + +This fixes a NULL pointer dereference in case of a MMC request with a +set block count command and no data. + +Reported-by: Dan Carpenter +Signed-off-by: Stefan Wahren +--- + drivers/mmc/host/bcm2835.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c +index 7d1b0db..1f343a4 100644 +--- a/drivers/mmc/host/bcm2835.c ++++ b/drivers/mmc/host/bcm2835.c +@@ -1200,7 +1200,8 @@ static void bcm2835_request(struct mmc_host *mmc, struct mmc_request *mrq) + return; + } + +- host->use_sbc = !!mrq->sbc && (host->mrq->data->flags & MMC_DATA_READ); ++ host->use_sbc = !!mrq->sbc && host->mrq->data && ++ (host->mrq->data->flags & MMC_DATA_READ); + if (host->use_sbc) { + if (bcm2835_send_command(host, mrq->sbc)) { + if (!host->use_busy) diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config index 4af6156dd..4313d4c15 100644 --- a/kernel-aarch64-debug.config +++ b/kernel-aarch64-debug.config @@ -3081,7 +3081,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-aarch64.config b/kernel-aarch64.config index 5979e0ea9..ead8d4905 100644 --- a/kernel-aarch64.config +++ b/kernel-aarch64.config @@ -3060,7 +3060,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-armv7hl-debug.config b/kernel-armv7hl-debug.config index 2acd96043..db30b0dff 100644 --- a/kernel-armv7hl-debug.config +++ b/kernel-armv7hl-debug.config @@ -3316,7 +3316,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m @@ -4744,7 +4743,7 @@ CONFIG_RTC_DRV_MC13XXX=m CONFIG_RTC_DRV_MSM6242=m CONFIG_RTC_DRV_MV=m CONFIG_RTC_DRV_MXC=m -CONFIG_RTC_DRV_OMAP=y +CONFIG_RTC_DRV_OMAP=m CONFIG_RTC_DRV_PALMAS=m CONFIG_RTC_DRV_PCF2123=m CONFIG_RTC_DRV_PCF2127=m diff --git a/kernel-armv7hl-lpae-debug.config b/kernel-armv7hl-lpae-debug.config index 7115ec258..845532ac5 100644 --- a/kernel-armv7hl-lpae-debug.config +++ b/kernel-armv7hl-lpae-debug.config @@ -3173,7 +3173,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-armv7hl-lpae.config b/kernel-armv7hl-lpae.config index ff6a9b4d7..9dff4cdd4 100644 --- a/kernel-armv7hl-lpae.config +++ b/kernel-armv7hl-lpae.config @@ -3152,7 +3152,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-armv7hl.config b/kernel-armv7hl.config index 7215da28e..6db1bb12e 100644 --- a/kernel-armv7hl.config +++ b/kernel-armv7hl.config @@ -3295,7 +3295,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m @@ -4722,7 +4721,7 @@ CONFIG_RTC_DRV_MC13XXX=m CONFIG_RTC_DRV_MSM6242=m CONFIG_RTC_DRV_MV=m CONFIG_RTC_DRV_MXC=m -CONFIG_RTC_DRV_OMAP=y +CONFIG_RTC_DRV_OMAP=m CONFIG_RTC_DRV_PALMAS=m CONFIG_RTC_DRV_PCF2123=m CONFIG_RTC_DRV_PCF2127=m diff --git a/kernel-ppc64-debug.config b/kernel-ppc64-debug.config index 5fb547750..9d7ecaab3 100644 --- a/kernel-ppc64-debug.config +++ b/kernel-ppc64-debug.config @@ -1801,8 +1801,6 @@ CONFIG_I2C_PARPORT=m CONFIG_I2C_PCA_PLATFORM=m # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_POWERMAC=m -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2867,7 +2865,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-ppc64.config b/kernel-ppc64.config index e3bd6be9b..d9e915837 100644 --- a/kernel-ppc64.config +++ b/kernel-ppc64.config @@ -1783,8 +1783,6 @@ CONFIG_I2C_PARPORT=m CONFIG_I2C_PCA_PLATFORM=m # CONFIG_I2C_PIIX4 is not set CONFIG_I2C_POWERMAC=m -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2845,7 +2843,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index 54fa3528f..235eb52d4 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -1753,8 +1753,6 @@ CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PARPORT=m CONFIG_I2C_PCA_PLATFORM=m # CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2812,7 +2810,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index 7ca9997a5..aa3d835b5 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -1735,8 +1735,6 @@ CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PARPORT=m CONFIG_I2C_PCA_PLATFORM=m # CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2790,7 +2788,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-ppc64p7-debug.config b/kernel-ppc64p7-debug.config index 1e8f8148c..14153e3c5 100644 --- a/kernel-ppc64p7-debug.config +++ b/kernel-ppc64p7-debug.config @@ -1752,8 +1752,6 @@ CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PARPORT=m CONFIG_I2C_PCA_PLATFORM=m # CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2811,7 +2809,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-ppc64p7.config b/kernel-ppc64p7.config index c1376535f..2baf5ea37 100644 --- a/kernel-ppc64p7.config +++ b/kernel-ppc64p7.config @@ -1734,8 +1734,6 @@ CONFIG_I2C_PARPORT_LIGHT=m CONFIG_I2C_PARPORT=m CONFIG_I2C_PCA_PLATFORM=m # CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2789,7 +2787,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config index bfddb869a..9b6e68bb8 100644 --- a/kernel-s390x-debug.config +++ b/kernel-s390x-debug.config @@ -1708,8 +1708,6 @@ CONFIG_I2C_MUX_MLXCPLD=m # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2750,7 +2748,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel-s390x.config b/kernel-s390x.config index c10c59afd..176b160ed 100644 --- a/kernel-s390x.config +++ b/kernel-s390x.config @@ -1690,8 +1690,6 @@ CONFIG_I2C_MUX_MLXCPLD=m # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_PIIX4 is not set -CONFIG_I2C_PXA=m -# CONFIG_I2C_PXA_SLAVE is not set # CONFIG_I2C_RK3X is not set # CONFIG_I2C_ROBOTFUZZ_OSIF is not set CONFIG_I2C_SI470X=m @@ -2728,7 +2726,6 @@ CONFIG_MOUSE_ELAN_I2C_SMBUS=y CONFIG_MOUSE_PS2_ELANTECH=y CONFIG_MOUSE_PS2_SENTELIC=y # CONFIG_MOUSE_PS2_TOUCHKIT is not set -# CONFIG_MOUSE_PS2_VMMOUSE is not set CONFIG_MOUSE_PS2=y CONFIG_MOUSE_SERIAL=m CONFIG_MOUSE_SYNAPTICS_I2C=m diff --git a/kernel.spec b/kernel.spec index 432fe5279..ec5084824 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2172,6 +2172,10 @@ fi # # %changelog +* Sun Mar 26 2017 Peter Robinson +- Fix null pointer dereference in bcm2835 MMC driver +- Minor ARM updates + * Fri Mar 24 2017 Laura Abbott - 4.11.0-0.rc3.git2.1 - Linux v4.11-rc3-161-gebe6482