cve_id
stringlengths
13
16
repo
stringclasses
12 values
repo_url
stringclasses
10 values
file_path
stringlengths
7
62
function_name
stringlengths
4
52
pa
stringlengths
50
341k
pb
stringlengths
33
341k
px
stringlengths
50
338k
py
stringlengths
33
338k
pa_sliced
stringlengths
31
44.3k
pb_sliced
stringlengths
31
44.6k
px_sliced
stringlengths
51
45.8k
py_sliced
stringlengths
33
46.9k
patch_sliced
stringlengths
0
46.8k
CVE-2021-3759
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
ipc/sem.c
find_alloc_undo
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { struct sem_array *sma; struct sem_undo_list *ulp; struct sem_undo *un, *new; int nsems, error; error = get_undo_list(&ulp); if (error) { return ERR_PTR(error); } rcu_read_lock(); spin_lock(&ulp->lo...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { struct sem_array *sma; struct sem_undo_list *ulp; struct sem_undo *un, *new; int nsems, error; error = get_undo_list(&ulp); if (error) { return ERR_PTR(error); } rcu_read_lock(); spin_lock(&ulp->lo...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { struct sem_array *sma; struct sem_undo_list *ulp; struct sem_undo *un, *new; int nsems, error; error = get_undo_list(&ulp); if (error) { return ERR_PTR(error); } rcu_read_lock(); spin_lock(&ulp->lo...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { struct sem_array *sma; struct sem_undo_list *ulp; struct sem_undo *un, *new; int nsems, error; error = get_undo_list(&ulp); if (error) { return ERR_PTR(error); } rcu_read_lock(); spin_lock(&ulp->lo...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { un = lookup_undo(ulp, semid); sma = sem_obtain_object_check(ns, semid); if (IS_ERR(sma)) { return ERR_CAST(sma); } nsems = sma->sem_nsems; rcu_read_unlock(); new = kzalloc(sizeof(struct sem_undo) + sizeof(...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { un = lookup_undo(ulp, semid); sma = sem_obtain_object_check(ns, semid); if (IS_ERR(sma)) { return ERR_CAST(sma); } nsems = sma->sem_nsems; rcu_read_unlock(); new = kzalloc(sizeof(struct sem_undo) + sizeof(...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ un = lookup_undo(ulp, semid); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sma = sem_obtain_object_check(ns, semid); if (IS_ERR(sma)) { /* PLACEHOLDER: DO NOT DELETE THIS...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ un = lookup_undo(ulp, semid); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sma = sem_obtain_object_check(ns, semid); if (IS_ERR(sma)) { /* PLACEHOLDER: DO NOT DELETE THIS...
static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) { un = lookup_undo(ulp, semid); sma = sem_obtain_object_check(ns, semid); if (IS_ERR(sma)) { return ERR_CAST(sma); } nsems = sma->sem_nsems; rcu_read_unlock(); - new = kzalloc(sizeof(struct sem_undo) ...
CVE-2021-3759
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
ipc/sem.c
get_undo_list
static inline int get_undo_list(struct sem_undo_list **undo_listp) { struct sem_undo_list *undo_list; undo_list = current->sysvsem.undo_list; if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL); if (undo_list == NULL) { return -ENOMEM; } spin_loc...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { struct sem_undo_list *undo_list; undo_list = current->sysvsem.undo_list; if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL_ACCOUNT); if (undo_list == NULL) { return -ENOMEM; } ...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { struct sem_undo_list *undo_list; undo_list = current->sysvsem.undo_list; if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL); if (undo_list == NULL) { return -ENOMEM; } spin_loc...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { struct sem_undo_list *undo_list; undo_list = current->sysvsem.undo_list; if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL_ACCOUNT); if (undo_list == NULL) { return -ENOMEM; } ...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL); if (undo_list == NULL) { return -ENOMEM; } spin_lock_init(&undo_list->lock); refcount_set(&undo_list->refcnt, 1); IT...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL_ACCOUNT); if (undo_list == NULL) { return -ENOMEM; } spin_lock_init(&undo_list->lock); refcount_set(&undo_list->refcnt, 1); ...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL); if (undo_list == NULL) { return -ENOMEM; } spin_lock_init(&undo_list->lock); ...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!undo_list) { undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL_ACCOUNT); if (undo_list == NULL) { return -ENOMEM; } spin_lock_init(&undo_list->lock...
static inline int get_undo_list(struct sem_undo_list **undo_listp) { if (!undo_list) { - undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL); + undo_list = kzalloc(sizeof(*undo_list), GFP_KERNEL_ACCOUNT); if (undo_list == NULL) { return -ENOMEM; } spin_lock_in...
CVE-2021-3759
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
ipc/sem.c
sem_alloc
static struct sem_array *sem_alloc(size_t nsems) { struct sem_array *sma; if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); if (unlikely(!sma)) { return NULL; } return sma; }
static struct sem_array *sem_alloc(size_t nsems) { struct sem_array *sma; if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); if (unlikely(!sma)) { return NULL; } return sma; }
static struct sem_array *sem_alloc(size_t nsems) { struct sem_array *sma; if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); if (unlikely(!sma)) { return NULL; } return sma; }
static struct sem_array *sem_alloc(size_t nsems) { struct sem_array *sma; if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); if (unlikely(!sma)) { return NULL; } return sma; }
static struct sem_array *sem_alloc(size_t nsems) { if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); if (unlikely(!sma)) { return NULL; } return sma; }
static struct sem_array *sem_alloc(size_t nsems) { if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); if (unlikely(!sma)) { return NULL; } return sma; }
static struct sem_array *sem_alloc(size_t nsems) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); if (unlikely(!sma)) { return NULL; } return ...
static struct sem_array *sem_alloc(size_t nsems) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); if (unlikely(!sma)) { return NULL; } ...
static struct sem_array *sem_alloc(size_t nsems) { if (nsems > (T_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) { return NULL; } - sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); + sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); if (unlikely(!sma)) { r...
CVE-2021-3759
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
ipc/shm.c
newseg
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { key_t key = params->key; int shmflg = params->flg; size_t size = params->u.size; int error; struct shmid_kernel *shp; size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; struct file *file; char name[13]; vm_...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { key_t key = params->key; int shmflg = params->flg; size_t size = params->u.size; int error; struct shmid_kernel *shp; size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; struct file *file; char name[13]; vm_...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { key_t key = params->key; int shmflg = params->flg; size_t size = params->u.size; int error; struct shmid_kernel *shp; size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; struct file *file; char name[13]; vm_...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { key_t key = params->key; int shmflg = params->flg; size_t size = params->u.size; int error; struct shmid_kernel *shp; size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; struct file *file; char name[13]; vm_...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { if (ns->shm_tot + numpages < ns->shm_tot || ns->shm_tot + numpages > ns->shm_ctlall) { return -ENOSPC; } shp = kvmalloc(sizeof(*shp), GFP_KERNEL); if (unlikely(!shp)) { return -ENOMEM; } error = security_shm...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { if (ns->shm_tot + numpages < ns->shm_tot || ns->shm_tot + numpages > ns->shm_ctlall) { return -ENOSPC; } shp = kvmalloc(sizeof(*shp), GFP_KERNEL_ACCOUNT); if (unlikely(!shp)) { return -ENOMEM; } error = secu...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (ns->shm_tot + numpages < ns->shm_tot || ns->shm_tot + numpages > ns->shm_ctlall) { return -ENOSPC; } shp = kvmalloc(sizeof(*shp), GFP_KERNEL); if (unlikely(!shp)) { ...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (ns->shm_tot + numpages < ns->shm_tot || ns->shm_tot + numpages > ns->shm_ctlall) { return -ENOSPC; } shp = kvmalloc(sizeof(*shp), GFP_KERNEL_ACCOUNT); if (unlikely(!shp)...
static int newseg(struct ipc_namespace *ns, struct ipc_params *params) { if (ns->shm_tot + numpages < ns->shm_tot || ns->shm_tot + numpages > ns->shm_ctlall) { return -ENOSPC; } - shp = kvmalloc(sizeof(*shp), GFP_KERNEL); + shp = kvmalloc(sizeof(*shp), GFP_KERNEL_ACCOUNT); if (unlikely(!s...
CVE-2021-3760
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/nfc/nci/rsp.c
nci_core_conn_close_rsp_packet
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { struct nci_conn_info *conn_info; __u8 status = skb->data[0]; pr_debug("status 0x%x\n", status); if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_id); if (conn_in...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { struct nci_conn_info *conn_info; __u8 status = skb->data[0]; pr_debug("status 0x%x\n", status); if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_id); if (conn_in...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { struct nci_conn_info *conn_info; __u8 status = skb->data[0]; pr_debug("status 0x%x\n", status); if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_conn_id); if (co...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { struct nci_conn_info *conn_info; __u8 status = skb->data[0]; pr_debug("status 0x%x\n", status); if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_conn_id); if (co...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_id); if (conn_info) { list_del(&conn_info->list); devm_kfree(&ndev->nfc_dev->dev, conn_info); ...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_id); if (conn_info) { list_del(&conn_info->list); if (conn_info == ndev->rf_conn_info) { ...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_conn_id); if (conn_info) { list_del(&conn_info->list); ...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_conn_id); if (conn_info) { list_del(&conn_info->list); ...
static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb) { if (status == NCI_STATUS_OK) { conn_info = nci_get_conn_info_by_conn_id(ndev, ndev->cur_id); if (conn_info) { list_del(&conn_info->list); + if (conn_info == ndev->rf_conn_info) { + ...
CVE-2021-3772
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sctp/sm_statefuns.c
sctp_ootb_pkt_new
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { struct sctp_transport *transport; struct sctp_packet *packet; __u16 sport, dport; __u32 vtag; sport = ntohs(chunk->sctp_hdr->dest); dport = ntohs(chunk->sctp_hdr-...
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { struct sctp_transport *transport; struct sctp_packet *packet; __u16 sport, dport; __u32 vtag; sport = ntohs(chunk->sctp_hdr->dest); dport = ntohs(chunk->sctp_hdr-...
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { struct sctp_transport *transport; struct sctp_packet *packet; __u16 sport, dport; __u32 vtag; sport = ntohs(chunk->sctp_hdr->dest); dport = ntohs(chunk->sctp_hdr-...
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { struct sctp_transport *transport; struct sctp_packet *packet; __u16 sport, dport; __u32 vtag; sport = ntohs(chunk->sctp_hdr->dest); dport = ntohs(chunk->sctp_hdr-...
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { if (asoc) { switch (chunk->chunk_hdr->type) { } } else { } }
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { if (asoc) { switch (chunk->chunk_hdr->type) { case SCTP_CID_IT: } } else { } }
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (asoc) { switch (chunk->chunk_hdr->type) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } } else { /...
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (asoc) { switch (chunk->chunk_hdr->type) { case SCTP_CID_IT: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
static struct sctp_packet *sctp_ootb_pkt_new( struct net *net, const struct sctp_association *asoc, const struct sctp_chunk *chunk) { if (asoc) { switch (chunk->chunk_hdr->type) { + case SCTP_CID_IT: } } else { } }
CVE-2021-38160
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/char/virtio_console.c
control_work_handler
static void control_work_handler(struct work_struct *work) { struct ports_device *portdev; struct virtqueue *vq; struct port_buffer *buf; unsigned int len; portdev = container_of(work, struct ports_device, control_work); vq = portdev->c_ivq; spin_lock(&portdev->c_ivq_lock); while ((buf =...
static void control_work_handler(struct work_struct *work) { struct ports_device *portdev; struct virtqueue *vq; struct port_buffer *buf; unsigned int len; portdev = container_of(work, struct ports_device, control_work); vq = portdev->c_ivq; spin_lock(&portdev->c_ivq_lock); while ((buf =...
static void control_work_handler(struct work_struct *work) { struct ports_device *portdev; struct virtqueue *vq; struct port_buffer *buf; unsigned int len; portdev = container_of(work, struct ports_device, control_work); vq = portdev->c_ivq; spin_lock(&portdev->c_ivq_lock); while ((buf =...
static void control_work_handler(struct work_struct *work) { struct ports_device *portdev; struct virtqueue *vq; struct port_buffer *buf; unsigned int len; portdev = container_of(work, struct ports_device, control_work); vq = portdev->c_ivq; spin_lock(&portdev->c_ivq_lock); while ((buf =...
static void control_work_handler(struct work_struct *work) { vq = portdev->c_ivq; while ((buf = virtqueue_get_buf(vq, &len))) { spin_unlock(&portdev->c_ivq_lock); buf->len = len; buf->offset = 0; handle_control_message(vq->vdev, portdev, buf); spin_lock(&portdev->c_ivq_lo...
static void control_work_handler(struct work_struct *work) { vq = portdev->c_ivq; while ((buf = virtqueue_get_buf(vq, &len))) { spin_unlock(&portdev->c_ivq_lock); buf->len = min_t(size_t, len, buf->size); buf->offset = 0; handle_control_message(vq->vdev, portdev, buf); sp...
static void control_work_handler(struct work_struct *work) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vq = portdev->c_ivq; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ while ((buf = virtqueue_get_buf(vq, &len))) { spin_unlock(&portdev->c_ivq_lock); buf->len = len; buf->offs...
static void control_work_handler(struct work_struct *work) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vq = portdev->c_ivq; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ while ((buf = virtqueue_get_buf(vq, &len))) { spin_unlock(&portdev->c_ivq_lock); buf->len = min_t(size_t, len, buf...
static void control_work_handler(struct work_struct *work) { vq = portdev->c_ivq; while ((buf = virtqueue_get_buf(vq, &len))) { spin_unlock(&portdev->c_ivq_lock); - buf->len = len; + buf->len = min_t(size_t, len, buf->size); buf->offset = 0; handle_control_message(vq-...
CVE-2021-38160
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/char/virtio_console.c
get_inbuf
static struct port_buffer *get_inbuf(struct port *port) { struct port_buffer *buf; unsigned int len; if (port->inbuf) { return port->inbuf; } buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = len; buf->offset = 0; port->stats.bytes_received += len;...
static struct port_buffer *get_inbuf(struct port *port) { struct port_buffer *buf; unsigned int len; if (port->inbuf) { return port->inbuf; } buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = min_t(size_t, len, buf->size); buf->offset = 0; port->st...
static struct port_buffer *get_inbuf(struct port *port) { struct port_buffer *buf; unsigned int len; if (port->inbuf) { return port->inbuf; } buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = len; buf->offset = 0; port->stats.bytes_received += len;...
static struct port_buffer *get_inbuf(struct port *port) { struct port_buffer *buf; unsigned int len; if (port->inbuf) { return port->inbuf; } buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = min_t(size_t, len, buf->size); buf->offset = 0; port->st...
static struct port_buffer *get_inbuf(struct port *port) { buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = len; buf->offset = 0; port->stats.bytes_received += len; } return buf; }
static struct port_buffer *get_inbuf(struct port *port) { buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = min_t(size_t, len, buf->size); buf->offset = 0; port->stats.bytes_received += len; } return buf; }
static struct port_buffer *get_inbuf(struct port *port) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = len; buf->offset = 0; port->stats.bytes_received += len; } return buf; }
static struct port_buffer *get_inbuf(struct port *port) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { buf->len = min_t(size_t, len, buf->size); buf->offset = 0; port->stats.bytes_received += len; } return buf; }
static struct port_buffer *get_inbuf(struct port *port) { buf = virtqueue_get_buf(port->in_vq, &len); if (buf) { - buf->len = len; + buf->len = min_t(size_t, len, buf->size); buf->offset = 0; port->stats.bytes_received += len; } return buf; }
CVE-2021-38166
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/hashtab.c
__htab_map_lookup_and_delete_batch
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); u32 bucket_cnt, total, key_size, value_size, roundup_key_size; void *keys ...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); u32 bucket_cnt, total, key_size, value_size, roundup_key_size; void *keys ...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); u32 bucket_cnt, total, key_size, value_size, roundup_key_size; void *keys ...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); u32 bucket_cnt, total, key_size, value_size, roundup_key_size; void *keys ...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { key_size = htab->map.key_size; value_size = htab->map.value_size; size = round_up(value_size, 8); if (is_percpu) { value_size =...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { key_size = htab->map.key_size; value_size = htab->map.value_size; size = round_up(value_size, 8); if (is_percpu) { value_size =...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ key_size = htab->map.key_size; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ value_size =...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ key_size = htab->map.key_size; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ value_size =...
static int __htab_map_lookup_and_delete_batch(struct bpf_map *map, const union bpf_attr *attr, union bpf_attr *uattr, bool do_delete, bool is_lru_map, bool is_percpu) { key_size = htab->map.key_size; value_size = htab->map.value_size; size = round_up(value_size, 8); if (is_percpu) { value_...
CVE-2021-38198
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kvm/paging_tmpl.h
FNAME
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gpa_t addr, u32 access) { int ret; pt_element_t pte; pt_element_t *ptep_user; gfn_t table_gfn; u64 pt_access, pte_access; unsigned index, accessed_dirty, pte_pkey; unsigned nested_acc...
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gpa_t addr, u32 access) { int ret; pt_element_t pte; pt_element_t *ptep_user; gfn_t table_gfn; u64 pt_access, pte_access; unsigned index, accessed_dirty, pte_pkey; unsigned nested_acc...
static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, struct guest_walker *gw, int write_fault, int hlevel, kvm_pfn_t pfn, bool map_writable, bool prefault, bool lpage_disallowed) { struct kvm_mmu_page *sp = NULL; struct kvm_shadow_walk_iterator it; unsigned direct_access, access = gw->pt_access; i...
static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, struct guest_walker *gw, int write_fault, int hlevel, kvm_pfn_t pfn, bool map_writable, bool prefault, bool lpage_disallowed) { struct kvm_mmu_page *sp = NULL; struct kvm_shadow_walk_iterator it; unsigned int direct_access, access; int top_level...
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gpa_t addr, u32 access) { do { unsigned long host_addr; pt_access = pte_access; --walker->level; index = PT_DEX(addr, walker->level); table_gfn = gpte_to_gfn(pte); ...
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gpa_t addr, u32 access) { do { unsigned long host_addr; pt_access = pte_access; --walker->level; index = PT_DEX(addr, walker->level); table_gfn = gpte_to_gfn(pte); ...
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gva_t addr, u32 access) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ do { gfn_t real_gfn; unsigned long host_addr; pt_access = pte_access; --walker->level; inde...
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gva_t addr, u32 access) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ do { gfn_t real_gfn; unsigned long host_addr; pt_access = pte_access; --walker->level; inde...
static int FNAME(walk_addr_generic)(struct guest_walker *walker, struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, gpa_t addr, u32 access) { do { unsigned long host_addr; pt_access = pte_access; --walker->level; index = PT_DEX(addr, walker->level); table_gfn = gpte_to_gfn(pt...
CVE-2021-38199
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/nfs/nfs4client.c
nfs4_alloc_client
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { int err; struct nfs_client *clp = nfs_alloc_client(cl_init); if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_init->minorversion); if (err) { goto error; } if (cl_init->mi...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *clp = nfs_alloc_client(cl_init); int err; if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_ini...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { int err; struct nfs_client *clp = nfs_alloc_client(cl_init); if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_init->minorversion); if (err) { goto error; } if (cl_init->mi...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *clp = nfs_alloc_client(cl_init); int err; if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_ini...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { int err; struct nfs_client *clp = nfs_alloc_client(cl_init); if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_init->minorversion); if (cl_init->minorversion > NFS4_MAX_MOR_VERSION) { ...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *clp = nfs_alloc_client(cl_init); int err; if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_ini...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { int err; struct nfs_client *clp = nfs_alloc_client(cl_init); if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_init->minorversion); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (cl...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *clp = nfs_alloc_client(cl_init); int err; if (IS_ERR(clp)) { return clp; } err = nfs_get_cb_ident_idr(clp, cl_ini...
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *cl_init) { + char buf[ET6_ADDRSTRLEN + 1]; + const char *ip_addr = cl_init->ip_addr; + struct nfs_client *clp = nfs_alloc_client(cl_init); int err; - struct nfs_client *clp = nfs_alloc_client(cl_init); if (IS_ERR(clp)) { ...
CVE-2021-38199
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/nfs/nfs4client.c
nfs4_init_client
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *old; int error; if (clp->cl_cons_state == NFS_CS_READY) { return clp; } clp->rpc_ops = &nf...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { struct nfs_client *old; int error; if (clp->cl_cons_state == NFS_CS_READY) { return clp; } error = nfs4_init_client_minor_version(clp); if (error < 0) { goto error; } ...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *old; int error; if (clp->cl_cons_state == NFS_CS_READY) { dprintk("<-- nfs4_init_client() = 0 [alr...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { struct nfs_client *old; int error; if (clp->cl_cons_state == NFS_CS_READY) { dprintk("<-- nfs4_init_client() = 0 [already %p]\n", clp); return clp; } error = nfs4_init_client_mino...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *old; if (clp->cl_cons_state == NFS_CS_READY) { return clp; } clp->rpc_ops = &nfs_v4_clientops;...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { struct nfs_client *old; if (clp->cl_cons_state == NFS_CS_READY) { return clp; } error = nfs4_init_client_minor_version(clp); if (error < 0) { goto error; } error = nfs4_di...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { char buf[ET6_ADDRSTRLEN + 1]; const char *ip_addr = cl_init->ip_addr; struct nfs_client *old; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (clp->cl_cons_state == NFS_CS_READY) { /* PLACEH...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { struct nfs_client *old; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (clp->cl_cons_state == NFS_CS_READY) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ return clp; } error = nfs...
struct nfs_client *nfs4_init_client(struct nfs_client *clp, const struct nfs_client_initdata *cl_init) { - char buf[ET6_ADDRSTRLEN + 1]; - const char *ip_addr = cl_init->ip_addr; struct nfs_client *old; if (clp->cl_cons_state == NFS_CS_READY) { return clp; } - clp->rpc_ops = &nfs_v4_cl...
CVE-2021-38201
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sunrpc/xdr.c
xdr_set_page_base
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { unsigned int pgnr; unsigned int maxlen; unsigned int pgoff; unsigned int pgend; void *kaddr; maxlen = xdr->buf->page_len; if (base >= maxlen) { base = maxlen; maxlen = 0; ...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { unsigned int pgnr; unsigned int maxlen; unsigned int pgoff; unsigned int pgend; void *kaddr; maxlen = xdr->buf->page_len; if (base >= maxlen) { return 0; } else { maxlen -...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { unsigned int pgnr; unsigned int maxlen; unsigned int pgoff; unsigned int pgend; void *kaddr; maxlen = xdr->buf->page_len; if (base >= maxlen) { base = maxlen; maxlen = 0; ...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { unsigned int pgnr; unsigned int maxlen; unsigned int pgoff; unsigned int pgend; void *kaddr; maxlen = xdr->buf->page_len; if (base >= maxlen) { return 0; } else { maxlen -...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { maxlen = xdr->buf->page_len; if (base >= maxlen) { base = maxlen; maxlen = 0; } else { } if (len > maxlen) { len = maxlen; } xdr_stream_page_set_pos(xdr, base); ba...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { maxlen = xdr->buf->page_len; if (base >= maxlen) { return 0; } else { } if (len > maxlen) { len = maxlen; } xdr_stream_page_set_pos(xdr, base); base += xdr->buf->page_base...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ maxlen = xdr->buf->page_len; if (base >= maxlen) { base = maxlen; maxlen = 0; } else { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ maxlen = xdr->buf->page_len; if (base >= maxlen) { return 0; } else { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } if (len > maxlen) {...
static unsigned int xdr_set_page_base(struct xdr_stream *xdr, unsigned int base, unsigned int len) { maxlen = xdr->buf->page_len; if (base >= maxlen) { - base = maxlen; - maxlen = 0; + return 0; } else { } if (len > maxlen) { len = maxlen; } xdr_stream_p...
CVE-2021-38204
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/host/max3421-hcd.c
max3421_select_and_start_urb
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct spi_device *spi = to_spi_device(hcd->self.controller); struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum, force_toggles = 0; struct usb_host_endp...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct spi_device *spi = to_spi_device(hcd->self.controller); struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum; struct usb_host_endpoint *ep; struc...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct spi_device *spi = to_spi_device(hcd->self.controller); struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum, force_toggles = 0; struct usb_host_endp...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct spi_device *spi = to_spi_device(hcd->self.controller); struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum; struct usb_host_endpoint *ep; struc...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum, force_toggles = 0; struct usb_host_endpoint *ep; spin_lock_irqsave(&max3421_hcd->lock, flags); ...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum; struct usb_host_endpoint *ep; spin_lock_irqsave(&max3421_hcd->lock, flags); list_for_each(pos...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum, force_toggles = 0; struct usb_host_endpoint *ep; /*...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; int epnum; struct usb_host_endpoint *ep; /* PLACEHOLDER: DO NO...
static int max3421_select_and_start_urb(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); struct urb *urb, *curr_urb = NULL; struct max3421_ep *max3421_ep; - int epnum, force_toggles = 0; + int epnum; struct usb_host_endpoint *ep; spin_lock_irqsave(&max3421_hc...
CVE-2021-38204
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/host/max3421-hcd.c
max3421_set_address
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum) { int rcvtog, sndtog; u8 hctl; rcvtog = usb_gettoggle(dev, epnum, 0); sndtog = usb_gettoggle(dev, epnum, 1); hctl = (BIT(rcvtog + MAX3421_HCTL_RCVTOG0_BIT) | BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT)); spi_wr8(h...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum) { int rcvtog, sndtog; u8 hctl; rcvtog = usb_gettoggle(dev, epnum, 0); sndtog = usb_gettoggle(dev, epnum, 1); hctl = (BIT(rcvtog + MAX3421_HCTL_RCVTOG0_BIT) | BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT)); spi_wr8(h...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum) { int rcvtog, sndtog; u8 hctl; rcvtog = usb_gettoggle(dev, epnum, 0); sndtog = usb_gettoggle(dev, epnum, 1); hctl = (BIT(rcvtog + MAX3421_HCTL_RCVTOG0_BIT) | BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT)); spi_wr8(h...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_...
static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum) { int rcvtog, sndtog; u8 hctl; rcvtog = usb_gettoggle(dev, epnum, 0); sndtog = usb_gettoggle(dev, epnum, 1); hctl = (BIT(rcvtog + MAX3421_HCTL_RCVTOG0_BIT) | BIT(sndtog + MAX3421_HCTL_SNDTOG0_BIT)); spi_wr8(h...
-static void max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) { - struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); - int old_epnum, same_ep, rcvtog, sndtog; - struct usb_device *old_dev; +static void max3421_set_address(struct usb_hcd *hcd, struct usb_device ...
CVE-2021-38204
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/host/max3421-hcd.c
max3421_urb_done
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); unsigned long flags; struct urb *urb; int status; status = max3421_hcd->urb_done; max3421_hcd->urb_done = 0; if (status > 0) { status = 0; } urb = max3421_hcd->curr_urb; ...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); unsigned long flags; struct urb *urb; int status; status = max3421_hcd->urb_done; max3421_hcd->urb_done = 0; if (status > 0) { status = 0; } urb = max3421_hcd->curr_urb; ...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); unsigned long flags; struct urb *urb; int status; status = max3421_hcd->urb_done; max3421_hcd->urb_done = 0; if (status > 0) { status = 0; } urb = max3421_hcd->curr_urb; ...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); unsigned long flags; struct urb *urb; int status; status = max3421_hcd->urb_done; max3421_hcd->urb_done = 0; if (status > 0) { status = 0; } urb = max3421_hcd->curr_urb; ...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); urb = max3421_hcd->curr_urb; if (urb) { max3421_hcd->curr_urb = NULL; usb_hcd_unlink_urb_from_ep(hcd, urb); usb_hcd_giveback_urb(hcd, urb, status); } }
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); urb = max3421_hcd->curr_urb; if (urb) { u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); int rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; int sndtog = (hrsl >> MAX3421_HRSL_SNDTOGR...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ urb = max3421_hcd->curr_urb; if (urb) { max3421_hcd->curr_urb = NULL; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ usb_hcd_unlink_u...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ urb = max3421_hcd->curr_urb; if (urb) { u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); int rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; ...
static int max3421_urb_done(struct usb_hcd *hcd) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); urb = max3421_hcd->curr_urb; if (urb) { + u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); + int rcvtog = (hrsl >> MAX3421_HRSL_RCVTOGRD_BIT) & 1; + int sndtog = (hrsl >> MAX3421_HRSL_...
CVE-2021-38205
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/ethernet/xilinx/xilinx_emaclite.c
xemaclite_of_probe
static int xemaclite_of_probe(struct platform_device *ofdev) { struct resource *res; struct net_device *ndev = NULL; struct net_local *lp = NULL; struct device *dev = &ofdev->dev; const void *mac_address; int rc = 0; dev_info(dev, "Device Tree Probing\n"); ndev = alloc_etherdev(sizeof(st...
static int xemaclite_of_probe(struct platform_device *ofdev) { struct resource *res; struct net_device *ndev = NULL; struct net_local *lp = NULL; struct device *dev = &ofdev->dev; const void *mac_address; int rc = 0; dev_info(dev, "Device Tree Probing\n"); ndev = alloc_etherdev(sizeof(st...
static int xemaclite_of_probe(struct platform_device *ofdev) { struct resource *res; struct net_device *ndev = NULL; struct net_local *lp = NULL; struct device *dev = &ofdev->dev; const void *mac_address; int rc = 0; dev_info(dev, "Device Tree Probing\n"); ndev = alloc_etherdev(sizeof(st...
static int xemaclite_of_probe(struct platform_device *ofdev) { struct resource *res; struct net_device *ndev = NULL; struct net_local *lp = NULL; struct device *dev = &ofdev->dev; const void *mac_address; int rc = 0; dev_info(dev, "Device Tree Probing\n"); ndev = alloc_etherdev(sizeof(st...
static int xemaclite_of_probe(struct platform_device *ofdev) { dev_info(dev, "Xilinx EmacLite at 0x%08lX mapped to 0x%08lX, irq=%d\n", (unsigned long __force)ndev->mem_start, (unsigned long __force)lp->base_addr, ndev->irq); return 0; }
static int xemaclite_of_probe(struct platform_device *ofdev) { dev_info(dev, "Xilinx EmacLite at 0x%08lX mapped to 0x%p, irq=%d\n", (unsigned long __force)ndev->mem_start, lp->base_addr, ndev->irq); return 0; }
static int xemaclite_of_probe(struct platform_device *ofdev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev_info(dev, "Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n", (unsigned int __force)ndev->mem_start, (unsigned int __force)lp->base_addr, ndev->irq); return 0; /* PLACEHOLDER: DO NOT DELE...
static int xemaclite_of_probe(struct platform_device *ofdev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev_info(dev, "Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n", (unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq); return 0; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
static int xemaclite_of_probe(struct platform_device *ofdev) { - dev_info(dev, "Xilinx EmacLite at 0x%08lX mapped to 0x%08lX, irq=%d\n", (unsigned long __force)ndev->mem_start, (unsigned long __force)lp->base_addr, ndev->irq); + dev_info(dev, "Xilinx EmacLite at 0x%08lX mapped to 0x%p, irq=%d\n", (unsigned long ...
CVE-2021-38206
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/mac80211/tx.c
ieee80211_monitor_start_xmit
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr; struct ieee80211_sub_...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr; struct ieee80211_sub_...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr; struct ieee80211_sub_...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_chanctx_conf *chanctx_conf; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr; struct ieee80211_sub_...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_JECTED; if (!ieee80211_parse_tx_radiotap(skb, dev)) { goto fail; } len_rthdr = ieee8...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_JECTED; if (!ieee80211_validate_radiotap_len(skb)) { goto fail; } len_rthdr = ieee80...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_JECT...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_JECT...
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS | IEEE80211_TX_CTL_JECTED; - if (!ieee80211_parse_tx_radiotap(skb, dev)) { + if (!ieee80211_validate_radiotap_len(...
CVE-2021-38206
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/mac80211/tx.c
ieee80211_parse_tx_radiotap
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_radiotap_iterator iterator; struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_radiotap_iterator iterator; struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_radiotap_iterator iterator; struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_radiotap_iterator iterator; struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_supported_band *sband = local->hw.wiphy->bands[info->band]; i...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len, NULL); ...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_supported_band ...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); int ret = ieee80211_radiotap_ite...
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb, struct net_device *dev) { struct ieee80211_radiotap_header *rthdr = (struct ieee80211_radiotap_header *) skb->data; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_supported_band *sband = local->hw.wiphy->bands[info->band]; ...
CVE-2021-38207
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/ethernet/xilinx/ll_temac_main.c
temac_start_xmit
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); struct cdmac_bd *cur_p; dma_addr_t tail_p, skb_dma_addr; int ii; unsigned long num_frag; skb_frag_t *frag; num_frag = skb_shinfo(skb)->nr_frags; frag = &skb_shi...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); struct cdmac_bd *cur_p; dma_addr_t tail_p, skb_dma_addr; int ii; unsigned long num_frag; skb_frag_t *frag; num_frag = skb_shinfo(skb)->nr_frags; frag = &skb_shi...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); struct cdmac_bd *cur_p; dma_addr_t tail_p, skb_dma_addr; int ii; unsigned long num_frag; skb_frag_t *frag; num_frag = skb_shinfo(skb)->nr_frags; frag = &skb_shi...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); struct cdmac_bd *cur_p; dma_addr_t tail_p, skb_dma_addr; int ii; unsigned long num_frag; skb_frag_t *frag; num_frag = skb_shinfo(skb)->nr_frags; frag = &skb_shi...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); num_frag = skb_shinfo(skb)->nr_frags; if (temac_check_tx_bd_space(lp, num_frag + 1)) { smp_mb(); if (temac_check_tx_bd_space(lp, num_frag)) { return NET...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); num_frag = skb_shinfo(skb)->nr_frags; if (temac_check_tx_bd_space(lp, num_frag + 1)) { smp_mb(); if (temac_check_tx_bd_space(lp, num_frag + 1)) { return...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ num_frag = skb_shinfo(skb)->nr_frags; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (temac_check_tx_bd_space(lp, num_frag +...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ num_frag = skb_shinfo(skb)->nr_frags; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (temac_check_tx_bd_space(lp, num_frag +...
static netdev_tx_t temac_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct temac_local *lp = netdev_priv(ndev); num_frag = skb_shinfo(skb)->nr_frags; if (temac_check_tx_bd_space(lp, num_frag + 1)) { smp_mb(); - if (temac_check_tx_bd_space(lp, num_frag)) { + if (tem...
CVE-2021-38208
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/nfc/llcp_sock.c
llcp_sock_bind
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); struct nfc_llcp_local *local; struct nfc_dev *dev; struct sockaddr_nfc_llcp llcp_addr; int len, ret = 0; if (!addr || alen < offs...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); struct nfc_llcp_local *local; struct nfc_dev *dev; struct sockaddr_nfc_llcp llcp_addr; int len, ret = 0; if (!addr || alen < offs...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); struct nfc_llcp_local *local; struct nfc_dev *dev; struct sockaddr_nfc_llcp llcp_addr; int len, ret = 0; if (!addr || alen < offs...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); struct nfc_llcp_local *local; struct nfc_dev *dev; struct sockaddr_nfc_llcp llcp_addr; int len, ret = 0; if (!addr || alen < offs...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { dev = nfc_get_device(llcp_addr.dev_idx); if (dev == NULL) { goto error; } local = nfc_llcp_find_local(dev); if (local == NULL) { goto put_dev; } if (!llcp_sock->service_name) { llcp_sock...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { dev = nfc_get_device(llcp_addr.dev_idx); if (dev == NULL) { goto error; } local = nfc_llcp_find_local(dev); if (local == NULL) { goto put_dev; } if (!llcp_sock->service_name) { llcp_sock...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev = nfc_get_device(llcp_addr.dev_idx); if (dev == NULL) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ goto error; } local = nfc_llcp_find_local(dev); if...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev = nfc_get_device(llcp_addr.dev_idx); if (dev == NULL) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ goto error; } local = nfc_llcp_find_local(dev); if...
static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) { dev = nfc_get_device(llcp_addr.dev_idx); if (dev == NULL) { goto error; } local = nfc_llcp_find_local(dev); if (local == NULL) { goto put_dev; } if (!llcp_sock->service_name) { ...
CVE-2021-38209
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/netfilter/nf_conntrack_standalone.c
nf_conntrack_standalone_init_sysctl
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); struct ctl_table *table; BUILD_BUG_ON(ARRAY_SIZE(nf_ct_sysctl_table) != NF_SYSCTL_CT_LAST_SYSCTL); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { ...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); struct ctl_table *table; BUILD_BUG_ON(ARRAY_SIZE(nf_ct_sysctl_table) != NF_SYSCTL_CT_LAST_SYSCTL); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { ...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); struct ctl_table *table; BUILD_BUG_ON(ARRAY_SIZE(nf_ct_sysctl_table) != NF_SYSCTL_CT_LAST_SYSCTL); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { ...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); struct ctl_table *table; BUILD_BUG_ON(ARRAY_SIZE(nf_ct_sysctl_table) != NF_SYSCTL_CT_LAST_SYSCTL); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { ...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { return -ENOMEM; } table[NF_SYSCTL_CT_PROTO_TIME_GENERIC].data = &nf_generic_pernet(net)->ti...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { return -ENOMEM; } table[NF_SYSCTL_CT_PROTO_TIME_GENERIC].data = &nf_generic_pernet(net)->ti...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { return -ENOMEM; } /* PLACEHOLDER: DO NOT ...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { return -ENOMEM; } /* PLACEHOLDER: DO NOT ...
static int nf_conntrack_standalone_init_sysctl(struct net *net) { struct nf_udp_net *un = nf_udp_pernet(net); table = kmemdup(nf_ct_sysctl_table, sizeof(nf_ct_sysctl_table), GFP_KERNEL); if (!table) { return -ENOMEM; } table[NF_SYSCTL_CT_PROTO_TIME_GENERIC].data = &nf_generic_pernet(n...
CVE-2021-38300
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/mips/net/bpf_jit.c
bpf_jit_compile
void bpf_jit_compile(struct bpf_prog *fp) { struct jit_ctx ctx; unsigned int alloc_size, tmp_idx; if (!bpf_jit_enable) { return; } memset(&ctx, 0, sizeof(ctx)); ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } ...
void bpf_jit_compile(struct bpf_prog *fp) { struct jit_ctx ctx; unsigned int alloc_size, tmp_idx; if (!bpf_jit_enable) { return; } memset(&ctx, 0, sizeof(ctx)); ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } ...
void bpf_jit_compile(struct bpf_prog *fp) { struct jit_ctx ctx; unsigned int alloc_size, tmp_idx; if (!bpf_jit_enable) { return; } memset(&ctx, 0, sizeof(ctx)); ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } ...
void bpf_jit_compile(struct bpf_prog *fp) { struct jit_ctx ctx; unsigned int alloc_size, tmp_idx; if (!bpf_jit_enable) { return; } memset(&ctx, 0, sizeof(ctx)); ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } ...
void bpf_jit_compile(struct bpf_prog *fp) { ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } tmp_idx = ctx.idx; ctx.prologue_bytes = (ctx.idx - tmp_idx) * 4; alloc_size = 4 * ctx.idx; ctx.target = module_alloc(alloc_size); ...
void bpf_jit_compile(struct bpf_prog *fp) { ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } tmp_idx = ctx.idx; ctx.prologue_bytes = (ctx.idx - tmp_idx) * 4; alloc_size = 4 * ctx.idx; ctx.target = module_alloc(alloc_size); ...
void bpf_jit_compile(struct bpf_prog *fp) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ tmp_idx = ctx.idx; /* PLACEHOLDER: DO NOT...
void bpf_jit_compile(struct bpf_prog *fp) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ tmp_idx = ctx.idx; /* PLACEHOLDER: DO NOT...
void bpf_jit_compile(struct bpf_prog *fp) { ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL); if (ctx.offsets == NULL) { return; } tmp_idx = ctx.idx; ctx.prologue_bytes = (ctx.idx - tmp_idx) * 4; alloc_size = 4 * ctx.idx; ctx.target = module_alloc(alloc_s...
CVE-2021-38300
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/mips/net/bpf_jit.c
build_body
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; const struct sock_filter *inst; unsigned int i, off, condt; u32 k, b_off __maybe_unused; u8 (*sk_load_func)(unsigned long *skb, int offset); for (i = 0; i < prog->len; i++) { u16 code; inst = &(p...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; const struct sock_filter *inst; unsigned int i, off, condt; u32 k, b_off __maybe_unused; u8 (*sk_load_func)(unsigned long *skb, int offset); for (i = 0; i < prog->len; i++) { u16 code; inst = &(p...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; const struct sock_filter *inst; unsigned int i, off, condt; u32 k, b_off __maybe_unused; u8 (*sk_load_func)(unsigned long *skb, int offset); for (i = 0; i < prog->len; i++) { u16 code; inst = &(p...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; const struct sock_filter *inst; unsigned int i, off, condt; u32 k, b_off __maybe_unused; u8 (*sk_load_func)(unsigned long *skb, int offset); for (i = 0; i < prog->len; i++) { u16 code; inst = &(p...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; for (i = 0; i < prog->len; i++) { inst = &(prog->insns[i]); pr_debug("%s: code->0x%02x, jt->0x%x, jf->0x%x, k->0x%x\n", __func__, inst->code, inst->jt, inst->jf, inst->k); k = inst->k; code = bpf...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; for (i = 0; i < prog->len; i++) { inst = &(prog->insns[i]); pr_debug("%s: code->0x%02x, jt->0x%x, jf->0x%x, k->0x%x\n", __func__, inst->code, inst->jt, inst->jf, inst->k); k = inst->k; code = bpf...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < prog->len; i++) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ inst = &(prog->insns[i]); pr_debug("%s: code->0x%02x, jt->0x%x, jf->0x%x, k->...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < prog->len; i++) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ inst = &(prog->insns[i]); pr_debug("%s: code->0x%02x, jt->0x%x, jf->0x%x, k->...
static int build_body(struct jit_ctx *ctx) { const struct bpf_prog *prog = ctx->skf; for (i = 0; i < prog->len; i++) { inst = &(prog->insns[i]); pr_debug("%s: code->0x%02x, jt->0x%x, jf->0x%x, k->0x%x\n", __func__, inst->code, inst->jt, inst->jf, inst->k); k = inst->k; cod...
CVE-2021-3894
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sctp/sm_make_chunk.c
sctp_make_strreset_req
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { struct sctp_strreset_outreq outreq; __u16 stream_len = stream_num * 2; struct sctp_strreset_inreq inreq; struct sctp_chunk *retval; __u16 outlen, inlen; out...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { struct sctp_strreset_outreq outreq; __u16 stream_len = stream_num * 2; struct sctp_strreset_inreq inreq; struct sctp_chunk *retval; __u16 outlen, inlen; out...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { __u16 stream_len = stream_num * sizeof(__u16); struct sctp_strreset_outreq outreq; struct sctp_strreset_inreq inreq; struct sctp_chunk *retval; __u16 outlen, in...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { __u16 stream_len = stream_num * sizeof(__u16); struct sctp_strreset_outreq outreq; struct sctp_strreset_inreq inreq; struct sctp_chunk *retval; __u16 outlen, in...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { __u16 stream_len = stream_num * 2; outlen = (sizeof(outreq) + stream_len) * out; inlen = (sizeof(inreq) + stream_len) * in; retval = sctp_make_reconf(asoc, outlen +...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { __u16 stream_len = stream_num * 2; outlen = (sizeof(outreq) + stream_len) * out; inlen = (sizeof(inreq) + stream_len) * in; retval = sctp_make_reconf(asoc, SCTP_PAD...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ outlen = (sizeof(outreq) + stream_len) * out; inlen = (sizeof(inreq) + stream_len) * in; retval = sctp_make_reconf(aso...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ outlen = (sizeof(outreq) + stream_len) * out; inlen = (sizeof(inreq) + stream_len) * in; retval = sctp_make_reconf(aso...
struct sctp_chunk *sctp_make_strreset_req( const struct sctp_association *asoc, __u16 stream_num, __be16 *stream_list, bool out, bool in) { __u16 stream_len = stream_num * 2; outlen = (sizeof(outreq) + stream_len) * out; inlen = (sizeof(inreq) + stream_len) * in; - retval = sctp_make_reconf(asoc, out...
CVE-2021-3896
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/isdn/capi/kcapi.c
detach_capi_ctr
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; ncontrollers--; if (ctr->procent...
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; ...
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; ncontrollers--; if (ctr->procent...
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; ...
int detach_capi_ctr(struct capi_ctr *ctr) { ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; if (ctr->procent) { remove_proc_entry(ctr->procfn, NULL); } unlock_out: mutex_unlock(&capi_contro...
int detach_capi_ctr(struct capi_ctr *ctr) { ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; if (...
int detach_capi_ctr(struct capi_ctr *ctr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; /* PLACEHOLDE...
int detach_capi_ctr(struct capi_ctr *ctr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { /* PLACEHOLDER: DO NOT DELE...
int detach_capi_ctr(struct capi_ctr *ctr) { ctr_down(ctr, CAPI_CTR_DETACHED); + if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { + err = -EVAL; + goto unlock_out; + } if (capi_controller[ctr->cnr - 1] != ctr) { goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL...
CVE-2021-3923
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/infiniband/core/uverbs_marshall.c
ib_copy_ah_attr_to_user
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) && (rdma_ah_get_dl...
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh, 0, sizeof(dst->grh)); if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) && (rdma_ah_get_dlid(ah_attr) > be16...
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) && (rdma_ah_get_dl...
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh, 0, sizeof(dst->grh)); if ((ah_attr->type == RDMA_AH_ATTR_TYPE_OPA) && (rdma_ah_get_dlid(ah_attr) > be16...
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); }
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh, 0, sizeof(dst->grh)); }
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; memset(&dst->grh, 0, sizeof(dst->grh)); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
void ib_copy_ah_attr_to_user(struct ib_device *device, struct ib_uverbs_ah_attr *dst, struct rdma_ah_attr *ah_attr) { struct rdma_ah_attr *src = ah_attr; struct rdma_ah_attr conv_ah; - memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved)); + memset(&dst->grh, 0, sizeof(dst->grh)); }
CVE-2021-39633
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/ipv4/ip_gre.c
gre_handle_offloads
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { if (csum && skb_checksum_start(skb) < skb->data) { return -EVAL; } return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { if (csum && skb_checksum_start(skb) < skb->data) { return -EVAL; } return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { if (csum && skb_checksum_start(skb) < skb->data) { return -EVAL; } return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { if (csum && skb_checksum_start(skb) < skb->data) { return -EVAL; } return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
static int gre_handle_offloads(struct sk_buff *skb, bool csum) { + if (csum && skb_checksum_start(skb) < skb->data) { + return -EVAL; + } return iptunnel_handle_offloads(skb, csum ? SKB_GSO_GRE_CSUM : SKB_GSO_GRE); }
CVE-2021-39634
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/eventpoll.c
ep_insert
static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check) { int error, pwake = 0; __poll_t revents; long user_watches; struct epitem *epi; struct ep_pqueue epq; lockdep_assert_irqs_enabled(); user_watches = atomic_long_read(&ep->u...
static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check) { int error, pwake = 0; __poll_t revents; long user_watches; struct epitem *epi; struct ep_pqueue epq; lockdep_assert_irqs_enabled(); user_watches = atomic_long_read(&ep->u...
static int ep_insert(struct eventpoll *ep, struct epoll_event *event, struct file *tfile, int fd, int full_check) { int error, revents, pwake = 0; unsigned long flags; long user_watches; struct epitem *epi; struct ep_pqueue epq; user_watches = atomic_long_read(&ep->user->epoll_watches); if (...
static int ep_insert(struct eventpoll *ep, struct epoll_event *event, struct file *tfile, int fd, int full_check) { int error, revents, pwake = 0; unsigned long flags; long user_watches; struct epitem *epi; struct ep_pqueue epq; user_watches = atomic_long_read(&ep->user->epoll_watches); if (...
static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check) { if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL))) { return -ENOMEM; } epi->nwait = 0; if (epi->event.events & EPOLLWAKEUP) { error = ep_create_wakeup_source(epi);...
static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check) { if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL))) { return -ENOMEM; } epi->nwait = 0; if (epi->event.events & EPOLLWAKEUP) { error = ep_create_wakeup_source(epi);...
static int ep_insert(struct eventpoll *ep, struct epoll_event *event, struct file *tfile, int fd, int full_check) { int error, revents, pwake = 0; unsigned long flags; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL))) { return -ENOMEM; } ...
static int ep_insert(struct eventpoll *ep, struct epoll_event *event, struct file *tfile, int fd, int full_check) { int error, revents, pwake = 0; unsigned long flags; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL))) { return -ENOMEM; } ...
static int ep_insert(struct eventpoll *ep, const struct epoll_event *event, struct file *tfile, int fd, int full_check) { if (!(epi = kmem_cache_alloc(epi_cache, GFP_KERNEL))) { return -ENOMEM; } epi->nwait = 0; if (epi->event.events & EPOLLWAKEUP) { error = ep_create_wakeup_sourc...
CVE-2021-39648
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/gadget/configfs.c
gadget_dev_desc_UDC_show
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name; return sprintf(page, "%s\n", udc_name ?: ""); }
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { struct gadget_info *gi = to_gadget_info(item); char *udc_name; int ret; mutex_lock(&gi->lock); udc_name = gi->composite.gadget_driver.udc_name; ret = sprintf(page, "%s\n", udc_name ?: ""); mutex_unlock(&gi->lock)...
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name; return sprintf(page, "%s\n", udc_name ?: ""); }
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { struct gadget_info *gi = to_gadget_info(item); char *udc_name; int ret; mutex_lock(&gi->lock); udc_name = gi->composite.gadget_driver.udc_name; ret = sprintf(page, "%s\n", udc_name ?: ""); mutex_unlock(&gi->lock)...
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name; return sprintf(page, "%s\n", udc_name ?: ""); }
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { struct gadget_info *gi = to_gadget_info(item); char *udc_name; int ret; mutex_lock(&gi->lock); udc_name = gi->composite.gadget_driver.udc_name; ret = sprintf(page, "%s\n", udc_name ?: ""); mutex_unlock(&gi->lock)...
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name; return sprintf(page, "%s\n", udc_name ?: ""); }
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { struct gadget_info *gi = to_gadget_info(item); char *udc_name; int ret; mutex_lock(&gi->lock); udc_name = gi->composite.gadget_driver.udc_name; ret = sprintf(page, "%s\n", udc_name ?: ""); mutex_unlock(&gi->lock)...
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) { - char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name; - return sprintf(page, "%s\n", udc_name ?: ""); + struct gadget_info *gi = to_gadget_info(item); + char *udc_name; + int ret; + mutex_lock(&gi->lo...
CVE-2021-39656
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/configfs/file.c
__configfs_open_file
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; struct configfs_fragment *frag = to_frag(file); struct configfs_attribute *attr; struct configfs_buffer *buffer; int error; error = -ENOMEM; buffer = kzalloc(sizeo...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; struct configfs_fragment *frag = to_frag(file); struct configfs_attribute *attr; struct configfs_buffer *buffer; int error; error = -ENOMEM; buffer = kzalloc(sizeo...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; struct configfs_fragment *frag = to_frag(file); struct configfs_attribute *attr; struct configfs_buffer *buffer; int error; error = -ENOMEM; buffer = kzalloc(sizeo...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; struct configfs_fragment *frag = to_frag(file); struct configfs_attribute *attr; struct configfs_buffer *buffer; int error; error = -ENOMEM; buffer = kzalloc(sizeo...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; buffer = kzalloc(sizeof(struct configfs_buffer), GFP_KERNEL); if (!buffer) { goto out; } buffer->item = to_item(dentry->d_parent); if (!buffer->item) { ...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; buffer = kzalloc(sizeof(struct configfs_buffer), GFP_KERNEL); if (!buffer) { goto out; } buffer->item = to_item(dentry->d_parent); if (!buffer->item) { ...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ buffer = kzalloc(sizeof(struct configfs_buffer), GFP_KERNEL); if (!buffer) { goto out; } /* PLACEHOLDER: DO NOT D...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ buffer = kzalloc(sizeof(struct configfs_buffer), GFP_KERNEL); if (!buffer) { goto out; } /* PLACEHOLDER: DO NOT D...
static int __configfs_open_file(struct inode *inode, struct file *file, int type) { struct dentry *dentry = file->f_path.dentry; buffer = kzalloc(sizeof(struct configfs_buffer), GFP_KERNEL); if (!buffer) { goto out; } buffer->item = to_item(dentry->d_parent); if (!buffer->item) {...
CVE-2021-39657
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/scsi/ufs/ufshcd.c
ufshcd_eh_device_reset_handler
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct Scsi_Host *host; struct ufs_hba *hba; unsigned int tag; u32 pos; int err; u8 resp = 0xF; struct ufshcd_lrb *lrbp; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); tag = cmd->reques...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct Scsi_Host *host; struct ufs_hba *hba; u32 pos; int err; u8 resp = 0xF, lun; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); err = ufsh...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct Scsi_Host *host; struct ufs_hba *hba; unsigned int tag; u32 pos; int err; u8 resp = 0xF; struct ufshcd_lrb *lrbp; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); tag = cmd->reques...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct Scsi_Host *host; struct ufs_hba *hba; u32 pos; int err; u8 resp = 0xF, lun; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); err = ufsh...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct ufs_hba *hba; unsigned int tag; u32 pos; int err; u8 resp = 0xF; struct ufshcd_lrb *lrbp; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); tag = cmd->request->tag; lrbp = &hba->lrb...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct ufs_hba *hba; u32 pos; int err; u8 resp = 0xF, lun; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); err = ufshcd_issue_tm_cmd(hba, lun, 0,...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct ufs_hba *hba; unsigned int tag; u32 pos; int err; u8 resp = 0xF; struct ufshcd_lrb *lrbp; unsigned long flags; host = cmd->device->host; hba = shost_priv(host);...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct ufs_hba *hba; u32 pos; int err; u8 resp = 0xF, lun; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); lun = ufshcd_scsi_to_upiu_lun(cmd->device...
static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) { struct ufs_hba *hba; - unsigned int tag; u32 pos; int err; - u8 resp = 0xF; - struct ufshcd_lrb *lrbp; + u8 resp = 0xF, lun; unsigned long flags; host = cmd->device->host; hba = shost_priv(host); - tag = cmd...
CVE-2021-39685
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/gadget/composite.c
composite_setup
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_request *req = cdev->req; int value = -EOPNOTSUPP; int status = 0; u16 w_index = le16_to_cpu(ctrl->wIndex); u8 intf = w_index & 0xFF; u16 ...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_request *req = cdev->req; int value = -EOPNOTSUPP; int status = 0; u16 w_index = le16_to_cpu(ctrl->wIndex); u8 intf = w_index & 0xFF; u16 ...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_request *req = cdev->req; int value = -EOPNOTSUPP; int status = 0; u16 w_index = le16_to_cpu(ctrl->wIndex); u8 intf = w_index & 0xFF; u16 ...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_composite_dev *cdev = get_gadget_data(gadget); struct usb_request *req = cdev->req; int value = -EOPNOTSUPP; int status = 0; u16 w_index = le16_to_cpu(ctrl->wIndex); u8 intf = w_index & 0xFF; u16 ...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { u16 w_length = le16_to_cpu(ctrl->wLength); struct usb_function *f = NULL; u8 endp; req->zero = 0; if ((ctrl->bRequestType & USB_TYPE_MASK) != USB_TYPE_STANDARD) { goto unknown; } switch (ctrl->bReque...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { u16 w_length = le16_to_cpu(ctrl->wLength); struct usb_function *f = NULL; u8 endp; if (w_length > USB_COMP_EP0_BUFSIZ) { if (ctrl->bRequestType == USB_DIR_) { goto done; } else { ...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 w_length = le16_to_cpu(ctrl->wLength); struct usb_function *f = NULL; u8 endp; req->zero = 0; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if ((ctrl->bReque...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 w_length = le16_to_cpu(ctrl->wLength); struct usb_function *f = NULL; u8 endp; if (w_length > USB_COMP_EP0_BUFSIZ) { if (ctrl->bRequestType == USB_DIR_) { ...
int composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { u16 w_length = le16_to_cpu(ctrl->wLength); struct usb_function *f = NULL; u8 endp; + if (w_length > USB_COMP_EP0_BUFSIZ) { + if (ctrl->bRequestType == USB_DIR_) { + goto done; + } else { + ...
CVE-2021-39685
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/gadget/legacy/dbgp.c
dbgp_setup
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_request *req = dbgp.req; u8 request = ctrl->bRequest; u16 value = le16_to_cpu(ctrl->wValue); u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; void *data = NULL; u16 len = 0; i...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_request *req = dbgp.req; u8 request = ctrl->bRequest; u16 value = le16_to_cpu(ctrl->wValue); u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; void *data = NULL; u16 len = 0; i...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_request *req = dbgp.req; u8 request = ctrl->bRequest; u16 value = le16_to_cpu(ctrl->wValue); u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; void *data = NULL; u16 len = 0; i...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct usb_request *req = dbgp.req; u8 request = ctrl->bRequest; u16 value = le16_to_cpu(ctrl->wValue); u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; void *data = NULL; u16 len = 0; i...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; u16 len = 0; if (request == USB_REQ_GET_DESCRIPTOR) { } else if (request == USB_REQ_SET_FEATURE && value == USB_DEVICE_DEBUG_MODE) { } else { ...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; u16 len = 0; if (length > DBGP_REQ_LEN) { if (ctrl->bRequestType == USB_DIR_) { return err; } else { __le16 *temp...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 len = 0; if (request == USB_REQ_GET_DESCRIPTOR) {...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 len = 0; if (length > DBGP_REQ_LEN) { if ...
static int dbgp_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { u16 length = le16_to_cpu(ctrl->wLength); int err = -EOPNOTSUPP; u16 len = 0; + if (length > DBGP_REQ_LEN) { + if (ctrl->bRequestType == USB_DIR_) { + return err; + } else { + __l...
CVE-2021-39685
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/gadget/legacy/inode.c
gadgetfs_setup
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct dev_data *dev = get_gadget_data (gadget); struct usb_request *req = dev->req; int value = -EOPNOTSUPP; struct usb_gadgetfs_event *event; u16 w_value = le16_to_cpu(ctrl->wValue); u16 w_length = le16...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct dev_data *dev = get_gadget_data (gadget); struct usb_request *req = dev->req; int value = -EOPNOTSUPP; struct usb_gadgetfs_event *event; u16 w_value = le16_to_cpu(ctrl->wValue); u16 w_length = le16...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct dev_data *dev = get_gadget_data (gadget); struct usb_request *req = dev->req; int value = -EOPNOTSUPP; struct usb_gadgetfs_event *event; u16 w_value = le16_to_cpu(ctrl->wValue); u16 w_length = le16...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { struct dev_data *dev = get_gadget_data (gadget); struct usb_request *req = dev->req; int value = -EOPNOTSUPP; struct usb_gadgetfs_event *event; u16 w_value = le16_to_cpu(ctrl->wValue); u16 w_length = le16...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { int value = -EOPNOTSUPP; u16 w_length = le16_to_cpu(ctrl->wLength); spin_lock (&dev->lock); switch (ctrl->bRequest) { case USB_REQ_GET_DESCRIPTOR: if (ctrl->bRequestType != USB_DIR_) { got...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { int value = -EOPNOTSUPP; u16 w_length = le16_to_cpu(ctrl->wLength); if (w_length > RBUF_SIZE) { if (ctrl->bRequestType == USB_DIR_) { return value; } else { __le16 *temp = (__l...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int value = -EOPNOTSUPP; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 w_length = le16_to_cpu(ctrl->wLength); spin_lock (&dev->lock); /* PLACEHOLDER: DO N...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int value = -EOPNOTSUPP; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 w_length = le16_to_cpu(ctrl->wLength); if (w_length > RBUF_SIZE) { if (ctrl->bR...
static int gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) { int value = -EOPNOTSUPP; u16 w_length = le16_to_cpu(ctrl->wLength); + if (w_length > RBUF_SIZE) { + if (ctrl->bRequestType == USB_DIR_) { + return value; + } else { + __le16 *tem...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
bpf_map_do_batch
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { struct bpf_map *map; int err, ufd; struct fd f; if (CHECK_ATTR(BPF_MAP_BATCH)) { return -EVAL; } ufd = attr->batch.map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { ...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { bool has_read = cmd == BPF_MAP_LOOKUP_BATCH || cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH; bool has_write = cmd != BPF_MAP_LOOKUP_BATCH; struct bpf_map *map; int err, ufd; struct fd f; if (CHECK_ATTR(BPF_MAP_BA...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { struct bpf_map *map; int err, ufd; struct fd f; if (CHECK_ATTR(BPF_MAP_BATCH)) { return -EVAL; } ufd = attr->batch.map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { ...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { bool has_read = cmd == BPF_MAP_LOOKUP_BATCH || cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH; bool has_write = cmd != BPF_MAP_LOOKUP_BATCH; struct bpf_map *map; int err, ufd; struct fd f; if (CHECK_ATTR(BPF_MAP_BA...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { struct bpf_map *map; if (CHECK_ATTR(BPF_MAP_BATCH)) { return -EVAL; } ufd = attr->batch.map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } ...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { bool has_read = cmd == BPF_MAP_LOOKUP_BATCH || cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH; bool has_write = cmd != BPF_MAP_LOOKUP_BATCH; struct bpf_map *map; if (CHECK_ATTR(BPF_MAP_BATCH)) { return -EVAL; }...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { struct bpf_map *map; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (CHECK_ATTR(BPF_MAP_BATCH)) { return -EVAL; } ufd = attr->batch.map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_E...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { bool has_read = cmd == BPF_MAP_LOOKUP_BATCH || cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH; bool has_write = cmd != BPF_MAP_LOOKUP_BATCH; struct bpf_map *map; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (CHECK_...
static int bpf_map_do_batch(const union bpf_attr *attr, union bpf_attr *uattr, int cmd) { + bool has_read = cmd == BPF_MAP_LOOKUP_BATCH || cmd == BPF_MAP_LOOKUP_AND_DELETE_BATCH; + bool has_write = cmd != BPF_MAP_LOOKUP_BATCH; struct bpf_map *map; if (CHECK_ATTR(BPF_MAP_BATCH)) { return -EVAL;...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
bpf_map_mmap
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; int err; if (!map->ops->map_mmap || map_value_has_spin_lock(map) || map_value_has_timer(map)) { return -ENOTSUPP; } if (!(vma->vm_flags & VM_SHARED)) { return -EVAL; ...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; int err; if (!map->ops->map_mmap || map_value_has_spin_lock(map) || map_value_has_timer(map)) { return -ENOTSUPP; } if (!(vma->vm_flags & VM_SHARED)) { return -EVAL; ...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; int err; if (!map->ops->map_mmap || map_value_has_spin_lock(map)) { return -ENOTSUPP; } if (!(vma->vm_flags & VM_SHARED)) { return -EVAL; } mutex_lock(&map->free...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; int err; if (!map->ops->map_mmap || map_value_has_spin_lock(map)) { return -ENOTSUPP; } if (!(vma->vm_flags & VM_SHARED)) { return -EVAL; } mutex_lock(&map->free...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; if (!map->ops->map_mmap || map_value_has_spin_lock(map) || map_value_has_timer(map)) { return -ENOTSUPP; } err = map->ops->map_mmap(map, vma); if (vma->vm_flags & VM_MAYWRITE) {...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; if (!map->ops->map_mmap || map_value_has_spin_lock(map) || map_value_has_timer(map)) { return -ENOTSUPP; } err = map->ops->map_mmap(map, vma); if (vma->vm_flags & VM_MAYWRITE) {...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!map->ops->map_mmap || map_value_has_spin_lock(map)) { return -ENOTSUPP; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ er...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!map->ops->map_mmap || map_value_has_spin_lock(map)) { return -ENOTSUPP; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ er...
static int bpf_map_mmap(struct file *filp, struct vm_area_struct *vma) { struct bpf_map *map = filp->private_data; if (!map->ops->map_mmap || map_value_has_spin_lock(map) || map_value_has_timer(map)) { return -ENOTSUPP; } err = map->ops->map_mmap(map, vma); if (vma->vm_flags & VM_MAYW...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
bpf_map_mmap_close
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt--; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_dec(map); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt--; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_dec(map); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt--; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_dec(map); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt--; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_dec(map); } }
static void bpf_map_mmap_close(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { - mutex_lock(&map->freeze_mutex); - map->writecnt--; - mutex_unlock(&map->freeze_mutex); + bpf_map_write_active_dec(map); } }
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
bpf_map_mmap_open
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt++; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_inc(map); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt++; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_inc(map); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt++; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_inc(map); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { mutex_lock(&map->freeze_mutex); map->writecnt++; mutex_unlock(&map->freeze_mutex); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { bpf_map_write_active_inc(map); } }
static void bpf_map_mmap_open(struct vm_area_struct *vma) { struct bpf_map *map = vma->vm_file->private_data; if (vma->vm_flags & VM_MAYWRITE) { - mutex_lock(&map->freeze_mutex); - map->writecnt++; - mutex_unlock(&map->freeze_mutex); + bpf_map_write_active_inc(map); } }
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
map_delete_elem
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; struct bpf_map *map; struct fd f; void *key; int err; if (CHECK_ATTR(BPF_MAP_DELETE_ELEM)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if ...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; struct bpf_map *map; struct fd f; void *key; int err; if (CHECK_ATTR(BPF_MAP_DELETE_ELEM)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if ...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; struct bpf_map *map; struct fd f; void *key; int err; if (CHECK_ATTR(BPF_MAP_DELETE_ELEM)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if ...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; struct bpf_map *map; struct fd f; void *key; int err; if (CHECK_ATTR(BPF_MAP_DELETE_ELEM)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if ...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (!(map_get_sys_perms(map, f) & FMODE_CAN_WRITE)) { err = -EPERM; go...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } bpf_map_write_active_inc(map); if (!(map_get_sys_perms(map, f) & FMODE_CAN_WRITE))...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (!(map_get_sys_perms(map, f) & FM...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } bpf_map_write_active_inc(map); i...
static int map_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } + bpf_map_write_active_inc(map); if (!(map_get_sys_perms(map, f) & FMODE_C...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
map_freeze
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; struct bpf_map *map; struct fd f; if (CHECK_ATTR(BPF_MAP_FREEZE)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; struct bpf_map *map; struct fd f; if (CHECK_ATTR(BPF_MAP_FREEZE)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; struct bpf_map *map; struct fd f; if (CHECK_ATTR(BPF_MAP_FREEZE)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; struct bpf_map *map; struct fd f; if (CHECK_ATTR(BPF_MAP_FREEZE)) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS || map_value_has_timer(map)) { return -ENOTSUPP; } mutex_loc...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS || map_value_has_timer(map)) { return -ENOTSUPP; } mutex_loc...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS) { /* PLACEHOLDER: DO ...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS) { /* PLACEHOLDER: DO ...
static int map_freeze(const union bpf_attr *attr) { int err = 0, ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS || map_value_has_timer(map)) { return -ENOTSUPP; } ...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
map_lookup_and_delete_elem
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_LOOKUP_AND_...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_LOOKUP_AND_...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_LOOKUP_AND_...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_LOOKUP_AND_...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; if (attr->flags & ~BPF_F_LOCK) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } if (!(map_...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; if (attr->flags & ~BPF_F_LOCK) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } bpf_map_wr...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); int ufd = attr->map_fd; if (attr->flags & ~BPF_F_LOCK) { return -EVAL; } f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map); } + ...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/syscall.c
map_update_elem
static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr) { bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; ...
static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr) { bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; ...
static int map_update_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_UPDATE_ELEM)) { ...
static int map_update_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_UPDATE_ELEM)) { ...
static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr) { bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); int ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map);...
static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr) { bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); int ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map);...
static int map_update_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map...
static int map_update_elem(union bpf_attr *attr) { void *ukey = u64_to_user_ptr(attr->key); void *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_ERR(map...
static int map_update_elem(union bpf_attr *attr, bpfptr_t uattr) { bpfptr_t ukey = make_bpfptr(attr->key, uattr.is_kernel); bpfptr_t uvalue = make_bpfptr(attr->value, uattr.is_kernel); int ufd = attr->map_fd; f = fdget(ufd); map = __bpf_map_get(f); if (IS_ERR(map)) { return PTR_E...
CVE-2021-4001
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/verifier.c
bpf_map_is_rdonly
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && map->frozen; }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && READ_ONCE(map->frozen) && !bpf_map_write_active(map); }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && map->frozen; }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && READ_ONCE(map->frozen) && !bpf_map_write_active(map); }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && map->frozen; }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && READ_ONCE(map->frozen) && !bpf_map_write_active(map); }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && map->frozen; }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { return (map->map_flags & BPF_F_RDONLY_PROG) && READ_ONCE(map->frozen) && !bpf_map_write_active(map); }
static bool bpf_map_is_rdonly(const struct bpf_map *map) { - return (map->map_flags & BPF_F_RDONLY_PROG) && map->frozen; + return (map->map_flags & BPF_F_RDONLY_PROG) && READ_ONCE(map->frozen) && !bpf_map_write_active(map); }
CVE-2021-4002
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/hugetlb.c
__unmap_hugepage_range
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; unsigned long address; pte_t *ptep; pte_t pte; spinlock_t *ptl; struct page *page; struct hstate *h = hstate_vma...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; unsigned long address; pte_t *ptep; pte_t pte; spinlock_t *ptl; struct page *page; struct hstate *h = hstate_vma...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; unsigned long address; pte_t *ptep; pte_t pte; spinlock_t *ptl; struct page *page; struct hstate *h = hstate_vma...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; unsigned long address; pte_t *ptep; pte_t pte; spinlock_t *ptl; struct page *page; struct hstate *h = hstate_vma...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_size(h); struct mmu_notifier_range range; WARN_ON(!is_v...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_size(h); struct mmu_notifier_range range; bool force_fl...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_size(h); ...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_size(h); ...
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { struct mm_struct *mm = vma->vm_mm; struct hstate *h = hstate_vma(vma); unsigned long sz = huge_page_size(h); struct mmu_notifier_range range; + bool fo...
CVE-2021-4028
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/infiniband/core/cma.c
rdma_listen
int rdma_listen(struct rdma_cm_id *id, int backlog) { struct rdma_id_private *id_priv = container_of(id, struct rdma_id_private, id); int ret; if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { id->route.addr.src_addr.ss_family = AF_ET; ret = rdma_bind_addr(id, cma_src_addr(i...
int rdma_listen(struct rdma_cm_id *id, int backlog) { struct rdma_id_private *id_priv = container_of(id, struct rdma_id_private, id); int ret; if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { struct sockaddr_in any_in = { .sin_family = AF_ET, .sin_addr.s_addr = htonl(AD...
int rdma_listen(struct rdma_cm_id *id, int backlog) { struct rdma_id_private *id_priv = container_of(id, struct rdma_id_private, id); int ret; if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { id->route.addr.src_addr.ss_family = AF_ET; ret = rdma_bind_addr(id, cma_src_addr(i...
int rdma_listen(struct rdma_cm_id *id, int backlog) { struct rdma_id_private *id_priv = container_of(id, struct rdma_id_private, id); int ret; if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { struct sockaddr_in any_in = { .sin_family = AF_ET, .sin_addr.s_addr = htonl(AD...
int rdma_listen(struct rdma_cm_id *id, int backlog) { if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { id->route.addr.src_addr.ss_family = AF_ET; ret = rdma_bind_addr(id, cma_src_addr(id_priv)); if (ret) { return ret; } if (WARN_ON(!cma_comp_exch...
int rdma_listen(struct rdma_cm_id *id, int backlog) { if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { struct sockaddr_in any_in = { .sin_family = AF_ET, .sin_addr.s_addr = htonl(ADDR_ANY), }; ret = rdma_bind_addr(id, (struct sockaddr *)&any_in); if (ret...
int rdma_listen(struct rdma_cm_id *id, int backlog) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { id->route.addr.src_addr.ss_family = AF_ET; ret = rdma_bind_addr(id, cma_src_addr(id_priv)); if (ret) { return...
int rdma_listen(struct rdma_cm_id *id, int backlog) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { struct sockaddr_in any_in = { .sin_family = AF_ET, .sin_addr.s_addr = htonl(ADDR_ANY), }; ret = rdma_bind_add...
int rdma_listen(struct rdma_cm_id *id, int backlog) { if (!cma_comp_exch(id_priv, RDMA_CM_ADDR_BOUND, RDMA_CM_LISTEN)) { - id->route.addr.src_addr.ss_family = AF_ET; - ret = rdma_bind_addr(id, cma_src_addr(id_priv)); + struct sockaddr_in any_in = { + .sin_family = AF_ET, .sin_addr....
CVE-2021-40490
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/ext4/inline.c
ext4_write_inline_data_end
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { int ret, no_expand; void *kaddr; struct ext4_iloc iloc; if (unlikely(copied < len)) { if (!PageUptodate(page)) { copied = 0; goto out; } } r...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { int ret, no_expand; void *kaddr; struct ext4_iloc iloc; if (unlikely(copied < len)) { if (!PageUptodate(page)) { copied = 0; goto out; } } r...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { int ret, no_expand; void *kaddr; struct ext4_iloc iloc; if (unlikely(copied < len)) { if (!PageUptodate(page)) { copied = 0; goto out; } } r...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { int ret, no_expand; void *kaddr; struct ext4_iloc iloc; if (unlikely(copied < len)) { if (!PageUptodate(page)) { copied = 0; goto out; } } r...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { ret = ext4_get_inode_loc(inode, &iloc); ext4_write_lock_xattr(inode, &no_expand); BUG_ON(!ext4_has_inline_data(inode)); kaddr = kmap_atomic(page); ext4_write_inline_data(inode, &iloc, ...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { ret = ext4_get_inode_loc(inode, &iloc); ext4_write_lock_xattr(inode, &no_expand); BUG_ON(!ext4_has_inline_data(inode)); (void) ext4_find_inline_data_nolock(inode); kaddr = kmap_atomic(...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ret = ext4_get_inode_loc(inode, &iloc); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ext4_write_lock_xattr(inode, &no_expand); BUG_ON(!ex...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ret = ext4_get_inode_loc(inode, &iloc); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ext4_write_lock_xattr(inode, &no_expand); BUG_ON(!ex...
int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len, unsigned copied, struct page *page) { ret = ext4_get_inode_loc(inode, &iloc); ext4_write_lock_xattr(inode, &no_expand); BUG_ON(!ext4_has_inline_data(inode)); + (void) ext4_find_inline_data_nolock(inode); kaddr = kmap_a...
CVE-2021-41073
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/io_uring.c
loop_rw_iter
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; ssize_t ret = 0; if (kiocb->ki_flags & IOCB_HIPRI) { return -EOPNOTSUPP; } if (kiocb->ki_flags & IOCB_NOWAIT) { return -EAGA; ...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; ssize_t ret = 0; if (kiocb->ki_flags & IOCB_HIPRI) { return -EOPNOTSUPP; } if (kiocb->ki_flags & IOCB_NOWAIT) { return -EAGA; ...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; ssize_t ret = 0; if (kiocb->ki_flags & IOCB_HIPRI) { return -EOPNOTSUPP; } if (kiocb->ki_flags & IOCB_NOWAIT) { return -EAGA; ...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; ssize_t ret = 0; if (kiocb->ki_flags & IOCB_HIPRI) { return -EOPNOTSUPP; } if (kiocb->ki_flags & IOCB_NOWAIT) { return -EAGA; ...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; while (iov_iter_count(iter)) { struct iovec iovec; ssize_t nr; if (!iov_iter_is_bvec(iter)) { iovec = iov_iter_iovec(ite...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; while (iov_iter_count(iter)) { struct iovec iovec; ssize_t nr; if (!iov_iter_is_bvec(iter)) { iovec = iov_iter_iovec(ite...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ while (iov_iter_count(iter)) { struct iovec iovec; ssize_t nr; if (!iov_iter_is_bv...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ while (iov_iter_count(iter)) { struct iovec iovec; ssize_t nr; if (!iov_iter_is_bv...
static ssize_t loop_rw_iter(int rw, struct io_kiocb *req, struct iov_iter *iter) { struct kiocb *kiocb = &req->rw.kiocb; struct file *file = req->file; while (iov_iter_count(iter)) { struct iovec iovec; ssize_t nr; if (!iov_iter_is_bvec(iter)) { iovec = iov_iter_i...
CVE-2021-4135
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/netdevsim/bpf.c
nsim_bpf_map_alloc
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { struct nsim_bpf_bound_map *nmap; int i, err; if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && offmap->map.map_type != BPF_MAP_TYPE_HASH)) { return -EVAL; } if (offmap->map.max_entries > NSIM_BPF_...
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { struct nsim_bpf_bound_map *nmap; int i, err; if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && offmap->map.map_type != BPF_MAP_TYPE_HASH)) { return -EVAL; } if (offmap->map.max_entries > NSIM_BPF_...
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { struct nsim_bpf_bound_map *nmap; int i, err; if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && offmap->map.map_type != BPF_MAP_TYPE_HASH)) { return -EVAL; } if (offmap->map.max_entries > NSIM_BPF_...
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { struct nsim_bpf_bound_map *nmap; int i, err; if (WARN_ON(offmap->map.map_type != BPF_MAP_TYPE_ARRAY && offmap->map.map_type != BPF_MAP_TYPE_HASH)) { return -EVAL; } if (offmap->map.max_entries > NSIM_BPF_...
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { for (i = 0; i < ARRAY_SIZE(nmap->entry); i++) { *key = i; } } }
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { for (i = 0; i < ARRAY_SIZE(nmap->entry); i++) { *key = i; memset(nmap->entry[i].value, 0, offmap->map.value_size); } } }
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { for (i = 0; i < ARRAY_SIZE(nmap->entry); i++) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ *key = i; ...
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { for (i = 0; i < ARRAY_SIZE(nmap->entry); i++) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ *key = i; ...
static int nsim_bpf_map_alloc(struct netdevsim *ns, struct bpf_offloaded_map *offmap) { if (offmap->map.map_type == BPF_MAP_TYPE_ARRAY) { for (i = 0; i < ARRAY_SIZE(nmap->entry); i++) { *key = i; + memset(nmap->entry[i].value, 0, offmap->map.value_size); } } }
CVE-2021-4148
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/khugepaged.c
hugepage_vma_check
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) { return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR); } ...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (vma->vm_file && !IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR)) { return false; } if (shmem_file(vma->vm_fil...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) { return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR); } ...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (vma->vm_file && !IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR)) { return false; } if (shmem_file(vma->vm_fil...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) { return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR); } ...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (vma->vm_file && !IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR)) { return false; } if (shmem_file(vma->vm_fil...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) { return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR); } ...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } if (vma->vm_file && !IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR)) { return false; } if (shmem_file(vma->vm_fil...
static bool hugepage_vma_check(struct vm_area_struct *vma, unsigned long vm_flags) { if (!transhuge_vma_enabled(vma, vm_flags)) { return false; } - if (shmem_file(vma->vm_file) && shmem_huge_enabled(vma)) { - return IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff, HPAGE_PMD_NR); +...
CVE-2021-4149
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/btrfs/extent-tree.c
btrfs_alloc_tree_block
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_key ins; struct btrfs_block_rsv ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_key ins; struct btrfs_block_rsv ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_key ins; struct btrfs_block_rsv ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_key ins; struct btrfs_block_rsv ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; u32 blocksize = fs_info->nodesize; block_rsv ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; u32 blocksize = fs_info->nodesize; block_rsv ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 parent, u64 root_objectid, const struct btrfs_disk_key *key, int level, u64 hint, u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; u32 blocksize = fs_info->nodesize; block...
CVE-2021-4154
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/cgroup/cgroup-v1.c
cgroup1_parse_param
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); struct cgroup_subsys *ss; struct fs_parse_result result; int opt, i; opt = fs_parse(fc, cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); struct cgroup_subsys *ss; struct fs_parse_result result; int opt, i; opt = fs_parse(fc, cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); struct cgroup_subsys *ss; struct fs_parse_result result; int opt, i; opt = fs_parse(fc, &cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if ...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); struct cgroup_subsys *ss; struct fs_parse_result result; int opt, i; opt = fs_parse(fc, &cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if ...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); opt = fs_parse(fc, cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (strcmp(param->key, "source") == 0) { if (fc->source) { ...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); opt = fs_parse(fc, cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (strcmp(param->key, "source") == 0) { if (param->type != fs_value_is_s...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ opt = fs_parse(fc, &cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (strcmp(param->key, "source") =...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ opt = fs_parse(fc, &cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (strcmp(param->key, "source") =...
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); opt = fs_parse(fc, cgroup1_fs_parameters, param, &result); if (opt == -ENOPARAM) { if (strcmp(param->key, "source") == 0) { + if (param->type != fs_valu...
CVE-2021-4157
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/nfs/flexfilelayout/flexfilelayout.c
decode_nfs_fh
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { __be32 *p; p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > sizeof(struct nfs_fh)) { printk(KERN_ERR "NFS flexfiles: Too big fh received %d\n", ...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { __be32 *p; p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > NFS_MAXFHSIZE) { printk(KERN_ERR "NFS flexfiles: Too big fh received %d\n", fh->size...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { __be32 *p; p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > sizeof(struct nfs_fh)) { printk(KERN_ERR "NFS flexfiles: Too big fh received %d\n", ...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { __be32 *p; p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > NFS_MAXFHSIZE) { printk(KERN_ERR "NFS flexfiles: Too big fh received %d\n", fh->size...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > sizeof(struct nfs_fh)) { printk(KERN_ERR "NFS flexfiles: Too big fh received %d\n", fh->size); ...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > NFS_MAXFHSIZE) { printk(KERN_ERR "NFS flexfiles: Too big fh received %d\n", fh->size); retu...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > sizeof(struct nfs_fh)) { printk(KERN_ERR "NFS fle...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); if (fh->size > NFS_MAXFHSIZE) { printk(KERN_ERR "NFS flexfiles: ...
static int decode_nfs_fh(struct xdr_stream *xdr, struct nfs_fh *fh) { p = xdr_inline_decode(xdr, 4); if (unlikely(!p)) { return -ENOBUFS; } fh->size = be32_to_cpup(p++); - if (fh->size > sizeof(struct nfs_fh)) { + if (fh->size > NFS_MAXFHSIZE) { printk(KERN_ERR "NFS flexfile...
CVE-2021-4159
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/verifier.c
adjust_scalar_min_max_vals
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); bool src_known, dst_known; s64 smin_val, smax_val; u64 umin_val, umax_...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); bool src_known, dst_known; s64 smin_val, smax_val; u64 umin_val, umax_...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); bool src_known, dst_known; s64 smin_val, smax_val; u64 umin_val, umax_...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); bool src_known, dst_known; s64 smin_val, smax_val; u64 umin_val, umax_...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { if (insn_bitness == 32) { coerce_reg_to_size(dst_reg, 4); } dst_known = tnum_is_const(dst_reg->var_off); switch (opcode) { case BPF_MUL: ...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { if (insn_bitness == 32) { coerce_reg_to_size(dst_reg, 4); } dst_known = tnum_is_const(dst_reg->var_off); switch (opcode) { case BPF_MUL: ...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (insn_bitness == 32) { coerce_reg_to_size(dst_reg, 4); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (insn_bitness == 32) { coerce_reg_to_size(dst_reg, 4); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT...
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { if (insn_bitness == 32) { coerce_reg_to_size(dst_reg, 4); } dst_known = tnum_is_const(dst_reg->var_off); switch (opcode) { case BPF...
CVE-2021-41864
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/stackmap.c
prealloc_elems_and_freelist
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } err = pcpu...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u64 elem_size = sizeof(struct stack_map_bucket) + (u64)smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } err =...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } err = pcpu...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u64 elem_size = sizeof(struct stack_map_bucket) + (u64)smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } err =...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } pcpu_freel...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u64 elem_size = sizeof(struct stack_map_bucket) + (u64)smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } pcpu_...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } /* PLACEHO...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { u64 elem_size = sizeof(struct stack_map_bucket) + (u64)smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap->map.numa_node); if (!smap->elems) { return -ENOMEM; } /* PL...
static int prealloc_elems_and_freelist(struct bpf_stack_map *smap) { - u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size; + u64 elem_size = sizeof(struct stack_map_bucket) + (u64)smap->map.value_size; int err; smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries, smap...
CVE-2021-42008
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/hamradio/6pack.c
decode_data
static void decode_data(struct sixpack *sp, unsigned char inbyte) { unsigned char *buf; if (sp->rx_count != 3) { sp->raw_buf[sp->rx_count++] = inbyte; return; } buf = sp->raw_buf; sp->cooked_buf[sp->rx_count_cooked++] = buf[0] | ((buf[1] << 2) & 0xc0); sp->cooked_buf[sp->rx_count...
static void decode_data(struct sixpack *sp, unsigned char inbyte) { unsigned char *buf; if (sp->rx_count != 3) { sp->raw_buf[sp->rx_count++] = inbyte; return; } if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) { pr_err("6pack: cooked buffer overrun, data loss\n"); s...
static void decode_data(struct sixpack *sp, unsigned char inbyte) { unsigned char *buf; if (sp->rx_count != 3) { sp->raw_buf[sp->rx_count++] = inbyte; return; } buf = sp->raw_buf; sp->cooked_buf[sp->rx_count_cooked++] = buf[0] | ((buf[1] << 2) & 0xc0); sp->cooked_buf[sp->rx_count...
static void decode_data(struct sixpack *sp, unsigned char inbyte) { unsigned char *buf; if (sp->rx_count != 3) { sp->raw_buf[sp->rx_count++] = inbyte; return; } if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) { pr_err("6pack: cooked buffer overrun, data loss\n"); s...
static void decode_data(struct sixpack *sp, unsigned char inbyte) { if (sp->rx_count != 3) { return; } buf = sp->raw_buf; }
static void decode_data(struct sixpack *sp, unsigned char inbyte) { if (sp->rx_count != 3) { return; } if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) { pr_err("6pack: cooked buffer overrun, data loss\n"); sp->rx_count = 0; return; } buf = sp->raw_buf; }
static void decode_data(struct sixpack *sp, unsigned char inbyte) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (sp->rx_count != 3) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ return; } buf = sp->raw_buf; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
static void decode_data(struct sixpack *sp, unsigned char inbyte) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (sp->rx_count != 3) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ return; } if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) { pr_err("6pack: cooked buffer ove...
static void decode_data(struct sixpack *sp, unsigned char inbyte) { if (sp->rx_count != 3) { return; } + if (sp->rx_count_cooked + 2 >= sizeof(sp->cooked_buf)) { + pr_err("6pack: cooked buffer overrun, data loss\n"); + sp->rx_count = 0; + return; + } buf = sp->raw_buf...
CVE-2021-4202
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/nfc/nci/core.c
nci_request
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, const void *opt), const void *opt, __u32 timeout) { int rc; if (!test_bit(NCI_UP, &ndev->flags)) { return -ENETDOWN; } mutex_lock(&ndev->req_lock); rc = __nci_request(ndev, req, opt, timeout); mutex_unlock(&nd...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, const void *opt), const void *opt, __u32 timeout) { int rc; mutex_lock(&ndev->req_lock); if (test_bit(NCI_UP, &ndev->flags)) { rc = __nci_request(ndev, req, opt, timeout); } else { rc = -ENETDOWN; } mu...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, unsigned long opt), unsigned long opt, __u32 timeout) { int rc; if (!test_bit(NCI_UP, &ndev->flags)) { return -ENETDOWN; } mutex_lock(&ndev->req_lock); rc = __nci_request(ndev, req, opt, timeout); mutex_unlock...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, unsigned long opt), unsigned long opt, __u32 timeout) { int rc; mutex_lock(&ndev->req_lock); if (test_bit(NCI_UP, &ndev->flags)) { rc = __nci_request(ndev, req, opt, timeout); } else { rc = -ENETDOWN; } ...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, const void *opt), const void *opt, __u32 timeout) { int rc; if (!test_bit(NCI_UP, &ndev->flags)) { return -ENETDOWN; } mutex_lock(&ndev->req_lock); mutex_unlock(&ndev->req_lock); return rc; }
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, const void *opt), const void *opt, __u32 timeout) { int rc; mutex_lock(&ndev->req_lock); if (test_bit(NCI_UP, &ndev->flags)) { rc = __nci_request(ndev, req, opt, timeout); } else { rc = -ENETDOWN; } mu...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, unsigned long opt), unsigned long opt, __u32 timeout) { int rc; if (!test_bit(NCI_UP, &ndev->flags)) { return -ENETDOWN; } mutex_lock(&ndev->req_lock); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mutex_unloc...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, unsigned long opt), unsigned long opt, __u32 timeout) { int rc; mutex_lock(&ndev->req_lock); if (test_bit(NCI_UP, &ndev->flags)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else { rc = -ENETDOWN; } ...
inline int nci_request(struct nci_dev *ndev, void (*req)(struct nci_dev *ndev, const void *opt), const void *opt, __u32 timeout) { int rc; - if (!test_bit(NCI_UP, &ndev->flags)) { - return -ENETDOWN; + mutex_lock(&ndev->req_lock); + if (test_bit(NCI_UP, &ndev->flags)) { + rc = __nci_request...
CVE-2021-4203
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/core/sock.c
__sk_destruct
static void __sk_destruct(struct rcu_head *head) { struct sock *sk = container_of(head, struct sock, sk_rcu); struct sk_filter *filter; if (sk->sk_destruct) { sk->sk_destruct(sk); } filter = rcu_dereference_check(sk->sk_filter, refcount_read(&sk->sk_wmem_alloc) == 0); if (filter) { ...
static void __sk_destruct(struct rcu_head *head) { struct sock *sk = container_of(head, struct sock, sk_rcu); struct sk_filter *filter; if (sk->sk_destruct) { sk->sk_destruct(sk); } filter = rcu_dereference_check(sk->sk_filter, refcount_read(&sk->sk_wmem_alloc) == 0); if (filter) { ...
static void __sk_destruct(struct rcu_head *head) { struct sock *sk = container_of(head, struct sock, sk_rcu); struct sk_filter *filter; if (sk->sk_destruct) { sk->sk_destruct(sk); } filter = rcu_dereference_check(sk->sk_filter, atomic_read(&sk->sk_wmem_alloc) == 0); if (filter) { ...
static void __sk_destruct(struct rcu_head *head) { struct sock *sk = container_of(head, struct sock, sk_rcu); struct sk_filter *filter; if (sk->sk_destruct) { sk->sk_destruct(sk); } filter = rcu_dereference_check(sk->sk_filter, atomic_read(&sk->sk_wmem_alloc) == 0); if (filter) { ...
static void __sk_destruct(struct rcu_head *head) { if (sk->sk_frag.page) { sk->sk_frag.page = NULL; } if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } put_pid(sk->sk_peer_pid); }
static void __sk_destruct(struct rcu_head *head) { if (sk->sk_frag.page) { sk->sk_frag.page = NULL; } put_cred(sk->sk_peer_cred); put_pid(sk->sk_peer_pid); }
static void __sk_destruct(struct rcu_head *head) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (sk->sk_frag.page) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sk->sk_frag.page = NULL; } if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } put_pid(sk->sk_peer_pid); ...
static void __sk_destruct(struct rcu_head *head) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (sk->sk_frag.page) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sk->sk_frag.page = NULL; } put_cred(sk->sk_peer_cred); put_pid(sk->sk_peer_pid); /* PLACEHOLDER: DO NOT DELETE THIS C...
static void __sk_destruct(struct rcu_head *head) { if (sk->sk_frag.page) { sk->sk_frag.page = NULL; } - if (sk->sk_peer_cred) { - put_cred(sk->sk_peer_cred); - } + put_cred(sk->sk_peer_cred); put_pid(sk->sk_peer_pid); }
CVE-2021-4203
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/core/sock.c
sock_getsockopt
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; union { int val; u64 val64; struct linger ling; struct timeval tm; } v; int lv = sizeof(int); int len; if (get_user(len, optlen)) { re...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; union { int val; u64 val64; struct linger ling; struct timeval tm; } v; int lv = sizeof(int); int len; if (get_user(len, optlen)) { re...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; union { int val; struct linger ling; struct timeval tm; } v; int lv = sizeof(int); int len; if (get_user(len, optlen)) { return -EFAULT; }...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; union { int val; struct linger ling; struct timeval tm; } v; int lv = sizeof(int); int len; if (get_user(len, optlen)) { return -EFAULT; }...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; switch (optname) { case SO_PEERCRED: { if (len > sizeof(peercred)) { len = sizeof(peercred); } cred_to_ucred(sk->sk_peer_pid, sk->sk_peer_cred, &peerc...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; switch (optname) { case SO_PEERCRED: { if (len > sizeof(peercred)) { len = sizeof(peercred); } spin_lock(&sk->sk_peer_lock); cred_to_ucred(sk-...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (optname) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case SO_PEERCRED: { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT ...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (optname) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case SO_PEERCRED: { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT ...
int sock_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen) { struct sock *sk = sock->sk; switch (optname) { case SO_PEERCRED: { if (len > sizeof(peercred)) { len = sizeof(peercred); } + spin_lock(&sk->sk_peer_lock); cred_to_...
CVE-2021-4203
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/core/sock.c
sock_init_data
void sock_init_data(struct socket *sock, struct sock *sk) { sk_init_common(sk); sk->sk_send_head = NULL; init_timer(&sk->sk_timer); sk->sk_allocation = GFP_KERNEL; sk->sk_rcvbuf = sysctl_rmem_default; sk->sk_sndbuf = sysctl_wmem_default; sk->sk_state = TCP_CLOSE; sk_set_socket(sk, sock);...
void sock_init_data(struct socket *sock, struct sock *sk) { sk_init_common(sk); sk->sk_send_head = NULL; init_timer(&sk->sk_timer); sk->sk_allocation = GFP_KERNEL; sk->sk_rcvbuf = sysctl_rmem_default; sk->sk_sndbuf = sysctl_wmem_default; sk->sk_state = TCP_CLOSE; sk_set_socket(sk, sock);...
void sock_init_data(struct socket *sock, struct sock *sk) { skb_queue_head_init(&sk->sk_receive_queue); skb_queue_head_init(&sk->sk_write_queue); skb_queue_head_init(&sk->sk_error_queue); sk->sk_send_head = NULL; init_timer(&sk->sk_timer); sk->sk_allocation = GFP_KERNEL; sk->sk_rcvbuf = sysc...
void sock_init_data(struct socket *sock, struct sock *sk) { skb_queue_head_init(&sk->sk_receive_queue); skb_queue_head_init(&sk->sk_write_queue); skb_queue_head_init(&sk->sk_error_queue); sk->sk_send_head = NULL; init_timer(&sk->sk_timer); sk->sk_allocation = GFP_KERNEL; sk->sk_rcvbuf = sysc...
void sock_init_data(struct socket *sock, struct sock *sk) { sk_init_common(sk); sk_set_socket(sk, sock); sock_set_flag(sk, SOCK_ZAPPED); if (sock) { } else { sk->sk_uid = make_kuid(sock_net(sk)->user_ns, 0); } sk->sk_peer_cred = NULL; sk->sk_write_pending = 0; }
void sock_init_data(struct socket *sock, struct sock *sk) { sk_init_common(sk); sk_set_socket(sk, sock); sock_set_flag(sk, SOCK_ZAPPED); if (sock) { } else { sk->sk_uid = make_kuid(sock_net(sk)->user_ns, 0); } sk->sk_peer_cred = NULL; spin_lock_init(&sk->sk_peer_lock); sk->sk...
void sock_init_data(struct socket *sock, struct sock *sk) { skb_queue_head_init(&sk->sk_receive_queue); skb_queue_head_init(&sk->sk_write_queue); skb_queue_head_init(&sk->sk_error_queue); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sk_set_socket(sk, sock); sock_set_flag(sk, SOCK_ZAPPED); i...
void sock_init_data(struct socket *sock, struct sock *sk) { skb_queue_head_init(&sk->sk_receive_queue); skb_queue_head_init(&sk->sk_write_queue); skb_queue_head_init(&sk->sk_error_queue); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sk_set_socket(sk, sock); sock_set_flag(sk, SOCK_ZAPPED); i...
void sock_init_data(struct socket *sock, struct sock *sk) { sk_init_common(sk); sk_set_socket(sk, sock); sock_set_flag(sk, SOCK_ZAPPED); if (sock) { } else { sk->sk_uid = make_kuid(sock_net(sk)->user_ns, 0); } sk->sk_peer_cred = NULL; + spin_lock_init(&sk->sk_peer_lock); ...
CVE-2021-4203
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/unix/af_unix.c
copy_peercred
static void copy_peercred(struct sock *sk, struct sock *peersk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(peersk->sk_peer_pid); sk->sk_peer_cred = get_cred(peersk->sk_peer_cred); }
static void copy_peercred(struct sock *sk, struct sock *peersk) { const struct cred *old_cred; struct pid *old_pid; if (sk < peersk) { spin_lock(&sk->sk_peer_lock); spin_lock_nested(&peersk->sk_peer_lock, SGLE_DEPTH_NESTG); } else { spin_lock(&peersk->sk_peer_lock); spin_...
static void copy_peercred(struct sock *sk, struct sock *peersk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(peersk->sk_peer_pid); sk->sk_peer_cred = get_cred(peersk->sk_peer_cred); }
static void copy_peercred(struct sock *sk, struct sock *peersk) { const struct cred *old_cred; struct pid *old_pid; if (sk < peersk) { spin_lock(&sk->sk_peer_lock); spin_lock_nested(&peersk->sk_peer_lock, SGLE_DEPTH_NESTG); } else { spin_lock(&peersk->sk_peer_lock); spin_...
static void copy_peercred(struct sock *sk, struct sock *peersk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(peersk->sk_peer_pid); sk->sk_peer_cred = get_cred(peersk->sk_peer_cred); }
static void copy_peercred(struct sock *sk, struct sock *peersk) { const struct cred *old_cred; struct pid *old_pid; if (sk < peersk) { spin_lock(&sk->sk_peer_lock); spin_lock_nested(&peersk->sk_peer_lock, SGLE_DEPTH_NESTG); } else { spin_lock(&peersk->sk_peer_lock); spin_...
static void copy_peercred(struct sock *sk, struct sock *peersk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(peersk->sk_peer_pid); sk->sk_peer_cred = get_cred(peersk->sk_peer_cred); }
static void copy_peercred(struct sock *sk, struct sock *peersk) { const struct cred *old_cred; struct pid *old_pid; if (sk < peersk) { spin_lock(&sk->sk_peer_lock); spin_lock_nested(&peersk->sk_peer_lock, SGLE_DEPTH_NESTG); } else { spin_lock(&peersk->sk_peer_lock); spin_...
static void copy_peercred(struct sock *sk, struct sock *peersk) { - put_pid(sk->sk_peer_pid); - if (sk->sk_peer_cred) { - put_cred(sk->sk_peer_cred); + const struct cred *old_cred; + struct pid *old_pid; + if (sk < peersk) { + spin_lock(&sk->sk_peer_lock); + spin_lock_nested(&peersk...
CVE-2021-4203
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/unix/af_unix.c
init_peercred
static void init_peercred(struct sock *sk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); }
static void init_peercred(struct sock *sk) { const struct cred *old_cred; struct pid *old_pid; spin_lock(&sk->sk_peer_lock); old_pid = sk->sk_peer_pid; old_cred = sk->sk_peer_cred; sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); spin_unlock(&sk->sk_p...
static void init_peercred(struct sock *sk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); }
static void init_peercred(struct sock *sk) { const struct cred *old_cred; struct pid *old_pid; spin_lock(&sk->sk_peer_lock); old_pid = sk->sk_peer_pid; old_cred = sk->sk_peer_cred; sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); spin_unlock(&sk->sk_p...
static void init_peercred(struct sock *sk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); }
static void init_peercred(struct sock *sk) { const struct cred *old_cred; struct pid *old_pid; spin_lock(&sk->sk_peer_lock); old_pid = sk->sk_peer_pid; old_cred = sk->sk_peer_cred; sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); spin_unlock(&sk->sk_p...
static void init_peercred(struct sock *sk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) { put_cred(sk->sk_peer_cred); } sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); }
static void init_peercred(struct sock *sk) { const struct cred *old_cred; struct pid *old_pid; spin_lock(&sk->sk_peer_lock); old_pid = sk->sk_peer_pid; old_cred = sk->sk_peer_cred; sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); spin_unlock(&sk->sk_p...
static void init_peercred(struct sock *sk) { - put_pid(sk->sk_peer_pid); - if (sk->sk_peer_cred) { - put_cred(sk->sk_peer_cred); - } + const struct cred *old_cred; + struct pid *old_pid; + spin_lock(&sk->sk_peer_lock); + old_pid = sk->sk_peer_pid; + old_cred = sk->sk_peer_cred; sk->...
CVE-2021-42252
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/soc/aspeed/aspeed-lpc-ctrl.c
aspeed_lpc_ctrl_mmap
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vsize > lpc_ctrl->mem_base + lpc_ctrl->mem_size) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vma_pages(vma) > lpc_ctrl->mem_size >> PAGE_SHIFT) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vsize > lpc_ctrl->mem_base + lpc_ctrl->mem_size) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vma_pages(vma) > lpc_ctrl->mem_size >> PAGE_SHIFT) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vsize > lpc_ctrl->mem_base + lpc_ctrl->mem_size) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vma_pages(vma) > lpc_ctrl->mem_size >> PAGE_SHIFT) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vsize > lpc_ctrl->mem_base + lpc_ctrl->mem_size) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; if (vma->vm_pgoff + vma_pages(vma) > lpc_ctrl->mem_size >> PAGE_SHIFT) { ...
static int aspeed_lpc_ctrl_mmap(struct file *file, struct vm_area_struct *vma) { struct aspeed_lpc_ctrl *lpc_ctrl = file_aspeed_lpc_ctrl(file); unsigned long vsize = vma->vm_end - vma->vm_start; pgprot_t prot = vma->vm_page_prot; - if (vma->vm_pgoff + vsize > lpc_ctrl->mem_base + lpc_ctrl->mem_size) ...
CVE-2021-42327
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
dp_link_settings_write
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { struct amdgpu_dm_connector *connector = file_inode(f)->i_private; struct dc_link *link = connector->dc_link; struct dc_link_settings prefer_link_settings; char *wr_buf = NULL; const uint32_t wr_buf_siz...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { struct amdgpu_dm_connector *connector = file_inode(f)->i_private; struct dc_link *link = connector->dc_link; struct dc_link_settings prefer_link_settings; char *wr_buf = NULL; const uint32_t wr_buf_siz...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { struct amdgpu_dm_connector *connector = file_inode(f)->i_private; struct dc_link *link = connector->dc_link; struct dc_link_settings prefer_link_settings; char *wr_buf = NULL; const uint32_t wr_buf_siz...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { struct amdgpu_dm_connector *connector = file_inode(f)->i_private; struct dc_link *link = connector->dc_link; struct dc_link_settings prefer_link_settings; char *wr_buf = NULL; const uint32_t wr_buf_siz...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { const uint32_t wr_buf_size = 40; int max_param_num = 2; uint8_t param_nums = 0; if (size == 0) { return -EVAL; } wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); if (!wr_buf) { ...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { const uint32_t wr_buf_size = 40; int max_param_num = 2; uint8_t param_nums = 0; if (size == 0) { return -EVAL; } wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); if (!wr_buf) { ...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ const uint32_t wr_buf_size = 40; int max_param_num = 2; uint8_t param_nums = 0; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (size == 0) { ...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ const uint32_t wr_buf_size = 40; int max_param_num = 2; uint8_t param_nums = 0; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (size == 0) { ...
static ssize_t dp_link_settings_write(struct file *f, const char *buf, size_t size, loff_t *pos) { const uint32_t wr_buf_size = 40; int max_param_num = 2; uint8_t param_nums = 0; if (size == 0) { return -EVAL; } wr_buf = kcalloc(wr_buf_size, sizeof(char), GFP_KERNEL); if (!w...
CVE-2021-42739
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/media/firewire/firedtv-avc.c
avc_ca_pmt
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data; int list_management; int program_info_length; int pmt_cmd_id; int read_pos; int write_pos; int es_info_length; in...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data; int list_management; int program_info_length; int pmt_cmd_id; int read_pos; int write_pos; int es_info_length; in...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data; int list_management; int program_info_length; int pmt_cmd_id; int read_pos; int write_pos; int es_info_length; in...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { struct avc_command_frame *c = (void *)fdtv->avc_data; struct avc_response_frame *r = (void *)fdtv->avc_data; int list_management; int program_info_length; int pmt_cmd_id; int read_pos; int write_pos; int es_info_length; in...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) { debug_pmt(msg, length); } program_info_length = ((msg[4] & 0x0f) << 8) + msg[5]; if (program_info_length > 0) { program_info_length--; } c->operand[22] = (program_...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) { debug_pmt(msg, length); } program_info_length = ((msg[4] & 0x0f) << 8) + msg[5]; if (program_info_length > 0) { program_info_length--; } c->operand[22] = (program_...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) { debug_pmt(msg, length); } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ program_info_length = ((msg[4] & 0x0f) << 8) + msg[5]; ...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) { debug_pmt(msg, length); } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ program_info_length = ((msg[4] & 0x0f) << 8) + msg[5]; ...
int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { if (unlikely(avc_debug & AVC_DEBUG_APPLICATION_PMT)) { debug_pmt(msg, length); } program_info_length = ((msg[4] & 0x0f) << 8) + msg[5]; if (program_info_length > 0) { program_info_length--; } c->operand[22] = ...
CVE-2021-42739
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/media/firewire/firedtv-ci.c
fdtv_ca_pmt
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { struct ca_msg *msg = arg; int data_pos; int data_length; int i; data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[da...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { struct ca_msg *msg = arg; int data_pos; int data_length; int i; data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[da...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { struct ca_msg *msg = arg; int data_pos; int data_length; int i; data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[da...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { struct ca_msg *msg = arg; int data_pos; int data_length; int i; data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[da...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[data_pos++]; } else { data_length = msg->msg[3]; } return avc_...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[data_pos++]; } else { data_length = msg->msg[3]; } if (data_le...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[data_pos++]; } else { ...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[data_pos++]; } else { ...
static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) { data_pos = 4; if (msg->msg[3] & 0x80) { data_length = 0; for (i = 0; i < (msg->msg[3] & 0x7f); i++) data_length = (data_length << 8) + msg->msg[data_pos++]; } else { data_length = msg->msg[3]; } + i...
CVE-2021-43267
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/tipc/crypto.c
tipc_crypto_key_rcv
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { struct tipc_crypto *tx = tipc_net(rx->net)->crypto_tx; struct tipc_aead_key *skey = NULL; u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); spin_lock(&rx->lock); if (unlikely(...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { struct tipc_crypto *tx = tipc_net(rx->net)->crypto_tx; struct tipc_aead_key *skey = NULL; u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); unsigned int keylen; if (unlikely(s...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { struct tipc_crypto *tx = tipc_net(rx->net)->crypto_tx; struct tipc_aead_key *skey = NULL; u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); spin_lock(&rx->lock); if (unlikely(...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { struct tipc_crypto *tx = tipc_net(rx->net)->crypto_tx; struct tipc_aead_key *skey = NULL; u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); unsigned int keylen; if (unlikely(s...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); spin_lock(&rx->lock); if (unlikely(rx->skey || (key_gen == rx->key_gen && rx->key.keys))) { pr_err("%s: key existed <%p>, gen...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); unsigned int keylen; if (unlikely(size < sizeof(struct tipc_aead_key) + TIPC_AEAD_KEYLEN_M)) { pr_debug("%s: message data siz...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); spin_lock(&rx->lock); if (unlikely(rx->skey || (key_gen == rx->key_gen && rx->key.k...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); unsigned int keylen; if (unlikely(size < sizeof(struct tipc_aead_key) + TIPC_AEAD_K...
static bool tipc_crypto_key_rcv(struct tipc_crypto *rx, struct tipc_msg *hdr) { u16 key_gen = msg_key_gen(hdr); u16 size = msg_data_sz(hdr); u8 *data = msg_data(hdr); + unsigned int keylen; + if (unlikely(size < sizeof(struct tipc_aead_key) + TIPC_AEAD_KEYLEN_M)) { + pr_debug("%s: message d...
CVE-2021-43389
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/isdn/capi/kcapi.c
detach_capi_ctr
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; ncontrollers--; if (ctr->procent...
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; ...
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; ncontrollers--; if (ctr->procent...
int detach_capi_ctr(struct capi_ctr *ctr) { int err = 0; mutex_lock(&capi_controller_lock); ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { err = -EVAL; ...
int detach_capi_ctr(struct capi_ctr *ctr) { ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; if (ctr->procent) { remove_proc_entry(ctr->procfn, NULL); } unlock_out: mutex_unlock(&capi_contro...
int detach_capi_ctr(struct capi_ctr *ctr) { ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; if (...
int detach_capi_ctr(struct capi_ctr *ctr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctr_down(ctr, CAPI_CTR_DETACHED); if (capi_controller[ctr->cnr - 1] != ctr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL; /* PLACEHOLDE...
int detach_capi_ctr(struct capi_ctr *ctr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctr_down(ctr, CAPI_CTR_DETACHED); if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { err = -EVAL; goto unlock_out; } if (capi_controller[ctr->cnr - 1] != ctr) { /* PLACEHOLDER: DO NOT DELE...
int detach_capi_ctr(struct capi_ctr *ctr) { ctr_down(ctr, CAPI_CTR_DETACHED); + if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { + err = -EVAL; + goto unlock_out; + } if (capi_controller[ctr->cnr - 1] != ctr) { goto unlock_out; } capi_controller[ctr->cnr - 1] = NULL...
CVE-2021-43975
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
hw_atl_utils_fw_rpc_wait
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_aq_atl_utils_fw_rpc **rpc) { int err = 0; struct aq_hw_atl_utils_fw_rpc_tid_s sw; struct aq_hw_atl_utils_fw_rpc_tid_s fw; do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; AQ_HW_WAIT_FO...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_aq_atl_utils_fw_rpc **rpc) { int err = 0; struct aq_hw_atl_utils_fw_rpc_tid_s sw; struct aq_hw_atl_utils_fw_rpc_tid_s fw; do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; AQ_HW_WAIT_FO...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_atl_utils_fw_rpc **rpc) { struct aq_hw_atl_utils_fw_rpc_tid_s sw; struct aq_hw_atl_utils_fw_rpc_tid_s fw; int err = 0; do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; err = readx_poll...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_atl_utils_fw_rpc **rpc) { struct aq_hw_atl_utils_fw_rpc_tid_s sw; struct aq_hw_atl_utils_fw_rpc_tid_s fw; int err = 0; do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; err = readx_poll...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_aq_atl_utils_fw_rpc **rpc) { do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; AQ_HW_WAIT_FOR(sw.tid == (fw.val = aq_hw_read_reg(self, HW_ATL_RPC_STATE_ADR), fw.tid), 1000U, 100U); if (err ...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_aq_atl_utils_fw_rpc **rpc) { do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; AQ_HW_WAIT_FOR(sw.tid == (fw.val = aq_hw_read_reg(self, HW_ATL_RPC_STATE_ADR), fw.tid), 1000U, 100U); if (err ...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_atl_utils_fw_rpc **rpc) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; err = readx_poll_timeout_atomic(hw_atl_utils_rpc_state_get, self, fw.va...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_atl_utils_fw_rpc **rpc) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; err = readx_poll_timeout_atomic(hw_atl_utils_rpc_state_get, self, fw.va...
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, struct hw_aq_atl_utils_fw_rpc **rpc) { do { sw.val = aq_hw_read_reg(self, HW_ATL_RPC_CONTROL_ADR); self->rpc_tid = sw.tid; AQ_HW_WAIT_FOR(sw.tid == (fw.val = aq_hw_read_reg(self, HW_ATL_RPC_STATE_ADR), fw.tid), 1000U, 100U); if...
CVE-2021-43976
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/wireless/marvell/mwifiex/usb.c
mwifiex_usb_recv
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { u32 recv_type; __le32 tmp; int ret; if (adapter->hs_activated) { mwifiex_process_hs_config(adapter); } if (skb->len < TF_HEADER_LEN) { mwifiex_dbg(adapter, ERROR, "%s: invalid skb->len\n", ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { u32 recv_type; __le32 tmp; int ret; if (adapter->hs_activated) { mwifiex_process_hs_config(adapter); } if (skb->len < TF_HEADER_LEN) { mwifiex_dbg(adapter, ERROR, "%s: invalid skb->len\n", ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { u32 recv_type; __le32 tmp; int ret; if (adapter->hs_activated) { mwifiex_process_hs_config(adapter); } if (skb->len < TF_HEADER_LEN) { mwifiex_dbg(adapter, ERROR, "%s: invalid skb->len\n", ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { u32 recv_type; __le32 tmp; int ret; if (adapter->hs_activated) { mwifiex_process_hs_config(adapter); } if (skb->len < TF_HEADER_LEN) { mwifiex_dbg(adapter, ERROR, "%s: invalid skb->len\n", ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { switch (ep) { case MWIFIEX_USB_EP_CMD_EVENT: switch (recv_type) { default: mwifiex_dbg(adapter, ERROR, "unknown recv_type %#x\n", recv_type); return -1; } break; ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { switch (ep) { case MWIFIEX_USB_EP_CMD_EVENT: switch (recv_type) { default: mwifiex_dbg(adapter, ERROR, "unknown recv_type %#x\n", recv_type); ret = -1; goto exit_restore...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (ep) { case MWIFIEX_USB_EP_CMD_EVENT: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (recv_type) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (ep) { case MWIFIEX_USB_EP_CMD_EVENT: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (recv_type) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT ...
static int mwifiex_usb_recv(struct mwifiex_adapter *adapter, struct sk_buff *skb, u8 ep) { switch (ep) { case MWIFIEX_USB_EP_CMD_EVENT: switch (recv_type) { default: mwifiex_dbg(adapter, ERROR, "unknown recv_type %#x\n", recv_type); - return -1; + ret = -1...
CVE-2021-44879
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/f2fs/gc.c
gc_data_segment
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; struct f2fs_summary *entry; block_t start_addr; int off; int phase = 0; int submitted = 0; un...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; struct f2fs_summary *entry; block_t start_addr; int off; int phase = 0; int submitted = 0; un...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; struct f2fs_summary *entry; block_t start_addr; int off; int phase = 0; int submitted = 0; un...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; struct f2fs_summary *entry; block_t start_addr; int off; int phase = 0; int submitted = 0; un...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; unsigned int usable_blks_in_seg = f2fs_usable_blks_in_seg(sbi, segno); start_addr = START_BLOCK(sbi, segno); ...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; unsigned int usable_blks_in_seg = f2fs_usable_blks_in_seg(sbi, segno); start_addr = START_BLOCK(sbi, segno); ...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ unsigned int usable_blks_in_seg = f2fs_usable_blks_in_seg(sbi, ...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ unsigned int usable_blks_in_seg = f2fs_usable_blks_in_seg(sbi, ...
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, struct gc_inode_list *gc_list, unsigned int segno, int gc_type, bool force_migrate) { struct super_block *sb = sbi->sb; unsigned int usable_blks_in_seg = f2fs_usable_blks_in_seg(sbi, segno); start_addr = START_BLOCK(sbi, segn...
CVE-2021-45095
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/phonet/pep.c
pep_sock_accept
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp) { struct pep_sock *pn = pep_sk(sk), *newpn; struct sock *newsk = NULL; struct sk_buff *skb; struct pnpipehdr *hdr; struct sockaddr_pn dst, src; int err; u16 peer_type; u8 pipe_handle, enabled, n_sb; u8 aligned...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp) { struct pep_sock *pn = pep_sk(sk), *newpn; struct sock *newsk = NULL; struct sk_buff *skb; struct pnpipehdr *hdr; struct sockaddr_pn dst, src; int err; u16 peer_type; u8 pipe_handle, enabled, n_sb; u8 aligned...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp, bool kern) { struct pep_sock *pn = pep_sk(sk), *newpn; struct sock *newsk = NULL; struct sk_buff *skb; struct pnpipehdr *hdr; struct sockaddr_pn dst, src; int err; u16 peer_type; u8 pipe_handle, enabled, n_sb; ...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp, bool kern) { struct pep_sock *pn = pep_sk(sk), *newpn; struct sock *newsk = NULL; struct sk_buff *skb; struct pnpipehdr *hdr; struct sockaddr_pn dst, src; int err; u16 peer_type; u8 pipe_handle, enabled, n_sb; ...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp) { struct pep_sock *pn = pep_sk(sk), *newpn; skb = skb_recv_datagram(sk, 0, flags & O_NONBLOCK, errp); lock_sock(sk); sk_acceptq_removed(sk); newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_KERNEL, sk->sk_prot, 0); sock_hold...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp) { struct pep_sock *pn = pep_sk(sk), *newpn; skb = skb_recv_datagram(sk, 0, flags & O_NONBLOCK, errp); lock_sock(sk); sk_acceptq_removed(sk); newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_KERNEL, sk->sk_prot, 0); sock_hold...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp, bool kern) { struct pep_sock *pn = pep_sk(sk), *newpn; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ skb = skb_recv_datagram(sk, 0, flags & O_NONBLOCK, errp); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ lock_sock(sk); /...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp, bool kern) { struct pep_sock *pn = pep_sk(sk), *newpn; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ skb = skb_recv_datagram(sk, 0, flags & O_NONBLOCK, errp); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ lock_sock(sk); /...
static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp) { struct pep_sock *pn = pep_sk(sk), *newpn; skb = skb_recv_datagram(sk, 0, flags & O_NONBLOCK, errp); lock_sock(sk); sk_acceptq_removed(sk); newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_KERNEL, sk->sk_prot, 0); so...
CVE-2021-45402
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/verifier.c
check_alu_op
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); int err; if (opcode == BPF_END || opcode == BPF_NEG) { if (opcode == BPF_NEG) { if (BPF_SRC(insn->code) != 0 || insn->src_reg != ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); int err; if (opcode == BPF_END || opcode == BPF_NEG) { if (opcode == BPF_NEG) { if (BPF_SRC(insn->code) != 0 || insn->src_reg != ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); int err; if (opcode == BPF_END || opcode == BPF_NEG) { if (opcode == BPF_NEG) { if (BPF_SRC(insn->code) != 0 || insn->src_reg != ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); int err; if (opcode == BPF_END || opcode == BPF_NEG) { if (opcode == BPF_NEG) { if (BPF_SRC(insn->code) != 0 || insn->src_reg != ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); if (opcode == BPF_END || opcode == BPF_NEG) { } else if (opcode == BPF_MOV) { if (BPF_SRC(insn->code) == BPF_X) { err = check_reg_arg(env, insn->src_reg, SRC_OP); ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); if (opcode == BPF_END || opcode == BPF_NEG) { } else if (opcode == BPF_MOV) { if (BPF_SRC(insn->code) == BPF_X) { err = check_reg_arg(env, insn->src_reg, SRC_OP); ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (opcode == BPF_END || opcode == BPF_NEG) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else if (opcode == BPF_MOV) { ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (opcode == BPF_END || opcode == BPF_NEG) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else if (opcode == BPF_MOV) { ...
static int check_alu_op(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); if (opcode == BPF_END || opcode == BPF_NEG) { } else if (opcode == BPF_MOV) { if (BPF_SRC(insn->code) == BPF_X) { err = check_reg_arg(env, insn->src_reg, SRC_O...
CVE-2021-45469
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/f2fs/xattr.c
__f2fs_setxattr
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { struct f2fs_xattr_entry *here, *last; void *base_addr, *last_base_addr; nid_t xnid = F2FS_I(inode)->i_xattr_nid; int found, newsize; size_t len; __u32 new...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { struct f2fs_xattr_entry *here, *last; void *base_addr, *last_base_addr; nid_t xnid = F2FS_I(inode)->i_xattr_nid; int found, newsize; size_t len; __u32 new...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { struct f2fs_xattr_entry *here, *last; void *base_addr, *last_base_addr; int found, newsize; size_t len; __u32 new_hsize; int error; if (name == NULL) ...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { struct f2fs_xattr_entry *here, *last; void *base_addr, *last_base_addr; int found, newsize; size_t len; __u32 new_hsize; int error; if (name == NULL) ...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { nid_t xnid = F2FS_I(inode)->i_xattr_nid; if (name == NULL) { return -EVAL; } if (value == NULL) { size = 0; } len = strlen(name); if (...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { nid_t xnid = F2FS_I(inode)->i_xattr_nid; if (name == NULL) { return -EVAL; } if (value == NULL) { size = 0; } len = strlen(name); if (...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (name == NULL) { return -EVAL; } if (value == NULL) { size = 0; } len = strlen(name); ...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (name == NULL) { return -EVAL; } if (value == NULL) { size = 0; } len = strlen(name); ...
static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) { nid_t xnid = F2FS_I(inode)->i_xattr_nid; if (name == NULL) { return -EVAL; } if (value == NULL) { size = 0; } len = strlen(name);...
CVE-2021-45485
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/ipv6/output_core.c
__ipv6_select_ident
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { const struct { struct in6_addr dst; struct in6_addr src; } __aligned(SIPHASH_ALIGNMENT) combined = { .dst = *dst, .src = *src, }; u32 hash, id; if (unlikely(siphash_key_i...
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { u32 id; do { id = prandom_u32(); } while (!id); return id; }
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { const struct { struct in6_addr dst; struct in6_addr src; } __aligned(SIPHASH_ALIGNMENT) combined = { .dst = *dst, .src = *src, }; u32 hash, id; if (unlikely(siphash_key_i...
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { u32 id; do { id = prandom_u32(); } while (!id); return id; }
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { const struct { struct in6_addr dst; struct in6_addr src; } __aligned(SIPHASH_ALIGNMENT) combined = { .dst = *dst, .src = *src, }; u32 hash, id; if (unlikely(siphash_key_i...
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { u32 id; do { id = prandom_u32(); } while (!id); return id; }
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { const struct { struct in6_addr dst; struct in6_addr src; } __aligned(SIPHASH_ALIGNMENT) combined = { .dst = *dst, .src = *src, }; u32 hash, id; if (unlikely(siphash_key_i...
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { u32 id; do { id = prandom_u32(); } while (!id); return id; }
static u32 __ipv6_select_ident(struct net *net, const struct in6_addr *dst, const struct in6_addr *src) { - const struct { - struct in6_addr dst; - struct in6_addr src; - } __aligned(SIPHASH_ALIGNMENT) combined = { - .dst = *dst, .src = *src, - }; - u32 hash, id; - if (unlikely(siph...
CVE-2021-45486
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/ipv4/route.c
ip_idents_reserve
u32 ip_idents_reserve(u32 hash, int segs) { u32 *p_tstamp = ip_tstamps + hash % IP_IDENTS_SZ; atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ; u32 old = READ_ONCE(*p_tstamp); u32 now = (u32)jiffies; u32 delta = 0; if (old != now && cmpxchg(p_tstamp, old, now) == old) { delta = prandom_u...
u32 ip_idents_reserve(u32 hash, int segs) { u32 bucket, old, now = (u32)jiffies; atomic_t *p_id; u32 *p_tstamp; u32 delta = 0; bucket = hash & ip_idents_mask; p_tstamp = ip_tstamps + bucket; p_id = ip_idents + bucket; old = READ_ONCE(*p_tstamp); if (old != now && cmpxchg(p_tstamp, ol...
u32 ip_idents_reserve(u32 hash, int segs) { u32 *p_tstamp = ip_tstamps + hash % IP_IDENTS_SZ; atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ; u32 old = ACCESS_ONCE(*p_tstamp); u32 now = (u32)jiffies; u32 delta = 0; if (old != now && cmpxchg(p_tstamp, old, now) == old) { delta = prandom...
u32 ip_idents_reserve(u32 hash, int segs) { u32 bucket, old, now = (u32)jiffies; atomic_t *p_id; u32 *p_tstamp; u32 delta = 0; bucket = hash & ip_idents_mask; p_tstamp = ip_tstamps + bucket; p_id = ip_idents + bucket; old = ACCESS_ONCE(*p_tstamp); if (old != now && cmpxchg(p_tstamp, ...
u32 ip_idents_reserve(u32 hash, int segs) { u32 *p_tstamp = ip_tstamps + hash % IP_IDENTS_SZ; atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ; u32 old = READ_ONCE(*p_tstamp); u32 now = (u32)jiffies; u32 delta = 0; if (old != now && cmpxchg(p_tstamp, old, now) == old) { delta = prandom_u...
u32 ip_idents_reserve(u32 hash, int segs) { u32 bucket, old, now = (u32)jiffies; atomic_t *p_id; u32 *p_tstamp; u32 delta = 0; bucket = hash & ip_idents_mask; p_tstamp = ip_tstamps + bucket; p_id = ip_idents + bucket; old = READ_ONCE(*p_tstamp); if (old != now && cmpxchg(p_tstamp, ol...
u32 ip_idents_reserve(u32 hash, int segs) { u32 *p_tstamp = ip_tstamps + hash % IP_IDENTS_SZ; atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ; u32 old = ACCESS_ONCE(*p_tstamp); u32 now = (u32)jiffies; u32 delta = 0; if (old != now && cmpxchg(p_tstamp, old, now) == old) { delta = prandom...
u32 ip_idents_reserve(u32 hash, int segs) { u32 bucket, old, now = (u32)jiffies; atomic_t *p_id; u32 *p_tstamp; u32 delta = 0; bucket = hash & ip_idents_mask; p_tstamp = ip_tstamps + bucket; p_id = ip_idents + bucket; old = ACCESS_ONCE(*p_tstamp); if (old != now && cmpxchg(p_tstamp, ...
u32 ip_idents_reserve(u32 hash, int segs) { - u32 *p_tstamp = ip_tstamps + hash % IP_IDENTS_SZ; - atomic_t *p_id = ip_idents + hash % IP_IDENTS_SZ; - u32 old = READ_ONCE(*p_tstamp); - u32 now = (u32)jiffies; + u32 bucket, old, now = (u32)jiffies; + atomic_t *p_id; + u32 *p_tstamp; u32 delta =...
CVE-2021-45486
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/ipv4/route.c
ip_rt_init
int ip_rt_init(void) { int cpu; ip_idents = kmalloc_array(IP_IDENTS_SZ, sizeof(*ip_idents), GFP_KERNEL); if (!ip_idents) { panic("IP: failed to allocate ip_idents\n"); } prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents)); ip_tstamps = kcalloc(IP_IDENTS_SZ, sizeof(*ip_tstamps), G...
int ip_rt_init(void) { void *idents_hash; int cpu; idents_hash = alloc_large_system_hash("IP idents", sizeof(*ip_idents) + sizeof(*ip_tstamps), 0, 16, HASH_ZERO, NULL, &ip_idents_mask, 2048, 256*1024); ip_idents = idents_hash; prandom_bytes(ip_idents, (ip_idents_mask + 1) * sizeof(*ip_idents)); ...
int ip_rt_init(void) { int rc = 0; int cpu; ip_idents = kmalloc(IP_IDENTS_SZ * sizeof(*ip_idents), GFP_KERNEL); if (!ip_idents) { panic("IP: failed to allocate ip_idents\n"); } prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents)); ip_tstamps = kcalloc(IP_IDENTS_SZ, sizeof(*ip_...
int ip_rt_init(void) { void *idents_hash; int rc = 0; int cpu; idents_hash = alloc_large_system_hash("IP idents", sizeof(*ip_idents) + sizeof(*ip_tstamps), 0, 16, 0, NULL, &ip_idents_mask, 2048, 256*1024); ip_idents = idents_hash; prandom_bytes(ip_idents, (ip_idents_mask + 1) * sizeof(*ip_idents...
int ip_rt_init(void) { int cpu; ip_idents = kmalloc_array(IP_IDENTS_SZ, sizeof(*ip_idents), GFP_KERNEL); if (!ip_idents) { panic("IP: failed to allocate ip_idents\n"); } prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents)); ip_tstamps = kcalloc(IP_IDENTS_SZ, sizeof(*ip_tstamps), G...
int ip_rt_init(void) { void *idents_hash; int cpu; idents_hash = alloc_large_system_hash("IP idents", sizeof(*ip_idents) + sizeof(*ip_tstamps), 0, 16, HASH_ZERO, NULL, &ip_idents_mask, 2048, 256*1024); ip_idents = idents_hash; prandom_bytes(ip_idents, (ip_idents_mask + 1) * sizeof(*ip_idents)); ...
int ip_rt_init(void) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int cpu; ip_idents = kmalloc(IP_IDENTS_SZ * sizeof(*ip_idents), GFP_KERNEL); if (!ip_idents) { panic("IP: failed to allocate ip_idents\n"); } prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents)); ip_tstamps =...
int ip_rt_init(void) { void *idents_hash; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int cpu; idents_hash = alloc_large_system_hash("IP idents", sizeof(*ip_idents) + sizeof(*ip_tstamps), 0, 16, 0, NULL, &ip_idents_mask, 2048, 256*1024); ip_idents = idents_hash; prandom_bytes(ip_idents, (ip_id...
int ip_rt_init(void) { + void *idents_hash; int cpu; - ip_idents = kmalloc_array(IP_IDENTS_SZ, sizeof(*ip_idents), GFP_KERNEL); - if (!ip_idents) { - panic("IP: failed to allocate ip_idents\n"); - } - prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents)); - ip_tstamps = kcalloc(IP_I...
CVE-2021-45868
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/quota/quota_tree.c
find_tree_dqentry
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); loff_t ret = 0; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); if (ret < 0) { quot...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); loff_t ret = 0; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); if (ret < 0) { quot...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); loff_t ret = 0; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); if (ret < 0) { quot...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); loff_t ret = 0; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); if (ret < 0) { quot...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); blk = le32_to_cpu(ref[get_index(info, dquot->dq...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); blk = le32_to_cpu(ref[get_index(info, dquot->dq...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); ...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); ...
static loff_t find_tree_dqentry(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, blk, buf); blk = le32_to_cpu(ref[get_index(info, d...
CVE-2021-45868
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/quota/quota_tree.c
remove_tree
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); int ret = 0; uint newblk; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); if (ret < 0) { ...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); int ret = 0; uint newblk; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); if (ret < 0) { ...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); int ret = 0; uint newblk; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); if (ret < 0) { ...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); int ret = 0; uint newblk; __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); if (ret < 0) { ...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id,...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id,...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); /* P...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); /* P...
static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth) { char *buf = getdqbuf(info->dqi_usable_bs); __le32 *ref = (__le32 *)buf; if (!buf) { return -ENOMEM; } ret = read_blk(info, *blk, buf); newblk = le32_to_cpu(ref[get_index(info, dquot...
CVE-2021-46904
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_create_bulk_serial_device
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { struct hso_device *hso_dev; struct hso_serial *serial; int num_urbs; struct hso_tiocmget *tiocmget; hso_dev = hso_create_device(interface, port); if (!hso_dev) { return NULL; } s...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { struct hso_device *hso_dev; struct hso_serial *serial; int num_urbs; struct hso_tiocmget *tiocmget; hso_dev = hso_create_device(interface, port); if (!hso_dev) { return NULL; } s...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { struct hso_device *hso_dev; struct hso_serial *serial; int num_urbs; struct hso_tiocmget *tiocmget; hso_dev = hso_create_device(interface, port); if (!hso_dev) { return NULL; } s...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { struct hso_device *hso_dev; struct hso_serial *serial; int num_urbs; struct hso_tiocmget *tiocmget; hso_dev = hso_create_device(interface, port); if (!hso_dev) { return NULL; } s...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) { num_urbs = 2; if (serial->tiocmget) { if (t...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) { num_urbs = 2; if (serial->tiocmget) { if (t...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if ((port & HSO_POR...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if ((port & HSO_POR...
static struct hso_device *hso_create_bulk_serial_device( struct usb_interface *interface, int port) { serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) { num_urbs = 2; if (serial->tiocmget) { ...
CVE-2021-46904
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_create_mux_serial_device
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { struct hso_device *hso_dev; struct hso_serial *serial; int port_spec; port_spec = HSO_TF_MUX; port_spec &= ~HSO_PORT_MASK; port_spec |= hso_mux_to_port(port); if ((...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { struct hso_device *hso_dev; struct hso_serial *serial; int port_spec; port_spec = HSO_TF_MUX; port_spec &= ~HSO_PORT_MASK; port_spec |= hso_mux_to_port(port); if ((...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { struct hso_device *hso_dev; struct hso_serial *serial; int port_spec; port_spec = HSO_TF_MUX; port_spec &= ~HSO_PORT_MASK; port_spec |= hso_mux_to_port(port); if ((...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { struct hso_device *hso_dev; struct hso_serial *serial; int port_spec; port_spec = HSO_TF_MUX; port_spec &= ~HSO_PORT_MASK; port_spec |= hso_mux_to_port(port); if ((...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } if (hso_serial_common_create (serial, 1, CTRL_URB_RX_SIZE, CTRL_URB_TX_SIZE)) { goto ...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } if (hso_serial_common_create (serial, 1, CTRL_URB_RX_SIZE, CTRL_URB_TX_SIZE)) { goto ...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT ...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT ...
static struct hso_device *hso_create_mux_serial_device(struct usb_interface *interface, int port, struct hso_shared_int *mux) { serial = kzalloc(sizeof(*serial), GFP_KERNEL); if (!serial) { goto exit; } if (hso_serial_common_create (serial, 1, CTRL_URB_RX_SIZE, CTRL_URB_TX_SIZE)) { ...
CVE-2021-46904
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_free_interface
static void hso_free_interface(struct usb_interface *interface) { struct hso_serial *serial; int i; for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { serial = dev2ser(serial_table[i]); tty_port_tty_hangup(&serial->...
static void hso_free_interface(struct usb_interface *interface) { struct hso_serial *serial; int i; for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { serial = dev2ser(serial_table[i]); tty_port_tty_hangup(&serial->...
static void hso_free_interface(struct usb_interface *interface) { struct hso_serial *serial; int i; for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { serial = dev2ser(serial_table[i]); tty_port_tty_hangup(&serial->...
static void hso_free_interface(struct usb_interface *interface) { struct hso_serial *serial; int i; for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { serial = dev2ser(serial_table[i]); tty_port_tty_hangup(&serial->...
static void hso_free_interface(struct usb_interface *interface) { for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { kref_put(&serial_table[i]->ref, hso_serial_ref_free); set_serial_by_index(i, NULL); } } }
static void hso_free_interface(struct usb_interface *interface) { for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { kref_put(&serial_table[i]->ref, hso_serial_ref_free); } } }
static void hso_free_interface(struct usb_interface *interface) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ kref_put(&serial_t...
static void hso_free_interface(struct usb_interface *interface) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ kref_put(&serial_t...
static void hso_free_interface(struct usb_interface *interface) { for (i = 0; i < HSO_SERIAL_TTY_MORS; i++) { if (serial_table[i] && (serial_table[i]->interface == interface)) { kref_put(&serial_table[i]->ref, hso_serial_ref_free); - set_serial_by_index(i, NULL); } }...
CVE-2021-46904
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_serial_common_create
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { int minor; int i; tty_port_init(&serial->port); minor = get_free_serial_index(); if (minor < 0) { goto exit2; } serial->parent->dev = tty_port_register_device_attr(&serial->port, ...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { int i; tty_port_init(&serial->port); if (obtain_minor(serial)) { goto exit2; } serial->parent->dev = tty_port_register_device_attr(&serial->port, tty_drv, serial->minor, &serial->parent->...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { struct device *dev; int minor; int i; tty_port_init(&serial->port); minor = get_free_serial_index(); if (minor < 0) { goto exit2; } serial->parent->dev = tty_port_register_dev...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { struct device *dev; int i; tty_port_init(&serial->port); if (obtain_minor(serial)) { goto exit2; } serial->parent->dev = tty_port_register_device_attr(&serial->port, tty_drv, serial->...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { int minor; int i; tty_port_init(&serial->port); minor = get_free_serial_index(); if (minor < 0) { goto exit2; } serial->parent->dev = tty_port_register_device_attr(&serial->port, ...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { int i; tty_port_init(&serial->port); if (obtain_minor(serial)) { goto exit2; } serial->parent->dev = tty_port_register_device_attr(&serial->port, tty_drv, serial->minor, &serial->parent->...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int minor; int i; tty_port_init(&serial->port); minor = get_free_serial_index(); if (minor < 0) { goto exit2; } serial->parent->d...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int i; tty_port_init(&serial->port); if (obtain_minor(serial)) { goto exit2; } serial->parent->dev = tty_port_register_device_attr(&seria...
static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, int rx_size, int tx_size) { - int minor; int i; tty_port_init(&serial->port); - minor = get_free_serial_index(); - if (minor < 0) { + if (obtain_minor(serial)) { goto exit2; } - serial->parent->dev = tty...
CVE-2021-46904
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_serial_tty_unregister
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); release_minor(serial); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); release_minor(serial); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); release_minor(serial); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); release_minor(serial); }
static void hso_serial_tty_unregister(struct hso_serial *serial) { tty_unregister_device(tty_drv, serial->minor); + release_minor(serial); }
CVE-2021-46906
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/hid/usbhid/hid-core.c
hid_submit_ctrl
static int hid_submit_ctrl(struct hid_device *hid) { struct hid_report *report; unsigned char dir; char *raw_report; int len, r; struct usbhid_device *usbhid = hid->driver_data; report = usbhid->ctrl[usbhid->ctrltail].report; raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report; dir = ...
static int hid_submit_ctrl(struct hid_device *hid) { struct hid_report *report; unsigned char dir; char *raw_report; int len, r; struct usbhid_device *usbhid = hid->driver_data; report = usbhid->ctrl[usbhid->ctrltail].report; raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report; dir = ...
static int hid_submit_ctrl(struct hid_device *hid) { struct hid_report *report; unsigned char dir; char *raw_report; int len, r; struct usbhid_device *usbhid = hid->driver_data; report = usbhid->ctrl[usbhid->ctrltail].report; raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report; dir = ...
static int hid_submit_ctrl(struct hid_device *hid) { struct hid_report *report; unsigned char dir; char *raw_report; int len, r; struct usbhid_device *usbhid = hid->driver_data; report = usbhid->ctrl[usbhid->ctrltail].report; raw_report = usbhid->ctrl[usbhid->ctrltail].raw_report; dir = ...
static int hid_submit_ctrl(struct hid_device *hid) { report = usbhid->ctrl[usbhid->ctrltail].report; dir = usbhid->ctrl[usbhid->ctrltail].dir; len = ((report->size - 1) >> 3) + 1 + (report->id > 0); if (dir == USB_DIR_) { usbhid->urbctrl->transfer_buffer_length = len; if (raw_report) { ...
static int hid_submit_ctrl(struct hid_device *hid) { report = usbhid->ctrl[usbhid->ctrltail].report; dir = usbhid->ctrl[usbhid->ctrltail].dir; len = hid_report_len(report); if (dir == USB_DIR_) { usbhid->urbctrl->transfer_buffer_length = len; if (raw_report) { memcpy(usbhid->...
static int hid_submit_ctrl(struct hid_device *hid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ report = usbhid->ctrl[usbhid->ctrltail].report; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dir = usbhid->ctrl[usbhid->ctrltail].dir; len = ((report->size - 1) >> 3) + 1 + (report->id > 0); if (d...
static int hid_submit_ctrl(struct hid_device *hid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ report = usbhid->ctrl[usbhid->ctrltail].report; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dir = usbhid->ctrl[usbhid->ctrltail].dir; len = hid_report_len(report); if (dir == USB_DIR_) { /* P...
static int hid_submit_ctrl(struct hid_device *hid) { report = usbhid->ctrl[usbhid->ctrltail].report; dir = usbhid->ctrl[usbhid->ctrltail].dir; - len = ((report->size - 1) >> 3) + 1 + (report->id > 0); + len = hid_report_len(report); if (dir == USB_DIR_) { usbhid->urbctrl->transfer_buffer_...
CVE-2021-46906
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
include/linux/hid.h
hid_report_len
static inline u32 hid_report_len(struct hid_report *report) { return ((report->size - 1) >> 3) + 1 + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return DIV_ROUND_UP(report->size, 8) + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return ((report->size - 1) >> 3) + 1 + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return DIV_ROUND_UP(report->size, 8) + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return ((report->size - 1) >> 3) + 1 + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return DIV_ROUND_UP(report->size, 8) + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return ((report->size - 1) >> 3) + 1 + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { return DIV_ROUND_UP(report->size, 8) + (report->id > 0); }
static inline u32 hid_report_len(struct hid_report *report) { - return ((report->size - 1) >> 3) + 1 + (report->id > 0); + return DIV_ROUND_UP(report->size, 8) + (report->id > 0); }
CVE-2021-46908
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/bpf/verifier.c
adjust_ptr_min_max_vals
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curframe]; struct bpf_reg_state *regs =...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curframe]; struct bpf_reg_state *regs =...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curframe]; struct bpf_reg_state *regs =...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curframe]; struct bpf_reg_state *regs =...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { bool known = tnum_is_const(off_reg->var_off); s64 smin_val = off_reg->smin_value, smax_val = off_reg->smax_value, smin_ptr = ptr_reg->smin_value, sm...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { bool known = tnum_is_const(off_reg->var_off); s64 smin_val = off_reg->smin_value, smax_val = off_reg->smax_value, smin_ptr = ptr_reg->smin_value, sm...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ bool known = tnum_is_const(off_reg->var_off); s64 smin_val = off_reg->smin_value, smax_val = off_r...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ bool known = tnum_is_const(off_reg->var_off); s64 smin_val = off_reg->smin_value, smax_val = off_r...
static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, const struct bpf_reg_state *off_reg) { bool known = tnum_is_const(off_reg->var_off); s64 smin_val = off_reg->smin_value, smax_val = off_reg->smax_value, smin_ptr = ptr_reg->smin_value,...
CVE-2021-46911
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
chcr_ktls_xmit
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { u32 tls_end_offset, tcp_seq, skb_data_len, skb_offset; struct ch_ktls_port_stats_debug *port_stats; struct chcr_ktls_ofld_ctx_tx *tx_ctx; struct ch_ktls_stats_debug *stats; struct tcphdr *th = tcp_hdr(skb); int data_len, qi...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { u32 tls_end_offset, tcp_seq, skb_data_len, skb_offset; struct ch_ktls_port_stats_debug *port_stats; struct chcr_ktls_ofld_ctx_tx *tx_ctx; struct ch_ktls_stats_debug *stats; struct tcphdr *th = tcp_hdr(skb); int data_len, qi...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { u32 tls_end_offset, tcp_seq, skb_data_len, skb_offset; struct ch_ktls_port_stats_debug *port_stats; struct chcr_ktls_ofld_ctx_tx *tx_ctx; struct ch_ktls_stats_debug *stats; struct tcphdr *th = tcp_hdr(skb); int data_len, qi...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { u32 tls_end_offset, tcp_seq, skb_data_len, skb_offset; struct ch_ktls_port_stats_debug *port_stats; struct chcr_ktls_ofld_ctx_tx *tx_ctx; struct ch_ktls_stats_debug *stats; struct tcphdr *th = tcp_hdr(skb); int data_len, qi...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { struct tcphdr *th = tcp_hdr(skb); tcp_seq = ntohl(th->seq); skb_offset = skb_transport_offset(skb) + tcp_hdrlen(skb); skb_data_len = skb->len - skb_offset; data_len = skb_data_len; mss = skb_is_gso(skb) ? skb_shinfo(skb)->g...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { struct tcphdr *th = tcp_hdr(skb); tcp_seq = ntohl(th->seq); skb_offset = skb_transport_offset(skb) + tcp_hdrlen(skb); skb_data_len = skb->len - skb_offset; data_len = skb_data_len; mss = skb_is_gso(skb) ? skb_shinfo(skb)->g...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct tcphdr *th = tcp_hdr(skb); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ tcp_seq = ntohl(th->seq); skb_offset = skb_transport_offset(skb) + tcp_hdrlen(skb); skb_data_len ...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct tcphdr *th = tcp_hdr(skb); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ tcp_seq = ntohl(th->seq); skb_offset = skb_transport_offset(skb) + tcp_hdrlen(skb); skb_data_len ...
static int chcr_ktls_xmit(struct sk_buff *skb, struct net_device *dev) { struct tcphdr *th = tcp_hdr(skb); tcp_seq = ntohl(th->seq); skb_offset = skb_transport_offset(skb) + tcp_hdrlen(skb); skb_data_len = skb->len - skb_offset; data_len = skb_data_len; mss = skb_is_gso(skb) ? skb_shinfo(...
CVE-2021-46913
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/netfilter/nf_tables_api.c
nft_add_set_elem
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nft_expr *expr_array[NFT_SET_EXPR_MAX] = {}; struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; u8 genmask = nft_genmask_next(ctx->net); u32 flags = 0, size = 0, num_exprs = 0; struct n...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nft_expr *expr_array[NFT_SET_EXPR_MAX] = {}; struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; u8 genmask = nft_genmask_next(ctx->net); u32 flags = 0, size = 0, num_exprs = 0; struct n...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; u8 genmask = nft_genmask_next(ctx->net); struct nft_set_ext_tmpl tmpl; struct nft_set_ext *ext, *ext2; struct nft_set_elem elem; struct n...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; u8 genmask = nft_genmask_next(ctx->net); struct nft_set_ext_tmpl tmpl; struct nft_set_ext *ext, *ext2; struct nft_set_elem elem; struct n...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nft_expr *expr_array[NFT_SET_EXPR_MAX] = {}; u8 genmask = nft_genmask_next(ctx->net); u32 flags = 0, size = 0, num_exprs = 0; struct nft_object *obj = NULL; err = nla_parse_nest...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nft_expr *expr_array[NFT_SET_EXPR_MAX] = {}; u8 genmask = nft_genmask_next(ctx->net); u32 flags = 0, size = 0, num_exprs = 0; struct nft_object *obj = NULL; err = nla_parse_nest...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u8 genmask = nft_genmask_next(ctx->net); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct nft_object *obj = NULL; /* PLACEHOLDER: DO N...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u8 genmask = nft_genmask_next(ctx->net); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct nft_object *obj = NULL; /* PLACEHOLDER: DO N...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nft_expr *expr_array[NFT_SET_EXPR_MAX] = {}; u8 genmask = nft_genmask_next(ctx->net); u32 flags = 0, size = 0, num_exprs = 0; struct nft_object *obj = NULL; err = nla_pars...
CVE-2021-46915
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/netfilter/nft_limit.c
nft_limit_init
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { u64 unit, tokens; if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { u64 unit, tokens; if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { u64 unit, tokens; if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { u64 unit, tokens; if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_UNIT]));...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_UNIT]));...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit...
static int nft_limit_init(struct nft_limit *limit, const struct nlattr * const tb[], bool pkts) { if (tb[NFTA_LIMIT_RATE] == NULL || tb[NFTA_LIMIT_UNIT] == NULL) { return -EVAL; } limit->rate = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_RATE])); unit = be64_to_cpu(nla_get_be64(tb[NFTA_LIMIT_UN...
CVE-2021-46917
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/dma/idxd/device.c
idxd_wq_config_write
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; u32 wq_offset; int i; if (!wq->group) { return 0; } memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->wqcfg->wq_size = wq->size; if (wq->size == 0) { ...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; u32 wq_offset; int i; if (!wq->group) { return 0; } for (i = 0; i < WQCFG_STRIDES(idxd); i++) { wq_offset = WQCFG_OFFSET(idxd, wq->id, i); ...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; u32 wq_offset; int i; if (!wq->group) { return 0; } memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->wqcfg->wq_size = wq->size; if (wq->size == 0) { ...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; u32 wq_offset; int i; if (!wq->group) { return 0; } for (i = 0; i < WQCFG_STRIDES(idxd); i++) { wq_offset = WQCFG_OFFSET(idxd, wq->id, i); ...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; if (!wq->group) { return 0; } memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->wqcfg->wq_size = wq->size; dev_dbg(dev, "WQ %d CFGs\n", wq->id); for (i = 0; i < WQCFG_STRIDES(idxd); i++) { wq...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; if (!wq->group) { return 0; } for (i = 0; i < WQCFG_STRIDES(idxd); i++) { wq_offset = WQCFG_OFFSET(idxd, wq->id, i); wq->wqcfg->bits[i] = ioread32(idxd->reg_base + wq_offset); } wq-...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!wq->group) { return 0; } memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->wqcfg->wq_size = wq->size; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!wq->group) { return 0; } for (i = 0; i < WQCFG_STRIDES(idxd); i++) { wq_offset = WQCFG_OFFSET(idxd, wq->id, i); wq->wqcfg->bits[i] = i...
static int idxd_wq_config_write(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; if (!wq->group) { return 0; } - memset(wq->wqcfg, 0, idxd->wqcfg_size); + for (i = 0; i < WQCFG_STRIDES(idxd); i++) { + wq_offset = WQCFG_OFFSET(idxd, wq->id, i); + wq->wqcfg->bits[i] ...
CVE-2021-46917
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/dma/idxd/device.c
idxd_wq_disable_cleanup
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; int i, wq_offset; lockdep_assert_held(&idxd->dev_lock); memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->type = IDXD_WQT_NONE; wq->size = 0; wq->group = NULL; wq-...
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; lockdep_assert_held(&idxd->dev_lock); memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->type = IDXD_WQT_NONE; wq->size = 0; wq->group = NULL; wq->threshold = 0; wq->priority = 0; clear_bit(WQ_FLAG_DEDIC...
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; int i, wq_offset; lockdep_assert_held(&idxd->dev_lock); memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->type = IDXD_WQT_NONE; wq->size = 0; wq->group = NULL; wq-...
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; lockdep_assert_held(&idxd->dev_lock); memset(wq->wqcfg, 0, idxd->wqcfg_size); wq->type = IDXD_WQT_NONE; wq->size = 0; wq->group = NULL; wq->threshold = 0; wq->priority = 0; wq->ats_dis = 0; cl...
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; int i, wq_offset; lockdep_assert_held(&idxd->dev_lock); memset(wq->name, 0, WQ_NAME_SIZE); for (i = 0; i < WQCFG_STRIDES(idxd); i++) { wq_offset = WQCFG_OFFSET(i...
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; lockdep_assert_held(&idxd->dev_lock); memset(wq->name, 0, WQ_NAME_SIZE); }
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; int i, wq_offset; lockdep_assert_held(&idxd->dev_lock); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ memset(wq->name, 0, WQ_NAME_SIZE); for (i = 0; i < WQCFG_STRIDE...
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; lockdep_assert_held(&idxd->dev_lock); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ memset(wq->name, 0, WQ_NAME_SIZE); }
void idxd_wq_disable_cleanup(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; - struct device *dev = &idxd->pdev->dev; - int i, wq_offset; lockdep_assert_held(&idxd->dev_lock); memset(wq->name, 0, WQ_NAME_SIZE); - for (i = 0; i < WQCFG_STRIDES(idxd); i++) { - wq_offset = WQCFG_...
CVE-2021-46917
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/dma/idxd/sysfs.c
disable_wq
static void disable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; int rc; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (wq->state == IDXD_WQ_DISABLED) { mutex_unlock(&wq->wq_loc...
static void disable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (wq->state == IDXD_WQ_DISABLED) { mutex_unlock(&wq->wq_lock); ...
static void disable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; int rc; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (wq->state == IDXD_WQ_DISABLED) { mutex_unlock(&wq->wq_loc...
static void disable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (wq->state == IDXD_WQ_DISABLED) { mutex_unlock(&wq->wq_lock); ...
static void disable_wq(struct idxd_wq *wq) { struct device *dev = &idxd->pdev->dev; int rc; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (is_idxd_wq_dmaengine(wq)) { idxd_unregister_dma_channel(wq); } else if (is_idxd_wq_cdev(wq)) {...
static void disable_wq(struct idxd_wq *wq) { struct device *dev = &idxd->pdev->dev; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (is_idxd_wq_dmaengine(wq)) { idxd_unregister_dma_channel(wq); } else if (is_idxd_wq_cdev(wq)) { idx...
static void disable_wq(struct idxd_wq *wq) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct device *dev = &idxd->pdev->dev; int rc; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (is_idx...
static void disable_wq(struct idxd_wq *wq) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct device *dev = &idxd->pdev->dev; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (is_idxd_wq_dmaengi...
static void disable_wq(struct idxd_wq *wq) { struct device *dev = &idxd->pdev->dev; - int rc; mutex_lock(&wq->wq_lock); dev_dbg(dev, "%s removing WQ %s\n", __func__, dev_name(&wq->conf_dev)); if (is_idxd_wq_dmaengine(wq)) { idxd_unregister_dma_channel(wq); } else if (is_idxd_wq_cde...
CVE-2021-46919
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/dma/idxd/sysfs.c
wq_size_store
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_wq *wq = container_of(dev, struct idxd_wq, conf_dev); unsigned long size; struct idxd_device *idxd = wq->idxd; int rc; rc = kstrtoul(buf, 10, &size); if (rc < 0) { ...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_wq *wq = container_of(dev, struct idxd_wq, conf_dev); unsigned long size; struct idxd_device *idxd = wq->idxd; int rc; rc = kstrtoul(buf, 10, &size); if (rc < 0) { ...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_wq *wq = container_of(dev, struct idxd_wq, conf_dev); unsigned long size; struct idxd_device *idxd = wq->idxd; int rc; rc = kstrtoul(buf, 10, &size); if (rc < 0) { ...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_wq *wq = container_of(dev, struct idxd_wq, conf_dev); unsigned long size; struct idxd_device *idxd = wq->idxd; int rc; rc = kstrtoul(buf, 10, &size); if (rc < 0) { ...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_device *idxd = wq->idxd; if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) { return -EPERM; } if (wq->state != IDXD_WQ_DISABLED) { return -EPERM; } if (...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_device *idxd = wq->idxd; if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) { return -EPERM; } if (idxd->state == IDXD_DEV_ENABLED) { return -EPERM; } if...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct idxd_device *idxd = wq->idxd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) { ...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct idxd_device *idxd = wq->idxd; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) { ...
static ssize_t wq_size_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct idxd_device *idxd = wq->idxd; if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) { return -EPERM; } - if (wq->state != IDXD_WQ_DISABLED) { + if (idxd->state == IDXD_DE...
CVE-2021-46920
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/dma/idxd/irq.c
process_misc_interrupts
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { struct device *dev = &idxd->pdev->dev; union gensts_reg gensts; u32 val = 0; int i; bool err = false; if (cause & IDXD_TC_ERR) { spin_lock_bh(&idxd->dev_lock); for (i = 0; i < 4; i++) idxd->sw_e...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { struct device *dev = &idxd->pdev->dev; union gensts_reg gensts; u32 val = 0; int i; bool err = false; if (cause & IDXD_TC_ERR) { spin_lock_bh(&idxd->dev_lock); for (i = 0; i < 4; i++) idxd->sw_e...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { struct device *dev = &idxd->pdev->dev; union gensts_reg gensts; u32 val = 0; int i; bool err = false; if (cause & IDXD_TC_ERR) { spin_lock_bh(&idxd->dev_lock); for (i = 0; i < 4; i++) idxd->sw_e...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { struct device *dev = &idxd->pdev->dev; union gensts_reg gensts; u32 val = 0; int i; bool err = false; if (cause & IDXD_TC_ERR) { spin_lock_bh(&idxd->dev_lock); for (i = 0; i < 4; i++) idxd->sw_e...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { if (cause & IDXD_TC_ERR) { for (i = 0; i < 4; i++) idxd->sw_err.bits[i] = ioread64(idxd->reg_base + IDXD_SWERR_OFFSET + i * sizeof(u64)); iowrite64(IDXD_SWERR_ACK, idxd->reg_base + IDXD_SWERR_OFFSET); if (i...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { if (cause & IDXD_TC_ERR) { for (i = 0; i < 4; i++) idxd->sw_err.bits[i] = ioread64(idxd->reg_base + IDXD_SWERR_OFFSET + i * sizeof(u64)); iowrite64(idxd->sw_err.bits[0] & IDXD_SWERR_ACK, idxd->reg_base + IDXD_SWERR...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (cause & IDXD_TC_ERR) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < 4; i++) idxd->sw_err.bits[i] = ioread64(idxd->reg_base + IDXD_SWERR_OFFSET + i ...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (cause & IDXD_TC_ERR) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < 4; i++) idxd->sw_err.bits[i] = ioread64(idxd->reg_base + IDXD_SWERR_OFFSET + i ...
static int process_misc_interrupts(struct idxd_device *idxd, u32 cause) { if (cause & IDXD_TC_ERR) { for (i = 0; i < 4; i++) idxd->sw_err.bits[i] = ioread64(idxd->reg_base + IDXD_SWERR_OFFSET + i * sizeof(u64)); - iowrite64(IDXD_SWERR_ACK, idxd->reg_base + IDXD_SWERR_OFFSET); + ...
CVE-2021-46921
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/locking/qrwlock.c
queued_write_lock_slowpath
void queued_write_lock_slowpath(struct qrwlock *lock) { arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { atomic_cond_read_acquire(&lock->cnts, VAL ==...
void queued_write_lock_slowpath(struct qrwlock *lock) { int cnts; arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { cnts = atomic_cond_read_relaxe...
void queued_write_lock_slowpath(struct qrwlock *lock) { arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { atomic_cond_read_acquire(&lock->cnts, VAL ==...
void queued_write_lock_slowpath(struct qrwlock *lock) { int cnts; arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { cnts = atomic_cond_read_relaxe...
void queued_write_lock_slowpath(struct qrwlock *lock) { arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { atomic_cond_read_acquire(&lock->cnts, VAL ==...
void queued_write_lock_slowpath(struct qrwlock *lock) { int cnts; arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { cnts = atomic_cond_read_relaxe...
void queued_write_lock_slowpath(struct qrwlock *lock) { arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { atomic_cond_read_acquire(&lock->cnts, VAL ==...
void queued_write_lock_slowpath(struct qrwlock *lock) { int cnts; arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { cnts = atomic_cond_read_relaxe...
void queued_write_lock_slowpath(struct qrwlock *lock) { + int cnts; arch_spin_lock(&lock->wait_lock); if (!atomic_read(&lock->cnts) && (atomic_cmpxchg_acquire(&lock->cnts, 0, _QW_LOCKED) == 0)) { goto unlock; } atomic_add(_QW_WAITG, &lock->cnts); do { - atomic_cond_read_acqu...
CVE-2021-46924
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/nfc/st21nfca/i2c.c
st21nfca_hci_i2c_probe
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; struct st21nfca_i2c_phy *phy; int r; dev_dbg(&client->dev, "%s\n", __func__); dev_dbg(&client->dev, "IRQ: %d\n", client->irq); if (!i2c_check_functionality(client->ad...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; struct st21nfca_i2c_phy *phy; int r; dev_dbg(&client->dev, "%s\n", __func__); dev_dbg(&client->dev, "IRQ: %d\n", client->irq); if (!i2c_check_functionality(client->ad...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; struct st21nfca_i2c_phy *phy; int r; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { nfc_err(&client->dev, "Need I2C_FUNC_I2C\n"); return -ENOD...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; struct st21nfca_i2c_phy *phy; int r; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { nfc_err(&client->dev, "Need I2C_FUNC_I2C\n"); return -ENOD...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; dev_dbg(&client->dev, "IRQ: %d\n", client->irq); phy = devm_kzalloc(&client->dev, sizeof(struct st21nfca_i2c_phy), GFP_KERNEL); if (!phy) { return -ENOMEM; } ...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; dev_dbg(&client->dev, "IRQ: %d\n", client->irq); phy = devm_kzalloc(&client->dev, sizeof(struct st21nfca_i2c_phy), GFP_KERNEL); if (!phy) { return -ENOMEM; } ...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ phy = devm_kzalloc(&client->dev, sizeof(struct st21nfca_i2c_phy), GFP_KERNEL); if (!phy) { return -ENOMEM; } /* ...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ phy = devm_kzalloc(&client->dev, sizeof(struct st21nfca_i2c_phy), GFP_KERNEL); if (!phy) { return -ENOMEM; } /* ...
static int st21nfca_hci_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; dev_dbg(&client->dev, "IRQ: %d\n", client->irq); phy = devm_kzalloc(&client->dev, sizeof(struct st21nfca_i2c_phy), GFP_KERNEL); if (!phy) { return -ENOMEM; ...
CVE-2021-46924
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/nfc/st21nfca/i2c.c
st21nfca_hci_i2c_remove
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); dev_dbg(&client->dev, "%s\n", __func__); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } return 0; }
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); dev_dbg(&client->dev, "%s\n", __func__); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } if (phy->pending_skb) { kfree_s...
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } return 0; }
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } if (phy->pending_skb) { kfree_skb(phy->pending_skb); } return 0; }
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); dev_dbg(&client->dev, "%s\n", __func__); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } return 0; }
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); dev_dbg(&client->dev, "%s\n", __func__); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } if (phy->pending_skb) { kfree_s...
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } return 0; }
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } if (phy->pending_skb) { kfree_skb(phy->pending_skb); } return 0; }
static int st21nfca_hci_i2c_remove(struct i2c_client *client) { struct st21nfca_i2c_phy *phy = i2c_get_clientdata(client); dev_dbg(&client->dev, "%s\n", __func__); st21nfca_hci_remove(phy->hdev); if (phy->powered) { st21nfca_hci_i2c_disable(phy); } + if (phy->pending_skb) { + ...
CVE-2021-46925
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/smc/smc_cdc.c
smc_cdc_msg_send
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { struct smc_link *link = conn->lnk; union smc_host_cursor cfed; int rc; smc_cdc_add_pending_send(conn, pend); conn->tx_cdc_seq++; conn->local_tx_ctrl.seqno = conn->tx_cdc_seq; smc_host...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { struct smc_link *link = conn->lnk; union smc_host_cursor cfed; int rc; smc_cdc_add_pending_send(conn, pend); conn->tx_cdc_seq++; conn->local_tx_ctrl.seqno = conn->tx_cdc_seq; smc_host...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { struct smc_link *link = conn->lnk; union smc_host_cursor cfed; int rc; smc_cdc_add_pending_send(conn, pend); conn->tx_cdc_seq++; conn->local_tx_ctrl.seqno = conn->tx_cdc_seq; smc_host...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { struct smc_link *link = conn->lnk; union smc_host_cursor cfed; int rc; smc_cdc_add_pending_send(conn, pend); conn->tx_cdc_seq++; conn->local_tx_ctrl.seqno = conn->tx_cdc_seq; smc_host...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { smc_cdc_add_pending_send(conn, pend); smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed); rc = smc_wr_tx_send(link, (struct smc_wr_tx_pend_priv *)pend); if (!rc) { } else { ...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { smc_cdc_add_pending_send(conn, pend); smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed); atomic_inc(&conn->cdc_pend_tx_wr); smp_mb__after_atomic(); rc = smc_wr_tx_send(link, (str...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ smc_cdc_add_pending_send(conn, pend); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed); ...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ smc_cdc_add_pending_send(conn, pend); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed); ...
int smc_cdc_msg_send(struct smc_connection *conn, struct smc_wr_buf *wr_buf, struct smc_cdc_tx_pend *pend) { smc_cdc_add_pending_send(conn, pend); smc_host_msg_to_cdc((struct smc_cdc_msg *)wr_buf, conn, &cfed); + atomic_inc(&conn->cdc_pend_tx_wr); + smp_mb__after_atomic(); rc = smc_wr_tx_send(link...
CVE-2021-46925
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/smc/smc_cdc.c
smc_cdc_tx_handler
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; struct smc_sock *smc; int diff; if (!conn) { return; ...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; struct smc_sock *smc; int diff; smc = container_of(conn, struct ...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; struct smc_sock *smc; int diff; if (!conn) { return; ...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; struct smc_sock *smc; int diff; smc = container_of(conn, struct ...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; int diff; if (!conn) { return; } bh_lock_sock(&smc->...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; int diff; bh_lock_sock(&smc->sk); if (!wc_status) { smc_...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int diff; if (!con...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int diff; /* PLACE...
static void smc_cdc_tx_handler(struct smc_wr_tx_pend_priv *pnd_snd, struct smc_link *link, enum ib_wc_status wc_status) { struct smc_cdc_tx_pend *cdcpend = (struct smc_cdc_tx_pend *)pnd_snd; struct smc_connection *conn = cdcpend->conn; int diff; - if (!conn) { - return; - } bh_lock_soc...