Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
20 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files80
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- Kconfig
- Makefile
- aead_api.c
- aead_api.h
- aes_ccm.h
- aes_cmac.c
- aes_cmac.h
- aes_gcm.h
- aes_gmac.c
- aes_gmac.h
- agg-rx.c
- agg-tx.c
- cfg.c
- chan.c
- debug.h
- debugfs.c
- debugfs.h
- debugfs_key.c
- debugfs_key.h
- debugfs_netdev.c
- debugfs_netdev.h
- debugfs_sta.c
- debugfs_sta.h
- driver-ops.c
- driver-ops.h
- ethtool.c
- fils_aead.c
- fils_aead.h
- he.c
- ht.c
- ibss.c
- ieee80211_i.h
- iface.c
- key.c
- key.h
- led.c
- led.h
- main.c
- mesh.c
- mesh.h
- mesh_hwmp.c
- mesh_pathtbl.c
- mesh_plink.c
- mesh_ps.c
- mesh_sync.c
- michael.c
- michael.h
- mlme.c
- ocb.c
- offchannel.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
net/mac80211/aes_cmac.c
C · 1,773 bytes/*
* AES-128-CMAC with TLen 16 for IEEE 802.11w BIP
* Copyright 2008, Jouni Malinen <[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 <linux/kernel.h>
#include <linux/types.h>
#include <linux/crypto.h>
#include <linux/export.h>
#include <linux/err.h>
#include <crypto/aes.h>
#include <net/mac80211.h>
#include "key.h"
#include "aes_cmac.h"
#define CMAC_TLEN 8 /* CMAC TLen = 64 bits (8 octets) */
#define CMAC_TLEN_256 16 /* CMAC TLen = 128 bits (16 octets) */
#define AAD_LEN 20
static const u8 zero[CMAC_TLEN_256];
void ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad,
const u8 *data, size_t data_len, u8 *mic)
{
SHASH_DESC_ON_STACK(desc, tfm);
u8 out[AES_BLOCK_SIZE];
desc->tfm = tfm;
crypto_shash_init(desc);
crypto_shash_update(desc, aad, AAD_LEN);
crypto_shash_update(desc, data, data_len - CMAC_TLEN);
crypto_shash_finup(desc, zero, CMAC_TLEN, out);
memcpy(mic, out, CMAC_TLEN);
}
void ieee80211_aes_cmac_256(struct crypto_shash *tfm, const u8 *aad,
const u8 *data, size_t data_len, u8 *mic)
{
SHASH_DESC_ON_STACK(desc, tfm);
desc->tfm = tfm;
crypto_shash_init(desc);
crypto_shash_update(desc, aad, AAD_LEN);
crypto_shash_update(desc, data, data_len - CMAC_TLEN_256);
crypto_shash_finup(desc, zero, CMAC_TLEN_256, mic);
}
struct crypto_shash *ieee80211_aes_cmac_key_setup(const u8 key[],
size_t key_len)
{
struct crypto_shash *tfm;
tfm = crypto_alloc_shash("cmac(aes)", 0, 0);
if (!IS_ERR(tfm))
crypto_shash_setkey(tfm, key, key_len);
return tfm;
}
void ieee80211_aes_cmac_key_free(struct crypto_shash *tfm)
{
crypto_free_shash(tfm);
}