]> www.infradead.org Git - users/willy/pagecache.git/commit
LoongArch: csum: Fix OoB access in IP checksum code for negative lengths
authorYuli Wang <wangyuli@uniontech.com>
Thu, 13 Feb 2025 04:02:40 +0000 (12:02 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 13 Feb 2025 04:02:40 +0000 (12:02 +0800)
commit6287f1a8c16138c2ec750953e35039634018c84a
tree7a1eb325bfca1266fa967bad1dff386c0c91fd4a
parent6b72cd9ef062702390fc96c469beea1729a5dffe
LoongArch: csum: Fix OoB access in IP checksum code for negative lengths

Commit 69e3a6aa6be2 ("LoongArch: Add checksum optimization for 64-bit
system") would cause an undefined shift and an out-of-bounds read.

Commit 8bd795fedb84 ("arm64: csum: Fix OoB access in IP checksum code
for negative lengths") fixes the same issue on ARM64.

Fixes: 69e3a6aa6be2 ("LoongArch: Add checksum optimization for 64-bit system")
Co-developed-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Yuli Wang <wangyuli@uniontech.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/lib/csum.c