Exploit databaseDownload repository ZIP
GH-a4473dcd9930d1ae4c0775adc06b1cfb
satheesh575555/linux-4.19.72_cve-2022-36946
Sources for CVE-2022-36946
2 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files42
satheesh575555/linux-4.19.72_cve-2022-36946Revision 34cc7d8183fd
- ↑..Parent directory
- .gitignore
- Kconfig
- Makefile
- aes-ce-ccm-core.S
- aes-ce-ccm-glue.c
- aes-ce-core.S
- aes-ce-glue.c
- aes-ce-setkey.h
- aes-ce.S
- aes-cipher-core.S
- aes-cipher-glue.c
- aes-ctr-fallback.h
- aes-glue.c
- aes-modes.S
- aes-neon.S
- aes-neonbs-core.S
- aes-neonbs-glue.c
- chacha20-neon-core.S
- chacha20-neon-glue.c
- crc32-ce-core.S
- crc32-ce-glue.c
- crct10dif-ce-core.S
- crct10dif-ce-glue.c
- ghash-ce-core.S
- ghash-ce-glue.c
- sha1-ce-core.S
- sha1-ce-glue.c
- sha2-ce-core.S
- sha2-ce-glue.c
- sha256-core.S_shipped
- sha256-glue.c
- sha3-ce-core.S
- sha3-ce-glue.c
- sha512-armv8.pl
- sha512-ce-core.S
- sha512-ce-glue.c
- sha512-core.S_shipped
- sha512-glue.c
- sm3-ce-core.S
- sm3-ce-glue.c
- sm4-ce-core.S
- sm4-ce-glue.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
arch/arm64/crypto/aes-ctr-fallback.h
Text · 1,354 bytes/*
* Fallback for sync aes(ctr) in contexts where kernel mode NEON
* is not allowed
*
* Copyright (C) 2017 Linaro Ltd <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <crypto/aes.h>
#include <crypto/internal/skcipher.h>
asmlinkage void __aes_arm64_encrypt(u32 *rk, u8 *out, const u8 *in, int rounds);
static inline int aes_ctr_encrypt_fallback(struct crypto_aes_ctx *ctx,
struct skcipher_request *req)
{
struct skcipher_walk walk;
u8 buf[AES_BLOCK_SIZE];
int err;
err = skcipher_walk_virt(&walk, req, true);
while (walk.nbytes > 0) {
u8 *dst = walk.dst.virt.addr;
u8 *src = walk.src.virt.addr;
int nbytes = walk.nbytes;
int tail = 0;
if (nbytes < walk.total) {
nbytes = round_down(nbytes, AES_BLOCK_SIZE);
tail = walk.nbytes % AES_BLOCK_SIZE;
}
do {
int bsize = min(nbytes, AES_BLOCK_SIZE);
__aes_arm64_encrypt(ctx->key_enc, buf, walk.iv,
6 + ctx->key_length / 4);
crypto_xor_cpy(dst, src, buf, bsize);
crypto_inc(walk.iv, AES_BLOCK_SIZE);
dst += AES_BLOCK_SIZE;
src += AES_BLOCK_SIZE;
nbytes -= AES_BLOCK_SIZE;
} while (nbytes > 0);
err = skcipher_walk_done(&walk, tail);
}
return err;
}