# git rev-parse -q --verify 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5^{commit} # git fetch -q -n -f git://fs.ozlabs.ibm.com/kernel/crypto master # git rev-parse -q --verify 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5^{commit} 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 # 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 48 ARCH=powerpc O=/kisskb/build/crypto_ppc64_defconfig+NO_TM_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- ppc64_defconfig # Added to kconfig CONFIG_PPC_TRANSACTIONAL_MEM=n # < make -s -j 48 ARCH=powerpc O=/kisskb/build/crypto_ppc64_defconfig+NO_TM_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/crypto_ppc64_defconfig+NO_TM_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/crypto_ppc64_defconfig+NO_TM_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/drivers/net/ethernet/chelsio/cxgb4/sge.c: In function 'cxgb4_write_partial_sgl': /kisskb/src/drivers/net/ethernet/chelsio/cxgb4/sge.c:910:9: warning: missing braces around initializer [-Wmissing-braces] struct ulptx_sge_pair buf[MAX_SKB_FRAGS / 2 + 1] = {0}, *to; ^ /kisskb/src/drivers/net/ethernet/chelsio/cxgb4/sge.c:910:9: warning: (near initialization for 'buf[0]') [-Wmissing-braces] /kisskb/src/fs/btrfs/tree-checker.c: In function 'check_root_item': /kisskb/src/fs/btrfs/tree-checker.c:1064:9: warning: missing braces around initializer [-Wmissing-braces] struct btrfs_root_item ri = { 0 }; ^ /kisskb/src/fs/btrfs/tree-checker.c:1064:9: warning: (near initialization for 'ri.inode') [-Wmissing-braces] Completed OK # rm -rf /kisskb/build/crypto_ppc64_defconfig+NO_TM_powerpc-gcc4.9 # Build took: 0:03:52.505251