* [PATCH 6.1 073/292] wifi: ath: Silence memcpy run-time false positive warning
[not found] <20230522190405.880733338@linuxfoundation.org>
@ 2023-05-22 19:07 ` Greg Kroah-Hartman
2023-05-23 14:52 ` [PATCH 6.1 000/292] 6.1.30-rc1 review Naresh Kamboju
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-05-22 19:07 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Kalle Valo, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, linux-wireless, netdev,
Kees Cook, Kalle Valo, Sasha Levin
From: Kees Cook <keescook@chromium.org>
[ Upstream commit bfcc8ba45eb87bfaaff900bbad2b87b204899d41 ]
The memcpy() in ath_key_config() was attempting to write across
neighboring struct members in struct ath_keyval. Introduce a wrapping
struct_group, kv_values, to be the addressable target of the memcpy
without overflowing an individual member. Silences the false positive
run-time warning:
memcpy: detected field-spanning write (size 32) of single field "hk.kv_val" at drivers/net/wireless/ath/key.c:506 (size 16)
Link: https://bbs.archlinux.org/viewtopic.php?id=282254
Cc: Kalle Valo <kvalo@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230210054310.never.554-kees@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath.h | 12 +++++++-----
drivers/net/wireless/ath/key.c | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index f083fb9038c36..f02a308a9ffc5 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -96,11 +96,13 @@ struct ath_keyval {
u8 kv_type;
u8 kv_pad;
u16 kv_len;
- u8 kv_val[16]; /* TK */
- u8 kv_mic[8]; /* Michael MIC key */
- u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
- * supports both MIC keys in the same key cache entry;
- * in that case, kv_mic is the RX key) */
+ struct_group(kv_values,
+ u8 kv_val[16]; /* TK */
+ u8 kv_mic[8]; /* Michael MIC key */
+ u8 kv_txmic[8]; /* Michael MIC TX key (used only if the hardware
+ * supports both MIC keys in the same key cache entry;
+ * in that case, kv_mic is the RX key) */
+ );
};
enum ath_cipher {
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c
index 61b59a804e308..b7b61d4f02bae 100644
--- a/drivers/net/wireless/ath/key.c
+++ b/drivers/net/wireless/ath/key.c
@@ -503,7 +503,7 @@ int ath_key_config(struct ath_common *common,
hk.kv_len = key->keylen;
if (key->keylen)
- memcpy(hk.kv_val, key->key, key->keylen);
+ memcpy(&hk.kv_values, key->key, key->keylen);
if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
switch (vif->type) {
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6.1 000/292] 6.1.30-rc1 review
[not found] <20230522190405.880733338@linuxfoundation.org>
2023-05-22 19:07 ` [PATCH 6.1 073/292] wifi: ath: Silence memcpy run-time false positive warning Greg Kroah-Hartman
@ 2023-05-23 14:52 ` Naresh Kamboju
2023-05-23 15:09 ` Matthieu Baerts
1 sibling, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2023-05-23 14:52 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, LTP List, Netdev,
linux-perf-users, MPTCP Upstream
On Tue, 23 May 2023 at 00:53, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.1.30 release.
> There are 292 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Wed, 24 May 2023 19:03:25 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.30-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-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.
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
NOTE:
Following are the list of intermittent failures.
LTP syscalls msync04 started failing intermittently on 6.3, 6.1 and 5.15 on
arm64 devices which are using NFS mounted rootfs and external mounted drive.
Where as on arm x15 device it is always fails from 6.3.2-rc1, 6.1.28-rc1
and 5.15.111-rc1.
Test log:
========
tst_test.c:1634: TINFO: === Testing on vfat ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with vfat opts='' extra opts=''
msync04.c:72: TPASS: msync() working correctly
tst_test.c:1634: TINFO: === Testing on ntfs ===
tst_test.c:1093: TINFO: Formatting /dev/loop0 with ntfs opts='' extra opts=''
The partition start sector was not specified for /dev/loop0 and it
could not be obtained automatically. It has been set to 0.
The number of sectors per track was not specified for /dev/loop0 and
it could not be obtained automatically. It has been set to 0.
The number of heads was not specified for /dev/loop0 and it could not
be obtained automatically. It has been set to 0.
To boot from a device, Windows needs the 'partition start sector', the
'sectors per track' and the 'number of heads' to be set.
Windows will not be able to boot from this device.
tst_test.c:1107: TINFO: Trying FUSE...
msync04.c:59: TFAIL: Expected dirty bit to be set after writing to
mmap()-ed area
log:
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.3.y/build/v6.3.3-365-g20efcce0526d/testrun/17163865/suite/ltp-syscalls/test/msync04/log
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.3.y/build/v6.3.3-365-g20efcce0526d/testrun/17163865/suite/ltp-syscalls/test/msync04/history/
Test results compare across 6.3, 6.1 and 5.15.
- https://qa-reports.linaro.org/_/comparetest/?project=1764&project=1597&project=1022&suite=ltp-syscalls&test=msync04
=====
Following Perf CoreSight test cases failing intermittently on arm64
Qualcomm dragonboard 410c.
78: CoreSight / Thread Loop 10 Threads - Check TID :
--- start ---
test child forked, pid 1196
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 6.477 MB
./perf-thread_loop-check-tid-10th.data ]
Thread IDs 1211 not found in perf AUX data
test child finished with -1
---- end ----
CoreSight / Thread Loop 10 Threads - Check TID: FAILED!
79: CoreSight / Thread Loop 2 Threads - Check TID :
--- start ---
test child forked, pid 1285
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.005 MB
./perf-thread_loop-check-tid-2th.data ]
Thread IDs 1290 1290 not found in perf AUX data
test child finished with -1
---- end ----
CoreSight / Thread Loop 2 Threads - Check TID: FAILED!
logs:
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17164102/suite/perf/test/CoreSight_Thread_Loop_10_Threads__Check_TID/history/
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17164102/suite/perf/test/CoreSight_Thread_Loop_10_Threads__Check_TID/log
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17164102/suite/perf/test/CoreSight_Thread_Loop_10_Threads__Check_TID/details/
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17164102/suite/perf/test/CoreSight_Thread_Loop_2_Threads__Check_TID/history/
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17164102/suite/perf/test/CoreSight_Thread_Loop_2_Threads__Check_TID/details/
=====
selftests: net/mptcp: diag.sh started failing on 6.1.30-rc1 but
passed on 6.3.4-rc1. This is due to changes in latest kselftest
(6.3) running on 6.1.
test logs:
=======
# selftests: net/mptcp: diag.sh
# no msk on netns creation [ ok ]
# listen match for dport 10000 [ ok ]
# listen match for sport 10000 [ ok ]
# listen match for saddr and sport [ ok ]
# all listen sockets [ ok ]
# after MPC handshake [ ok ]
# ....chk remote_key [ ok ]
# ....chk no fallback [ ok ]
# ....chk 2 msk in use [ fail ] expected 2 found 0
# ....chk 0 msk in use after flush [ ok ]
# check fallback [ ok ]
# ....chk 1 msk in use [ fail ] expected 1 found 0
# ....chk 0 msk in use after flush [ ok ]
# many msk socket present [ ok ]
# ....chk many msk in use [ fail ] expected
254 found 0
# ....chk 0 msk in use after flush [ ok ]
not ok 4 selftests: net/mptcp: diag.sh # exit=11
logs:
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17163977/suite/kselftest-net-mptcp/test/net_mptcp_diag_sh/history/
- https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17163977/suite/kselftest-net-mptcp/test/net_mptcp_diag_sh/details/
## Build
* kernel: 6.1.30-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-6.1.y
* git commit: e00a3d96f756a884ab864ae21c22bc1b86d0844d
* git describe: v6.1.29-293-ge00a3d96f756
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756
## Test Regressions (compared to v6.1.29)
* bcm2711-rpi-4-b, ltp-syscalls - intermittent failures
- msync04
* dragonboard-410c, perf - intermittent failures
- CoreSight_Thread_Loop_10_Threads__Check_TID
- CoreSight_Thread_Loop_2_Threads__Check_TID
* qemu_i386, kselftest-net-mptcp - fails only on 32-bit architectures.
- net_mptcp_diag_sh
## Metric Regressions (compared to v6.1.29)
## Test Fixes (compared to v6.1.29)
## Metric Fixes (compared to v6.1.29)
## Test result summary
total: 171342, pass: 147295, fail: 4403, skip: 19372, xfail: 272
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 151 total, 150 passed, 1 failed
* arm64: 54 total, 53 passed, 1 failed
* i386: 41 total, 38 passed, 3 failed
* mips: 30 total, 28 passed, 2 failed
* parisc: 8 total, 8 passed, 0 failed
* powerpc: 38 total, 36 passed, 2 failed
* riscv: 16 total, 15 passed, 1 failed
* s390: 16 total, 16 passed, 0 failed
* sh: 14 total, 12 passed, 2 failed
* sparc: 8 total, 8 passed, 0 failed
* x86_64: 46 total, 46 passed, 0 failed
## Test suites summary
* boot
* fwts
* igt-gpu-tools
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kselftest-zram
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* perf
* rcutorture
* v4l2-compliance
* vdso
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 6.1 000/292] 6.1.30-rc1 review
2023-05-23 14:52 ` [PATCH 6.1 000/292] 6.1.30-rc1 review Naresh Kamboju
@ 2023-05-23 15:09 ` Matthieu Baerts
0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2023-05-23 15:09 UTC (permalink / raw)
To: Naresh Kamboju, Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, LTP List, Netdev,
linux-perf-users, MPTCP Upstream
Hi Naresh,
On 23/05/2023 16:52, Naresh Kamboju wrote:
> On Tue, 23 May 2023 at 00:53, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>>
>> This is the start of the stable review cycle for the 6.1.30 release.
>> There are 292 patches in this series, all will be posted as a response
>> to this one. If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Wed, 24 May 2023 19:03:25 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.30-rc1.gz
>> or in the git tree and branch at:
>> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-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.
>
> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
(...)
> selftests: net/mptcp: diag.sh started failing on 6.1.30-rc1 but
> passed on 6.3.4-rc1. This is due to changes in latest kselftest
> (6.3) running on 6.1.
>
> test logs:
> =======
> # selftests: net/mptcp: diag.sh
> # no msk on netns creation [ ok ]
> # listen match for dport 10000 [ ok ]
> # listen match for sport 10000 [ ok ]
> # listen match for saddr and sport [ ok ]
> # all listen sockets [ ok ]
> # after MPC handshake [ ok ]
> # ....chk remote_key [ ok ]
> # ....chk no fallback [ ok ]
> # ....chk 2 msk in use [ fail ] expected 2 found 0
> # ....chk 0 msk in use after flush [ ok ]
> # check fallback [ ok ]
> # ....chk 1 msk in use [ fail ] expected 1 found 0
> # ....chk 0 msk in use after flush [ ok ]
> # many msk socket present [ ok ]
> # ....chk many msk in use [ fail ] expected
> 254 found 0
> # ....chk 0 msk in use after flush [ ok ]
> not ok 4 selftests: net/mptcp: diag.sh # exit=11
>
> logs:
> - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17163977/suite/kselftest-net-mptcp/test/net_mptcp_diag_sh/history/
> - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/build/v6.1.29-293-ge00a3d96f756/testrun/17163977/suite/kselftest-net-mptcp/test/net_mptcp_diag_sh/details/
Thank you for looking at these MPTCP selftests and for having reported
these issues.
We are looking at having MPTCP selftests supporting previous kernel
versions but that's not easy because our selftests are verifying some
internal behaviours, not just what is exposed to the uAPI, e.g. what
network packets are being sent, etc.. Also, some socket options and
counters -- like what you reported here above with diag.sh -- were
returning 0 before being implemented in MPTCP: so we need to accept that
these counters might not work, that's not ideal for a test that wants to
check if they work :)
Anyway, for those who wants to follow the evolution, patches have been
shared on our mailing list:
https://patchwork.kernel.org/project/mptcp/list/?series=749868&state=*
https://github.com/multipath-tcp/mptcp_net-next/commits/7220c4c22b88
https://github.com/multipath-tcp/mptcp_net-next/issues/368
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-23 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230522190405.880733338@linuxfoundation.org>
2023-05-22 19:07 ` [PATCH 6.1 073/292] wifi: ath: Silence memcpy run-time false positive warning Greg Kroah-Hartman
2023-05-23 14:52 ` [PATCH 6.1 000/292] 6.1.30-rc1 review Naresh Kamboju
2023-05-23 15:09 ` Matthieu Baerts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).