idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
37,300
static void unix_get_secdata(struct scm_cookie *scm, struct sk_buff *skb) { UNIXCB(skb).secid = scm->secid; }
DoS Bypass
0
static void unix_get_secdata(struct scm_cookie *scm, struct sk_buff *skb) { UNIXCB(skb).secid = scm->secid; }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,301
static inline unsigned int unix_hash_fold(__wsum n) { unsigned int hash = (__force unsigned int)csum_fold(n); hash ^= hash>>8; return hash&(UNIX_HASH_SIZE-1); }
DoS Bypass
0
static inline unsigned int unix_hash_fold(__wsum n) { unsigned int hash = (__force unsigned int)csum_fold(n); hash ^= hash>>8; return hash&(UNIX_HASH_SIZE-1); }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,302
static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) { struct dentry *dentry; struct path path; int err = 0; /* * Get the parent directory, calculate the hash for last * component. */ dentry = kern_path_create(AT_FDCWD, sun_path, &path, 0); err = PTR_ERR(dentry); if (IS_ERR(dentry)) ...
DoS Bypass
0
static int unix_mknod(const char *sun_path, umode_t mode, struct path *res) { struct dentry *dentry; struct path path; int err = 0; /* * Get the parent directory, calculate the hash for last * component. */ dentry = kern_path_create(AT_FDCWD, sun_path, &path, 0); err = PTR_ERR(dentry); if (IS_ERR(dentry)) ...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,303
static int unix_scm_to_skb(struct scm_cookie *scm, struct sk_buff *skb, bool send_fds) { int err = 0; UNIXCB(skb).pid = get_pid(scm->pid); UNIXCB(skb).uid = scm->creds.uid; UNIXCB(skb).gid = scm->creds.gid; UNIXCB(skb).fp = NULL; unix_get_secdata(scm, skb); if (scm->fp && send_fds) err = unix_attach_fds(scm,...
DoS Bypass
0
static int unix_scm_to_skb(struct scm_cookie *scm, struct sk_buff *skb, bool send_fds) { int err = 0; UNIXCB(skb).pid = get_pid(scm->pid); UNIXCB(skb).uid = scm->creds.uid; UNIXCB(skb).gid = scm->creds.gid; UNIXCB(skb).fp = NULL; unix_get_secdata(scm, skb); if (scm->fp && send_fds) err = unix_attach_fds(scm,...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,304
static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb) { return (scm->secid == UNIXCB(skb).secid); }
DoS Bypass
0
static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb) { return (scm->secid == UNIXCB(skb).secid); }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,305
static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb) { return true; }
DoS Bypass
0
static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb) { return true; }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,306
static int unix_set_peek_off(struct sock *sk, int val) { struct unix_sock *u = unix_sk(sk); if (mutex_lock_interruptible(&u->readlock)) return -EINTR; sk->sk_peek_off = val; mutex_unlock(&u->readlock); return 0; }
DoS Bypass
0
static int unix_set_peek_off(struct sock *sk, int val) { struct unix_sock *u = unix_sk(sk); if (mutex_lock_interruptible(&u->readlock)) return -EINTR; sk->sk_peek_off = val; mutex_unlock(&u->readlock); return 0; }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,307
static void unix_sock_destructor(struct sock *sk) { struct unix_sock *u = unix_sk(sk); skb_queue_purge(&sk->sk_receive_queue); WARN_ON(atomic_read(&sk->sk_wmem_alloc)); WARN_ON(!sk_unhashed(sk)); WARN_ON(sk->sk_socket); if (!sock_flag(sk, SOCK_DEAD)) { pr_info("Attempt to release alive unix socket: %p\n", sk)...
DoS Bypass
0
static void unix_sock_destructor(struct sock *sk) { struct unix_sock *u = unix_sk(sk); skb_queue_purge(&sk->sk_receive_queue); WARN_ON(atomic_read(&sk->sk_wmem_alloc)); WARN_ON(!sk_unhashed(sk)); WARN_ON(sk->sk_socket); if (!sock_flag(sk, SOCK_DEAD)) { pr_info("Attempt to release alive unix socket: %p\n", sk)...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,308
static long unix_stream_data_wait(struct sock *sk, long timeo, struct sk_buff *last, unsigned int last_len) { struct sk_buff *tail; DEFINE_WAIT(wait); unix_state_lock(sk); for (;;) { prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); tail = skb_peek_tail(&sk->sk_receive_queue); if (tail != las...
DoS Bypass
0
static long unix_stream_data_wait(struct sock *sk, long timeo, struct sk_buff *last, unsigned int last_len) { struct sk_buff *tail; DEFINE_WAIT(wait); unix_state_lock(sk); for (;;) { prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); tail = skb_peek_tail(&sk->sk_receive_queue); if (tail != las...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,309
static int unix_stream_read_generic(struct unix_stream_read_state *state) { struct scm_cookie scm; struct socket *sock = state->socket; struct sock *sk = sock->sk; struct unix_sock *u = unix_sk(sk); int copied = 0; int flags = state->flags; int noblock = flags & MSG_DONTWAIT; bool check_creds = false; int targ...
DoS Bypass
0
static int unix_stream_read_generic(struct unix_stream_read_state *state) { struct scm_cookie scm; struct socket *sock = state->socket; struct sock *sk = sock->sk; struct unix_sock *u = unix_sk(sk); int copied = 0; int flags = state->flags; int noblock = flags & MSG_DONTWAIT; bool check_creds = false; int targ...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,310
static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct unix_stream_read_state state = { .recv_actor = unix_stream_read_actor, .socket = sock, .msg = msg, .size = size, .flags = flags }; return unix_stream_read_generic(&state); }
DoS Bypass
0
static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct unix_stream_read_state state = { .recv_actor = unix_stream_read_actor, .socket = sock, .msg = msg, .size = size, .flags = flags }; return unix_stream_read_generic(&state); }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,311
static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; struct sock *other = NULL; int err, size; struct sk_buff *skb; int sent = 0; struct scm_cookie scm; bool fds_sent = false; int max_level; int data_len; wait_for_unix_gc(); err = scm_se...
DoS Bypass
0
static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) { struct sock *sk = sock->sk; struct sock *other = NULL; int err, size; struct sk_buff *skb; int sent = 0; struct scm_cookie scm; bool fds_sent = false; int max_level; int data_len; wait_for_unix_gc(); err = scm_se...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,312
static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page, int offset, size_t size, int flags) { int err = 0; bool send_sigpipe = true; struct sock *other, *sk = socket->sk; struct sk_buff *skb, *newskb = NULL, *tail = NULL; if (flags & MSG_OOB) return -EOPNOTSUPP; other = unix_peer...
DoS Bypass
0
static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page, int offset, size_t size, int flags) { int err = 0; bool send_sigpipe = true; struct sock *other, *sk = socket->sk; struct sk_buff *skb, *newskb = NULL, *tail = NULL; if (flags & MSG_OOB) return -EOPNOTSUPP; other = unix_peer...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,313
static int unix_stream_splice_actor(struct sk_buff *skb, int skip, int chunk, struct unix_stream_read_state *state) { return skb_splice_bits(skb, state->socket->sk, UNIXCB(skb).consumed + skip, state->pipe, chunk, state->splice_flags, skb_unix_socket_splice); }
DoS Bypass
0
static int unix_stream_splice_actor(struct sk_buff *skb, int skip, int chunk, struct unix_stream_read_state *state) { return skb_splice_bits(skb, state->socket->sk, UNIXCB(skb).consumed + skip, state->pipe, chunk, state->splice_flags, skb_unix_socket_splice); }
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,314
static ssize_t unix_stream_splice_read(struct socket *sock, loff_t *ppos, struct pipe_inode_info *pipe, size_t size, unsigned int flags) { struct unix_stream_read_state state = { .recv_actor = unix_stream_splice_actor, .socket = sock, .pipe = pipe, .size = size, .splice_flags = flags, ...
DoS Bypass
0
static ssize_t unix_stream_splice_read(struct socket *sock, loff_t *ppos, struct pipe_inode_info *pipe, size_t size, unsigned int flags) { struct unix_stream_read_state state = { .recv_actor = unix_stream_splice_actor, .socket = sock, .pipe = pipe, .size = size, .splice_flags = flags, ...
@@ -326,6 +326,118 @@ static struct sock *unix_find_socket_byinode(struct inode *i) return s; } +/* Support code for asymmetrically connected dgram sockets + * + * If a datagram socket is connected to a socket not itself connected + * to the first socket (eg, /dev/log), clients may only enqueue more + * messages i...
null
null
null
37,315
static int append_new_servers(GArray *const servers, GError **const gerror) { int i; GArray *new_servers; const int old_len = servers->len; int retval = -1; struct generic_conf genconf; new_servers = parse_cfile(config_file_pos, &genconf, gerror); if (!new_server...
DoS
0
static int append_new_servers(GArray *const servers, GError **const gerror) { int i; GArray *new_servers; const int old_len = servers->len; int retval = -1; struct generic_conf genconf; new_servers = parse_cfile(config_file_pos, &genconf, gerror); if (!new_server...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,316
int append_serve(const SERVER *const s, GArray *const a) { SERVER *ns = NULL; struct addrinfo hints; struct addrinfo *ai = NULL; struct addrinfo *rp = NULL; char host[NI_MAXHOST]; gchar *port = NULL; int e; int ret; assert(s != NULL); port = g_strdup_printf("%d", s->port); memset(&hints,'\0',sizeof(hin...
DoS
0
int append_serve(const SERVER *const s, GArray *const a) { SERVER *ns = NULL; struct addrinfo hints; struct addrinfo *ai = NULL; struct addrinfo *rp = NULL; char host[NI_MAXHOST]; gchar *port = NULL; int e; int ret; assert(s != NULL); port = g_strdup_printf("%d", s->port); memset(&hints,'\0',sizeof(hin...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,317
int authorized_client(CLIENT *opts) { const char *ERRMSG="Invalid entry '%s' in authfile '%s', so, refusing all connections."; FILE *f ; char line[LINELEN]; char *tmp; struct in_addr addr; struct in_addr client; struct in_addr cltemp; int len; if ((f=fopen(opts->server->authname,"r"))==NULL) { ...
DoS
0
int authorized_client(CLIENT *opts) { const char *ERRMSG="Invalid entry '%s' in authfile '%s', so, refusing all connections."; FILE *f ; char line[LINELEN]; char *tmp; struct in_addr addr; struct in_addr client; struct in_addr cltemp; int len; if ((f=fopen(opts->server->authname,"r"))==NULL) { ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,318
static inline void consume(int f, void * buf, size_t len, size_t bufsiz) { size_t curlen; while (len>0) { curlen = (len>bufsiz)?bufsiz:len; readit(f, buf, curlen); len -= curlen; } }
DoS
0
static inline void consume(int f, void * buf, size_t len, size_t bufsiz) { size_t curlen; while (len>0) { curlen = (len>bufsiz)?bufsiz:len; readit(f, buf, curlen); len -= curlen; } }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,319
GArray* do_cfile_dir(gchar* dir, GError** e) { DIR* dirh = opendir(dir); struct dirent* de; gchar* fname; GArray* retval = NULL; GArray* tmp; struct stat stbuf; if(!dir) { g_set_error(e, NBDS_ERR, NBDS_ERR_CFILE_DIR_UNKNOWN, "Invalid directory specified: %s", strerror(errno)); return NULL; } errno=0; whi...
DoS
0
GArray* do_cfile_dir(gchar* dir, GError** e) { DIR* dirh = opendir(dir); struct dirent* de; gchar* fname; GArray* retval = NULL; GArray* tmp; struct stat stbuf; if(!dir) { g_set_error(e, NBDS_ERR, NBDS_ERR_CFILE_DIR_UNKNOWN, "Invalid directory specified: %s", strerror(errno)); return NULL; } errno=0; whi...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,320
int dosockopts(const int socket, GError **const gerror) { #ifndef sun int yes=1; #else char yes='1'; #endif /* sun */ struct linger l; /* lose the pesky "Address already in use" error message */ if (setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(int)) == -1) { g_set_error(gerror, NBDS_ERR, ...
DoS
0
int dosockopts(const int socket, GError **const gerror) { #ifndef sun int yes=1; #else char yes='1'; #endif /* sun */ struct linger l; /* lose the pesky "Address already in use" error message */ if (setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(int)) == -1) { g_set_error(gerror, NBDS_ERR, ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,321
SERVER* dup_serve(const SERVER *const s) { SERVER *serve = NULL; serve=g_new0(SERVER, 1); if(serve == NULL) return NULL; if(s->exportname) serve->exportname = g_strdup(s->exportname); serve->expected_size = s->expected_size; if(s->listenaddr) serve->listenaddr = g_strdup(s->listenaddr); serve->port = ...
DoS
0
SERVER* dup_serve(const SERVER *const s) { SERVER *serve = NULL; serve=g_new0(SERVER, 1); if(serve == NULL) return NULL; if(s->exportname) serve->exportname = g_strdup(s->exportname); serve->expected_size = s->expected_size; if(s->listenaddr) serve->listenaddr = g_strdup(s->listenaddr); serve->port = ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,322
int expflush(CLIENT *client) { gint i; if (client->server->flags & F_COPYONWRITE) { return fsync(client->difffile); } for (i = 0; i < client->export->len; i++) { FILE_INFO fi = g_array_index(client->export, FILE_INFO, i); if (fsync(fi.fhandle) < 0) return -1; } return 0; }
DoS
0
int expflush(CLIENT *client) { gint i; if (client->server->flags & F_COPYONWRITE) { return fsync(client->difffile); } for (i = 0; i < client->export->len; i++) { FILE_INFO fi = g_array_index(client->export, FILE_INFO, i); if (fsync(fi.fhandle) < 0) return -1; } return 0; }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,323
int expread(off_t a, char *buf, size_t len, CLIENT *client) { off_t rdlen, offset; off_t mapcnt, mapl, maph, pagestart; if (!(client->server->flags & F_COPYONWRITE)) return(rawexpread_fully(a, buf, len, client)); DEBUG("Asked to read %u bytes at %llu.\n", (unsigned int)len, (unsigned long long)a); mapl=a/DIFFP...
DoS
0
int expread(off_t a, char *buf, size_t len, CLIENT *client) { off_t rdlen, offset; off_t mapcnt, mapl, maph, pagestart; if (!(client->server->flags & F_COPYONWRITE)) return(rawexpread_fully(a, buf, len, client)); DEBUG("Asked to read %u bytes at %llu.\n", (unsigned int)len, (unsigned long long)a); mapl=a/DIFFP...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,324
int expwrite(off_t a, char *buf, size_t len, CLIENT *client, int fua) { char pagebuf[DIFFPAGESIZE]; off_t mapcnt,mapl,maph; off_t wrlen,rdlen; off_t pagestart; off_t offset; if (!(client->server->flags & F_COPYONWRITE)) return(rawexpwrite_fully(a, buf, len, client, fua)); DEBUG("Asked to write %u bytes at %...
DoS
0
int expwrite(off_t a, char *buf, size_t len, CLIENT *client, int fua) { char pagebuf[DIFFPAGESIZE]; off_t mapcnt,mapl,maph; off_t wrlen,rdlen; off_t pagestart; off_t offset; if (!(client->server->flags & F_COPYONWRITE)) return(rawexpwrite_fully(a, buf, len, client, fua)); DEBUG("Asked to write %u bytes at %...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,325
static int get_index_by_servename(const gchar *const servename, const GArray *const servers) { int i; for (i = 0; i < servers->len; ++i) { const SERVER server = g_array_index(servers, SERVER, i); if (strcmp(servename, server.servename) ...
DoS
0
static int get_index_by_servename(const gchar *const servename, const GArray *const servers) { int i; for (i = 0; i < servers->len; ++i) { const SERVER server = g_array_index(servers, SERVER, i); if (strcmp(servename, server.servename) ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,326
void glib_message_syslog_redirect(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { int level=LOG_DEBUG; switch( log_level ) { case G_LOG_FLAG_FATAL: ...
DoS
0
void glib_message_syslog_redirect(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { int level=LOG_DEBUG; switch( log_level ) { case G_LOG_FLAG_FATAL: ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,327
handle_connection(GArray *servers, int net, SERVER *serve, CLIENT *client) { int sock_flags_old; int sock_flags_new; if(serve->max_connections > 0 && g_hash_table_size(children) >= serve->max_connections) { msg(LOG_INFO, "Max connections reached"); goto handle_connection_out; } if((sock_flags_old = fcnt...
DoS
0
handle_connection(GArray *servers, int net, SERVER *serve, CLIENT *client) { int sock_flags_old; int sock_flags_new; if(serve->max_connections > 0 && g_hash_table_size(children) >= serve->max_connections) { msg(LOG_INFO, "Max connections reached"); goto handle_connection_out; } if((sock_flags_old = fcnt...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,328
static CLIENT* handle_export_name(uint32_t opt, int net, GArray* servers, uint32_t cflags) { uint32_t namelen; char* name; int i; if (read(net, &namelen, sizeof(namelen)) < 0) { err("Negotiation failed/7: %m"); return NULL; } namelen = ntohl(namelen); name = malloc(namelen+1); name[namelen]=0; if (read(ne...
DoS
0
static CLIENT* handle_export_name(uint32_t opt, int net, GArray* servers, uint32_t cflags) { uint32_t namelen; char* name; int i; if (read(net, &namelen, sizeof(namelen)) < 0) { err("Negotiation failed/7: %m"); return NULL; } namelen = ntohl(namelen); name = malloc(namelen+1); name[namelen]=0; if (read(ne...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,329
static void handle_list(uint32_t opt, int net, GArray* servers, uint32_t cflags) { uint32_t len; int i; char buf[1024]; char *ptr = buf + sizeof(len); if (read(net, &len, sizeof(len)) < 0) err("Negotiation failed/8: %m"); len = ntohl(len); if(len) { send_reply(opt, net, NBD_REP_ERR_INVALID, 0, NULL); } if...
DoS
0
static void handle_list(uint32_t opt, int net, GArray* servers, uint32_t cflags) { uint32_t len; int i; char buf[1024]; char *ptr = buf + sizeof(len); if (read(net, &len, sizeof(len)) < 0) err("Negotiation failed/8: %m"); len = ntohl(len); if(len) { send_reply(opt, net, NBD_REP_ERR_INVALID, 0, NULL); } if...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,330
void killchild(gpointer key, gpointer value, gpointer user_data) { pid_t *pid=value; kill(*pid, SIGTERM); }
DoS
0
void killchild(gpointer key, gpointer value, gpointer user_data) { pid_t *pid=value; kill(*pid, SIGTERM); }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,331
int mainloop(CLIENT *client) { struct nbd_request request; struct nbd_reply reply; gboolean go_on=TRUE; #ifdef DODBG int i = 0; #endif negotiate(client->net, client, NULL, client->modern ? NEG_MODERN : (NEG_OLD | NEG_INIT)); DEBUG("Entering request loop!\n"); reply.magic = htonl(NBD_REPLY_MAGIC); reply.error = ...
DoS
0
int mainloop(CLIENT *client) { struct nbd_request request; struct nbd_reply reply; gboolean go_on=TRUE; #ifdef DODBG int i = 0; #endif negotiate(client->net, client, NULL, client->modern ? NEG_MODERN : (NEG_OLD | NEG_INIT)); DEBUG("Entering request loop!\n"); reply.magic = htonl(NBD_REPLY_MAGIC); reply.error = ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,332
CLIENT* negotiate(int net, CLIENT *client, GArray* servers, int phase) { char zeros[128]; uint64_t size_host; uint32_t flags = NBD_FLAG_HAS_FLAGS; uint16_t smallflags = 0; uint64_t magic; memset(zeros, '\0', sizeof(zeros)); assert(((phase & NEG_INIT) && (phase & NEG_MODERN)) || client); if(phase & NEG_MODERN) ...
DoS
0
CLIENT* negotiate(int net, CLIENT *client, GArray* servers, int phase) { char zeros[128]; uint64_t size_host; uint32_t flags = NBD_FLAG_HAS_FLAGS; uint16_t smallflags = 0; uint64_t magic; memset(zeros, '\0', sizeof(zeros)); assert(((phase & NEG_INIT) && (phase & NEG_MODERN)) || client); if(phase & NEG_MODERN) ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,333
int open_modern(const gchar *const addr, const gchar *const port, GError **const gerror) { struct addrinfo hints; struct addrinfo* ai = NULL; struct addrinfo* ai_bak; struct sock_flags; int e; int retval = -1; int i=0; int sock = -1; memset(&hints, '\0', sizeof(hints)); hints.ai_flags ...
DoS
0
int open_modern(const gchar *const addr, const gchar *const port, GError **const gerror) { struct addrinfo hints; struct addrinfo* ai = NULL; struct addrinfo* ai_bak; struct sock_flags; int e; int retval = -1; int i=0; int sock = -1; memset(&hints, '\0', sizeof(hints)); hints.ai_flags ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,334
GArray* parse_cfile(gchar* f, struct generic_conf *const genconf, GError** e) { const char* DEFAULT_ERROR = "Could not parse %s in group %s: %s"; const char* MISSING_REQUIRED_ERROR = "Could not find required value %s in group %s: %s"; gchar* cfdir = NULL; SERVER s; gchar *virtstyle=NULL; PARAM lp[] = { { "expor...
DoS
0
GArray* parse_cfile(gchar* f, struct generic_conf *const genconf, GError** e) { const char* DEFAULT_ERROR = "Could not parse %s in group %s: %s"; const char* MISSING_REQUIRED_ERROR = "Could not find required value %s in group %s: %s"; gchar* cfdir = NULL; SERVER s; gchar *virtstyle=NULL; PARAM lp[] = { { "expor...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,335
ssize_t rawexpread(off_t a, char *buf, size_t len, CLIENT *client) { int fhandle; off_t foffset; size_t maxbytes; if(get_filepos(client->export, a, &fhandle, &foffset, &maxbytes)) return -1; if(maxbytes && len > maxbytes) len = maxbytes; DEBUG("(READ from fd %d offset %llu len %u), ", fhandle, (long long un...
DoS
0
ssize_t rawexpread(off_t a, char *buf, size_t len, CLIENT *client) { int fhandle; off_t foffset; size_t maxbytes; if(get_filepos(client->export, a, &fhandle, &foffset, &maxbytes)) return -1; if(maxbytes && len > maxbytes) len = maxbytes; DEBUG("(READ from fd %d offset %llu len %u), ", fhandle, (long long un...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,336
ssize_t rawexpwrite(off_t a, char *buf, size_t len, CLIENT *client, int fua) { int fhandle; off_t foffset; size_t maxbytes; ssize_t retval; if(get_filepos(client->export, a, &fhandle, &foffset, &maxbytes)) return -1; if(maxbytes && len > maxbytes) len = maxbytes; DEBUG("(WRITE to fd %d offset %llu len %u f...
DoS
0
ssize_t rawexpwrite(off_t a, char *buf, size_t len, CLIENT *client, int fua) { int fhandle; off_t foffset; size_t maxbytes; ssize_t retval; if(get_filepos(client->export, a, &fhandle, &foffset, &maxbytes)) return -1; if(maxbytes && len > maxbytes) len = maxbytes; DEBUG("(WRITE to fd %d offset %llu len %u f...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,337
static inline void readit(int f, void *buf, size_t len) { ssize_t res; while (len > 0) { DEBUG("*"); if ((res = read(f, buf, len)) <= 0) { if(errno != EAGAIN) { err("Read failed: %m"); } } else { len -= res; buf += res; } } }
DoS
0
static inline void readit(int f, void *buf, size_t len) { ssize_t res; while (len > 0) { DEBUG("*"); if ((res = read(f, buf, len)) <= 0) { if(errno != EAGAIN) { err("Read failed: %m"); } } else { len -= res; buf += res; } } }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,338
static void send_reply(uint32_t opt, int net, uint32_t reply_type, size_t datasize, void* data) { uint64_t magic = htonll(0x3e889045565a9LL); reply_type = htonl(reply_type); uint32_t datsize = htonl(datasize); struct iovec v_data[] = { { &magic, sizeof(magic) }, { &opt, sizeof(opt) }, { &reply_type, sizeof(re...
DoS
0
static void send_reply(uint32_t opt, int net, uint32_t reply_type, size_t datasize, void* data) { uint64_t magic = htonll(0x3e889045565a9LL); reply_type = htonl(reply_type); uint32_t datsize = htonl(datasize); struct iovec v_data[] = { { &magic, sizeof(magic) }, { &opt, sizeof(opt) }, { &reply_type, sizeof(re...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,339
void serveconnection(CLIENT *client) { if (client->server->transactionlog && (client->transactionlogfd == -1)) { if (-1 == (client->transactionlogfd = open(client->server->transactionlog, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR))) g_warning("Could not open transaction log %s", client->ser...
DoS
0
void serveconnection(CLIENT *client) { if (client->server->transactionlog && (client->transactionlogfd == -1)) { if (-1 == (client->transactionlogfd = open(client->server->transactionlog, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR))) g_warning("Could not open transaction log %s", client->ser...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,340
int set_peername(int net, CLIENT *client) { struct sockaddr_storage addrin; struct sockaddr_storage netaddr; struct sockaddr_in *netaddr4 = NULL; struct sockaddr_in6 *netaddr6 = NULL; socklen_t addrinlen = sizeof( addrin ); struct addrinfo hints; struct addrinfo *ai = NULL; char peername[NI_MAXHOST]; char net...
DoS
0
int set_peername(int net, CLIENT *client) { struct sockaddr_storage addrin; struct sockaddr_storage netaddr; struct sockaddr_in *netaddr4 = NULL; struct sockaddr_in6 *netaddr6 = NULL; socklen_t addrinlen = sizeof( addrin ); struct addrinfo hints; struct addrinfo *ai = NULL; char peername[NI_MAXHOST]; char net...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,341
int setup_serve(SERVER *const serve, GError **const gerror) { struct addrinfo hints; struct addrinfo *ai = NULL; gchar *port = NULL; int e; int retval = -1; /* Without this, it's possible that socket == 0, even if it's * not initialized at all. And that would be wrong because 0 is ...
DoS
0
int setup_serve(SERVER *const serve, GError **const gerror) { struct addrinfo hints; struct addrinfo *ai = NULL; gchar *port = NULL; int e; int retval = -1; /* Without this, it's possible that socket == 0, even if it's * not initialized at all. And that would be wrong because 0 is ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,342
void setup_servers(GArray *const servers, const gchar *const modernaddr, const gchar *const modernport) { int i; struct sigaction sa; int want_modern=0; for(i=0;i<servers->len;i++) { GError *gerror = NULL; SERVER *server = &g_array_index(servers, SERVER, i); ...
DoS
0
void setup_servers(GArray *const servers, const gchar *const modernaddr, const gchar *const modernport) { int i; struct sigaction sa; int want_modern=0; for(i=0;i<servers->len;i++) { GError *gerror = NULL; SERVER *server = &g_array_index(servers, SERVER, i); ...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,343
static void sighup_handler(const int s G_GNUC_UNUSED) { is_sighup_caught = 1; }
DoS
0
static void sighup_handler(const int s G_GNUC_UNUSED) { is_sighup_caught = 1; }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,344
void sigterm_handler(int s) { g_hash_table_foreach(children, killchild, NULL); unlink(pidfname); exit(EXIT_SUCCESS); }
DoS
0
void sigterm_handler(int s) { g_hash_table_foreach(children, killchild, NULL); unlink(pidfname); exit(EXIT_SUCCESS); }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,345
off_t size_autodetect(int fhandle) { off_t es; u64 bytes __attribute__((unused)); struct stat stat_buf; int error; #ifdef HAVE_SYS_MOUNT_H #ifdef HAVE_SYS_IOCTL_H #ifdef BLKGETSIZE64 DEBUG("looking for export size with ioctl BLKGETSIZE64\n"); if (!ioctl(fhandle, BLKGETSIZE64, &bytes) && bytes) { return (off_t)...
DoS
0
off_t size_autodetect(int fhandle) { off_t es; u64 bytes __attribute__((unused)); struct stat stat_buf; int error; #ifdef HAVE_SYS_MOUNT_H #ifdef HAVE_SYS_IOCTL_H #ifdef BLKGETSIZE64 DEBUG("looking for export size with ioctl BLKGETSIZE64\n"); if (!ioctl(fhandle, BLKGETSIZE64, &bytes) && bytes) { return (off_t)...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,346
void usage() { printf("This is nbd-server version " VERSION "\n"); printf("Usage: [ip:|ip6@]port file_to_export [size][kKmM] [-l authorize_file] [-r] [-m] [-c] [-C configuration file] [-p PID file name] [-o section name] [-M max connections]\n" "\t-r|--read-only\t\tread only\n" "\t-m|--multi-file\t\tm...
DoS
0
void usage() { printf("This is nbd-server version " VERSION "\n"); printf("Usage: [ip:|ip6@]port file_to_export [size][kKmM] [-l authorize_file] [-r] [-m] [-c] [-C configuration file] [-p PID file name] [-o section name] [-M max connections]\n" "\t-r|--read-only\t\tread only\n" "\t-m|--multi-file\t\tm...
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,347
static inline void writeit(int f, void *buf, size_t len) { ssize_t res; while (len > 0) { DEBUG("+"); if ((res = write(f, buf, len)) <= 0) err("Send failed: %m"); len -= res; buf += res; } }
DoS
0
static inline void writeit(int f, void *buf, size_t len) { ssize_t res; while (len > 0) { DEBUG("+"); if ((res = write(f, buf, len)) <= 0) err("Send failed: %m"); len -= res; buf += res; } }
@@ -2198,6 +2198,161 @@ void destroy_pid_t(gpointer data) { g_free(data); } +static pid_t +spawn_child() +{ + pid_t pid; + sigset_t newset; + sigset_t oldset; + + sigemptyset(&newset); + sigaddset(&newset, SIGCHLD); + sigaddset(&newset, SIGTERM); + sigprocmask(SIG_B...
CWE-399
null
null
37,348
static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct AES_CTX *ctx = crypto_tfm_ctx(tfm); AES_decrypt(src, dst, &ctx->dec_key); }
null
0
static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct AES_CTX *ctx = crypto_tfm_ctx(tfm); AES_decrypt(src, dst, &ctx->dec_key); }
@@ -93,6 +93,6 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm (ASM)"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("aes"); -MODULE_ALIAS("aes-asm"); +MODULE_ALIAS_CRYPTO("aes"); +MODULE_ALIAS_CRYPTO("aes-asm"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,349
static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct AES_CTX *ctx = crypto_tfm_ctx(tfm); AES_encrypt(src, dst, &ctx->enc_key); }
null
0
static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct AES_CTX *ctx = crypto_tfm_ctx(tfm); AES_encrypt(src, dst, &ctx->enc_key); }
@@ -93,6 +93,6 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm (ASM)"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("aes"); -MODULE_ALIAS("aes-asm"); +MODULE_ALIAS_CRYPTO("aes"); +MODULE_ALIAS_CRYPTO("aes-asm"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,350
static void __exit aes_fini(void) { crypto_unregister_alg(&aes_alg); }
null
0
static void __exit aes_fini(void) { crypto_unregister_alg(&aes_alg); }
@@ -93,6 +93,6 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm (ASM)"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("aes"); -MODULE_ALIAS("aes-asm"); +MODULE_ALIAS_CRYPTO("aes"); +MODULE_ALIAS_CRYPTO("aes-asm"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,351
static int __init aes_init(void) { return crypto_register_alg(&aes_alg); }
null
0
static int __init aes_init(void) { return crypto_register_alg(&aes_alg); }
@@ -93,6 +93,6 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm (ASM)"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("aes"); -MODULE_ALIAS("aes-asm"); +MODULE_ALIAS_CRYPTO("aes"); +MODULE_ALIAS_CRYPTO("aes-asm"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,352
static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct AES_CTX *ctx = crypto_tfm_ctx(tfm); switch (key_len) { case AES_KEYSIZE_128: key_len = 128; break; case AES_KEYSIZE_192: key_len = 192; break; case AES_KEYSIZE_256: key_len = 256; break; default: tfm->...
null
0
static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct AES_CTX *ctx = crypto_tfm_ctx(tfm); switch (key_len) { case AES_KEYSIZE_128: key_len = 128; break; case AES_KEYSIZE_192: key_len = 192; break; case AES_KEYSIZE_256: key_len = 256; break; default: tfm->...
@@ -93,6 +93,6 @@ module_exit(aes_fini); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm (ASM)"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("aes"); -MODULE_ALIAS("aes-asm"); +MODULE_ALIAS_CRYPTO("aes"); +MODULE_ALIAS_CRYPTO("aes-asm"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,353
static int sha1_export(struct shash_desc *desc, void *out) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
null
0
static int sha1_export(struct shash_desc *desc, void *out) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
@@ -171,5 +171,5 @@ module_exit(sha1_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm (ARM)"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,354
static int sha1_final(struct shash_desc *desc, u8 *out) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int i, index, padlen; __be32 *dst = (__be32 *)out; __be64 bits; static const u8 padding[SHA1_BLOCK_SIZE] = { 0x80, }; bits = cpu_to_be64(sctx->count << 3); /* Pad out to 56 mod 64 and append lengt...
null
0
static int sha1_final(struct shash_desc *desc, u8 *out) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int i, index, padlen; __be32 *dst = (__be32 *)out; __be64 bits; static const u8 padding[SHA1_BLOCK_SIZE] = { 0x80, }; bits = cpu_to_be64(sctx->count << 3); /* Pad out to 56 mod 64 and append lengt...
@@ -171,5 +171,5 @@ module_exit(sha1_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm (ARM)"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,355
static void __exit sha1_mod_fini(void) { crypto_unregister_shash(&alg); }
null
0
static void __exit sha1_mod_fini(void) { crypto_unregister_shash(&alg); }
@@ -171,5 +171,5 @@ module_exit(sha1_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm (ARM)"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,356
static int __init sha1_mod_init(void) { return crypto_register_shash(&alg); }
null
0
static int __init sha1_mod_init(void) { return crypto_register_shash(&alg); }
@@ -171,5 +171,5 @@ module_exit(sha1_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm (ARM)"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,357
int sha1_update_arm(struct shash_desc *desc, const u8 *data, unsigned int len) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; int res; /* Handle the fast case right here */ if (partial + len < SHA1_BLOCK_SIZE) { sctx->count += len; memcpy(sctx->bu...
null
0
int sha1_update_arm(struct shash_desc *desc, const u8 *data, unsigned int len) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; int res; /* Handle the fast case right here */ if (partial + len < SHA1_BLOCK_SIZE) { sctx->count += len; memcpy(sctx->bu...
@@ -171,5 +171,5 @@ module_exit(sha1_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm (ARM)"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1"); MODULE_AUTHOR("David McCullough <ucdevel@gmail.com>");
CWE-264
null
null
37,358
static int sha1_neon_export(struct shash_desc *desc, void *out) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
null
0
static int sha1_neon_export(struct shash_desc *desc, void *out) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
@@ -194,4 +194,4 @@ module_exit(sha1_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1");
CWE-264
null
null
37,359
static int sha1_neon_final(struct shash_desc *desc, u8 *out) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int i, index, padlen; __be32 *dst = (__be32 *)out; __be64 bits; static const u8 padding[SHA1_BLOCK_SIZE] = { 0x80, }; bits = cpu_to_be64(sctx->count << 3); /* Pad out to 56 mod 64 and append ...
null
0
static int sha1_neon_final(struct shash_desc *desc, u8 *out) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int i, index, padlen; __be32 *dst = (__be32 *)out; __be64 bits; static const u8 padding[SHA1_BLOCK_SIZE] = { 0x80, }; bits = cpu_to_be64(sctx->count << 3); /* Pad out to 56 mod 64 and append ...
@@ -194,4 +194,4 @@ module_exit(sha1_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1");
CWE-264
null
null
37,360
static int sha1_neon_import(struct shash_desc *desc, const void *in) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(sctx, in, sizeof(*sctx)); return 0; }
null
0
static int sha1_neon_import(struct shash_desc *desc, const void *in) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(sctx, in, sizeof(*sctx)); return 0; }
@@ -194,4 +194,4 @@ module_exit(sha1_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1");
CWE-264
null
null
37,361
static int sha1_neon_init(struct shash_desc *desc) { struct sha1_state *sctx = shash_desc_ctx(desc); *sctx = (struct sha1_state){ .state = { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 }, }; return 0; }
null
0
static int sha1_neon_init(struct shash_desc *desc) { struct sha1_state *sctx = shash_desc_ctx(desc); *sctx = (struct sha1_state){ .state = { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 }, }; return 0; }
@@ -194,4 +194,4 @@ module_exit(sha1_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1");
CWE-264
null
null
37,362
static int __init sha1_neon_mod_init(void) { if (!cpu_has_neon()) return -ENODEV; return crypto_register_shash(&alg); }
null
0
static int __init sha1_neon_mod_init(void) { if (!cpu_has_neon()) return -ENODEV; return crypto_register_shash(&alg); }
@@ -194,4 +194,4 @@ module_exit(sha1_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1");
CWE-264
null
null
37,363
static int sha1_neon_update(struct shash_desc *desc, const u8 *data, unsigned int len) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; int res; /* Handle the fast case right here */ if (partial + len < SHA1_BLOCK_SIZE) { sctx->count += len; memcp...
null
0
static int sha1_neon_update(struct shash_desc *desc, const u8 *data, unsigned int len) { struct sha1_state *sctx = shash_desc_ctx(desc); unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; int res; /* Handle the fast case right here */ if (partial + len < SHA1_BLOCK_SIZE) { sctx->count += len; memcp...
@@ -194,4 +194,4 @@ module_exit(sha1_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha1"); +MODULE_ALIAS_CRYPTO("sha1");
CWE-264
null
null
37,364
static int __sha512_neon_update(struct shash_desc *desc, const u8 *data, unsigned int len, unsigned int partial) { struct sha512_state *sctx = shash_desc_ctx(desc); unsigned int done = 0; sctx->count[0] += len; if (sctx->count[0] < len) sctx->count[1]++; if (partial) { done = SHA512_BLOCK_SIZE - partial;...
null
0
static int __sha512_neon_update(struct shash_desc *desc, const u8 *data, unsigned int len, unsigned int partial) { struct sha512_state *sctx = shash_desc_ctx(desc); unsigned int done = 0; sctx->count[0] += len; if (sctx->count[0] < len) sctx->count[1]++; if (partial) { done = SHA512_BLOCK_SIZE - partial;...
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,365
static int sha384_neon_final(struct shash_desc *desc, u8 *hash) { u8 D[SHA512_DIGEST_SIZE]; sha512_neon_final(desc, D); memcpy(hash, D, SHA384_DIGEST_SIZE); memset(D, 0, SHA512_DIGEST_SIZE); return 0; }
null
0
static int sha384_neon_final(struct shash_desc *desc, u8 *hash) { u8 D[SHA512_DIGEST_SIZE]; sha512_neon_final(desc, D); memcpy(hash, D, SHA384_DIGEST_SIZE); memset(D, 0, SHA512_DIGEST_SIZE); return 0; }
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,366
static int sha384_neon_init(struct shash_desc *desc) { struct sha512_state *sctx = shash_desc_ctx(desc); sctx->state[0] = SHA384_H0; sctx->state[1] = SHA384_H1; sctx->state[2] = SHA384_H2; sctx->state[3] = SHA384_H3; sctx->state[4] = SHA384_H4; sctx->state[5] = SHA384_H5; sctx->state[6] = SHA384_H6; sctx->sta...
null
0
static int sha384_neon_init(struct shash_desc *desc) { struct sha512_state *sctx = shash_desc_ctx(desc); sctx->state[0] = SHA384_H0; sctx->state[1] = SHA384_H1; sctx->state[2] = SHA384_H2; sctx->state[3] = SHA384_H3; sctx->state[4] = SHA384_H4; sctx->state[5] = SHA384_H5; sctx->state[6] = SHA384_H6; sctx->sta...
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,367
static int sha512_neon_export(struct shash_desc *desc, void *out) { struct sha512_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
null
0
static int sha512_neon_export(struct shash_desc *desc, void *out) { struct sha512_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,368
static int sha512_neon_final(struct shash_desc *desc, u8 *out) { struct sha512_state *sctx = shash_desc_ctx(desc); unsigned int i, index, padlen; __be64 *dst = (__be64 *)out; __be64 bits[2]; static const u8 padding[SHA512_BLOCK_SIZE] = { 0x80, }; /* save number of bits */ bits[1] = cpu_to_be64(sctx->count[0] <<...
null
0
static int sha512_neon_final(struct shash_desc *desc, u8 *out) { struct sha512_state *sctx = shash_desc_ctx(desc); unsigned int i, index, padlen; __be64 *dst = (__be64 *)out; __be64 bits[2]; static const u8 padding[SHA512_BLOCK_SIZE] = { 0x80, }; /* save number of bits */ bits[1] = cpu_to_be64(sctx->count[0] <<...
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,369
static int sha512_neon_import(struct shash_desc *desc, const void *in) { struct sha512_state *sctx = shash_desc_ctx(desc); memcpy(sctx, in, sizeof(*sctx)); return 0; }
null
0
static int sha512_neon_import(struct shash_desc *desc, const void *in) { struct sha512_state *sctx = shash_desc_ctx(desc); memcpy(sctx, in, sizeof(*sctx)); return 0; }
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,370
static int sha512_neon_init(struct shash_desc *desc) { struct sha512_state *sctx = shash_desc_ctx(desc); sctx->state[0] = SHA512_H0; sctx->state[1] = SHA512_H1; sctx->state[2] = SHA512_H2; sctx->state[3] = SHA512_H3; sctx->state[4] = SHA512_H4; sctx->state[5] = SHA512_H5; sctx->state[6] = SHA512_H6; sctx->sta...
null
0
static int sha512_neon_init(struct shash_desc *desc) { struct sha512_state *sctx = shash_desc_ctx(desc); sctx->state[0] = SHA512_H0; sctx->state[1] = SHA512_H1; sctx->state[2] = SHA512_H2; sctx->state[3] = SHA512_H3; sctx->state[4] = SHA512_H4; sctx->state[5] = SHA512_H5; sctx->state[6] = SHA512_H6; sctx->sta...
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,371
static int __init sha512_neon_mod_init(void) { if (!cpu_has_neon()) return -ENODEV; return crypto_register_shashes(algs, ARRAY_SIZE(algs)); }
null
0
static int __init sha512_neon_mod_init(void) { if (!cpu_has_neon()) return -ENODEV; return crypto_register_shashes(algs, ARRAY_SIZE(algs)); }
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,372
static int sha512_neon_update(struct shash_desc *desc, const u8 *data, unsigned int len) { struct sha512_state *sctx = shash_desc_ctx(desc); unsigned int partial = sctx->count[0] % SHA512_BLOCK_SIZE; int res; /* Handle the fast case right here */ if (partial + len < SHA512_BLOCK_SIZE) { sctx->count[0] +...
null
0
static int sha512_neon_update(struct shash_desc *desc, const u8 *data, unsigned int len) { struct sha512_state *sctx = shash_desc_ctx(desc); unsigned int partial = sctx->count[0] % SHA512_BLOCK_SIZE; int res; /* Handle the fast case right here */ if (partial + len < SHA512_BLOCK_SIZE) { sctx->count[0] +...
@@ -301,5 +301,5 @@ module_exit(sha512_neon_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA512 Secure Hash Algorithm, NEON accelerated"); -MODULE_ALIAS("sha512"); -MODULE_ALIAS("sha384"); +MODULE_ALIAS_CRYPTO("sha512"); +MODULE_ALIAS_CRYPTO("sha384");
CWE-264
null
null
37,373
static void __exit aes_mod_exit(void) { crypto_unregister_alg(&ccm_aes_alg); }
null
0
static void __exit aes_mod_exit(void) { crypto_unregister_alg(&ccm_aes_alg); }
@@ -294,4 +294,4 @@ module_exit(aes_mod_exit); MODULE_DESCRIPTION("Synchronous AES in CCM mode using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ccm(aes)"); +MODULE_ALIAS_CRYPTO("ccm(aes)");
CWE-264
null
null
37,374
static int __init aes_mod_init(void) { if (!(elf_hwcap & HWCAP_AES)) return -ENODEV; return crypto_register_alg(&ccm_aes_alg); }
null
0
static int __init aes_mod_init(void) { if (!(elf_hwcap & HWCAP_AES)) return -ENODEV; return crypto_register_alg(&ccm_aes_alg); }
@@ -294,4 +294,4 @@ module_exit(aes_mod_exit); MODULE_DESCRIPTION("Synchronous AES in CCM mode using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ccm(aes)"); +MODULE_ALIAS_CRYPTO("ccm(aes)");
CWE-264
null
null
37,375
static int ccm_init_mac(struct aead_request *req, u8 maciv[], u32 msglen) { struct crypto_aead *aead = crypto_aead_reqtfm(req); __be32 *n = (__be32 *)&maciv[AES_BLOCK_SIZE - 8]; u32 l = req->iv[0] + 1; /* verify that CCM dimension 'L' is set correctly in the IV */ if (l < 2 || l > 8) return -EINVAL; /* verify...
null
0
static int ccm_init_mac(struct aead_request *req, u8 maciv[], u32 msglen) { struct crypto_aead *aead = crypto_aead_reqtfm(req); __be32 *n = (__be32 *)&maciv[AES_BLOCK_SIZE - 8]; u32 l = req->iv[0] + 1; /* verify that CCM dimension 'L' is set correctly in the IV */ if (l < 2 || l > 8) return -EINVAL; /* verify...
@@ -294,4 +294,4 @@ module_exit(aes_mod_exit); MODULE_DESCRIPTION("Synchronous AES in CCM mode using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ccm(aes)"); +MODULE_ALIAS_CRYPTO("ccm(aes)");
CWE-264
null
null
37,376
static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) { if ((authsize & 1) || authsize < 4) return -EINVAL; return 0; }
null
0
static int ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) { if ((authsize & 1) || authsize < 4) return -EINVAL; return 0; }
@@ -294,4 +294,4 @@ module_exit(aes_mod_exit); MODULE_DESCRIPTION("Synchronous AES in CCM mode using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ccm(aes)"); +MODULE_ALIAS_CRYPTO("ccm(aes)");
CWE-264
null
null
37,377
static int ccm_setkey(struct crypto_aead *tfm, const u8 *in_key, unsigned int key_len) { struct crypto_aes_ctx *ctx = crypto_aead_ctx(tfm); int ret; ret = crypto_aes_expand_key(ctx, in_key, key_len); if (!ret) return 0; tfm->base.crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; return -EINVAL; }
null
0
static int ccm_setkey(struct crypto_aead *tfm, const u8 *in_key, unsigned int key_len) { struct crypto_aes_ctx *ctx = crypto_aead_ctx(tfm); int ret; ret = crypto_aes_expand_key(ctx, in_key, key_len); if (!ret) return 0; tfm->base.crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; return -EINVAL; }
@@ -294,4 +294,4 @@ module_exit(aes_mod_exit); MODULE_DESCRIPTION("Synchronous AES in CCM mode using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ccm(aes)"); +MODULE_ALIAS_CRYPTO("ccm(aes)");
CWE-264
null
null
37,378
static int num_rounds(struct crypto_aes_ctx *ctx) { /* * # of rounds specified by AES: * 128 bit key 10 rounds * 192 bit key 12 rounds * 256 bit key 14 rounds * => n byte key => 6 + (n/4) rounds */ return 6 + ctx->key_length / 4; }
null
0
static int num_rounds(struct crypto_aes_ctx *ctx) { /* * # of rounds specified by AES: * 128 bit key 10 rounds * 192 bit key 12 rounds * 256 bit key 14 rounds * => n byte key => 6 + (n/4) rounds */ return 6 + ctx->key_length / 4; }
@@ -294,4 +294,4 @@ module_exit(aes_mod_exit); MODULE_DESCRIPTION("Synchronous AES in CCM mode using ARMv8 Crypto Extensions"); MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("ccm(aes)"); +MODULE_ALIAS_CRYPTO("ccm(aes)");
CWE-264
null
null
37,379
static void __exit aes_exit(void) { crypto_unregister_algs(aes_algs, ARRAY_SIZE(aes_algs)); }
null
0
static void __exit aes_exit(void) { crypto_unregister_algs(aes_algs, ARRAY_SIZE(aes_algs)); }
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,380
static int __init aes_init(void) { return crypto_register_algs(aes_algs, ARRAY_SIZE(aes_algs)); }
null
0
static int __init aes_init(void) { return crypto_register_algs(aes_algs, ARRAY_SIZE(aes_algs)); }
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,381
static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flags &= ~CRY...
null
0
static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flags &= ~CRY...
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,382
static int cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flags &= ~CRY...
null
0
static int cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flags &= ~CRY...
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,383
static int ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flags &= ~CRY...
null
0
static int ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flags &= ~CRY...
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,384
static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key1.key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flag...
null
0
static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key1.key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flag...
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,385
static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key1.key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flag...
null
0
static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct crypto_aes_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); int err, first, rounds = 6 + ctx->key1.key_length / 4; struct blkcipher_walk walk; unsigned int blocks; desc->flag...
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,386
static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm); int ret; ret = crypto_aes_expand_key(&ctx->key1, in_key, key_len / 2); if (!ret) ret = crypto_aes_expand_key(&ctx->key2, &in_key[key_len / 2], key_len /...
null
0
static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm); int ret; ret = crypto_aes_expand_key(&ctx->key1, in_key, key_len / 2); if (!ret) ret = crypto_aes_expand_key(&ctx->key2, &in_key[key_len / 2], key_len /...
@@ -38,10 +38,10 @@ MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 Crypto Extensions"); #define aes_xts_encrypt neon_aes_xts_encrypt #define aes_xts_decrypt neon_aes_xts_decrypt MODULE_DESCRIPTION("AES-ECB/CBC/CTR/XTS using ARMv8 NEON"); -MODULE_ALIAS("ecb(aes)"); -MODULE_ALIAS("cbc(aes)"); -MODULE_ALIAS("ctr...
CWE-264
null
null
37,387
static int sha1_export(struct shash_desc *desc, void *out) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
null
0
static int sha1_export(struct shash_desc *desc, void *out) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(out, sctx, sizeof(*sctx)); return 0; }
@@ -154,4 +154,4 @@ module_exit(sha1_powerpc_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm"); -MODULE_ALIAS("sha1-powerpc"); +MODULE_ALIAS_CRYPTO("sha1-powerpc");
CWE-264
null
null
37,388
static int sha1_final(struct shash_desc *desc, u8 *out) { struct sha1_state *sctx = shash_desc_ctx(desc); __be32 *dst = (__be32 *)out; u32 i, index, padlen; __be64 bits; static const u8 padding[64] = { 0x80, }; bits = cpu_to_be64(sctx->count << 3); /* Pad out to 56 mod 64 */ index = sctx->count & 0x3f; padle...
null
0
static int sha1_final(struct shash_desc *desc, u8 *out) { struct sha1_state *sctx = shash_desc_ctx(desc); __be32 *dst = (__be32 *)out; u32 i, index, padlen; __be64 bits; static const u8 padding[64] = { 0x80, }; bits = cpu_to_be64(sctx->count << 3); /* Pad out to 56 mod 64 */ index = sctx->count & 0x3f; padle...
@@ -154,4 +154,4 @@ module_exit(sha1_powerpc_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm"); -MODULE_ALIAS("sha1-powerpc"); +MODULE_ALIAS_CRYPTO("sha1-powerpc");
CWE-264
null
null
37,389
static int sha1_import(struct shash_desc *desc, const void *in) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(sctx, in, sizeof(*sctx)); return 0; }
null
0
static int sha1_import(struct shash_desc *desc, const void *in) { struct sha1_state *sctx = shash_desc_ctx(desc); memcpy(sctx, in, sizeof(*sctx)); return 0; }
@@ -154,4 +154,4 @@ module_exit(sha1_powerpc_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm"); -MODULE_ALIAS("sha1-powerpc"); +MODULE_ALIAS_CRYPTO("sha1-powerpc");
CWE-264
null
null
37,390
static void __exit sha1_powerpc_mod_fini(void) { crypto_unregister_shash(&alg); }
null
0
static void __exit sha1_powerpc_mod_fini(void) { crypto_unregister_shash(&alg); }
@@ -154,4 +154,4 @@ module_exit(sha1_powerpc_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm"); -MODULE_ALIAS("sha1-powerpc"); +MODULE_ALIAS_CRYPTO("sha1-powerpc");
CWE-264
null
null
37,391
static int __init sha1_powerpc_mod_init(void) { return crypto_register_shash(&alg); }
null
0
static int __init sha1_powerpc_mod_init(void) { return crypto_register_shash(&alg); }
@@ -154,4 +154,4 @@ module_exit(sha1_powerpc_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm"); -MODULE_ALIAS("sha1-powerpc"); +MODULE_ALIAS_CRYPTO("sha1-powerpc");
CWE-264
null
null
37,392
static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); if (unlikely(need_fallback(sctx->key_len))) { crypto_cipher_decrypt_one(sctx->fallback.cip, out, in); return; } switch (sctx->key_len) { case 16: crypt_s390_km(KM_AES_128_DECRYPT,...
null
0
static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); if (unlikely(need_fallback(sctx->key_len))) { crypto_cipher_decrypt_one(sctx->fallback.cip, out, in); return; } switch (sctx->key_len) { case 16: crypt_s390_km(KM_AES_128_DECRYPT,...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,393
static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); if (unlikely(need_fallback(sctx->key_len))) { crypto_cipher_encrypt_one(sctx->fallback.cip, out, in); return; } switch (sctx->key_len) { case 16: crypt_s390_km(KM_AES_128_ENCRYPT,...
null
0
static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) { const struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); if (unlikely(need_fallback(sctx->key_len))) { crypto_cipher_encrypt_one(sctx->fallback.cip, out, in); return; } switch (sctx->key_len) { case 16: crypt_s390_km(KM_AES_128_ENCRYPT,...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,394
static int __init aes_s390_init(void) { int ret; if (crypt_s390_func_available(KM_AES_128_ENCRYPT, CRYPT_S390_MSA)) keylen_flag |= AES_KEYLEN_128; if (crypt_s390_func_available(KM_AES_192_ENCRYPT, CRYPT_S390_MSA)) keylen_flag |= AES_KEYLEN_192; if (crypt_s390_func_available(KM_AES_256_ENCRYPT, CRYPT_S390_MSA))...
null
0
static int __init aes_s390_init(void) { int ret; if (crypt_s390_func_available(KM_AES_128_ENCRYPT, CRYPT_S390_MSA)) keylen_flag |= AES_KEYLEN_128; if (crypt_s390_func_available(KM_AES_192_ENCRYPT, CRYPT_S390_MSA)) keylen_flag |= AES_KEYLEN_192; if (crypt_s390_func_available(KM_AES_256_ENCRYPT, CRYPT_S390_MSA))...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,395
static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, struct blkcipher_walk *walk) { struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); int ret = blkcipher_walk_virt(desc, walk); unsigned int nbytes = walk->nbytes; struct { u8 iv[AES_BLOCK_SIZE]; u8 key[AES_MAX_KEY_SIZE]; } param; if...
null
0
static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, struct blkcipher_walk *walk) { struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); int ret = blkcipher_walk_virt(desc, walk); unsigned int nbytes = walk->nbytes; struct { u8 iv[AES_BLOCK_SIZE]; u8 key[AES_MAX_KEY_SIZE]; } param; if...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,396
static int cbc_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); struct blkcipher_walk walk; if (unlikely(need_fallback(sctx->key_len))) return fallback_blk_dec(desc, dst, src, ...
null
0
static int cbc_aes_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); struct blkcipher_walk walk; if (unlikely(need_fallback(sctx->key_len))) return fallback_blk_dec(desc, dst, src, ...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,397
static int cbc_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); struct blkcipher_walk walk; if (unlikely(need_fallback(sctx->key_len))) return fallback_blk_enc(desc, dst, src, ...
null
0
static int cbc_aes_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, struct scatterlist *src, unsigned int nbytes) { struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); struct blkcipher_walk walk; if (unlikely(need_fallback(sctx->key_len))) return fallback_blk_enc(desc, dst, src, ...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,398
static int cbc_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); int ret; ret = need_fallback(key_len); if (ret > 0) { sctx->key_len = key_len; return setkey_fallback_blk(tfm, in_key, key_len); } switch (key_len) { case 16: ...
null
0
static int cbc_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, unsigned int key_len) { struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); int ret; ret = need_fallback(key_len); if (ret > 0) { sctx->key_len = key_len; return setkey_fallback_blk(tfm, in_key, key_len); } switch (key_len) { case 16: ...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null
37,399
static int ctr_aes_crypt(struct blkcipher_desc *desc, long func, struct s390_aes_ctx *sctx, struct blkcipher_walk *walk) { int ret = blkcipher_walk_virt_block(desc, walk, AES_BLOCK_SIZE); unsigned int n, nbytes; u8 buf[AES_BLOCK_SIZE], ctrbuf[AES_BLOCK_SIZE]; u8 *out, *in, *ctrptr = ctrbuf; if (!walk->nbytes)...
null
0
static int ctr_aes_crypt(struct blkcipher_desc *desc, long func, struct s390_aes_ctx *sctx, struct blkcipher_walk *walk) { int ret = blkcipher_walk_virt_block(desc, walk, AES_BLOCK_SIZE); unsigned int n, nbytes; u8 buf[AES_BLOCK_SIZE], ctrbuf[AES_BLOCK_SIZE]; u8 *out, *in, *ctrptr = ctrbuf; if (!walk->nbytes)...
@@ -979,7 +979,7 @@ static void __exit aes_s390_fini(void) module_init(aes_s390_init); module_exit(aes_s390_fini); -MODULE_ALIAS("aes-all"); +MODULE_ALIAS_CRYPTO("aes-all"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_LICENSE("GPL");
CWE-264
null
null