This is the start of the stable review cycle for the 4.14.207 release.
There are 85 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 Thu, 19 Nov 2020 12:20:51 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.207-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.207-rc1
Boris Protopopov <pboris(a)amazon.com>
Convert trailing spaces and periods in path components
Matteo Croce <mcroce(a)microsoft.com>
reboot: fix overflow parsing reboot cpu number
Matteo Croce <mcroce(a)microsoft.com>
Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
Jiri Olsa <jolsa(a)redhat.com>
perf/core: Fix race in the perf_mmap_close() function
Juergen Gross <jgross(a)suse.com>
xen/events: block rogue events for some time
Juergen Gross <jgross(a)suse.com>
xen/events: defer eoi in case of excessive number of events
Juergen Gross <jgross(a)suse.com>
xen/events: use a common cpu hotplug hook for event channels
Juergen Gross <jgross(a)suse.com>
xen/events: switch user event channels to lateeoi model
Juergen Gross <jgross(a)suse.com>
xen/pciback: use lateeoi irq binding
Juergen Gross <jgross(a)suse.com>
xen/pvcallsback: use lateeoi irq binding
Juergen Gross <jgross(a)suse.com>
xen/scsiback: use lateeoi irq binding
Juergen Gross <jgross(a)suse.com>
xen/netback: use lateeoi irq binding
Juergen Gross <jgross(a)suse.com>
xen/blkback: use lateeoi irq binding
Juergen Gross <jgross(a)suse.com>
xen/events: add a new "late EOI" evtchn framework
Juergen Gross <jgross(a)suse.com>
xen/events: fix race in evtchn_fifo_unmask()
Juergen Gross <jgross(a)suse.com>
xen/events: add a proper barrier to 2-level uevent unmasking
Juergen Gross <jgross(a)suse.com>
xen/events: avoid removing an event channel while handling it
kiyin(尹亮) <kiyin(a)tencent.com>
perf/core: Fix a memory leak in perf_event_parse_addr_filter()
Mathieu Poirier <mathieu.poirier(a)linaro.org>
perf/core: Fix crash when using HW tracing kernel filters
Song Liu <songliubraving(a)fb.com>
perf/core: Fix bad use of igrab()
Anand K Mistry <amistry(a)google.com>
x86/speculation: Allow IBPB to be conditionally enabled on CPUs with always-on STIBP
George Spelvin <lkml(a)sdf.org>
random32: make prandom_u32() output unpredictable
Mao Wenan <wenan.mao(a)linux.alibaba.com>
net: Update window_clamp if SOCK_RCVBUF is set
Heiner Kallweit <hkallweit1(a)gmail.com>
r8169: fix potential skb double free in an error path
Martin Willi <martin(a)strongswan.org>
vrf: Fix fast path output packet handling with async Netfilter rules
Martin Schiller <ms(a)dev.tdt.de>
net/x25: Fix null-ptr-deref in x25_connect
Ursula Braun <ubraun(a)linux.ibm.com>
net/af_iucv: fix null pointer dereference on shutdown
Oliver Herms <oliver.peter.herms(a)gmail.com>
IPv6: Set SIT tunnel hard_header_len to zero
Stefano Stabellini <stefano.stabellini(a)xilinx.com>
swiotlb: fix "x86: Don't panic if can not alloc buffer for swiotlb"
Coiby Xu <coiby.xu(a)gmail.com>
pinctrl: amd: fix incorrect way to disable debounce filter
Coiby Xu <coiby.xu(a)gmail.com>
pinctrl: amd: use higher precision for 512 RtcClk
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/gma500: Fix out-of-bounds access to struct drm_device.vblank[]
Al Viro <viro(a)zeniv.linux.org.uk>
don't dump the threads that had been already exiting when zapped.
Chen Zhou <chenzhou10(a)huawei.com>
selinux: Fix error return code in sel_ib_pkey_sid_slow()
Wengang Wang <wen.gang.wang(a)oracle.com>
ocfs2: initialize ip_next_orphan
Dan Carpenter <dan.carpenter(a)oracle.com>
futex: Don't enable IRQs unconditionally in put_pi_state()
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: protect mei_cl_mtu from null dereference
Chris Brandt <chris.brandt(a)renesas.com>
usb: cdc-acm: Add DISABLE_ECHO for Renesas USB Download mode
Shin'ichiro Kawasaki <shinichiro.kawasaki(a)wdc.com>
uio: Fix use-after-free in uio_unregister_device()
Jing Xiangfeng <jingxiangfeng(a)huawei.com>
thunderbolt: Add the missed ida_simple_remove() in ring_request_msix()
Joseph Qi <joseph.qi(a)linux.alibaba.com>
ext4: unlock xattr_sem properly in ext4_inline_data_truncate()
Kaixu Xia <kaixuxia(a)tencent.com>
ext4: correctly report "not supported" for {usr,grp}jquota when !CONFIG_QUOTA
Peter Zijlstra <peterz(a)infradead.org>
perf: Fix get_recursion_context()
Wang Hai <wanghai38(a)huawei.com>
cosa: Add missing kfree in error path of cosa_write
Evan Nimmo <evan.nimmo(a)alliedtelesis.co.nz>
of/address: Fix of_node memory leak in of_dma_is_coherent
Christoph Hellwig <hch(a)lst.de>
xfs: fix a missing unlock on error in xfs_fs_map_blocks
Darrick J. Wong <darrick.wong(a)oracle.com>
xfs: fix rmap key and record comparison functions
Darrick J. Wong <darrick.wong(a)oracle.com>
xfs: fix flags argument to rmap lookup when converting shared file rmaps
Christoph Hellwig <hch(a)lst.de>
nbd: fix a block_device refcount leak in nbd_release
Billy Tsai <billy_tsai(a)aspeedtech.com>
pinctrl: aspeed: Fix GPI only function problem.
Andrew Jeffery <andrew(a)aj.id.au>
ARM: 9019/1: kprobes: Avoid fortify_panic() when copying optprobe template
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
pinctrl: intel: Set default bias in case no particular value given
Suravee Suthikulpanit <suravee.suthikulpanit(a)amd.com>
iommu/amd: Increase interrupt remapping table limit to 512 entries
Hannes Reinecke <hare(a)suse.de>
scsi: scsi_dh_alua: Avoid crash during alua_bus_detach()
Ye Bin <yebin10(a)huawei.com>
cfg80211: regulatory: Fix inconsistent format argument
Johannes Berg <johannes.berg(a)intel.com>
mac80211: always wind down STA state
Johannes Berg <johannes.berg(a)intel.com>
mac80211: fix use of skb payload instead of header
Evan Quan <evan.quan(a)amd.com>
drm/amdgpu: perform srbm soft reset always on SDMA resume
Keita Suzuki <keitasuzuki.park(a)sslab.ics.keio.ac.jp>
scsi: hpsa: Fix memory leak in hpsa_init_one()
Bob Peterson <rpeterso(a)redhat.com>
gfs2: check for live vs. read-only file system in gfs2_fitrim
Bob Peterson <rpeterso(a)redhat.com>
gfs2: Add missing truncate_inode_pages_final for sd_aspace
Bob Peterson <rpeterso(a)redhat.com>
gfs2: Free rd_bits later in gfs2_clear_rgrpd to fix use-after-free
Evgeny Novikov <novikov(a)ispras.ru>
usb: gadget: goku_udc: fix potential crashes in probe
Masashi Honma <masashi.honma(a)gmail.com>
ath9k_htc: Use appropriate rs_datalen type
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix missing error return if writeback for extent buffer never started
Brian Foster <bfoster(a)redhat.com>
xfs: flush new eof page on truncate to avoid post-eof corruption
Stephane Grosjean <s.grosjean(a)peak-system.com>
can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on
Stephane Grosjean <s.grosjean(a)peak-system.com>
can: peak_usb: peak_usb_get_ts_time(): fix timestamp wrapping
Dan Carpenter <dan.carpenter(a)oracle.com>
can: peak_usb: add range checking in decode operations
Oleksij Rempel <o.rempel(a)pengutronix.de>
can: can_create_echo_skb(): fix echo skb generation: always use skb_clone()
Oliver Hartkopp <socketcan(a)hartkopp.net>
can: dev: __can_get_echo_skb(): fix real payload length return value for RTR frames
Vincent Mailhol <mailhol.vincent(a)wanadoo.fr>
can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: rx-offload: don't call kfree_skb() from IRQ context
Dan Carpenter <dan.carpenter(a)oracle.com>
ALSA: hda: prevent undefined shift in snd_hdac_ext_bus_get_link()
Jiri Olsa <jolsa(a)kernel.org>
perf tools: Add missing swap for ino_generation
zhuoliang zhang <zhuoliang.zhang(a)mediatek.com>
net: xfrm: fix a race condition during allocing spi
Olaf Hering <olaf(a)aepfle.de>
hv_balloon: disable warning when floor reached
Marc Zyngier <maz(a)kernel.org>
genirq: Let GENERIC_IRQ_IPI select IRQ_DOMAIN_HIERARCHY
Johannes Thumshirn <johannes.thumshirn(a)wdc.com>
btrfs: reschedule when cloning lots of extents
Josef Bacik <josef(a)toxicpanda.com>
btrfs: sysfs: init devices outside of the chunk_mutex
Ming Lei <ming.lei(a)redhat.com>
nbd: don't update block size after device is started
Zeng Tao <prime.zeng(a)hisilicon.com>
time: Prevent undefined behaviour in timespec64_to_ns()
Shijie Luo <luoshijie1(a)huawei.com>
mm: mempolicy: fix potential pte_unmap_unlock pte error
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
ring-buffer: Fix recursion protection transitions between interrupt context
Michał Mirosław <mirq-linux(a)rere.qmqm.pl>
regulator: defer probe when trying to get voltage from unresolved supply
-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 8 +
Makefile | 4 +-
arch/arm/include/asm/kprobes.h | 22 +-
arch/arm/probes/kprobes/opt-arm.c | 18 +-
arch/x86/events/intel/pt.c | 4 +-
arch/x86/kernel/cpu/bugs.c | 52 ++-
drivers/block/nbd.c | 10 +-
drivers/block/xen-blkback/blkback.c | 22 +-
drivers/block/xen-blkback/xenbus.c | 5 +-
drivers/char/random.c | 1 -
drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 27 +-
drivers/gpu/drm/gma500/psb_irq.c | 34 +-
drivers/hv/hv_balloon.c | 2 +-
drivers/iommu/amd_iommu_types.h | 6 +-
drivers/misc/mei/client.h | 4 +-
drivers/net/can/dev.c | 14 +-
drivers/net/can/peak_canfd/peak_canfd.c | 11 +-
drivers/net/can/rx-offload.c | 4 +-
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 51 ++-
drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 48 ++-
drivers/net/ethernet/realtek/r8169.c | 3 +-
drivers/net/vrf.c | 92 +++--
drivers/net/wan/cosa.c | 1 +
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 2 +-
drivers/net/xen-netback/common.h | 15 +
drivers/net/xen-netback/interface.c | 61 +++-
drivers/net/xen-netback/netback.c | 11 +-
drivers/net/xen-netback/rx.c | 13 +-
drivers/of/address.c | 4 +-
drivers/pinctrl/aspeed/pinctrl-aspeed.c | 7 +-
drivers/pinctrl/intel/pinctrl-intel.c | 8 +
drivers/pinctrl/pinctrl-amd.c | 6 +-
drivers/regulator/core.c | 2 +
drivers/scsi/device_handler/scsi_dh_alua.c | 9 +-
drivers/scsi/hpsa.c | 4 +-
drivers/thunderbolt/nhi.c | 19 +-
drivers/uio/uio.c | 10 +-
drivers/usb/class/cdc-acm.c | 9 +
drivers/usb/gadget/udc/goku_udc.c | 2 +-
drivers/xen/events/events_2l.c | 9 +-
drivers/xen/events/events_base.c | 422 ++++++++++++++++++++--
drivers/xen/events/events_fifo.c | 83 ++---
drivers/xen/events/events_internal.h | 20 +-
drivers/xen/evtchn.c | 7 +-
drivers/xen/pvcalls-back.c | 76 ++--
drivers/xen/xen-pciback/pci_stub.c | 14 +-
drivers/xen/xen-pciback/pciback.h | 12 +-
drivers/xen/xen-pciback/pciback_ops.c | 48 ++-
drivers/xen/xen-pciback/xenbus.c | 2 +-
drivers/xen/xen-scsiback.c | 23 +-
fs/btrfs/extent_io.c | 4 +
fs/btrfs/ioctl.c | 2 +
fs/btrfs/volumes.c | 7 +-
fs/cifs/cifs_unicode.c | 8 +-
fs/ext4/inline.c | 1 +
fs/ext4/super.c | 4 +-
fs/gfs2/rgrp.c | 5 +-
fs/gfs2/super.c | 1 +
fs/ocfs2/super.c | 1 +
fs/xfs/libxfs/xfs_rmap.c | 2 +-
fs/xfs/libxfs/xfs_rmap_btree.c | 16 +-
fs/xfs/xfs_iops.c | 10 +
fs/xfs/xfs_pnfs.c | 2 +-
include/linux/can/skb.h | 20 +-
include/linux/perf_event.h | 2 +-
include/linux/prandom.h | 36 +-
include/linux/time64.h | 4 +
include/xen/events.h | 29 +-
kernel/events/core.c | 44 +--
kernel/events/internal.h | 2 +-
kernel/exit.c | 5 +-
kernel/futex.c | 5 +-
kernel/irq/Kconfig | 1 +
kernel/reboot.c | 28 +-
kernel/time/itimer.c | 4 -
kernel/time/timer.c | 7 -
kernel/trace/ring_buffer.c | 54 ++-
lib/random32.c | 462 +++++++++++++++---------
lib/swiotlb.c | 6 +-
mm/mempolicy.c | 6 +-
net/ipv4/syncookies.c | 9 +-
net/ipv6/sit.c | 2 -
net/ipv6/syncookies.c | 10 +-
net/iucv/af_iucv.c | 3 +-
net/mac80211/sta_info.c | 18 +
net/mac80211/tx.c | 35 +-
net/wireless/reg.c | 2 +-
net/x25/af_x25.c | 2 +-
net/xfrm/xfrm_state.c | 8 +-
security/selinux/ibpkey.c | 4 +-
sound/hda/ext/hdac_ext_controller.c | 2 +
tools/perf/util/session.c | 1 +
92 files changed, 1585 insertions(+), 630 deletions(-)
From: Eric Biggers <ebiggers(a)google.com>
As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to
create a duplicate filename in an encrypted directory by creating a file
concurrently with adding the directory's encryption key.
Fix this bug on f2fs by rejecting no-key dentries in f2fs_add_link().
Note that the weird check for the current task in f2fs_do_add_link()
seems to make this bug difficult to reproduce on f2fs.
Fixes: 9ea97163c6da ("f2fs crypto: add filename encryption for f2fs_add_link")
Cc: stable(a)vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
---
fs/f2fs/f2fs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index cb700d797296..9a321c52face 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3251,6 +3251,8 @@ bool f2fs_empty_dir(struct inode *dir);
static inline int f2fs_add_link(struct dentry *dentry, struct inode *inode)
{
+ if (fscrypt_is_nokey_name(dentry))
+ return -ENOKEY;
return f2fs_do_add_link(d_inode(dentry->d_parent), &dentry->d_name,
inode, inode->i_ino, inode->i_mode);
}
--
2.29.2
From: Eric Biggers <ebiggers(a)google.com>
As described in "fscrypt: add fscrypt_is_nokey_name()", it's possible to
create a duplicate filename in an encrypted directory by creating a file
concurrently with adding the directory's encryption key.
Fix this bug on ext4 by rejecting no-key dentries in ext4_add_entry().
Note that the duplicate check in ext4_find_dest_de() sometimes prevented
this bug. However in many cases it didn't, since ext4_find_dest_de()
doesn't examine every dentry.
Fixes: 4461471107b7 ("ext4 crypto: enable filename encryption")
Cc: stable(a)vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
---
fs/ext4/namei.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 33509266f5a0..793fc7db9d28 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2195,6 +2195,9 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry,
if (!dentry->d_name.len)
return -EINVAL;
+ if (fscrypt_is_nokey_name(dentry))
+ return -ENOKEY;
+
#ifdef CONFIG_UNICODE
if (sb_has_strict_encoding(sb) && IS_CASEFOLDED(dir) &&
sb->s_encoding && utf8_validate(sb->s_encoding, &dentry->d_name))
--
2.29.2
From: Eric Biggers <ebiggers(a)google.com>
It's possible to create a duplicate filename in an encrypted directory
by creating a file concurrently with adding the encryption key.
Specifically, sys_open(O_CREAT) (or sys_mkdir(), sys_mknod(), or
sys_symlink()) can lookup the target filename while the directory's
encryption key hasn't been added yet, resulting in a negative no-key
dentry. The VFS then calls ->create() (or ->mkdir(), ->mknod(), or
->symlink()) because the dentry is negative. Normally, ->create() would
return -ENOKEY due to the directory's key being unavailable. However,
if the key was added between the dentry lookup and ->create(), then the
filesystem will go ahead and try to create the file.
If the target filename happens to already exist as a normal name (not a
no-key name), a duplicate filename may be added to the directory.
In order to fix this, we need to fix the filesystems to prevent
->create(), ->mkdir(), ->mknod(), and ->symlink() on no-key names.
(->rename() and ->link() need it too, but those are already handled
correctly by fscrypt_prepare_rename() and fscrypt_prepare_link().)
In preparation for this, add a helper function fscrypt_is_nokey_name()
that filesystems can use to do this check. Use this helper function for
the existing checks that fs/crypto/ does for rename and link.
Cc: stable(a)vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
---
fs/crypto/hooks.c | 5 +++--
include/linux/fscrypt.h | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index 20b0df47fe6a..061418be4b08 100644
--- a/fs/crypto/hooks.c
+++ b/fs/crypto/hooks.c
@@ -61,7 +61,7 @@ int __fscrypt_prepare_link(struct inode *inode, struct inode *dir,
return err;
/* ... in case we looked up no-key name before key was added */
- if (dentry->d_flags & DCACHE_NOKEY_NAME)
+ if (fscrypt_is_nokey_name(dentry))
return -ENOKEY;
if (!fscrypt_has_permitted_context(dir, inode))
@@ -86,7 +86,8 @@ int __fscrypt_prepare_rename(struct inode *old_dir, struct dentry *old_dentry,
return err;
/* ... in case we looked up no-key name(s) before key was added */
- if ((old_dentry->d_flags | new_dentry->d_flags) & DCACHE_NOKEY_NAME)
+ if (fscrypt_is_nokey_name(old_dentry) ||
+ fscrypt_is_nokey_name(new_dentry))
return -ENOKEY;
if (old_dir != new_dir) {
diff --git a/include/linux/fscrypt.h b/include/linux/fscrypt.h
index a8f7a43f031b..8e1d31c959bf 100644
--- a/include/linux/fscrypt.h
+++ b/include/linux/fscrypt.h
@@ -111,6 +111,35 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry)
dentry->d_flags &= ~DCACHE_NOKEY_NAME;
}
+/**
+ * fscrypt_is_nokey_name() - test whether a dentry is a no-key name
+ * @dentry: the dentry to check
+ *
+ * This returns true if the dentry is a no-key dentry. A no-key dentry is a
+ * dentry that was created in an encrypted directory that hasn't had its
+ * encryption key added yet. Such dentries may be either positive or negative.
+ *
+ * When a filesystem is asked to create a new filename in an encrypted directory
+ * and the new filename's dentry is a no-key dentry, it must fail the operation
+ * with ENOKEY. This includes ->create(), ->mkdir(), ->mknod(), ->symlink(),
+ * ->rename(), and ->link(). (However, ->rename() and ->link() are already
+ * handled by fscrypt_prepare_rename() and fscrypt_prepare_link().)
+ *
+ * This is necessary because creating a filename requires the directory's
+ * encryption key, but just checking for the key on the directory inode during
+ * the final filesystem operation doesn't guarantee that the key was available
+ * during the preceding dentry lookup. And the key must have already been
+ * available during the dentry lookup in order for it to have been checked
+ * whether the filename already exists in the directory and for the new file's
+ * dentry not to be invalidated due to it incorrectly having the no-key flag.
+ *
+ * Return: %true if the dentry is a no-key name
+ */
+static inline bool fscrypt_is_nokey_name(const struct dentry *dentry)
+{
+ return dentry->d_flags & DCACHE_NOKEY_NAME;
+}
+
/* crypto.c */
void fscrypt_enqueue_decrypt_work(struct work_struct *);
@@ -244,6 +273,11 @@ static inline void fscrypt_handle_d_move(struct dentry *dentry)
{
}
+static inline bool fscrypt_is_nokey_name(const struct dentry *dentry)
+{
+ return false;
+}
+
/* crypto.c */
static inline void fscrypt_enqueue_decrypt_work(struct work_struct *work)
{
--
2.29.2
Hello stable(a)vger.kernel.org
We are Base Investment Company offering Corporate and Personal Loan at 3% Interest Rate for a duration of 10Years.
We also pay 1% commission to brokers, who introduce project owners for finance or other opportunities.
Please get back to me if you are interested for more
details.
Yours faithfully,
Hashim Murrah