6.1.134-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 159/204 udp: Fix memory accounting leak.
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit df207de9d9e7a4d92f8567e2c539d9c8c12fd99d ]
Matt Dowling reported a weird UDP memory usage issue.
Under normal operation, the UDP memory usage reported in /proc/net/sockstat remains close to zero. However, it occasionally spiked to 524,288 pages and never dropped. Moreover, the value doubled when the application was terminated. Finally, it caused intermittent packet drops.
We can reproduce the issue with the script below [0]:
1. /proc/net/sockstat reports 0 pages
# cat /proc/net/sockstat | grep UDP:
UDP: inuse 1 mem 02. Run the script till the report reaches 524,288
# python3 test.py & sleep 5
# cat /proc/net/sockstat | grep UDP:
UDP: inuse 3 mem 524288 <-- (INT_MAX + 1) >> PAGE_SHIFT3. Kill the socket and confirm the number never drops
# pkill python3 && sleep 5
# cat /proc/net/sockstat | grep UDP:
UDP: inuse 1 mem 524288 4. (necessary since v6.0) Trigger proto_memory_pcpu_drain()
# python3 test.py & sleep 1 && pkill python3
5. The number doubles
# cat /proc/net/sockstat | grep UDP:
UDP: inuse 1 mem 1048577The application set INT_MAX to SO_RCVBUF, which triggered an integer overflow in udp_rmem_release().
When a socket is close()d, udp_destruct_common() purges its receive queue and sums up skb->truesize in the queue. This total is calculated and stored in a local unsigned integer variable.
The total size is then passed to udp_rmem_release() to adjust memory accounting. However, because the function takes a signed integer argument, the total size can wrap around, causing an overflow.
Then, the released amount is calculated as follows:
1) Add size to sk->sk_forward_alloc.
2) Round down sk->sk_forward_alloc to the nearest lower multiple of PAGE_SIZE and assign it to amount.
3) Subtract amount from sk->sk_forward_alloc.
4) Pass amount >> PAGE_SHIFT to __sk_mem_reduce_allocated().
When the issue occurred, the total in udp_destruct_common() was 2147484480 (INT_MAX + 833), which was cast to -2147482816 in udp_rmem_release().
At 1) sk->sk_forward_alloc is changed from 3264 to -2147479552, and
2) sets -2147479552 to amount. 3) reverts the wraparound, so we don't see a warning in inet_sock_destruct(). However, udp_memory_allocated ends up doubling at 4).
Since commit 3cd3399dd7a8 ("net: implement per-cpu reserves for memory_allocated"), memory usage no longer doubles immediately after a socket is close()d because __sk_mem_reduce_allocated() caches the amount in udp_memory_per_cpu_fw_alloc. However, the next time a UDP socket receives a packet, the subtraction takes effect, causing UDP memory usage to double.
This issue makes further memory allocation fail once the socket's sk->sk_rmem_alloc exceeds net.ipv4.udp_rmem_min, resulting in packet drops.
To prevent this issue, let's use unsigned int for the calculation and call sk_forward_alloc_add() only once for the small delta.
Note that first_packet_length() also potentially has the same problem.
[0]:
from socket import *
SO_RCVBUFFORCE = 33INT_MAX = (2 ** 31) - 1
s = socket(AF_INET, SOCK_DGRAM)s.bind(('', 0))s.setsockopt(SOL_SOCKET, SO_RCVBUFFORCE, INT_MAX)
c = socket(AF_INET, SOCK_DGRAM)
c.connect(s.getsockname())
data = b'a' * 100
while True:
c.send(data)
--- net/ipv4/udp.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
net/ipv4/udp.c +7 -9
@@ -1437,12 +1437,12 @@ static bool udp_skb_has_head_state(struct sk_buff *skb) }/* fully reclaim rmem/fwd memory allocated for skb */ -static void udp_rmem_release (struct sock *sk,int size,int partial, -bool rx_queue_lock_held) +static void udp_rmem_release (struct sock *sk,unsigned int size, +int partial,bool rx_queue_lock_held) {struct udp_sock *up =udp_sk (sk);struct sk_buff_head *sk_queue; -int amt; +unsigned int amt;if (likely (partial)) { up->forward_deficit += size;
@@ -1462,10 +1462,8 @@ static void udp_rmem_release(struct sock *sk, int size, int partial,if (!rx_queue_lock_held)spin_lock (&sk_queue->lock); - -sk_forward_alloc_add (sk, size); - amt = (sk->sk_forward_alloc - partial) & ~(PAGE_SIZE -1 ); -sk_forward_alloc_add (sk, -amt); + amt = (size + sk->sk_forward_alloc - partial) & ~(PAGE_SIZE -1 ); +sk_forward_alloc_add (sk, size - amt);if (amt)__sk_mem_reduce_allocated (sk, amt >>PAGE_SHIFT );
@@ -1650,7 +1648,7 @@ EXPORT_SYMBOL_GPL(skb_consume_udp);static struct sk_buff *__first_packet_length (struct sock *sk,struct sk_buff_head *rcvq, -int *total) +unsigned int *total) {struct sk_buff *skb;
@@ -1683,8 +1681,8 @@ static int first_packet_length(struct sock *sk) {struct sk_buff_head *rcvq = &udp_sk (sk)->reader_queue;struct sk_buff_head *sk_queue = &sk->sk_receive_queue; +unsigned int total =0 ;struct sk_buff *skb; -int total =0 ;int res;spin_lock_bh (&rcvq->lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 177/204 platform/x86: ISST: Correct command storage data length
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Srinivas Pandruvada <[email protected]>
commit 9462e74c5c983cce34019bfb27f734552bebe59f upstream.
After resume/online turbo limit ratio (TRL) is restored partially if the admin explicitly changed TRL from user space.
A hash table is used to store SST mail box and MSR settings when modified to restore those settings after resume or online. This uses a struct isst_cmd field "data" to store these settings. This is a 64 bit field. But isst_store_new_cmd() is only assigning as u32. This results in truncation of 32 bits.
Change the argument to u64 from u32.
--- drivers/platform/x86/intel/speed_select_if/isst_if_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel/speed_select_if/isst_if_common.c +1 -1
@@ -77,7 +77,7 @@ static DECLARE_HASHTABLE(isst_hash, 8);static DEFINE_MUTEX (isst_hash_lock);static int isst_store_new_cmd (int cmd,u32 cpu,int mbox_cmd_type,u32 param, -u32 data) +u64 data) {struct isst_cmd *sst_cmd;
Greg Kroah-Hartman
maintainerPATCH 178/204 ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markus Elfring <[email protected]>
commit 4279e72cab31dd3eb8c89591eb9d2affa90ab6aa upstream.
The function call “dmaengine_unmap_put(unmap)” was used in an if branch. The same call was immediately triggered by a subsequent goto statement. Thus avoid such a call repetition.
This issue was detected by using the Coccinelle software.
--- drivers/ntb/test/ntb_perf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/ntb/test/ntb_perf.c +1 -3
@@ -839,10 +839,8 @@ static int perf_copy_chunk(struct perf_tdma_set_unmap (tx, unmap); ret =dma_submit_error (dmaengine_submit (tx)); -if (ret) { -dmaengine_unmap_put (unmap); +if (ret) goto err_free_resource; - }dmaengine_unmap_put (unmap);
Greg Kroah-Hartman
maintainerPATCH 179/204 perf/x86/intel: Apply static call for drain_pebs
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra (Intel) <[email protected]>
commit 314dfe10576912e1d786b13c5d4eee8c51b63caa upstream.
The x86_pmu_drain_pebs static call was introduced in commit 7c9903c9bf71 ("x86/perf, static_call: Optimize x86_pmu methods"), but it's not really used to replace the old method.
Apply the static call for drain_pebs.
--- arch/x86/events/intel/core.c | 2 +- arch/x86/events/intel/ds.c | 2 +- arch/x86/events/perf_event.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/events/intel/core.c +1 -1
@@ -2975,7 +2975,7 @@ static int handle_pmi_common(struct pt_r handled++;x86_pmu_handle_guest_pebs (regs, &data); - x86_pmu.drain_pebs (regs, &data); +static_call (x86_pmu_drain_pebs)(regs, &data); status &= intel_ctrl |GLOBAL_STATUS_TRACE_TOPAPMI ;/*
arch/x86/events/intel/ds.c +1 -1
@@ -793,7 +793,7 @@ static inline void intel_pmu_drain_pebs_ {struct perf_sample_data data; - x86_pmu.drain_pebs (NULL , &data); +static_call (x86_pmu_drain_pebs)(NULL , &data); }/*
arch/x86/events/perf_event.h +1 -0
@@ -1047,6 +1047,7 @@ extern struct x86_pmu x86_pmu __read_mosDECLARE_STATIC_CALL (x86_pmu_set_period, *x86_pmu.set_period);DECLARE_STATIC_CALL (x86_pmu_update, *x86_pmu.update); +DECLARE_STATIC_CALL (x86_pmu_drain_pebs, *x86_pmu.drain_pebs); static __always_inline struct x86_perf_task_context_opt *task_context_opt(void *ctx) {
Greg Kroah-Hartman
maintainerPATCH 180/204 perf/x86/intel: Avoid disable PMU if !cpuc->enabled in sample read
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kan Liang <[email protected]>
commit f9bdf1f953392c9edd69a7f884f78c0390127029 upstream.
The WARN_ON(this_cpu_read(cpu_hw_events.enabled)) in the intel_pmu_save_and_restart_reload() is triggered, when sampling read topdown events.
In a NMI handler, the cpu_hw_events.enabled is set and used to indicate the status of core PMU. The generic pmu->pmu_disable_count, updated in the perf_pmu_disable/enable pair, is not touched.
However, the perf_pmu_disable/enable pair is invoked when sampling read in a NMI handler. The cpuc->enabled is mistakenly set by the perf_pmu_enable().
Avoid disabling PMU if the core PMU is already disabled. Merge the logic together.
--- arch/x86/events/intel/core.c | 41 +++++++++++++++++++++++------------------ arch/x86/events/intel/ds.c | 11 +---------- arch/x86/events/perf_event.h | 2 +- 3 files changed, 25 insertions(+), 29 deletions(-)
arch/x86/events/intel/core.c +23 -18
@@ -2689,28 +2689,33 @@ static u64 adl_update_topdown_event(struDEFINE_STATIC_CALL (intel_pmu_update_topdown_event, x86_perf_event_update); -static void intel_pmu_read_topdown_event (struct perf_event *event) +static void intel_pmu_read_event (struct perf_event *event) { -struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events); +if (event->hw.flags & (PERF_X86_EVENT_AUTO_RELOAD |PERF_X86_EVENT_TOPDOWN )) { +struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events); +bool pmu_enabled = cpuc->enabled; + +/* Only need to call update_topdown_event() once for group read. */ +if (is_metric_event (event) && (cpuc->txn_flags &PERF_PMU_TXN_READ )) +return ; + + cpuc->enabled =0 ; +if (pmu_enabled) +intel_pmu_disable_all (); + +if (is_topdown_event (event)) +static_call (intel_pmu_update_topdown_event)(event); +else +intel_pmu_drain_pebs_buffer (); + + cpuc->enabled = pmu_enabled; +if (pmu_enabled) +intel_pmu_enable_all (0 ); -/* Only need to call update_topdown_event() once for group read. */ -if ((cpuc->txn_flags &PERF_PMU_TXN_READ ) && - !is_slots_event (event))return ; + } -perf_pmu_disable (event->pmu); -static_call (intel_pmu_update_topdown_event)(event); -perf_pmu_enable (event->pmu); -} - -static void intel_pmu_read_event (struct perf_event *event) -{ -if (event->hw.flags &PERF_X86_EVENT_AUTO_RELOAD ) -intel_pmu_auto_reload_read (event); -else if (is_topdown_count (event)) -intel_pmu_read_topdown_event (event); -else -x86_perf_event_update (event); +x86_perf_event_update (event); }static void intel_pmu_enable_fixed (struct perf_event *event)
arch/x86/events/intel/ds.c +1 -10
@@ -789,7 +789,7 @@ unlock:return 1 ; } -static inline void intel_pmu_drain_pebs_buffer (void ) +void intel_pmu_drain_pebs_buffer (void ) {struct perf_sample_data data;
@@ -1902,15 +1902,6 @@ get_next_pebs_record_by_bit(void *base,return NULL ; } -void intel_pmu_auto_reload_read (struct perf_event *event) -{ -WARN_ON (!(event->hw.flags &PERF_X86_EVENT_AUTO_RELOAD )); - -perf_pmu_disable (event->pmu); -intel_pmu_drain_pebs_buffer (); -perf_pmu_enable (event->pmu); -} -/* * Special variant of intel_pmu_save_and_restart() for auto-reload. */
arch/x86/events/perf_event.h +1 -1
@@ -1536,7 +1536,7 @@ void intel_pmu_pebs_disable_all(void);void intel_pmu_pebs_sched_task (struct perf_event_context *ctx,bool sched_in); -void intel_pmu_auto_reload_read (struct perf_event *event); +void intel_pmu_drain_pebs_buffer (void );void intel_pmu_store_pebs_lbrs (struct lbr_entry *lbr);
Greg Kroah-Hartman
maintainerPATCH 181/204 kunit/overflow: Fix UB in overflow_allocation_test
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Orlov <[email protected]>
commit 92e9bac18124682c4b99ede9ee3bcdd68f121e92 upstream.
The 'device_name' array doesn't exist out of the 'overflow_allocation_test' function scope. However, it is being used as a driver name when calling 'kunit_driver_create' from 'kunit_device_register'. It produces the kernel panic with KASAN enabled.
Since this variable is used in one place only, remove it and pass the device name into kunit_device_register directly as an ascii string.
--- lib/overflow_kunit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
lib/overflow_kunit.c +1 -2
@@ -608,7 +608,6 @@ DEFINE_TEST_ALLOC(devm_kzalloc, devm_kfstatic void overflow_allocation_test (struct kunit *test) { -const char device_name[] ="overflow-test" ;struct device *dev;int count =0 ;
@@ -618,7 +617,7 @@ static void overflow_allocation_test(str }while (0 )/* Create dummy device for devm_kmalloc()-family tests. */ - dev =root_device_register (device_name); + dev =root_device_register ("overflow-test" );KUNIT_ASSERT_FALSE_MSG (test,IS_ERR (dev),"Cannot register test device\n" );
Greg Kroah-Hartman
maintainerPATCH 182/204 btrfs: handle errors from btrfs_dec_ref() properly
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josef Bacik <[email protected]>
commit 5eb178f373b4f16f3b42d55ff88fc94dd95b93b1 upstream.
In walk_up_proc() we BUG_ON(ret) from btrfs_dec_ref(). This is incorrect, we have proper error handling here, return the error.
--- fs/btrfs/extent-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/btrfs/extent-tree.c +4 -1
@@ -5575,7 +5575,10 @@ static noinline int walk_up_proc(struct ret =btrfs_dec_ref (trans, root, eb,1 ); else ret =btrfs_dec_ref (trans, root, eb,0 ); -BUG_ON (ret);/* -ENOMEM */ +if (ret) { +btrfs_abort_transaction (trans, ret); +return ret; + }if (is_fstree (root->root_key.objectid)) { ret =btrfs_qgroup_trace_leaf_items (trans, eb);if (ret) {
Greg Kroah-Hartman
maintainerPATCH 183/204 x86/tsc: Always save/restore TSC sched_clock() on suspend/resume
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guilherme G. Piccoli <[email protected]>
commit d90c9de9de2f1712df56de6e4f7d6982d358cabe upstream.
TSC could be reset in deep ACPI sleep states, even with invariant TSC.
That's the reason we have sched_clock() save/restore functions, to deal with this situation. But what happens is that such functions are guarded with a check for the stability of sched_clock - if not considered stable, the save/restore routines aren't executed.
On top of that, we have a clear comment in native_sched_clock() saying that *even* with TSC unstable, we continue using TSC for sched_clock due to its speed.
In other words, if we have a situation of TSC getting detected as unstable, it marks the sched_clock as unstable as well, so subsequent S3 sleep cycles could bring bogus sched_clock values due to the lack of the save/restore mechanism, causing warnings like this:
[22.954918] ------------[ cut here ]------------ [22.954923] Delta way too big! 18446743750843854390 ts=18446744072977390405 before=322133536015 after=322133536015 write stamp=18446744072977390405 [22.954923] If you just came from a suspend/resume, [22.954923] please switch to the trace global clock: [22.954923] echo global > /sys/kernel/tracing/trace_clock [22.954923] or add trace_clock=global to the kernel command line [22.954937] WARNING: CPU: 2 PID: 5728 at kernel/trace/ring_buffer.c:2890 rb_add_timestamp+0x193/0x1c0
Notice that the above was reproduced even with "trace_clock=global".
The fix for that is to _always_ save/restore the sched_clock on suspend cycle _if TSC is used_ as sched_clock - only if we fallback to jiffies the sched_clock_stable() check becomes relevant to save/restore the sched_clock.
--- arch/x86/kernel/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/tsc.c +2 -2
@@ -920,7 +920,7 @@ static unsigned long long cyc2ns_suspendvoid tsc_save_sched_clock_state (void ) { -if (!sched_clock_stable ()) +if (!static_branch_likely (&__use_tsc) && !sched_clock_stable ())return ; cyc2ns_suspend =sched_clock ();
@@ -940,7 +940,7 @@ void tsc_restore_sched_clock_state(void)unsigned long flags;int cpu; -if (!sched_clock_stable ()) +if (!static_branch_likely (&__use_tsc) && !sched_clock_stable ())return ;local_irq_save (flags);
Greg Kroah-Hartman
maintainerPATCH 184/204 x86/mm: Fix flush_tlb_range() when used for zapping normal PMDs
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <[email protected]>
commit 3ef938c3503563bfc2ac15083557f880d29c2e64 upstream.
On the following path, flush_tlb_range() can be used for zapping normal PMD entries (PMD entries that point to page tables) together with the PTE entries in the pointed-to page table:
collapse_pte_mapped_thp
pmdp_collapse_flush
flush_tlb_range
The arm64 version of flush_tlb_range() has a comment describing that it can be used for page table removal, and does not use any last-level invalidation optimizations. Fix the X86 version by making it behave the same way.
Currently, X86 only uses this information for the following two purposes, which I think means the issue doesn't have much impact:
- In native_flush_tlb_multi() for checking if lazy TLB CPUs need to be IPI'd to avoid issues with speculative page table walks.
- In Hyper-V TLB paravirtualization, again for lazy TLB stuff.
The patch "x86/mm: only invalidate final translations with INVLPGB" which is currently under review (see
<https://lore.kernel.org/all/[email protected]/>)
would probably be making the impact of this a lot worse.
--- arch/x86/include/asm/tlbflush.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/tlbflush.h +1 -1
@@ -228,7 +228,7 @@ void flush_tlb_multi(const struct cpumasflush_tlb_mm_range ((vma)->vm_mm, start, end, \ ((vma)->vm_flags &VM_HUGETLB ) \ ?huge_page_shift (hstate_vma (vma)) \ - : PAGE_SHIFT, false) + : PAGE_SHIFT, true)extern void flush_tlb_all (void ); extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
Greg Kroah-Hartman
maintainerPATCH 185/204 acpi: nfit: fix narrowing conversion in acpi_nfit_ctl
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Murad Masimov <[email protected]>
commit 2ff0e408db36c21ed3fa5e3c1e0e687c82cf132f upstream.
Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary bus families can be translated". This warning is emited if the argument is equal to NVDIMM_BUS_FAMILY_NFIT == 0. Function acpi_nfit_ctl() first verifies that a user-provided value call_pkg->nd_family of type u64 is not equal to 0. Then the value is converted to int, and only after that is compared to NVDIMM_BUS_FAMILY_MAX. This can lead to passing an invalid argument to acpi_nfit_ctl(), if call_pkg->nd_family is non-zero, while the lower 32 bits are zero.
Furthermore, it is best to return EINVAL immediately upon seeing the invalid user input. The WARNING is insufficient to prevent further undefined behavior based on other invalid user input.
All checks of the input value should be applied to the original variable call_pkg->nd_family.
[iweiny: update commit message]
--- drivers/acpi/nfit/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/nfit/core.c +1 -1
@@ -485,7 +485,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_desc cmd_mask = nd_desc->cmd_mask;if (cmd ==ND_CMD_CALL && call_pkg->nd_family) { family = call_pkg->nd_family; -if (family >NVDIMM_BUS_FAMILY_MAX || +if (call_pkg->nd_family >NVDIMM_BUS_FAMILY_MAX || !test_bit (family, &nd_desc->bus_family_mask))return -EINVAL ; family = array_index_nospec(family,
Greg Kroah-Hartman
maintainerPATCH 186/204 ACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Menzel <[email protected]>
commit 2da31ea2a085cd189857f2db0f7b78d0162db87a upstream.
Like the ASUS Vivobook X1504VAP and Vivobook X1704VAP, the ASUS Vivobook 14 X1404VAP has its keyboard IRQ (1) described as ActiveLow in the DSDT, which the kernel overrides to EdgeHigh breaking the keyboard.
$ sudo dmidecode
[…]
System Information
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ASUS Vivobook 14 X1404VAP_X1404VA
[…]
$ grep -A 30 PS2K dsdt.dsl | grep IRQ -A 1
IRQ (Level, ActiveLow, Exclusive, )
{1}Add the X1404VAP to the irq1_level_low_skip_override[] quirk table to fix this.
--- drivers/acpi/resource.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/acpi/resource.c +7 -0
@@ -440,6 +440,13 @@ static const struct dmi_system_id asus_l }, }, { +/* Asus Vivobook X1404VAP */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_BOARD_NAME, "X1404VAP"), + }, + }, + {/* Asus Vivobook X1504VAP */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
Greg Kroah-Hartman
maintainerPATCH 160/204 vsock: avoid timeout during connect() if the socket is closing
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Garzarella <[email protected]>
[ Upstream commit fccd2b711d9628c7ce0111d5e4938652101ee30a ]
When a peer attempts to establish a connection, vsock_connect() contains a loop that waits for the state to be TCP_ESTABLISHED. However, the other peer can be fast enough to accept the connection and close it immediately, thus moving the state to TCP_CLOSING.
When this happens, the peer in the vsock_connect() is properly woken up, but since the state is not TCP_ESTABLISHED, it goes back to sleep until the timeout expires, returning -ETIMEDOUT.
If the socket state is TCP_CLOSING, waiting for the timeout is pointless. vsock_connect() can return immediately without errors or delay since the connection actually happened. The socket will be in a closing state, but this is not an issue, and subsequent calls will fail as expected.
We discovered this issue while developing a test that accepts and immediately closes connections to stress the transport switch between two connect() calls, where the first one was interrupted by a signal (see Closes link).
--- net/vmw_vsock/af_vsock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/vmw_vsock/af_vsock.c +5 -1
@@ -1437,7 +1437,11 @@ static int vsock_connect(struct socket *sock, struct sockaddr *addr, timeout = vsk->connect_timeout;prepare_to_wait (sk_sleep (sk), &wait,TASK_INTERRUPTIBLE ); -while (sk->sk_state !=TCP_ESTABLISHED && sk->sk_err ==0 ) { +/* If the socket is already closing or it is in an error state, there +* is no point in waiting. +*/ +while (sk->sk_state !=TCP_ESTABLISHED && + sk->sk_state !=TCP_CLOSING && sk->sk_err ==0 ) {if (flags &O_NONBLOCK ) {/* If we're not going to block, we schedule a timeout * function to generate a timeout on the connection
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 187/204 mmc: sdhci-pxav3: set NEED_RSP_BUSY capability
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karel Balej <[email protected]>
commit a41fcca4b342811b473bbaa4b44f1d34d87fcce6 upstream.
Set the MMC_CAP_NEED_RSP_BUSY capability for the sdhci-pxav3 host to prevent conversion of R1B responses to R1. Without this, the eMMC card in the samsung,coreprimevelte smartphone using the Marvell PXA1908 SoC with this mmc host doesn't probe with the ETIMEDOUT error originating in __mmc_poll_for_busy.
Note that the other issues reported for this phone and host, namely floods of "Tuning failed, falling back to fixed sampling clock" dmesg messages for the eMMC and unstable SDIO are not mitigated by this change.
--- drivers/mmc/host/sdhci-pxav3.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/host/sdhci-pxav3.c +1 -0
@@ -401,6 +401,7 @@ static int sdhci_pxav3_probe(struct platif (!IS_ERR (pxa->clk_core))clk_prepare_enable (pxa->clk_core); + host->mmc->caps |=MMC_CAP_NEED_RSP_BUSY ;/* enable 1/8V DDR capable */ host->mmc->caps |=MMC_CAP_1_8V_DDR ;
Greg Kroah-Hartman
maintainerPATCH 188/204 mmc: sdhci-omap: Disable MMC_CAP_AGGRESSIVE_PM for eMMC/SD
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ulf Hansson <[email protected]>
commit 49d162635151d0dd04935070d7cf67137ab863aa upstream.
We have received reports about cards can become corrupt related to the aggressive PM support. Let's make a partial revert of the change that enabled the feature.
--- drivers/mmc/host/sdhci-omap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/sdhci-omap.c +2 -2
@@ -1340,8 +1340,8 @@ static int sdhci_omap_probe(struct platf/* R1B responses is required to properly manage HW busy detection. */ mmc->caps |=MMC_CAP_NEED_RSP_BUSY ; -/* Allow card power off and runtime PM for eMMC/SD card devices */ - mmc->caps |=MMC_CAP_POWER_OFF_CARD |MMC_CAP_AGGRESSIVE_PM ; +/* Enable SDIO card power off. */ + mmc->caps |=MMC_CAP_POWER_OFF_CARD ; ret =sdhci_setup_host (host);if (ret)
Greg Kroah-Hartman
maintainerPATCH 189/204 ksmbd: add bounds check for create lease context
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Norbert Szetei <[email protected]>
commit bab703ed8472aa9d109c5f8c1863921533363dae upstream.
Add missing bounds check for create lease context.
--- fs/smb/server/oplock.c | 8 ++++++++ 1 file changed, 8 insertions(+)
fs/smb/server/oplock.c +8 -0
@@ -1534,6 +1534,10 @@ struct lease_ctx_info *parse_lease_stateif (sizeof (struct lease_context_v2 ) ==le32_to_cpu (cc->DataLength)) {struct create_lease_v2 *lc = (struct create_lease_v2 *)cc; +if (le16_to_cpu (cc->DataOffset) +le32_to_cpu (cc->DataLength) < +sizeof (struct create_lease_v2 ) -4 ) +return NULL ; +memcpy (lreq->lease_key, lc->lcontext.LeaseKey,SMB2_LEASE_KEY_SIZE );if (is_dir) { lreq->req_state = lc->lcontext.LeaseState &
@@ -1551,6 +1555,10 @@ struct lease_ctx_info *parse_lease_state }else {struct create_lease *lc = (struct create_lease *)cc; +if (le16_to_cpu (cc->DataOffset) +le32_to_cpu (cc->DataLength) < +sizeof (struct create_lease )) +return NULL ; +memcpy (lreq->lease_key, lc->lcontext.LeaseKey,SMB2_LEASE_KEY_SIZE ); lreq->req_state = lc->lcontext.LeaseState; lreq->flags = lc->lcontext.LeaseFlags;
Greg Kroah-Hartman
maintainerPATCH 190/204 ksmbd: fix use-after-free in ksmbd_sessions_deregister()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
commit 15a9605f8d69dc85005b1a00c31a050b8625e1aa upstream.
In multichannel mode, UAF issue can occur in session_deregister when the second channel sets up a session through the connection of the first channel. session that is freed through the global session table can be accessed again through ->sessions of connection.
--- fs/smb/server/mgmt/user_session.c | 3 +++ 1 file changed, 3 insertions(+)
fs/smb/server/mgmt/user_session.c +3 -0
@@ -229,6 +229,9 @@ void ksmbd_sessions_deregister(struct ksif (!ksmbd_chann_del (conn, sess) &&xa_empty (&sess->ksmbd_chann_list)) {hash_del (&sess->hlist); +down_write (&conn->session_lock); +xa_erase (&conn->sessions, sess->id); +up_write (&conn->session_lock);ksmbd_session_destroy (sess); } }
Greg Kroah-Hartman
maintainerPATCH 191/204 ksmbd: fix session use-after-free in multichannel connection
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
commit fa4cdb8cbca7d6cb6aa13e4d8d83d1103f6345db upstream.
There is a race condition between session setup and ksmbd_sessions_deregister. The session can be freed before the connection is added to channel list of session.
This patch check reference count of session before freeing it.
--- fs/smb/server/auth.c | 4 ++-- fs/smb/server/mgmt/user_session.c | 14 ++++++++------ fs/smb/server/smb2pdu.c | 7 ++++--- 3 files changed, 14 insertions(+), 11 deletions(-)
fs/smb/server/auth.c +2 -2
@@ -1010,9 +1010,9 @@ static int ksmbd_get_encryption_key(stru ses_enc_key = enc ? sess->smb3encryptionkey : sess->smb3decryptionkey; -if (enc) -ksmbd_user_session_get (sess);memcpy (key, ses_enc_key,SMB3_ENC_DEC_KEY_SIZE ); +if (!enc) +ksmbd_user_session_put (sess);return 0 ; }
fs/smb/server/mgmt/user_session.c +8 -6
@@ -180,7 +180,7 @@ static void ksmbd_expire_session(structdown_write (&sessions_table_lock);down_write (&conn->session_lock);xa_for_each (&conn->sessions, id, sess) { -if (atomic_read (&sess->refcnt) ==0 && +if (atomic_read (&sess->refcnt) <=1 && (sess->state !=SMB2_SESSION_VALID ||time_after (jiffies, sess->last_active +SMB2_SESSION_TIMEOUT ))) {
@@ -232,7 +232,8 @@ void ksmbd_sessions_deregister(struct ksdown_write (&conn->session_lock);xa_erase (&conn->sessions, sess->id);up_write (&conn->session_lock); -ksmbd_session_destroy (sess); +if (atomic_dec_and_test (&sess->refcnt)) +ksmbd_session_destroy (sess); } } }
@@ -251,7 +252,8 @@ void ksmbd_sessions_deregister(struct ksif (xa_empty (&sess->ksmbd_chann_list)) {xa_erase (&conn->sessions, sess->id);hash_del (&sess->hlist); -ksmbd_session_destroy (sess); +if (atomic_dec_and_test (&sess->refcnt)) +ksmbd_session_destroy (sess); } }up_write (&conn->session_lock);
@@ -327,8 +329,8 @@ void ksmbd_user_session_put(struct ksmbdif (atomic_read (&sess->refcnt) <=0 )WARN_ON (1 ); -else -atomic_dec (&sess->refcnt); +else if (atomic_dec_and_test (&sess->refcnt)) +ksmbd_session_destroy (sess); } struct preauth_session *ksmbd_preauth_session_alloc(struct ksmbd_conn *conn,
@@ -399,7 +401,7 @@ static struct ksmbd_session *__session_cxa_init (&sess->rpc_handle_list); sess->sequence_number =1 ;rwlock_init (&sess->tree_conns_lock); -atomic_set (&sess->refcnt,1 ); +atomic_set (&sess->refcnt,2 ); ret =__init_smb2_session (sess);if (ret)
fs/smb/server/smb2pdu.c +4 -3
@@ -2242,13 +2242,14 @@ int smb2_session_logoff(struct ksmbd_worreturn -ENOENT ; } -ksmbd_destroy_file_table (&sess->file_table);down_write (&conn->session_lock); sess->state =SMB2_SESSION_EXPIRED ;up_write (&conn->session_lock); -ksmbd_free_user (sess->user); - sess->user =NULL ; +if (sess->user) { +ksmbd_free_user (sess->user); + sess->user =NULL ; + }ksmbd_all_conn_set_status (sess_id,KSMBD_SESS_NEED_NEGOTIATE ); rsp->StructureSize =cpu_to_le16 (4 );
Greg Kroah-Hartman
maintainerPATCH 192/204 ksmbd: validate zero num_subauth before sub_auth is accessed
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Norbert Szetei <[email protected]>
commit bf21e29d78cd2c2371023953d9c82dfef82ebb36 upstream.
Access psid->sub_auth[psid->num_subauth - 1] without checking if num_subauth is non-zero leads to an out-of-bounds read. This patch adds a validation step to ensure num_subauth != 0 before sub_auth is accessed.
--- fs/smb/server/smbacl.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/smb/server/smbacl.c +5 -0
@@ -270,6 +270,11 @@ static int sid_to_id(struct user_namespareturn -EIO ; } +if (psid->num_subauth ==0 ) { +pr_err ("%s: zero subauthorities!\n" , __func__); +return -EIO ; + } +if (sidtype ==SIDOWNER ) {kuid_t uid;uid_t id;
Greg Kroah-Hartman
maintainerPATCH 193/204 tracing: Fix use-after-free in print_graph_function_flags during tracer switching
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tengda Wu <[email protected]>
commit 7f81f27b1093e4895e87b74143c59c055c3b1906 upstream.
Kairui reported a UAF issue in print_graph_function_flags() during ftrace stress testing [1]. This issue can be reproduced if puting a 'mdelay(10)' after 'mutex_unlock(&trace_types_lock)' in s_start(), and executing the following script:
$ echo function_graph > current_tracer $ cat trace > /dev/null & $ sleep 5 # Ensure the 'cat' reaches the 'mdelay(10)' point $ echo timerlat > current_tracer
The root cause lies in the two calls to print_graph_function_flags within print_trace_line during each s_show():
* One through 'iter->trace->print_line()';
* Another through 'event->funcs->trace()', which is hidden in print_trace_fmt() before print_trace_line returns.
Tracer switching only updates the former, while the latter continues to use the print_line function of the old tracer, which in the script above is print_graph_function_flags.
Moreover, when switching from the 'function_graph' tracer to the 'timerlat' tracer, s_start only calls graph_trace_close of the 'function_graph' tracer to free 'iter->private', but does not set it to NULL. This provides an opportunity for 'event->funcs->trace()' to use an invalid 'iter->private'.
To fix this issue, set 'iter->private' to NULL immediately after freeing it in graph_trace_close(), ensuring that an invalid pointer is not passed to other tracers. Additionally, clean up the unnecessary 'iter->private = NULL' during each 'cat trace' when using wakeup and irqsoff tracers.
[1] https://lore.kernel.org/all/[email protected]/
--- kernel/trace/trace_functions_graph.c | 1 + kernel/trace/trace_irqsoff.c | 2 -- kernel/trace/trace_sched_wakeup.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-)
kernel/trace/trace_functions_graph.c +1 -0
@@ -1244,6 +1244,7 @@ void graph_trace_close(struct trace_iterif (data) {free_percpu (data->cpu_data);kfree (data); + iter->private =NULL ; } }
kernel/trace/trace_irqsoff.c +0 -2
@@ -231,8 +231,6 @@ static void irqsoff_trace_open(struct tr {if (is_graph (iter->tr))graph_trace_open (iter); -else - iter->private =NULL ; }static void irqsoff_trace_close (struct trace_iterator *iter)
kernel/trace/trace_sched_wakeup.c +0 -2
@@ -168,8 +168,6 @@ static void wakeup_trace_open(struct tra {if (is_graph (iter->tr))graph_trace_open (iter); -else - iter->private =NULL ; }static void wakeup_trace_close (struct trace_iterator *iter)
Greg Kroah-Hartman
maintainerPATCH 194/204 tracing: Ensure module defining synth event cannot be unloaded while tracing
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Raillard <[email protected]>
commit 21581dd4e7ff6c07d0ab577e3c32b13a74b31522 upstream.
Currently, using synth_event_delete() will fail if the event is being used (tracing in progress), but that is normally done in the module exit function. At that stage, failing is problematic as returning a non-zero status means the module will become locked (impossible to unload or reload again).
Instead, ensure the module exit function does not get called in the first place by increasing the module refcnt when the event is enabled.
--- kernel/trace/trace_events_synth.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
kernel/trace/trace_events_synth.c +29 -1
@@ -875,6 +875,34 @@ static struct trace_event_fields synth_e {} }; +static int synth_event_reg (struct trace_event_call *call, +enum trace_reg type,void *data) +{ + struct synth_event *event = container_of(call, struct synth_event, call); + +switch (type) { +case TRACE_REG_REGISTER : +case TRACE_REG_PERF_REGISTER : +if (!try_module_get (event->mod)) +return -EBUSY ; +break ; +default : +break ; + } + +int ret =trace_event_reg (call, type, data); + +switch (type) { +case TRACE_REG_UNREGISTER : +case TRACE_REG_PERF_UNREGISTER : +module_put (event->mod); +break ; +default : +break ; + } +return ret; +} +static int register_synth_event (struct synth_event *event) {struct trace_event_call *call = &event->call;
@@ -904,7 +932,7 @@ static int register_synth_event(struct s goto out; } call->flags =TRACE_EVENT_FL_TRACEPOINT ; - call->class->reg = trace_event_reg; + call->class->reg = synth_event_reg; call->class->probe = trace_event_raw_event_synth; call->data = event; call->tp = event->tp;
Greg Kroah-Hartman
maintainerPATCH 195/204 tracing: Fix synth event printk format for str fields
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Raillard <[email protected]>
commit 4d38328eb442dc06aec4350fd9594ffa6488af02 upstream.
The printk format for synth event uses "%.*s" to print string fields, but then only passes the pointer part as var arg.
Replace %.*s with %s as the C string is guaranteed to be null-terminated.
The output in print fmt should never have been updated as __get_str() handles the string limit because it can access the length of the string in the string meta data that is saved in the ring buffer.
--- kernel/trace/trace_events_synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace_events_synth.c +1 -1
@@ -312,7 +312,7 @@ static const char *synth_field_fmt(charelse if (strcmp (type,"gfp_t" ) ==0 ) fmt ="%x" ;else if (synth_field_is_string (type)) - fmt ="%.*s" ; + fmt ="%s" ;else if (synth_field_is_stack (type)) fmt ="%s" ;
Greg Kroah-Hartman
maintainerPATCH 196/204 tracing/osnoise: Fix possible recursive locking for cpus_read_lock()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ran Xiaokai <[email protected]>
commit 7e6b3fcc9c5294aeafed0dbe1a09a1bc899bd0f2 upstream.
Lockdep reports this deadlock log:
osnoise: could not start sampling thread
============================================
WARNING: possible recursive locking detected
--------------------------------------------
CPU0
---- lock(cpu_hotplug_lock);
lock(cpu_hotplug_lock);
Call Trace: <TASK> print_deadlock_bug+0x282/0x3c0 __lock_acquire+0x1610/0x29a0 lock_acquire+0xcb/0x2d0 cpus_read_lock+0x49/0x120 stop_per_cpu_kthreads+0x7/0x60 start_kthread+0x103/0x120 osnoise_hotplug_workfn+0x5e/0x90 process_one_work+0x44f/0xb30 worker_thread+0x33e/0x5e0 kthread+0x206/0x3b0 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x11/0x20 </TASK>
This is the deadlock scenario:osnoise_hotplug_workfn()
guard(cpus_read_lock)(); // first lock call
start_kthread(cpu)
if (IS_ERR(kthread)) {
stop_per_cpu_kthreads(); {
cpus_read_lock(); // second lock call. Cause the AA deadlock
}
}It is not necessary to call stop_per_cpu_kthreads() which stops osnoise kthread for every other CPUs in the system if a failure occurs during hotplug of a certain CPU.
For start_per_cpu_kthreads(), if the start_kthread() call fails, this function calls stop_per_cpu_kthreads() to handle the error. Therefore, similarly, there is no need to call stop_per_cpu_kthreads() again within start_kthread().
So just remove stop_per_cpu_kthreads() from start_kthread to solve this issue.
--- kernel/trace/trace_osnoise.c | 1 - 1 file changed, 1 deletion(-)
kernel/trace/trace_osnoise.c +0 -1
@@ -1756,7 +1756,6 @@ static int start_kthread(unsigned int cpif (IS_ERR (kthread)) {pr_err (BANNER "could not start sampling thread\n" ); -stop_per_cpu_kthreads ();return -ENOMEM ; }
Greg Kroah-Hartman
maintainerPATCH 161/204 tunnels: Accept PACKET_HOST in skb_tunnel_check_pmtu().
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guillaume Nault <[email protected]>
[ Upstream commit 8930424777e43257f5bf6f0f0f53defd0d30415c ]
Because skb_tunnel_check_pmtu() doesn't handle PACKET_HOST packets, commit 30a92c9e3d6b ("openvswitch: Set the skbuff pkt_type for proper pmtud support.") forced skb->pkt_type to PACKET_OUTGOING for openvswitch packets that are sent using the OVS_ACTION_ATTR_OUTPUT action. This allowed such packets to invoke the iptunnel_pmtud_check_icmp() or iptunnel_pmtud_check_icmpv6() helpers and thus trigger PMTU update on the input device.
However, this also broke other parts of PMTU discovery. Since these packets don't have the PACKET_HOST type anymore, they won't trigger the sending of ICMP Fragmentation Needed or Packet Too Big messages to remote hosts when oversized (see the skb_in->pkt_type condition in __icmp_send() for example).
These two skb->pkt_type checks are therefore incompatible as one requires skb->pkt_type to be PACKET_HOST, while the other requires it to be anything but PACKET_HOST.
It makes sense to not trigger ICMP messages for non-PACKET_HOST packets as these messages should be generated only for incoming l2-unicast packets. However there doesn't seem to be any reason for skb_tunnel_check_pmtu() to ignore PACKET_HOST packets.
Allow both cases to work by allowing skb_tunnel_check_pmtu() to work on PACKET_HOST packets and not overriding skb->pkt_type in openvswitch anymore.
--- net/ipv4/ip_tunnel_core.c | 2 +- net/openvswitch/actions.c | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-)
net/ipv4/ip_tunnel_core.c +1 -1
@@ -415,7 +415,7 @@ int skb_tunnel_check_pmtu(struct sk_buff *skb, struct dst_entry *encap_dst,skb_dst_update_pmtu_no_confirm (skb, mtu); -if (!reply || skb->pkt_type ==PACKET_HOST ) +if (!reply)return 0 ;if (skb->protocol ==htons (ETH_P_IP ))
net/openvswitch/actions.c +0 -6
@@ -926,12 +926,6 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port,pskb_trim (skb,ovs_mac_header_len (key)); } -/* Need to set the pkt_type to involve the routing layer. The -* packet movement through the OVS datapath doesn't generally -* use routing, but this is needed for tunnel cases. -*/ - skb->pkt_type =PACKET_OUTGOING ; -if (likely (!mru || (skb->len <= mru + vport->dev->hard_header_len))) {ovs_vport_send (vport, skb,ovs_key_mac_proto (key));
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 197/204 arm64: Dont call NULL in do_compat_alignment_fixup()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Angelos Oikonomopoulos <[email protected]>
commit c28f31deeacda307acfee2f18c0ad904e5123aac upstream.
do_alignment_t32_to_handler() only fixes up alignment faults for specific instructions; it returns NULL otherwise (e.g. LDREX). When that's the case, signal to the caller that it needs to proceed with the regular alignment fault handling (i.e. SIGBUS). Without this patch, the kernel panics:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
Mem abort info:
ESR = 0x0000000086000006
EC = 0x21: IABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
user pgtable: 4k pages, 48-bit VAs, pgdp=00000800164aa000
[0000000000000000] pgd=0800081fdbd22003, p4d=0800081fdbd22003, pud=08000815d51c6003, pmd=0000000000000000
Internal error: Oops: 0000000086000006 [#1] SMP
Modules linked in: cfg80211 rfkill xt_nat xt_tcpudp xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat br_netfilter veth nvme_fa>
libcrc32c crc32c_generic raid0 multipath linear dm_mod dax raid1 md_mod xhci_pci nvme xhci_hcd nvme_core t10_pi usbcore igb crc64_rocksoft crc64 crc_t10dif crct10dif_generic crct10dif_ce crct10dif_common usb_common i2c_algo_bit i2c>
CPU: 2 PID: 3932954 Comm: WPEWebProcess Not tainted 6.1.0-31-arm64 #1 Debian 6.1.128-1
Hardware name: GIGABYTE MP32-AR1-00/MP32-AR1-00, BIOS F18v (SCP: 1.08.20211002) 12/01/2021
pstate: 80400009 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : 0x0
lr : do_compat_alignment_fixup+0xd8/0x3dc
sp : ffff80000f973dd0
x29: ffff80000f973dd0 x28: ffff081b42526180 x27: 0000000000000000
x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
x23: 0000000000000004 x22: 0000000000000000 x21: 0000000000000001
x20: 00000000e8551f00 x19: ffff80000f973eb0 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000000 x10: 0000000000000000 x9 : ffffaebc949bc488
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000400000 x4 : 0000fffffffffffe x3 : 0000000000000000
x2 : ffff80000f973eb0 x1 : 00000000e8551f00 x0 : 0000000000000001
Call trace:
0x0
do_alignment_fault+0x40/0x50
do_mem_abort+0x4c/0xa0
el0_da+0x48/0xf0
el0t_32_sync_handler+0x110/0x140
el0t_32_sync+0x190/0x194
Code: bad PC value
---[ end trace 0000000000000000 ]------ arch/arm64/kernel/compat_alignment.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/kernel/compat_alignment.c +2 -0
@@ -368,6 +368,8 @@ int do_compat_alignment_fixup(unsigned long addr, struct pt_regs *regs)return 1 ; } +if (!handler) +return 1 ; type =handler (addr, instr, regs);if (type ==TYPE_ERROR || type ==TYPE_FAULT )
Signature · 1 line
2.49.0
Greg Kroah-Hartman
maintainerPATCH 198/204 ext4: dont over-report free space or inodes in statvfs
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <[email protected]>
commit f87d3af7419307ae26e705a2b2db36140db367a2 upstream.
This fixes an analogus bug that was fixed in xfs in commit 4b8d867ca6e2 ("xfs: don't over-report free space or inodes in statvfs") where statfs can report misleading / incorrect information where project quota is enabled, and the free space is less than the remaining quota.
This commit will resolve a test failure in generic/762 which tests for this bug.
--- fs/ext4/super.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-)
fs/ext4/super.c +17 -10
@@ -6685,22 +6685,29 @@ static int ext4_statfs_project(struct su dquot->dq_dqb.dqb_bhardlimit); limit >>= sb->s_blocksize_bits; -if (limit && buf->f_blocks > limit) { +if (limit) { +uint64_t remaining =0 ; + curblock = (dquot->dq_dqb.dqb_curspace + dquot->dq_dqb.dqb_rsvspace) >> sb->s_blocksize_bits; - buf->f_blocks = limit; - buf->f_bfree = buf->f_bavail = - (buf->f_blocks > curblock) ? - (buf->f_blocks - curblock) :0 ; +if (limit > curblock) + remaining = limit - curblock; + + buf->f_blocks =min (buf->f_blocks, limit); + buf->f_bfree =min (buf->f_bfree, remaining); + buf->f_bavail =min (buf->f_bavail, remaining); } limit =min_not_zero (dquot->dq_dqb.dqb_isoftlimit, dquot->dq_dqb.dqb_ihardlimit); -if (limit && buf->f_files > limit) { - buf->f_files = limit; - buf->f_ffree = - (buf->f_files > dquot->dq_dqb.dqb_curinodes) ? - (buf->f_files - dquot->dq_dqb.dqb_curinodes) :0 ; +if (limit) { +uint64_t remaining =0 ; + +if (limit > dquot->dq_dqb.dqb_curinodes) + remaining = limit - dquot->dq_dqb.dqb_curinodes; + + buf->f_files =min (buf->f_files, limit); + buf->f_ffree =min (buf->f_ffree, remaining); }spin_unlock (&dquot->dq_dqb_lock);
Greg Kroah-Hartman
maintainerPATCH 199/204 ext4: fix OOB read when checking dotdot dir
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Acs, Jakub <[email protected]>
commit d5e206778e96e8667d3bde695ad372c296dc9353 upstream.
Mounting a corrupted filesystem with directory which contains '.' dir entry with rec_len == block size results in out-of-bounds read (later on, when the corrupted directory is removed).
ext4_empty_dir() assumes every ext4 directory contains at least '.' and '..' as directory entries in the first data block. It first loads the '.' dir entry, performs sanity checks by calling ext4_check_dir_entry() and then uses its rec_len member to compute the location of '..' dir entry (in ext4_next_entry). It assumes the '..' dir entry fits into the same data block.
If the rec_len of '.' is precisely one block (4KB), it slips through the sanity checks (it is considered the last directory entry in the data block) and leaves "struct ext4_dir_entry_2 *de" point exactly past the memory slot allocated to the data block. The following call to ext4_check_dir_entry() on new value of de then dereferences this pointer which results in out-of-bounds mem access.
Fix this by extending __ext4_check_dir_entry() to check for '.' dir entries that reach the end of data block. Make sure to ignore the phony dir entries for checksum (by checking name_len for non-zero).
Note: This is reported by KASAN as use-after-free in case another structure was recently freed from the slot past the bound, but it is really an OOB read.
This issue was found by syzkaller tool.
Call Trace: [ 38.594108] BUG: KASAN: slab-use-after-free in __ext4_check_dir_entry+0x67e/0x710 [ 38.594649] Read of size 2 at addr ffff88802b41a004 by task syz-executor/5375 [ 38.595158] [ 38.595288] CPU: 0 UID: 0 PID: 5375 Comm: syz-executor Not tainted 6.14.0-rc7 #1 [ 38.595298] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 [ 38.595304] Call Trace: [ 38.595308] <TASK> [ 38.595311] dump_stack_lvl+0xa7/0xd0 [ 38.595325] print_address_description.constprop.0+0x2c/0x3f0 [ 38.595339] ? __ext4_check_dir_entry+0x67e/0x710 [ 38.595349] print_report+0xaa/0x250 [ 38.595359] ? __ext4_check_dir_entry+0x67e/0x710 [ 38.595368] ? kasan_addr_to_slab+0x9/0x90 [ 38.595378] kasan_report+0xab/0xe0 [ 38.595389] ? __ext4_check_dir_entry+0x67e/0x710 [ 38.595400] __ext4_check_dir_entry+0x67e/0x710 [ 38.595410] ext4_empty_dir+0x465/0x990 [ 38.595421] ? __pfx_ext4_empty_dir+0x10/0x10 [ 38.595432] ext4_rmdir.part.0+0x29a/0xd10 [ 38.595441] ? __dquot_initialize+0x2a7/0xbf0 [ 38.595455] ? __pfx_ext4_rmdir.part.0+0x10/0x10 [ 38.595464] ? __pfx___dquot_initialize+0x10/0x10 [ 38.595478] ? down_write+0xdb/0x140 [ 38.595487] ? __pfx_down_write+0x10/0x10 [ 38.595497] ext4_rmdir+0xee/0x140 [ 38.595506] vfs_rmdir+0x209/0x670 [ 38.595517] ? lookup_one_qstr_excl+0x3b/0x190 [ 38.595529] do_rmdir+0x363/0x3c0 [ 38.595537] ? __pfx_do_rmdir+0x10/0x10 [ 38.595544] ? strncpy_from_user+0x1ff/0x2e0 [ 38.595561] __x64_sys_unlinkat+0xf0/0x130 [ 38.595570] do_syscall_64+0x5b/0x180 [ 38.595583] entry_SYSCALL_64_after_hwframe+0x76/0x7e
--- fs/ext4/dir.c | 3 +++ 1 file changed, 3 insertions(+)
fs/ext4/dir.c +3 -0
@@ -104,6 +104,9 @@ int __ext4_check_dir_entry(const char *felse if (unlikely (le32_to_cpu (de->inode) >le32_to_cpu (EXT4_SB (dir->i_sb)->s_es->s_inodes_count))) error_msg ="inode out of bounds" ; +else if (unlikely (next_offset == size && de->name_len ==1 && + de->name[0 ] =='.' )) + error_msg ="'.' directory cannot be the last in data block" ;else return 0 ;
Greg Kroah-Hartman
maintainerPATCH 162/204 netfilter: nft_tunnel: fix geneve_opt type confusion addition
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lin Ma <[email protected]>
[ Upstream commit 1b755d8eb1ace3870789d48fbd94f386ad6e30be ]
When handling multiple NFTA_TUNNEL_KEY_OPTS_GENEVE attributes, the parsing logic should place every geneve_opt structure one by one compactly. Hence, when deciding the next geneve_opt position, the pointer addition should be in units of char *.
However, the current implementation erroneously does type conversion before the addition, which will lead to heap out-of-bounds write.
[ 6.989857] ================================================================== [ 6.990293] BUG: KASAN: slab-out-of-bounds in nft_tunnel_obj_init+0x977/0xa70 [ 6.990725] Write of size 124 at addr ffff888005f18974 by task poc/178 [ 6.991162] [ 6.991259] CPU: 0 PID: 178 Comm: poc-oob-write Not tainted 6.1.132 #1 [ 6.991655] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 6.992281] Call Trace: [ 6.992423] <TASK> [ 6.992586] dump_stack_lvl+0x44/0x5c [ 6.992801] print_report+0x184/0x4be [ 6.993790] kasan_report+0xc5/0x100 [ 6.994252] kasan_check_range+0xf3/0x1a0 [ 6.994486] memcpy+0x38/0x60 [ 6.994692] nft_tunnel_obj_init+0x977/0xa70 [ 6.995677] nft_obj_init+0x10c/0x1b0 [ 6.995891] nf_tables_newobj+0x585/0x950 [ 6.996922] nfnetlink_rcv_batch+0xdf9/0x1020 [ 6.998997] nfnetlink_rcv+0x1df/0x220 [ 6.999537] netlink_unicast+0x395/0x530 [ 7.000771] netlink_sendmsg+0x3d0/0x6d0 [ 7.001462] __sock_sendmsg+0x99/0xa0 [ 7.001707] ____sys_sendmsg+0x409/0x450 [ 7.002391] ___sys_sendmsg+0xfd/0x170 [ 7.003145] __sys_sendmsg+0xea/0x170 [ 7.004359] do_syscall_64+0x5e/0x90 [ 7.005817] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 7.006127] RIP: 0033:0x7ec756d4e407 [ 7.006339] Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 faf [ 7.007364] RSP: 002b:00007ffed5d46760 EFLAGS: 00000202 ORIG_RAX: 000000000000002e [ 7.007827] RAX: ffffffffffffffda RBX: 00007ec756cc4740 RCX: 00007ec756d4e407 [ 7.008223] RDX: 0000000000000000 RSI: 00007ffed5d467f0 RDI: 0000000000000003 [ 7.008620] RBP: 00007ffed5d468a0 R08: 0000000000000000 R09: 0000000000000000 [ 7.009039] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 [ 7.009429] R13: 00007ffed5d478b0 R14: 00007ec756ee5000 R15: 00005cbd4e655cb8
Fix this bug with correct pointer addition and conversion in parse and dump code.
--- net/netfilter/nft_tunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/nft_tunnel.c +2 -2
@@ -339,7 +339,7 @@ static const struct nla_policy nft_tunnel_opts_geneve_policy[NFTA_TUNNEL_KEY_GENstatic int nft_tunnel_obj_geneve_init (const struct nlattr *attr,struct nft_tunnel_opts *opts) { -struct geneve_opt *opt = (struct geneve_opt *)opts->u.data + opts->len; +struct geneve_opt *opt = (struct geneve_opt *)(opts->u.data + opts->len);struct nlattr *tb[NFTA_TUNNEL_KEY_GENEVE_MAX +1 ];int err, data_len;
@@ -621,7 +621,7 @@ static int nft_tunnel_opts_dump(struct sk_buff *skb,if (!inner) goto failure; while (opts->len > offset) { - opt = (struct geneve_opt *)opts->u.data + offset; + opt = (struct geneve_opt *)(opts->u.data + offset); if (nla_put_be16(skb, NFTA_TUNNEL_KEY_GENEVE_CLASS, opt->opt_class) || nla_put_u8(skb, NFTA_TUNNEL_KEY_GENEVE_TYPE,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 163/204 ipv6: fix omitted netlink attributes when using RTEXT_FILTER_SKIP_STATS
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernando Fernandez Mancera <[email protected]>
[ Upstream commit 7ac6ea4a3e0898db76aecccd68fb2c403eb7d24e ]
Using RTEXT_FILTER_SKIP_STATS is incorrectly skipping non-stats IPv6 netlink attributes on link dump. This causes issues on userspace tools, e.g iproute2 is not rendering address generation mode as it should due to missing netlink attribute.
Move the filling of IFLA_INET6_STATS and IFLA_INET6_ICMP6STATS to a helper function guarded by a flag check to avoid hitting the same situation in the future.
--- net/ipv6/addrconf.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-)
net/ipv6/addrconf.c +25 -12
@@ -5718,6 +5718,27 @@ static void snmp6_fill_stats(u64 *stats, struct inet6_dev *idev, int attrtype, } } +static int inet6_fill_ifla6_stats_attrs (struct sk_buff *skb, +struct inet6_dev *idev) +{ +struct nlattr *nla; + + nla =nla_reserve (skb,IFLA_INET6_STATS ,IPSTATS_MIB_MAX *sizeof (u64)); +if (!nla) + goto nla_put_failure; +snmp6_fill_stats (nla_data (nla), idev,IFLA_INET6_STATS ,nla_len (nla)); + + nla =nla_reserve (skb,IFLA_INET6_ICMP6STATS ,ICMP6_MIB_MAX *sizeof (u64)); +if (!nla) + goto nla_put_failure; +snmp6_fill_stats (nla_data (nla), idev,IFLA_INET6_ICMP6STATS ,nla_len (nla)); + +return 0 ; + +nla_put_failure: +return -EMSGSIZE ; +} +static int inet6_fill_ifla6_attrs (struct sk_buff *skb,struct inet6_dev *idev,u32 ext_filter_mask) {
@@ -5739,18 +5760,10 @@ static int inet6_fill_ifla6_attrs(struct sk_buff *skb, struct inet6_dev *idev,/* XXX - MC not implemented */ -if (ext_filter_mask &RTEXT_FILTER_SKIP_STATS ) -return 0 ; - - nla =nla_reserve (skb,IFLA_INET6_STATS ,IPSTATS_MIB_MAX *sizeof (u64)); -if (!nla) - goto nla_put_failure; -snmp6_fill_stats (nla_data (nla), idev,IFLA_INET6_STATS ,nla_len (nla)); - - nla =nla_reserve (skb,IFLA_INET6_ICMP6STATS ,ICMP6_MIB_MAX *sizeof (u64)); -if (!nla) - goto nla_put_failure; -snmp6_fill_stats (nla_data (nla), idev,IFLA_INET6_ICMP6STATS ,nla_len (nla)); +if (!(ext_filter_mask &RTEXT_FILTER_SKIP_STATS )) { +if (inet6_fill_ifla6_stats_attrs (skb, idev) <0 ) + goto nla_put_failure; + } nla =nla_reserve (skb,IFLA_INET6_TOKEN ,sizeof (struct in6_addr ));if (!nla)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 164/204 net: dsa: mv88e6xxx: propperly shutdown PPU re-enable timer on destroy
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Oberhollenzer <[email protected]>
[ Upstream commit a58d882841a0750da3c482cd3d82432b1c7edb77 ]
The mv88e6xxx has an internal PPU that polls PHY state. If we want to access the internal PHYs, we need to disable the PPU first. Because that is a slow operation, a 10ms timer is used to re-enable it, canceled with every access, so bulk operations effectively only disable it once and re-enable it some 10ms after the last access.
If a PHY is accessed and then the mv88e6xxx module is removed before the 10ms are up, the PPU re-enable ends up accessing a dangling pointer.
This especially affects probing during bootup. The MDIO bus and PHY registration may succeed, but registration with the DSA framework may fail later on (e.g. because the CPU port depends on another, very slow device that isn't done probing yet, returning -EPROBE_DEFER). In this case, probe() fails, but the MDIO subsystem may already have accessed the MIDO bus or PHYs, arming the timer.
This is fixed as follows:
- If probe fails after mv88e6xxx_phy_init(), make sure we also call mv88e6xxx_phy_destroy() before returning
- In mv88e6xxx_remove(), make sure we do the teardown in the correct order, calling mv88e6xxx_phy_destroy() after unregistering the switch device.
- In mv88e6xxx_phy_destroy(), destroy both the timer and the work item that the timer might schedule, synchronously waiting in case one of the callbacks already fired and destroying the timer first, before waiting for the work item.
- Access to the PPU is guarded by a mutex, the worker acquires it with a mutex_trylock(), not proceeding with the expensive shutdown if that fails. We grab the mutex in mv88e6xxx_phy_destroy() to make sure the slow PPU shutdown is already done or won't even enter, when we wait for the work item.
--- drivers/net/dsa/mv88e6xxx/chip.c | 11 +++++++---- drivers/net/dsa/mv88e6xxx/phy.c | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +7 -4
@@ -7199,13 +7199,13 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev) err =mv88e6xxx_switch_reset (chip);mv88e6xxx_reg_unlock (chip);if (err) - goto out; + goto out_phy;if (np) { chip->irq =of_irq_get (np,0 );if (chip->irq == -EPROBE_DEFER ) { err = chip->irq; - goto out; + goto out_phy; } }
@@ -7224,7 +7224,7 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)mv88e6xxx_reg_unlock (chip);if (err) - goto out; + goto out_phy;if (chip->info->g2_irqs >0 ) { err =mv88e6xxx_g2_irq_setup (chip);
@@ -7264,6 +7264,8 @@ static int mv88e6xxx_probe(struct mdio_device *mdiodev)mv88e6xxx_g1_irq_free (chip); elsemv88e6xxx_irq_poll_free (chip ); +out_phy: +mv88e6xxx_phy_destroy (chip); out:if (pdata)dev_put (pdata->netdev);
@@ -7286,7 +7288,6 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)mv88e6xxx_ptp_free (chip); } -mv88e6xxx_phy_destroy (chip);mv88e6xxx_unregister_switch (chip);mv88e6xxx_mdios_unregister (chip);
@@ -7300,6 +7301,8 @@ static void mv88e6xxx_remove(struct mdio_device *mdiodev)mv88e6xxx_g1_irq_free (chip); elsemv88e6xxx_irq_poll_free (chip ); + +mv88e6xxx_phy_destroy (chip); }static void mv88e6xxx_shutdown (struct mdio_device *mdiodev)
drivers/net/dsa/mv88e6xxx/phy.c +3 -0
@@ -197,7 +197,10 @@ static void mv88e6xxx_phy_ppu_state_init(struct mv88e6xxx_chip *chip)static void mv88e6xxx_phy_ppu_state_destroy (struct mv88e6xxx_chip *chip) { +mutex_lock (&chip->ppu_mutex);del_timer_sync (&chip->ppu_timer); +cancel_work_sync (&chip->ppu_work); +mutex_unlock (&chip->ppu_mutex); } int mv88e6185_phy_ppu_read(struct mv88e6xxx_chip *chip, struct mii_bus *bus,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 165/204 net: fix geneve_opt length integer overflow
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lin Ma <[email protected]>
[ Upstream commit b27055a08ad4b415dcf15b63034f9cb236f7fb40 ]
struct geneve_opt uses 5 bit length for each single option, which means every vary size option should be smaller than 128 bytes.
However, all current related Netlink policies cannot promise this length condition and the attacker can exploit a exact 128-byte size option to *fake* a zero length option and confuse the parsing logic, further achieve heap out-of-bounds read.
One example crash log is like below:
[ 3.905425] ================================================================== [ 3.905925] BUG: KASAN: slab-out-of-bounds in nla_put+0xa9/0xe0 [ 3.906255] Read of size 124 at addr ffff888005f291cc by task poc/177 [ 3.906646] [ 3.906775] CPU: 0 PID: 177 Comm: poc-oob-read Not tainted 6.1.132 #1 [ 3.907131] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 [ 3.907784] Call Trace: [ 3.907925] <TASK> [ 3.908048] dump_stack_lvl+0x44/0x5c [ 3.908258] print_report+0x184/0x4be [ 3.909151] kasan_report+0xc5/0x100 [ 3.909539] kasan_check_range+0xf3/0x1a0 [ 3.909794] memcpy+0x1f/0x60 [ 3.909968] nla_put+0xa9/0xe0 [ 3.910147] tunnel_key_dump+0x945/0xba0 [ 3.911536] tcf_action_dump_1+0x1c1/0x340 [ 3.912436] tcf_action_dump+0x101/0x180 [ 3.912689] tcf_exts_dump+0x164/0x1e0 [ 3.912905] fw_dump+0x18b/0x2d0 [ 3.913483] tcf_fill_node+0x2ee/0x460 [ 3.914778] tfilter_notify+0xf4/0x180 [ 3.915208] tc_new_tfilter+0xd51/0x10d0 [ 3.918615] rtnetlink_rcv_msg+0x4a2/0x560 [ 3.919118] netlink_rcv_skb+0xcd/0x200 [ 3.919787] netlink_unicast+0x395/0x530 [ 3.921032] netlink_sendmsg+0x3d0/0x6d0 [ 3.921987] __sock_sendmsg+0x99/0xa0 [ 3.922220] __sys_sendto+0x1b7/0x240 [ 3.922682] __x64_sys_sendto+0x72/0x90 [ 3.922906] do_syscall_64+0x5e/0x90 [ 3.923814] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 3.924122] RIP: 0033:0x7e83eab84407 [ 3.924331] Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 faf [ 3.925330] RSP: 002b:00007ffff505e370 EFLAGS: 00000202 ORIG_RAX: 000000000000002c [ 3.925752] RAX: ffffffffffffffda RBX: 00007e83eaafa740 RCX: 00007e83eab84407 [ 3.926173] RDX: 00000000000001a8 RSI: 00007ffff505e3c0 RDI: 0000000000000003 [ 3.926587] RBP: 00007ffff505f460 R08: 00007e83eace1000 R09: 000000000000000c [ 3.926977] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffff505f3c0 [ 3.927367] R13: 00007ffff505f5c8 R14: 00007e83ead1b000 R15: 00005d4fbbe6dcb8
Fix these issues by enforing correct length condition in related policies.
--- net/ipv4/ip_tunnel_core.c | 2 +- net/netfilter/nft_tunnel.c | 2 +- net/sched/act_tunnel_key.c | 2 +- net/sched/cls_flower.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
net/ipv4/ip_tunnel_core.c +1 -1
@@ -450,7 +450,7 @@ static const struct nla_policy geneve_opt_policy[LWTUNNEL_IP_OPT_GENEVE_MAX + 1] = { [LWTUNNEL_IP_OPT_GENEVE_CLASS] = { .type = NLA_U16 }, [LWTUNNEL_IP_OPT_GENEVE_TYPE] = { .type = NLA_U8 }, - [LWTUNNEL_IP_OPT_GENEVE_DATA] = { .type = NLA_BINARY, .len = 128 }, + [LWTUNNEL_IP_OPT_GENEVE_DATA] = { .type = NLA_BINARY, .len = 127 }, }; static const struct nla_policy
net/netfilter/nft_tunnel.c +1 -1
@@ -333,7 +333,7 @@ static int nft_tunnel_obj_erspan_init(const struct nlattr *attr,static const struct nla_policy nft_tunnel_opts_geneve_policy[NFTA_TUNNEL_KEY_GENEVE_MAX +1 ] = { [NFTA_TUNNEL_KEY_GENEVE_CLASS ] = { .type =NLA_U16 }, [NFTA_TUNNEL_KEY_GENEVE_TYPE ] = { .type =NLA_U8 }, - [NFTA_TUNNEL_KEY_GENEVE_DATA ] = { .type =NLA_BINARY , .len =128 }, + [NFTA_TUNNEL_KEY_GENEVE_DATA ] = { .type =NLA_BINARY , .len =127 }, }; static int nft_tunnel_obj_geneve_init(const struct nlattr *attr,
net/sched/act_tunnel_key.c +1 -1
@@ -66,7 +66,7 @@ geneve_opt_policy[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX + 1] = { [TCA_TUNNEL_KEY_ENC_OPT_GENEVE_CLASS] = { .type = NLA_U16 }, [TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE] = { .type = NLA_U8 }, [TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA ] = { .type =NLA_BINARY , - .len = 128 }, + .len = 127 }, }; static const struct nla_policy
net/sched/cls_flower.c +1 -1
@@ -732,7 +732,7 @@ geneve_opt_policy[TCA_FLOWER_KEY_ENC_OPT_GENEVE_MAX + 1] = { [TCA_FLOWER_KEY_ENC_OPT_GENEVE_CLASS] = { .type = NLA_U16 }, [TCA_FLOWER_KEY_ENC_OPT_GENEVE_TYPE] = { .type = NLA_U8 }, [TCA_FLOWER_KEY_ENC_OPT_GENEVE_DATA ] = { .type =NLA_BINARY , - .len = 128 }, + .len = 127 }, }; static const struct nla_policy
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 166/204 ipv6: Start path selection from the first nexthop
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Schimmel <[email protected]>
[ Upstream commit 4d0ab3a6885e3e9040310a8d8f54503366083626 ]
Cited commit transitioned IPv6 path selection to use hash-threshold instead of modulo-N. With hash-threshold, each nexthop is assigned a region boundary in the multipath hash function's output space and a nexthop is chosen if the calculated hash is smaller than the nexthop's region boundary.
Hash-threshold does not work correctly if path selection does not start with the first nexthop. For example, if fib6_select_path() is always passed the last nexthop in the group, then it will always be chosen because its region boundary covers the entire hash function's output space.
Fix this by starting the selection process from the first nexthop and do not consider nexthops for which rt6_score_route() provided a negative score.
--- net/ipv6/route.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)
net/ipv6/route.c +35 -3
@@ -416,11 +416,35 @@ static bool rt6_check_expired(const struct rt6_info *rt)return false; } +static struct fib6_info * +rt6_multipath_first_sibling_rcu (const struct fib6_info *rt) +{ +struct fib6_info *iter; +struct fib6_node *fn; + + fn =rcu_dereference (rt->fib6_node); +if (!fn) + goto out; + iter =rcu_dereference (fn->leaf); +if (!iter) + goto out; + +while (iter) { +if (iter->fib6_metric == rt->fib6_metric && +rt6_qualify_for_ecmp (iter)) +return iter; + iter =rcu_dereference (iter->fib6_next); + } + +out: +return NULL ; +} +void fib6_select_path (const struct net *net,struct fib6_result *res,struct flowi6 *fl6,int oif,bool have_oif_match,const struct sk_buff *skb,int strict) { -struct fib6_info *match = res->f6i; +struct fib6_info *first, *match = res->f6i;struct fib6_info *sibling;if (!match->nh && (!match->fib6_nsiblings || have_oif_match))
@@ -444,10 +468,18 @@ void fib6_select_path(const struct net *net, struct fib6_result *res,return ; } -if (fl6->mp_hash <=atomic_read (&match->fib6_nh->fib_nh_upper_bound)) + first =rt6_multipath_first_sibling_rcu (match); +if (!first) goto out; -list_for_each_entry_rcu (sibling, &match->fib6_siblings, +if (fl6->mp_hash <=atomic_read (&first->fib6_nh->fib_nh_upper_bound) && +rt6_score_route (first->fib6_nh, first->fib6_flags, oif, + strict) >=0 ) { + match = first; + goto out; + } + +list_for_each_entry_rcu (sibling, &first->fib6_siblings, fib6_siblings) {const struct fib6_nh *nh = sibling->fib6_nh;int nh_upper_bound;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 157/204 net_sched: skbprio: Remove overly strict queue assertions
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <[email protected]>
[ Upstream commit ce8fe975fd99b49c29c42e50f2441ba53112b2e8 ]
In the current implementation, skbprio enqueue/dequeue contains an assertion that fails under certain conditions when SKBPRIO is used as a child qdisc under TBF with specific parameters. The failure occurs because TBF sometimes peeks at packets in the child qdisc without actually dequeuing them when tokens are unavailable.
This peek operation creates a discrepancy between the parent and child qdisc queue length counters. When TBF later receives a high-priority packet, SKBPRIO's queue length may show a different value than what's reflected in its internal priority queue tracking, triggering the assertion.
The fix removes this overly strict assertions in SKBPRIO, they are not necessary at all.
--- net/sched/sch_skbprio.c | 3 --- 1 file changed, 3 deletions(-)
net/sched/sch_skbprio.c +0 -3
@@ -121,8 +121,6 @@ static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,/* Check to update highest and lowest priorities. */ if (skb_queue_empty (lp_qdisc)) {if (q->lowest_prio == q->highest_prio) { -/* The incoming packet is the only packet in queue. */ -BUG_ON (sch->q.qlen !=1 ); q->lowest_prio = prio; q->highest_prio = prio; }else {
@@ -154,7 +152,6 @@ static struct sk_buff *skbprio_dequeue(struct Qdisc *sch)/* Update highest priority field. */ if (skb_queue_empty (hpq)) {if (q->lowest_prio == q->highest_prio) { -BUG_ON (sch->q.qlen); q->highest_prio =0 ; q->lowest_prio =SKBPRIO_MAX_PRIORITY -1 ; }else {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 201/204 jfs: add index corruption check to DT_GETPAGE()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roman Smirnov <[email protected]>
commit a8dfb2168906944ea61acfc87846b816eeab882d upstream.
If the file system is corrupted, the header.stblindex variable may become greater than 127. Because of this, an array access out of bounds may occur:
------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:3096:10 index 237 is out of range for type 'struct dtslot[128]' CPU: 0 UID: 0 PID: 5822 Comm: syz-executor740 Not tainted 6.13.0-rc4-syzkaller-00110-g4099a71718b0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: <TASK> __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_out_of_bounds+0x121/0x150 lib/ubsan.c:429 dtReadFirst+0x622/0xc50 fs/jfs/jfs_dtree.c:3096 dtReadNext fs/jfs/jfs_dtree.c:3147 [inline] jfs_readdir+0x9aa/0x3c50 fs/jfs/jfs_dtree.c:2862 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x571/0x800 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e2/0x4b0 fs/readdir.c:389 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f </TASK> ---[ end trace ]---
Add a stblindex check for corruption.
--- fs/jfs/jfs_dtree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/jfs/jfs_dtree.c +2 -1
@@ -117,7 +117,8 @@ do { \if (!(RC )) { \if (((P )->header.nextindex > \ (((BN ) ==0 ) ?DTROOTMAXSLOT : (P )->header.maxslot)) || \ - ((BN ) && ((P )->header.maxslot >DTPAGEMAXSLOT ))) { \ + ((BN ) && (((P )->header.maxslot >DTPAGEMAXSLOT ) || \ + ((P )->header.stblindex >=DTPAGEMAXSLOT )))) { \BT_PUTPAGE (MP ); \jfs_error ((IP )->i_sb, \"DT_GETPAGE: dtree page corrupt\n" ); \
Greg Kroah-Hartman
maintainerPATCH 202/204 media: streamzap: fix race between device disconnection and urb callback
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Murad Masimov <[email protected]>
commit f656cfbc7a293a039d6a0c7100e1c846845148c1 upstream.
Syzkaller has reported a general protection fault at function ir_raw_event_store_with_filter(). This crash is caused by a NULL pointer dereference of dev->raw pointer, even though it is checked for NULL in the same function, which means there is a race condition. It occurs due to the incorrect order of actions in the streamzap_disconnect() function:rc_unregister_device() is called before usb_kill_urb(). The dev->raw pointer is freed and set to NULL in rc_unregister_device(), and only after that usb_kill_urb() waits for in-progress requests to finish.
If rc_unregister_device() is called while streamzap_callback() handler is not finished, this can lead to accessing freed resources. Thus rc_unregister_device() should be called after usb_kill_urb().
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
--- drivers/media/rc/streamzap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/streamzap.c +1 -1
@@ -385,8 +385,8 @@ static void streamzap_disconnect(structif (!sz)return ; -rc_unregister_device (sz->rdev);usb_kill_urb (sz->urb_in); +rc_unregister_device (sz->rdev);usb_free_urb (sz->urb_in);usb_free_coherent (usbdev, sz->buf_in_len, sz->buf_in, sz->dma_in);
Greg Kroah-Hartman
maintainerPATCH 203/204 nfsd: put dl_stid if fail to queue dl_recall
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Lingfeng <[email protected]>
commit 230ca758453c63bd38e4d9f4a21db698f7abada8 upstream.
Before calling nfsd4_run_cb to queue dl_recall to the callback_wq, we increment the reference count of dl_stid.
We expect that after the corresponding work_struct is processed, the reference count of dl_stid will be decremented through the callback function nfsd4_cb_recall_release.
However, if the call to nfsd4_run_cb fails, the incremented reference count of dl_stid will not be decremented correspondingly, leading to the following nfs4_stid leak:
unreferenced object 0xffff88812067b578 (size 344):
comm "nfsd", pid 2761, jiffies 4295044002 (age 5541.241s) hex dump (first 32 bytes):
01 00 00 00 6b 6b 6b 6b b8 02 c0 e2 81 88 ff ff ....kkkk........
00 6b 6b 6b 6b 6b 6b 6b 00 00 00 00 ad 4e ad de .kkkkkkk.....N..
backtrace:
kmem_cache_alloc+0x4b9/0x700
nfsd4_process_open1+0x34/0x300
nfsd4_open+0x2d1/0x9d0
nfsd4_proc_compound+0x7a2/0xe30
nfsd_dispatch+0x241/0x3e0
svc_process_common+0x5d3/0xcc0
svc_process+0x2a3/0x320
nfsd+0x180/0x2e0
kthread+0x199/0x1d0
ret_from_fork+0x30/0x50
ret_from_fork_asm+0x1b/0x30
unreferenced object 0xffff8881499f4d28 (size 368):
comm "nfsd", pid 2761, jiffies 4295044005 (age 5541.239s)
hex dump (first 32 bytes):
01 00 00 00 00 00 00 00 30 4d 9f 49 81 88 ff ff ........0M.I....
30 4d 9f 49 81 88 ff ff 20 00 00 00 01 00 00 00 0M.I.... .......
backtrace:
kmem_cache_alloc+0x4b9/0x700
nfs4_alloc_stid+0x29/0x210
alloc_init_deleg+0x92/0x2e0
nfs4_set_delegation+0x284/0xc00
nfs4_open_delegation+0x216/0x3f0
nfsd4_process_open2+0x2b3/0xee0
nfsd4_open+0x770/0x9d0
nfsd4_proc_compound+0x7a2/0xe30
nfsd_dispatch+0x241/0x3e0
svc_process_common+0x5d3/0xcc0
svc_process+0x2a3/0x320
nfsd+0x180/0x2e0
kthread+0x199/0x1d0
ret_from_fork+0x30/0x50
ret_from_fork_asm+0x1b/0x30Fix it by checking the result of nfsd4_run_cb and call nfs4_put_stid if fail to queue dl_recall.
--- fs/nfsd/nfs4state.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
fs/nfsd/nfs4state.c +11 -1
@@ -1069,6 +1069,12 @@ static struct nfs4_ol_stateid * nfs4_allreturn openlockstateid (stid); } +/* +* As the sc_free callback of deleg, this may be called by nfs4_put_stid +* in nfsd_break_one_deleg. +* Considering nfsd_break_one_deleg is called with the flc->flc_lock held, +* this function mustn't ever sleep. +*/ static void nfs4_free_deleg (struct nfs4_stid *stid) {struct nfs4_delegation *dp =delegstateid (stid);
@@ -4923,6 +4929,7 @@ static const struct nfsd4_callback_ops nstatic void nfsd_break_one_deleg (struct nfs4_delegation *dp) { +bool queued;/* * We're assuming the state code never drops its reference * without first removing the lease. Since we're in this lease
@@ -4931,7 +4938,10 @@ static void nfsd_break_one_deleg(struct* we know it's safe to take a reference. */ refcount_inc (&dp->dl_stid.sc_count); -WARN_ON_ONCE (!nfsd4_run_cb (&dp->dl_recall)); + queued =nfsd4_run_cb (&dp->dl_recall); +WARN_ON_ONCE (!queued); +if (!queued) +nfs4_put_stid (&dp->dl_stid); }/* Called from break_lease() with flc_lock held. */
Greg Kroah-Hartman
maintainerPATCH 204/204 NFSD: Skip sending CB_RECALL_ANY when the backchannel isnt up
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit 8a388c1fabeb6606e16467b23242416c0dbeffad upstream.
NFSD sends CB_RECALL_ANY to clients when the server is low on memory or that client has a large number of delegations outstanding.
We've seen cases where NFSD attempts to send CB_RECALL_ANY requests to disconnected clients, and gets confused. These calls never go anywhere if a backchannel transport to the target client isn't available. Before the server can send any backchannel operation, the client has to connect first and then do a BIND_CONN_TO_SESSION.
This patch doesn't address the root cause of the confusion, but there's no need to queue up these optional operations if they can't go anywhere.
--- fs/nfsd/nfs4state.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
fs/nfsd/nfs4state.c +12 -7
@@ -6247,14 +6247,19 @@ deleg_reaper(struct nfsd_net *nn)spin_lock (&nn->client_lock);list_for_each_safe (pos, next, &nn->client_lru) { clp = list_entry(pos, struct nfs4_client, cl_lru); -if (clp->cl_state !=NFSD4_ACTIVE || -list_empty (&clp->cl_delegations) || -atomic_read (&clp->cl_delegs_in_recall) || -test_bit (NFSD4_CLIENT_CB_RECALL_ANY , &clp->cl_flags) || - (ktime_get_boottime_seconds () - - clp->cl_ra_time <5 )) { + +if (clp->cl_state !=NFSD4_ACTIVE ) +continue ; +if (list_empty (&clp->cl_delegations)) +continue ; +if (atomic_read (&clp->cl_delegs_in_recall)) +continue ; +if (test_bit (NFSD4_CLIENT_CB_RECALL_ANY , &clp->cl_flags)) +continue ; +if (ktime_get_boottime_seconds () - clp->cl_ra_time <5 ) +continue ; +if (clp->cl_cb_state !=NFSD4_CB_UP )continue ; - }list_add (&clp->cl_ra_cblist, &cblist);/* release in nfsd4_cb_recall_any_release */
Greg Kroah-Hartman
maintainerPATCH 200/204 jfs: fix slab-out-of-bounds read in ea_get()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qasim Ijaz <[email protected]>
commit fdf480da5837c23b146c4743c18de97202fcab37 upstream.
During the "size_check" label in ea_get(), the code checks if the extended attribute list (xattr) size matches ea_size. If not, it logs "ea_get: invalid extended attribute" and calls print_hex_dump().
Here, EALIST_SIZE(ea_buf->xattr) returns 4110417968, which exceeds INT_MAX (2,147,483,647). Then ea_size is clamped:
int size = clamp_t(int, ea_size, 0, EALIST_SIZE(ea_buf->xattr));
Although clamp_t aims to bound ea_size between 0 and 4110417968, the upper limit is treated as an int, causing an overflow above 2^31 - 1. This leads "size" to wrap around and become negative (-184549328).
The "size" is then passed to print_hex_dump() (called "len" in print_hex_dump()), it is passed as type size_t (an unsigned type), this is then stored inside a variable called "int remaining", which is then assigned to "int linelen" which is then passed to hex_dump_to_buffer(). In print_hex_dump() the for loop, iterates through 0 to len-1, where len is 18446744073525002176, calling hex_dump_to_buffer() on each iteration:
for (i = 0; i < len; i += rowsize) {
linelen = min(remaining, rowsize);
remaining -= rowsize;
hex_dump_to_buffer(ptr + i, linelen, rowsize, groupsize,
linebuf, sizeof(linebuf), ascii);
...
}The expected stopping condition (i < len) is effectively broken since len is corrupted and very large. This eventually leads to the "ptr+i" being passed to hex_dump_to_buffer() to get closer to the end of the actual bounds of "ptr", eventually an out of bounds access is done in hex_dump_to_buffer() in the following for loop:
for (j = 0; j < len; j++) {
if (linebuflen < lx + 2)
goto overflow2;
ch = ptr[j];
...
}To fix this we should validate "EALIST_SIZE(ea_buf->xattr)" before it is utilised.
--- fs/jfs/xattr.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
fs/jfs/xattr.c +9 -4
@@ -559,11 +559,16 @@ static int ea_get(struct inode *inode, s size_check:if (EALIST_SIZE (ea_buf->xattr) != ea_size) { -int size =clamp_t (int, ea_size,0 ,EALIST_SIZE (ea_buf->xattr)); +if (unlikely (EALIST_SIZE (ea_buf->xattr) >INT_MAX )) { +printk (KERN_ERR "ea_get: extended attribute size too large: %u > INT_MAX\n" , +EALIST_SIZE (ea_buf->xattr)); + }else { +int size =clamp_t (int, ea_size,0 ,EALIST_SIZE (ea_buf->xattr)); -printk (KERN_ERR "ea_get: invalid extended attribute\n" ); -print_hex_dump (KERN_ERR ,"" ,DUMP_PREFIX_ADDRESS ,16 ,1 , - ea_buf->xattr, size,1 ); +printk (KERN_ERR "ea_get: invalid extended attribute\n" ); +print_hex_dump (KERN_ERR ,"" ,DUMP_PREFIX_ADDRESS ,16 ,1 , + ea_buf->xattr, size,1 ); + }ea_release (inode, ea_buf); rc = -EIO ; goto clean_up;
Quoted 4 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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.
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.1.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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, 10 Apr 2025 10:47:53 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.134-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels, build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Am 08.04.2025 um 12:48 schrieb Greg Kroah-Hartman:
Quoted 4 lines
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg oddities or regressions found.
Beste Grüße,
Peter Schneider
Signature · 8 lines
Climb the mountain not to plant your flag, but to embrace the challenge, enjoy the air and behold the view. Climb it so you can see the world, not so the world can see you. -- David McCullough Jr. OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244 Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc https://keys.mailvelope.com/pks/lookup?op=get&[email protected] https://keys.mailvelope.com/pks/lookup?op=get&[email protected]
Hello,
Quoted 7 lines · On Tue, 8 Apr 2025 12:48:50 +0200 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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, 10 Apr 2025 10:47:53 +0000. Anything received after that time might be too late.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/damonitor/damon-tests/tree/next/corr
[2] 41c273b7c6e5 ("Linux 6.1.134-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: sysfs.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh # SKIP
ok 12 selftests: damon-tests: build_m68k.sh # SKIP
ok 13 selftests: damon-tests: build_i386_idle_flag.sh
ok 14 selftests: damon-tests: build_i386_highpte.sh
ok 15 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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, 10 Apr 2025 10:47:53 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.134-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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, 10 Apr 2025 10:47:53 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.134-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v6.1:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
115 tests: 115 pass, 0 failLinux version: 6.1.134-rc1-g41c273b7c6e5
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 6.1.134 release. There are 204 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, 10 Apr 2025 10:47:53 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.134-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.1.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 6.1.134-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: 41c273b7c6e5686866a063a29a03f95e3970fd7f
* git describe: v6.1.133-205-g41c273b7c6e5
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.133-205-g41c273b7c6e5
## Test Regressions (compared to v6.1.131-221-g819efe388d47)
## Metric Regressions (compared to v6.1.131-221-g819efe388d47)
## Test Fixes (compared to v6.1.131-221-g819efe388d47)
## Metric Fixes (compared to v6.1.131-221-g819efe388d47)
## Test result summary
total: 79336, pass: 60518, fail: 4593, skip: 13917, xfail: 308
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 135 total, 133 passed, 2 failed
* arm64: 43 total, 42 passed, 1 failed
* i386: 27 total, 23 passed, 4 failed
* mips: 26 total, 25 passed, 1 failed
* parisc: 4 total, 4 passed, 0 failed
* powerpc: 32 total, 29 passed, 3 failed
* riscv: 11 total, 11 passed, 0 failed
* s390: 14 total, 12 passed, 2 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 7 total, 7 passed, 0 failed
* x86_64: 35 total, 34 passed, 1 failed
## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org