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 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(-)
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() 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
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 <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
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 <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
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 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