# git rev-parse -q --verify 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5^{commit} 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 already have revision, skipping fetch # git checkout -q -f -B kisskb 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 # git clean -qxdf # < git log -1 # commit 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 # Author: Ard Biesheuvel # Date: Sat Jan 2 14:59:09 2021 +0100 # # crypto: ecdh - avoid buffer overflow in ecdh_set_secret() # # Pavel reports that commit 17858b140bf4 ("crypto: ecdh - avoid unaligned # accesses in ecdh_set_secret()") fixes one problem but introduces another: # the unconditional memcpy() introduced by that commit may overflow the # target buffer if the source data is invalid, which could be the result of # intentional tampering. # # So check params.key_size explicitly against the size of the target buffer # before validating the key further. # # Fixes: 17858b140bf4 ("crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()") # Reported-by: Pavel Machek # Cc: # Signed-off-by: Ard Biesheuvel # Signed-off-by: Herbert Xu # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/crypto_pmac32_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- pmac32_defconfig # < make -s -j 120 ARCH=powerpc O=/kisskb/build/crypto_pmac32_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 120 ARCH=powerpc O=/kisskb/build/crypto_pmac32_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 120 ARCH=powerpc O=/kisskb/build/crypto_pmac32_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/block/genhd.c: In function 'diskstats_show': /kisskb/src/block/genhd.c:1517:1: warning: the frame size of 1160 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ INFO: Uncompressed kernel (size 0xa5183c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) Completed OK # rm -rf /kisskb/build/crypto_pmac32_defconfig_powerpc-gcc4.9 # Build took: 0:01:01.941050