3.14.79-stable review
Greg Kroah-Hartman
maintainercover 3.14.79-stable review
------------------------------------------------------
NOTE:
This is going to be the last 3.14.y kernel release. You should have moved off of it by now to a more "modern" kernel, like 4.4, or even better yet, 4.7 or newer. After this release, it will be considered end-of-life and not receive any more updates.
------------------------------------------------------
This is the start of the stable review cycle for the 3.14.79 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Sep 11 15:31:40 UTC 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.14.79-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-3.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 3.14.79-rc1
Andrea Arcangeli <[email protected]>
mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED
Willy Tarreau <[email protected]>
fix d_walk()/non-delayed __d_free() race
Martin Schwidefsky <[email protected]>
s390/sclp_ctl: fix potential information leak with /dev/sclp
Kangjie Lu <[email protected]>
rds: fix an infoleak in rds_inc_info_copy
Ian Abbott <[email protected]>
staging: comedi: ni_mio_common: fix wrong insn_write handler
Theodore Ts'o <[email protected]>
ext4: validate that metadata blocks do not overlap superblock
Alexander Shiyan <[email protected]>
stb6100: fix buffer length check in stb6100_write_reg_range()
Tomer Barletz <[email protected]>
ALSA: oxygen: Fix logical-not-parentheses warning
James C Boyd <[email protected]>
HID: hid-input: Add parentheses to quell gcc warning
Tim Gardner <[email protected]>
be2iscsi: Fix bogus WARN_ON length check
Greg Kroah-Hartman <[email protected]>
Revert "can: fix handling of unmodifiable configuration options fix"
-------------
Diffstat:
Makefile | 4 ++-- drivers/hid/hid-input.c | 2 +- drivers/media/dvb-frontends/stb6100.c | 2 +- drivers/net/can/dev.c | 3 --- drivers/s390/char/sclp_ctl.c | 12 +++++++----- drivers/scsi/be2iscsi/be_main.c | 2 +- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- fs/dcache.c | 1 + fs/ext4/super.c | 18 +++++++++++++++++- mm/memory.c | 14 ++++++++++++-- net/rds/recv.c | 2 ++ sound/pci/oxygen/oxygen_mixer.c | 2 +- 12 files changed, 46 insertions(+), 18 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/11 Revert "can: fix handling of unmodifiable configuration options fix"
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <[email protected]>
This reverts commit 6f8f768a3586b6fbd50e249e7fe4f964a6994685 which was bce271f255dae8335dc4d2ee2c4531e09cc67f5a upstream.
It was applied incorrectly, and isn't needed for 3.14-stable.
--- drivers/net/can/dev.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/can/dev.c +0 -3
@@ -665,9 +665,6 @@ static int can_changelink(struct net_dev } } -if (!data) -return 0 ; -if (data[IFLA_CAN_CTRLMODE ]) {struct can_ctrlmode *cm;
Greg Kroah-Hartman
maintainerPATCH 2/11 be2iscsi: Fix bogus WARN_ON length check
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Gardner <[email protected]>
commit dd29dae00d39186890a5eaa2fe4ad8768bfd41a9 upstream.
drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous':drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
WARN_ON(!length > 0);
gcc version 5.2.1
--- drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/be2iscsi/be_main.c +1 -1
@@ -3172,7 +3172,7 @@ be_sgl_create_contiguous(void *virtual_a {WARN_ON (!virtual_address);WARN_ON (!physical_address); -WARN_ON (!length >0 ); +WARN_ON (!length);WARN_ON (!sgl); sgl->va = virtual_address;
Greg Kroah-Hartman
maintainerPATCH 3/11 HID: hid-input: Add parentheses to quell gcc warning
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: James C Boyd <[email protected]>
commit 09a5c34e8d6b05663ec4c3d22b1fbd9fec89aaf9 upstream.
GCC reports a -Wlogical-not-parentheses warning here; therefore add parentheses to shut it up and to express our intent more.
--- drivers/hid/hid-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-input.c +1 -1
@@ -1084,7 +1084,7 @@ void hidinput_hid_event(struct hid_devicreturn ;/* report the usage code as scancode if the key status has changed */ -if (usage->type ==EV_KEY && !!test_bit (usage->code, input->key) != value) +if (usage->type ==EV_KEY && (!!test_bit (usage->code, input->key)) != value)input_event (input,EV_MSC ,MSC_SCAN , usage->hid);input_event (input, usage->type, usage->code, value);
Greg Kroah-Hartman
maintainerPATCH 4/11 ALSA: oxygen: Fix logical-not-parentheses warning
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomer Barletz <[email protected]>
commit 8ec7cfce3762299ae289c384e281b2f4010ae231 upstream.
This fixes the following warning, that is seen with gcc 5.1:
warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses].
--- sound/pci/oxygen/oxygen_mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/oxygen/oxygen_mixer.c +1 -1
@@ -88,7 +88,7 @@ static int dac_mute_put(struct snd_kcontint changed;mutex_lock (&chip->mutex); - changed = !value->value.integer.value[0 ] != chip->dac_mute; + changed = (!value->value.integer.value[0 ]) != chip->dac_mute;if (changed) { chip->dac_mute = !value->value.integer.value[0 ]; chip->model.update_dac_mute (chip);
Greg Kroah-Hartman
maintainerPATCH 5/11 stb6100: fix buffer length check in stb6100_write_reg_range()
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Shiyan <[email protected]>
commit 7e6bd12fb77b0067df13fb3ba3fadbdff2945396 upstream.
We are checking sizeof() the wrong variable!
--- drivers/media/dvb-frontends/stb6100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-frontends/stb6100.c +1 -1
@@ -193,7 +193,7 @@ static int stb6100_write_reg_range(struc .len = len + 1 }; -if (1 + len >sizeof (buf)) { +if (1 + len >sizeof (cmdbuf)) {printk (KERN_WARNING "%s: i2c wr: len=%d is too big!\n" ,KBUILD_MODNAME , len);
Greg Kroah-Hartman
maintainerPATCH 6/11 ext4: validate that metadata blocks do not overlap superblock
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <[email protected]>
commit 829fa70dddadf9dd041d62b82cd7cea63943899d upstream.
A number of fuzzing failures seem to be caused by allocation bitmaps or other metadata blocks being pointed at the superblock.
This can cause kernel BUG or WARNings once the superblock is overwritten, so validate the group descriptor blocks to make sure this doesn't happen.
--- fs/ext4/super.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
fs/ext4/super.c +17 -1
@@ -2071,6 +2071,7 @@ void ext4_group_desc_csum_set(struct sup/* Called at mount-time, super-block is locked */ static int ext4_check_descriptors (struct super_block *sb, +ext4_fsblk_t sb_block,ext4_group_t *first_not_zeroed) {struct ext4_sb_info *sbi =EXT4_SB (sb);
@@ -2101,6 +2102,11 @@ static int ext4_check_descriptors(struct grp = i; block_bitmap =ext4_block_bitmap (sb, gdp); +if (block_bitmap == sb_block) { +ext4_msg (sb,KERN_ERR ,"ext4_check_descriptors: " +"Block bitmap for group %u overlaps " +"superblock" , i); + }if (block_bitmap < first_block || block_bitmap > last_block) {ext4_msg (sb,KERN_ERR ,"ext4_check_descriptors: " "Block bitmap for group %u not in group "
@@ -2108,6 +2114,11 @@ static int ext4_check_descriptors(structreturn 0 ; } inode_bitmap =ext4_inode_bitmap (sb, gdp); +if (inode_bitmap == sb_block) { +ext4_msg (sb,KERN_ERR ,"ext4_check_descriptors: " +"Inode bitmap for group %u overlaps " +"superblock" , i); + }if (inode_bitmap < first_block || inode_bitmap > last_block) {ext4_msg (sb,KERN_ERR ,"ext4_check_descriptors: " "Inode bitmap for group %u not in group "
@@ -2115,6 +2126,11 @@ static int ext4_check_descriptors(structreturn 0 ; } inode_table =ext4_inode_table (sb, gdp); +if (inode_table == sb_block) { +ext4_msg (sb,KERN_ERR ,"ext4_check_descriptors: " +"Inode table for group %u overlaps " +"superblock" , i); + }if (inode_table < first_block || inode_table + sbi->s_itb_per_group -1 > last_block) { ext4_msg(sb, KERN_ERR, "ext4_check_descriptors: "
@@ -3869,7 +3885,7 @@ static int ext4_fill_super(struct super_ goto failed_mount2; } } -if (!ext4_check_descriptors (sb, &first_not_zeroed)) { +if (!ext4_check_descriptors (sb, logical_sb_block, &first_not_zeroed)) {ext4_msg (sb,KERN_ERR ,"group descriptors corrupted!" ); goto failed_mount2; }
Greg Kroah-Hartman
maintainerPATCH 8/11 rds: fix an infoleak in rds_inc_info_copy
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <[email protected]>
commit 4116def2337991b39919f3b448326e21c40e0dbb upstream.
The last field "flags" of object "minfo" is not initialized. Copying this object out may leak kernel stack data. Assign 0 to it to avoid leak.
--- net/rds/recv.c | 2 ++ 1 file changed, 2 insertions(+)
net/rds/recv.c +2 -0
@@ -543,5 +543,7 @@ void rds_inc_info_copy(struct rds_incomi minfo.fport = inc->i_hdr.h_dport; } + minfo.flags =0 ; +rds_info_copy (iter, &minfo,sizeof (minfo)); }
Greg Kroah-Hartman
maintainerPATCH 9/11 s390/sclp_ctl: fix potential information leak with /dev/sclp
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Schwidefsky <[email protected]>
commit 532c34b5fbf1687df63b3fcd5b2846312ac943c6 upstream.
The sclp_ctl_ioctl_sccb function uses two copy_from_user calls to retrieve the sclp request from user space. The first copy_from_user fetches the length of the request which is stored in the first two bytes of the request. The second copy_from_user gets the complete sclp request, but this copies the length field a second time. A malicious user may have changed the length in the meantime.
--- drivers/s390/char/sclp_ctl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/s390/char/sclp_ctl.c +7 -5
@@ -56,6 +56,7 @@ static int sclp_ctl_ioctl_sccb(void __us {struct sclp_ctl_sccb ctl_sccb;struct sccb_header *sccb; +unsigned long copied;int rc;if (copy_from_user (&ctl_sccb, user_area,sizeof (ctl_sccb)))
@@ -65,14 +66,15 @@ static int sclp_ctl_ioctl_sccb(void __us sccb = (void *)get_zeroed_page (GFP_KERNEL |GFP_DMA );if (!sccb)return -ENOMEM ; -if (copy_from_user (sccb,u64_to_uptr (ctl_sccb.sccb),sizeof (*sccb))) { + copied =PAGE_SIZE - +copy_from_user (sccb,u64_to_uptr (ctl_sccb.sccb),PAGE_SIZE ); +if (offsetof(struct sccb_header , length) + +sizeof (sccb->length) > copied || sccb->length > copied) { rc = -EFAULT ; goto out_free; } -if (sccb->length >PAGE_SIZE || sccb->length <8 ) -return -EINVAL ; -if (copy_from_user (sccb,u64_to_uptr (ctl_sccb.sccb), sccb->length)) { - rc = -EFAULT ; +if (sccb->length <8 ) { + rc = -EINVAL ; goto out_free; } rc =sclp_sync_request (ctl_sccb.cmdw, sccb);
Greg Kroah-Hartman
maintainerPATCH 10/11 fix d_walk()/non-delayed __d_free() race
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willy Tarreau <[email protected]>
I checked Jari's explanation below and found that v3.14.77 and v3.12.62 are missing the same fix as 3.10. In fact Al's original commit 3d56c25 ("fix d_walk()/non-delayed __d_free() race") used to mention to check this __d_materialise_dentry() function in the Cc: stable line, but this got lost during the backports.
Normally all of our 3 kernels need to apply the following patch that Ben correctly put in 3.16 and 3.2. I'm fixing the backport in 3.10.103 right now.
Quoted 24 lines · Jari Ruusu
This patch for 3.10 branch appears to be missing one important
+
dentry->d_flags|=DCACHE_RCUACCESS;in
fs/dcache.c__d_materialise_dentry()function. When Ben Hutchings backported Al Viro's original fix to stable branches that he maintains, he added that one additional line to both 3.2 and 3.16 branches. Please consider including that additional one line fix for 3.10 stable branch also.Ben Hutchings said this on his 3.2.82-rc1 patch:
[bwh: Backported to 3.2:
- Adjust context
- Also set the flag in__d_materialise_dentry())]http://marc.info/?l=linux-kernel&m=147117565612275&w=2
Ben Hutchings said this on his 3.16.37-rc1 patch:
[bwh: Backported to 3.16:
- Adjust context
- Also set the flag in__d_materialise_dentry())]
Quoted 8 lines
http://marc.info/?l=linux-kernel&m=147117433412006&w=2
Also mentioned by Sasha Levin on 3.18 and 4.1 commits:
Cc: [email protected] # v3.2+ (and watch out for__d_materialise_dentry())http://marc.info/?l=linux-stable-commits&m=146648034410827&w=2
http://marc.info/?l=linux-stable-commits&m=146647471009771&w=2
--- fs/dcache.c | 1 + 1 file changed, 1 insertion(+)
fs/dcache.c +1 -0
@@ -2652,6 +2652,7 @@ static void __d_materialise_dentry(strucswitch_names (dentry, anon);swap (dentry->d_name.hash, anon->d_name.hash); + dentry->d_flags |=DCACHE_RCUACCESS ; dentry->d_parent = dentry;list_del_init (&dentry->d_child); anon->d_parent = dparent;
Greg Kroah-Hartman
maintainerPATCH 11/11 mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrea Arcangeli <[email protected]>
commit ad33bb04b2a6cee6c1f99fabb15cddbf93ff0433 upstream.
pmd_trans_unstable()/pmd_none_or_trans_huge_or_clear_bad() were introduced to locklessy (but atomically) detect when a pmd is a regular (stable) pmd or when the pmd is unstable and can infinitely transition from pmd_none() and pmd_trans_huge() from under us, while only holding the mmap_sem for reading (for writing not).
While holding the mmap_sem only for reading, MADV_DONTNEED can run from under us and so before we can assume the pmd to be a regular stable pmd we need to compare it against pmd_none() and pmd_trans_huge() in an atomic way, with pmd_trans_unstable(). The old pmd_trans_huge() left a tiny window for a race.
Useful applications are unlikely to notice the difference as doing MADV_DONTNEED concurrently with a page fault would lead to undefined behavior.
[js] 3.12 backport: no pmd_devmap in 3.12 yet.
--- mm/memory.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
mm/memory.c +12 -2
@@ -3770,8 +3770,18 @@ static int __handle_mm_fault(struct mm_sif (unlikely (pmd_none (*pmd)) &&unlikely (__pte_alloc (mm, vma, pmd, address)))return VM_FAULT_OOM ; -/* if an huge pmd materialized from under us just retry later */ -if (unlikely (pmd_trans_huge (*pmd))) +/* +* If a huge pmd materialized under us just retry later. Use +* pmd_trans_unstable() instead of pmd_trans_huge() to ensure the pmd +* didn't become pmd_trans_huge under us and then back to pmd_none, as +* a result of MADV_DONTNEED running immediately after a huge pmd fault +* in a different thread of this mm, in turn leading to a misleading +* pmd_trans_huge() retval. All we have to ensure is that it is a +* regular pmd that we can walk with pte_offset_map() and we can do that +* through an atomic read in C, which is what pmd_trans_unstable() +* provides. +*/ +if (unlikely (pmd_trans_unstable (pmd)))return 0 ;/* * A regular pmd is established and it can't morph into a huge pmd
Quoted 17 lines · Greg Kroah-Hartman
------------------------------------------------------
NOTE:
This is going to be the last 3.14.y kernel release. You should have moved off of it by now to a more "modern" kernel, like 4.4, or even better yet, 4.7 or newer. After this release, it will be considered end-of-life and not receive any more updates.
------------------------------------------------------This is the start of the stable review cycle for the 3.14.79 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Sep 11 15:31:40 UTC 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.14.79-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-3.14.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America(Silicon Valley) [email protected]
Greg Kroah-Hartman
maintainerQuoted 23 lines · Shuah Khan
Quoted 22 lines · Greg Kroah-Hartman
------------------------------------------------------
NOTE:
This is going to be the last 3.14.y kernel release. You should have moved off of it by now to a more "modern" kernel, like 4.4, or even better yet, 4.7 or newer. After this release, it will be considered end-of-life and not receive any more updates.
------------------------------------------------------This is the start of the stable review cycle for the 3.14.79 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Sep 11 15:31:40 UTC 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.x/stable-review/patch-3.14.79-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-3.14.y
and the diffstat can be found below.
Quoted 6 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Great, thanks for testing and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
------------------------------------------------------
NOTE:
This is going to be the last 3.14.y kernel release. You should have moved off of it by now to a more "modern" kernel, like 4.4, or even better yet, 4.7 or newer. After this release, it will be considered end-of-life and not receive any more updates.
------------------------------------------------------
Quoted 8 lines
This is the start of the stable review cycle for the 3.14.79 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Sep 11 15:31:40 UTC 2016. Anything received after that time might be too late.
Build results:
total: 131 pass: 131 fail: 0 Qemu test results: total: 89 pass: 89 fail: 0
Details are available at http://kerneltests.org/builders.
Guenter
Greg Kroah-Hartman
maintainerQuoted 18 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
------------------------------------------------------
NOTE:
This is going to be the last 3.14.y kernel release. You should have moved off of it by now to a more "modern" kernel, like 4.4, or even better yet, 4.7 or newer. After this release, it will be considered end-of-life and not receive any more updates.
------------------------------------------------------Quoted 8 lines
This is the start of the stable review cycle for the 3.14.79 release. There are 11 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Sep 11 15:31:40 UTC 2016. Anything received after that time might be too late.
Quoted 6 lines
Build results:
total: 131 pass: 131 fail: 0 Qemu test results: total: 89 pass: 89 fail: 0Details are available at http://kerneltests.org/builders.
Wonderful, thanks for testing and letting me know.
greg k-h