From: Greg Kroah-Hartman Date: Sat, 30 Mar 2024 09:50:57 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v6.7.12~114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d58694fff70ab77cc25af885e11a8947a72ce18;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch hexagon-vmlinux.lds.s-handle-attributes-section.patch mmc-core-avoid-negative-index-with-array-access.patch mmc-core-initialize-mmc_blk_ioc_data.patch net-ll_temac-platform_get_resource-replaced-by-wrong-function.patch wifi-mac80211-check-clear-fast-rx-for-non-4addr-sta-vlan-changes.patch --- diff --git a/queue-5.10/exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch b/queue-5.10/exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch new file mode 100644 index 00000000000..a348225d315 --- /dev/null +++ b/queue-5.10/exec-fix-nommu-linux_binprm-exec-in-transfer_args_to_stack.patch @@ -0,0 +1,42 @@ +From 2aea94ac14d1e0a8ae9e34febebe208213ba72f7 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Wed, 20 Mar 2024 11:26:07 -0700 +Subject: exec: Fix NOMMU linux_binprm::exec in transfer_args_to_stack() + +From: Max Filippov + +commit 2aea94ac14d1e0a8ae9e34febebe208213ba72f7 upstream. + +In NOMMU kernel the value of linux_binprm::p is the offset inside the +temporary program arguments array maintained in separate pages in the +linux_binprm::page. linux_binprm::exec being a copy of linux_binprm::p +thus must be adjusted when that array is copied to the user stack. +Without that adjustment the value passed by the NOMMU kernel to the ELF +program in the AT_EXECFN entry of the aux array doesn't make any sense +and it may break programs that try to access memory pointed to by that +entry. + +Adjust linux_binprm::exec before the successful return from the +transfer_args_to_stack(). + +Cc: +Fixes: b6a2fea39318 ("mm: variable length argument support") +Fixes: 5edc2a5123a7 ("binfmt_elf_fdpic: wire up AT_EXECFD, AT_EXECFN, AT_SECURE") +Signed-off-by: Max Filippov +Link: https://lore.kernel.org/r/20240320182607.1472887-1-jcmvbkbc@gmail.com +Signed-off-by: Kees Cook +Signed-off-by: Greg Kroah-Hartman +--- + fs/exec.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/exec.c ++++ b/fs/exec.c +@@ -888,6 +888,7 @@ int transfer_args_to_stack(struct linux_ + goto out; + } + ++ bprm->exec += *sp_location - MAX_ARG_PAGES * PAGE_SIZE; + *sp_location = sp; + + out: diff --git a/queue-5.10/gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch b/queue-5.10/gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch new file mode 100644 index 00000000000..75b4b72db69 --- /dev/null +++ b/queue-5.10/gpio-cdev-sanitize-the-label-before-requesting-the-interrupt.patch @@ -0,0 +1,126 @@ +From b34490879baa847d16fc529c8ea6e6d34f004b38 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Mon, 25 Mar 2024 10:02:42 +0100 +Subject: gpio: cdev: sanitize the label before requesting the interrupt + +From: Bartosz Golaszewski + +commit b34490879baa847d16fc529c8ea6e6d34f004b38 upstream. + +When an interrupt is requested, a procfs directory is created under +"/proc/irq//