This is the start of the stable review cycle for the 6.5.2 release.
There are 34 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 Wed, 06 Sep 2023 18:29:29 +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/v6.x/stable-review/patch-6.5.2-rc1.…
or in the git tree and …
[View More]branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.5.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.5.2-rc1
Mario Limonciello <mario.limonciello(a)amd.com>
pinctrl: amd: Don't show `Invalid config param` errors
Marco Felsch <m.felsch(a)pengutronix.de>
usb: typec: tcpci: clear the fault status bit
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
Brian Foster <bfoster(a)redhat.com>
tracing: Zero the pipe cpumask on alloc to avoid spurious -EBUSY
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
dt-bindings: sc16is7xx: Add property to change GPIO function
Badhri Jagan Sridharan <badhri(a)google.com>
tcpm: Avoid soft reset when partner does not support get_status
Juerg Haefliger <juerg.haefliger(a)canonical.com>
fsi: master-ast-cf: Add MODULE_FIRMWARE macro
Wang Ming <machel(a)vivo.com>
firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in probe
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix bug when first setting GPIO direction
Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
serial: sc16is7xx: fix broken port 0 uart init
Johan Hovold <johan+linaro(a)kernel.org>
serial: qcom-geni: fix opp vote on shutdown
Sven Eckelmann <sven(a)narfation.org>
wifi: ath11k: Cleanup mac80211 references on failure during tx_complete
Sven Eckelmann <sven(a)narfation.org>
wifi: ath11k: Don't drop tx_status when peer cannot be found
Sascha Hauer <s.hauer(a)pengutronix.de>
wifi: rtw88: usb: kill and free rx urbs on probe failure
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: fix skb leak by txs missing in AMSDU
Deren Wu <deren.wu(a)mediatek.com>
wifi: mt76: mt7921: do not support one stream on secondary antenna only
Nam Cao <namcaov(a)gmail.com>
staging: rtl8712: fix race condition
Aaron Armstrong Skomra <aaron.skomra(a)wacom.com>
HID: wacom: remove the battery when the EKR is off
Xu Yang <xu.yang_2(a)nxp.com>
usb: chipidea: imx: improve logic if samsung,picophy-* parameter is 0
Luke Lu <luke.lu(a)libre.computer>
usb: dwc3: meson-g12a: do post init to fix broken usb after resumption
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Fix init call orders for UAC1
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add FOXCONN T99W368/T99W373 product
Martin Kohn <m.kohn(a)welotec.com>
USB: serial: option: add Quectel EM05G variant (0x030e)
Christoph Hellwig <hch(a)lst.de>
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
Christoph Hellwig <hch(a)lst.de>
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
Christoph Hellwig <hch(a)lst.de>
net: enetc: use EXPORT_SYMBOL_GPL for enetc_phc_index
Christoph Hellwig <hch(a)lst.de>
mmc: au1xmmc: force non-modular build and remove symbol_get usage
Arnd Bergmann <arnd(a)arndb.de>
ARM: pxa: remove use of symbol_get()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: reduce descriptor size if remaining bytes is less than request size
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: replace one-element array with flex-array member in struct smb2_ea_info
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix wrong DataOffset validation of create context
Gao Xiang <xiang(a)kernel.org>
erofs: ensure that the post-EOF tails are all zeroed
Lang Yu <Lang.Yu(a)amd.com>
drm/amdgpu: correct vmhub index in GMC v10/11
-------------
Diffstat:
.../devicetree/bindings/serial/nxp,sc16is7xx.txt | 46 ++++++++++++++++++++++
Makefile | 4 +-
arch/arm/mach-pxa/sharpsl_pm.c | 2 -
arch/arm/mach-pxa/spitz.c | 14 +------
arch/mips/alchemy/devboards/db1000.c | 8 +---
arch/mips/alchemy/devboards/db1200.c | 19 +--------
arch/mips/alchemy/devboards/db1300.c | 10 +----
drivers/firmware/stratix10-svc.c | 2 +-
drivers/fsi/fsi-master-ast-cf.c | 1 +
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 4 +-
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 +-
drivers/hid/wacom.h | 1 +
drivers/hid/wacom_sys.c | 25 ++++++++++--
drivers/hid/wacom_wac.c | 1 +
drivers/hid/wacom_wac.h | 1 +
drivers/mmc/host/Kconfig | 5 ++-
drivers/net/ethernet/freescale/enetc/enetc_ptp.c | 2 +-
drivers/net/wireless/ath/ath11k/dp_tx.c | 10 ++---
.../net/wireless/mediatek/mt76/mt76_connac_mac.c | 7 +++-
drivers/net/wireless/mediatek/mt76/mt7921/main.c | 2 +-
drivers/net/wireless/realtek/rtw88/usb.c | 5 ++-
drivers/pinctrl/pinctrl-amd.c | 4 +-
drivers/rtc/rtc-ds1685.c | 2 +-
drivers/staging/rtl8712/os_intfs.c | 1 +
drivers/staging/rtl8712/usb_intf.c | 1 -
drivers/tty/serial/qcom_geni_serial.c | 5 +++
drivers/tty/serial/sc16is7xx.c | 17 +++++++-
drivers/usb/chipidea/ci_hdrc_imx.c | 10 +++--
drivers/usb/chipidea/usbmisc_imx.c | 6 ++-
drivers/usb/dwc3/dwc3-meson-g12a.c | 6 +++
drivers/usb/serial/option.c | 7 ++++
drivers/usb/typec/tcpm/tcpci.c | 4 ++
drivers/usb/typec/tcpm/tcpm.c | 7 ++++
fs/erofs/zdata.c | 2 +
fs/nilfs2/alloc.c | 3 +-
fs/nilfs2/inode.c | 7 +++-
fs/smb/server/auth.c | 3 ++
fs/smb/server/oplock.c | 2 +-
fs/smb/server/smb2pdu.c | 2 +-
fs/smb/server/smb2pdu.h | 2 +-
fs/smb/server/transport_rdma.c | 25 ++++++++----
include/linux/usb/tcpci.h | 1 +
kernel/module/main.c | 14 +++++--
kernel/trace/trace.c | 4 +-
sound/usb/stream.c | 11 +++++-
45 files changed, 220 insertions(+), 99 deletions(-)
[View Less]
From: Duoming Zhou <duoming(a)zju.edu.cn>
The watchdog_timer can schedule tx_timeout_task and watchdog_work
can also arm watchdog_timer. The process is shown below:
----------- timer schedules work ------------
cyttsp4_watchdog_timer() //timer handler
schedule_work(&cd->watchdog_work)
----------- work arms timer ------------
cyttsp4_watchdog_work() //workqueue callback function
cyttsp4_start_wd_timer()
mod_timer(&cd->watchdog_timer, ...)
Although del_timer_sync() …
[View More]and cancel_work_sync() are called in
cyttsp4_remove(), the timer and workqueue could still be rearmed.
As a result, the possible use after free bugs could happen. The
process is shown below:
(cleanup routine) | (timer and workqueue routine)
cyttsp4_remove() | cyttsp4_watchdog_timer() //timer
cyttsp4_stop_wd_timer() | schedule_work()
del_timer_sync() |
| cyttsp4_watchdog_work() //worker
| cyttsp4_start_wd_timer()
| mod_timer()
cancel_work_sync() |
| cyttsp4_watchdog_timer() //timer
| schedule_work()
del_timer_sync() |
kfree(cd) //FREE |
| cyttsp4_watchdog_work() // reschedule!
| cd-> //USE
This patch changes del_timer_sync() to timer_shutdown_sync(),
which could prevent rearming of the timer from the workqueue.
Cc: stable(a)vger.kernel.org
Fixes: CVE-2023-4134
Fixes: 17fb1563d69b ("Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices")
Signed-off-by: Duoming Zhou <duoming(a)zju.edu.cn>
Link: https://lore.kernel.org/r/20230421082919.8471-1-duoming@zju.edu.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Signed-off-by: Denis Efremov (Oracle) <efremov(a)linux.com>
---
I've only added Cc: stable and Fixes tag.
drivers/input/touchscreen/cyttsp4_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index dccbcb942fe5..f999265896f4 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -1263,9 +1263,8 @@ static void cyttsp4_stop_wd_timer(struct cyttsp4 *cd)
* Ensure we wait until the watchdog timer
* running on a different CPU finishes
*/
- del_timer_sync(&cd->watchdog_timer);
+ timer_shutdown_sync(&cd->watchdog_timer);
cancel_work_sync(&cd->watchdog_work);
- del_timer_sync(&cd->watchdog_timer);
}
static void cyttsp4_watchdog_timer(struct timer_list *t)
--
2.42.0
[View Less]
From: "Ritesh Harjani (IBM)" <ritesh.list(a)gmail.com>
[ Upstream commit eee2d2e6ea5550118170dbd5bb1316ceb38455fb ]
folio_next_index() returns an unsigned long value which left shifted
by PAGE_SHIFT could possibly cause an overflow on 32-bit system. Instead
use folio_pos(folio) + folio_size(folio), which does this correctly.
Suggested-by: Matthew Wilcox <willy(a)infradead.org>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list(a)gmail.com>
Reviewed-by: Darrick J. Wong <…
[View More]djwong(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/iomap/buffered-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index aa8967cca1a31..4dc4bbc4be10a 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -932,7 +932,7 @@ static int iomap_write_delalloc_scan(struct inode *inode,
* the end of this data range, not the end of the folio.
*/
*punch_start_byte = min_t(loff_t, end_byte,
- folio_next_index(folio) << PAGE_SHIFT);
+ folio_pos(folio) + folio_size(folio));
}
/* move offset to start of next folio in range */
--
2.40.1
[View Less]
From: "Ritesh Harjani (IBM)" <ritesh.list(a)gmail.com>
[ Upstream commit eee2d2e6ea5550118170dbd5bb1316ceb38455fb ]
folio_next_index() returns an unsigned long value which left shifted
by PAGE_SHIFT could possibly cause an overflow on 32-bit system. Instead
use folio_pos(folio) + folio_size(folio), which does this correctly.
Suggested-by: Matthew Wilcox <willy(a)infradead.org>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list(a)gmail.com>
Reviewed-by: Darrick J. Wong <…
[View More]djwong(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/iomap/buffered-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 063133ec77f49..5e5bffa384976 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -929,7 +929,7 @@ static int iomap_write_delalloc_scan(struct inode *inode,
* the end of this data range, not the end of the folio.
*/
*punch_start_byte = min_t(loff_t, end_byte,
- folio_next_index(folio) << PAGE_SHIFT);
+ folio_pos(folio) + folio_size(folio));
}
/* move offset to start of next folio in range */
--
2.40.1
[View Less]
commit 0bdf399 upstream.
This fix applies to all stable kernel versions 4.19+.
BPF programs that run on connect can rewrite the connect address. For
the connect system call this isn't a problem, because a copy of the address
is made when it is moved into kernel space. However, kernel_connect
simply passes through the address it is given, so the caller may observe
its address value unexpectedly change.
A practical example where this is problematic is where NFS is combined
with a system such …
[View More]as Cilium which implements BPF-based load balancing.
A common pattern in software-defined storage systems is to have an NFS
mount that connects to a persistent virtual IP which in turn maps to an
ephemeral server IP. This is usually done to achieve high availability:
if your server goes down you can quickly spin up a replacement and remap
the virtual IP to that endpoint. With BPF-based load balancing, mounts
will forget the virtual IP address when the address rewrite occurs
because a pointer to the only copy of that address is passed down the
stack. Server failover then breaks, because clients have forgotten the
virtual IP address. Reconnects fail and mounts remain broken. This patch
was tested by setting up a scenario like this and ensuring that NFS
reconnects worked after applying the patch.
Signed-off-by: Jordan Rife <jrife(a)google.com>
---
net/socket.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/socket.c b/net/socket.c
index ce70c01eb2f3e..db9d908198f21 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -3468,7 +3468,11 @@ EXPORT_SYMBOL(kernel_accept);
int kernel_connect(struct socket *sock, struct sockaddr *addr, int addrlen,
int flags)
{
- return sock->ops->connect(sock, addr, addrlen, flags);
+ struct sockaddr_storage address;
+
+ memcpy(&address, addr, addrlen);
+
+ return sock->ops->connect(sock, (struct sockaddr *)&address, addrlen, flags);
}
EXPORT_SYMBOL(kernel_connect);
--
2.42.0.283.g2d96d420d3-goog
[View Less]
From: Fedor Pchelkin <pchelkin(a)ispras.ru>
[ Upstream commit ccbe77f7e45dfb4420f7f531b650c00c6e9c7507 ]
Syzkaller reports a memory leak:
BUG: memory leak
unreferenced object 0xffff88810b279e00 (size 96):
comm "syz-executor399", pid 3631, jiffies 4294964921 (age 23.870s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 08 9e 27 0b 81 88 ff ff ..........'.....
08 9e 27 0b 81 88 ff ff 00 00 00 00 00 00 00 00 ..'.............
backtrace:
[<ffffffff814cfc90>] …
[View More]kmalloc_trace+0x20/0x90 mm/slab_common.c:1046
[<ffffffff81bb75ca>] kmalloc include/linux/slab.h:576 [inline]
[<ffffffff81bb75ca>] autofs_wait+0x3fa/0x9a0 fs/autofs/waitq.c:378
[<ffffffff81bb88a7>] autofs_do_expire_multi+0xa7/0x3e0 fs/autofs/expire.c:593
[<ffffffff81bb8c33>] autofs_expire_multi+0x53/0x80 fs/autofs/expire.c:619
[<ffffffff81bb6972>] autofs_root_ioctl_unlocked+0x322/0x3b0 fs/autofs/root.c:897
[<ffffffff81bb6a95>] autofs_root_ioctl+0x25/0x30 fs/autofs/root.c:910
[<ffffffff81602a9c>] vfs_ioctl fs/ioctl.c:51 [inline]
[<ffffffff81602a9c>] __do_sys_ioctl fs/ioctl.c:870 [inline]
[<ffffffff81602a9c>] __se_sys_ioctl fs/ioctl.c:856 [inline]
[<ffffffff81602a9c>] __x64_sys_ioctl+0xfc/0x140 fs/ioctl.c:856
[<ffffffff84608225>] do_syscall_x64 arch/x86/entry/common.c:50 [inline]
[<ffffffff84608225>] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
[<ffffffff84800087>] entry_SYSCALL_64_after_hwframe+0x63/0xcd
autofs_wait_queue structs should be freed if their wait_ctr becomes zero.
Otherwise they will be lost.
In this case an AUTOFS_IOC_EXPIRE_MULTI ioctl is done, then a new
waitqueue struct is allocated in autofs_wait(), its initial wait_ctr
equals 2. After that wait_event_killable() is interrupted (it returns
-ERESTARTSYS), so that 'wq->name.name == NULL' condition may be not
satisfied. Actually, this condition can be satisfied when
autofs_wait_release() or autofs_catatonic_mode() is called and, what is
also important, wait_ctr is decremented in those places. Upon the exit of
autofs_wait(), wait_ctr is decremented to 1. Then the unmounting process
begins: kill_sb calls autofs_catatonic_mode(), which should have freed the
waitqueues, but it only decrements its usage counter to zero which is not
a correct behaviour.
edit:imk
This description is of course not correct. The umount performed as a result
of an expire is a umount of a mount that has been automounted, it's not the
autofs mount itself. They happen independently, usually after everything
mounted within the autofs file system has been expired away. If everything
hasn't been expired away the automount daemon can still exit leaving mounts
in place. But expires done in both cases will result in a notification that
calls autofs_wait_release() with a result status. The problem case is the
summary execution of of the automount daemon. In this case any waiting
processes won't be woken up until either they are terminated or the mount
is umounted.
end edit: imk
So in catatonic mode we should free waitqueues which counter becomes zero.
edit: imk
Initially I was concerned that the calling of autofs_wait_release() and
autofs_catatonic_mode() was not mutually exclusive but that can't be the
case (obviously) because the queue entry (or entries) is removed from the
list when either of these two functions are called. Consequently the wait
entry will be freed by only one of these functions or by the woken process
in autofs_wait() depending on the order of the calls.
end edit: imk
Reported-by: syzbot+5e53f70e69ff0c0a1c0c(a)syzkaller.appspotmail.com
Suggested-by: Takeshi Misawa <jeliantsurux(a)gmail.com>
Signed-off-by: Fedor Pchelkin <pchelkin(a)ispras.ru>
Signed-off-by: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
Signed-off-by: Ian Kent <raven(a)themaw.net>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Andrei Vagin <avagin(a)gmail.com>
Cc: autofs(a)vger.kernel.org
Cc: linux-kernel(a)vger.kernel.org
Message-Id: <169112719161.7590.6700123246297365841.stgit(a)donald.themaw.net>
Signed-off-by: Christian Brauner <brauner(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
fs/autofs4/waitq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 961a12dc6dc81..5863532675e3c 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -42,8 +42,9 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
wq->status = -ENOENT; /* Magic is gone - report failure */
kfree(wq->name.name);
wq->name.name = NULL;
- wq->wait_ctr--;
wake_up_interruptible(&wq->queue);
+ if (!--wq->wait_ctr)
+ kfree(wq);
wq = nwq;
}
fput(sbi->pipe); /* Close the pipe */
--
2.40.1
[View Less]