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-2018-14616
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/f2fs/data.c
f2fs_grab_bio
static struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct fscrypt_ctx *ctx = NULL; struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode)) { ...
static struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct fscrypt_ctx *ctx = NULL; struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) { ret...
struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_crypto_ctx *ctx = NULL; struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode)) { ctx...
struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_crypto_ctx *ctx = NULL; struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) { return...
static struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode)) { f2fs_wait_on_encrypted_page_writebac...
static struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) { return ERR_PTR(-EFAULT); } if (...
struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (f2fs_encrypted_inode(inode) && S_ISREG(inode->i_mode)) { ...
struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) { ...
static struct bio *f2fs_grab_bio(struct inode *inode, block_t blkaddr, unsigned nr_pages) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct block_device *bdev = sbi->sb->s_bdev; struct bio *bio; + if (!f2fs_is_valid_blkaddr(sbi, blkaddr, DATA_GENERIC)) { + return ERR_PTR(-EFAULT); + } ...
CVE-2018-14616
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/f2fs/inode.c
__written_first_block
static bool __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (is_valid_data_blkaddr(sbi, addr)) { return true; } return false; }
static int __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (!__is_valid_data_blkaddr(addr)) { return 1; } if (!f2fs_is_valid_blkaddr(sbi, addr, DATA_GENERIC)) { return -EFAULT; } return 0; }
static bool __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (is_valid_data_blkaddr(sbi, addr)) { return true; } return false; }
static int __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (!__is_valid_data_blkaddr(addr)) { return 1; } if (!f2fs_is_valid_blkaddr(sbi, addr, DATA_GENERIC)) { return -EFAULT; } return 0; }
static bool __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (is_valid_data_blkaddr(sbi, addr)) { return true; } return false; }
static int __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (!__is_valid_data_blkaddr(addr)) { return 1; } if (!f2fs_is_valid_blkaddr(sbi, addr, DATA_GENERIC)) { return -EFAULT; } return 0; }
static bool __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (is_valid_data_blkaddr(sbi, addr)) { return true; } return false; }
static int __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); if (!__is_valid_data_blkaddr(addr)) { return 1; } if (!f2fs_is_valid_blkaddr(sbi, addr, DATA_GENERIC)) { return -EFAULT; } return 0; }
-static bool __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { +static int __written_first_block(struct f2fs_sb_info *sbi, struct f2fs_inode *ri) { block_t addr = le32_to_cpu(ri->i_addr[0]); - if (is_valid_data_blkaddr(sbi, addr)) { - return true; + if (!__is_valid_data_blkaddr(...
CVE-2018-14616
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/f2fs/inode.c
do_read_inode
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct page *node_page; struct f2fs_inode *ri; if (check_nid_range(sbi, inode->i_ino)) { f2fs_msg(inode->i_sb, KERN_ERR, "bad inode number: %lu", (unsigned...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct page *node_page; struct f2fs_inode *ri; int err; if (check_nid_range(sbi, inode->i_ino)) { f2fs_msg(inode->i_sb, KERN_ERR, "bad inode number: %l...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct page *node_page; struct f2fs_inode *ri; if (check_nid_range(sbi, inode->i_ino)) { f2fs_msg(inode->i_sb, KERN_ERR, "bad inode number: %lu", (unsigned...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct page *node_page; struct f2fs_inode *ri; int err; if (check_nid_range(sbi, inode->i_ino)) { f2fs_msg(inode->i_sb, KERN_ERR, "bad inode number: %l...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct f2fs_inode *ri; if (check_nid_range(sbi, inode->i_ino)) { return -EVAL; } node_page = get_node_page(sbi, inode->i_ino); if (IS_ERR(node_page...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct f2fs_inode *ri; int err; if (check_nid_range(sbi, inode->i_ino)) { return -EVAL; } node_page = get_node_page(sbi, inode->i_ino); if (IS_...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct f2fs_inode *ri; if (check_nid_range(sbi, inode->i_ino)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct f2fs_inode *ri; int err; if (check_nid_range(sbi, inode->i_ino)) { /* PLACEHOLDER: DO NOT DELETE THIS ...
static int do_read_inode(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct f2fs_inode_info *fi = F2FS_I(inode); struct f2fs_inode *ri; + int err; if (check_nid_range(sbi, inode->i_ino)) { return -EVAL; } node_page = get_node_page(sbi, inode->i_ino); ...
CVE-2018-14617
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/hfsplus/dir.c
hfsplus_lookup
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { struct inode *inode = NULL; struct hfs_find_data fd; struct super_block *sb; hfsplus_cat_entry entry; int err; u32 cnid, linkid = 0; u16 type; sb = dir->i_sb; dentry->d_fsdata = NULL;...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { struct inode *inode = NULL; struct hfs_find_data fd; struct super_block *sb; hfsplus_cat_entry entry; int err; u32 cnid, linkid = 0; u16 type; sb = dir->i_sb; dentry->d_fsdata = NULL;...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { struct inode *inode = NULL; struct hfs_find_data fd; struct super_block *sb; hfsplus_cat_entry entry; int err; u32 cnid, linkid = 0; u16 type; sb = dir->i_sb; dentry->d_fsdata = NULL;...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { struct inode *inode = NULL; struct hfs_find_data fd; struct super_block *sb; hfsplus_cat_entry entry; int err; u32 cnid, linkid = 0; u16 type; sb = dir->i_sb; dentry->d_fsdata = NULL;...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { sb = dir->i_sb; err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, &dentry->d_name); if (type == HFSPLUS_FOLDER) { } else if (type == HFSPL...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { sb = dir->i_sb; err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, &dentry->d_name); if (type == HFSPLUS_FOLDER) { } else if (type == HFSPL...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sb = dir->i_sb; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); /* PLACEHOLDER: DO NOT DELETE THIS COMM...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ sb = dir->i_sb; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); /* PLACEHOLDER: DO NOT DELETE THIS COMM...
static struct dentry *hfsplus_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { sb = dir->i_sb; err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, &dentry->d_name); if (type == HFSPLUS_FOLDER) { } else if (type ==...
CVE-2018-14625
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vsock.c
vhost_transport_cancel_pkt
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { struct vhost_vsock *vsock; struct virtio_vsock_pkt *pkt, *n; int cnt = 0; LIST_HEAD(freeme); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { return -ENODEV; } spin_lock_bh(&vsock->send_pkt_list_lock)...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { struct vhost_vsock *vsock; struct virtio_vsock_pkt *pkt, *n; int cnt = 0; int ret = -ENODEV; LIST_HEAD(freeme); rcu_read_lock(); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { goto out; } sp...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { struct vhost_vsock *vsock; struct virtio_vsock_pkt *pkt, *n; int cnt = 0; LIST_HEAD(freeme); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { return -ENODEV; } spin_lock_bh(&vsock->send_pkt_list_lock)...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { struct vhost_vsock *vsock; struct virtio_vsock_pkt *pkt, *n; int cnt = 0; int ret = -ENODEV; LIST_HEAD(freeme); rcu_read_lock(); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { goto out; } sp...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { int cnt = 0; LIST_HEAD(freeme); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { return -ENODEV; } if (cnt) { if (new_cnt + cnt >= tx_vq->num && new_cnt < tx_vq->num) { vhost_poll_queue(&t...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { int cnt = 0; int ret = -ENODEV; LIST_HEAD(freeme); rcu_read_lock(); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { goto out; } if (cnt) { if (new_cnt + cnt >= tx_vq->num && new_cnt < tx_vq->...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int cnt = 0; LIST_HEAD(freeme); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { return -ENODEV; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (cnt) ...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int cnt = 0; int ret = -ENODEV; LIST_HEAD(freeme); rcu_read_lock(); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { goto out; } /* PLACEHOLDER: DO NO...
static int vhost_transport_cancel_pkt(struct vsock_sock *vsk) { int cnt = 0; + int ret = -ENODEV; LIST_HEAD(freeme); + rcu_read_lock(); vsock = vhost_vsock_get(vsk->remote_addr.svm_cid); if (!vsock) { - return -ENODEV; + goto out; } if (cnt) { if (new_cnt + cn...
CVE-2018-14625
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vsock.c
vhost_transport_send_pkt
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { struct vhost_vsock *vsock; int len = pkt->len; vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { virtio_transport_free_pkt(pkt); return -ENODEV; } if (pkt->reply) { atomic_inc(&vsock->...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { struct vhost_vsock *vsock; int len = pkt->len; rcu_read_lock(); vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { rcu_read_unlock(); virtio_transport_free_pkt(pkt); return -ENODEV; } ...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { struct vhost_vsock *vsock; struct vhost_virtqueue *vq; int len = pkt->len; vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { virtio_transport_free_pkt(pkt); return -ENODEV; } vq = &vsock->...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { struct vhost_vsock *vsock; struct vhost_virtqueue *vq; int len = pkt->len; rcu_read_lock(); vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { rcu_read_unlock(); virtio_transport_free_pkt(pkt);...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { int len = pkt->len; vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { virtio_transport_free_pkt(pkt); return -ENODEV; } vhost_work_queue(&vsock->dev, &vsock->send_pkt_work); return len; }
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { int len = pkt->len; rcu_read_lock(); vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { rcu_read_unlock(); virtio_transport_free_pkt(pkt); return -ENODEV; } vhost_work_queue(&vsock->dev...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int len = pkt->len; vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { virtio_transport_free_pkt(pkt); return -ENODEV; } /* PLACEHOLDER: DO NOT DEL...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int len = pkt->len; rcu_read_lock(); vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { rcu_read_unlock(); virtio_transport_free_pkt(pkt); retu...
static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { int len = pkt->len; + rcu_read_lock(); vsock = vhost_vsock_get(le64_to_cpu(pkt->hdr.dst_cid)); if (!vsock) { + rcu_read_unlock(); virtio_transport_free_pkt(pkt); return -ENODEV; } vhost_work_queue(&...
CVE-2018-14625
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vsock.c
vhost_vsock_dev_open
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kzalloc(sizeof(*vsock), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); if (!vsock) { vsock = vmalloc(sizeof(*vsock)); if (!vsock) { ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kzalloc(sizeof(*vsock), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); if (!vsock) { vsock = vmalloc(sizeof(*vsock)); if (!vsock) { ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vhost_work_init(&vsock->send_pkt_work, vhost_transport_send_pkt_work); spin_lock_bh(&vhost_vsock_lock); list_add_t...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vhost_work_init(&vsock->send_pkt_work, vhost_transport_send_pkt_work); return 0; }
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vsock = kzalloc(sizeof(*vsock), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); if (!vsock) { vsock = vmalloc(sizeof(*vsock)); if (!vsock) { return -ENOMEM; ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vsock = kzalloc(sizeof(*vsock), GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); if (!vsock) { vsock = vmalloc(sizeof(*vsock)); if (!vsock) { return -ENOMEM; ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vhost_work_init(&vsock->send_pkt_work, vhost_transport_send_pkt_work); - spin_lock_bh(&vhost_vsock_lock); - li...
CVE-2018-14625
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vsock.c
vhost_vsock_dev_release
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); list_del(&vsock->list); spin_unlock_bh(&vhost_vsock_lock); vsock_for_each_connected_socket(vhost_vsock_reset_orphans); vhost_vsock_stop(vs...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); if (vsock->guest_cid) { hash_del_rcu(&vsock->hash); } spin_unlock_bh(&vhost_vsock_lock); synchronize_rcu(); vsock_for_each_con...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); list_del(&vsock->list); spin_unlock_bh(&vhost_vsock_lock); vsock_for_each_connected_socket(vhost_vsock_reset_orphans); vhost_vsock_stop(vs...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); if (vsock->guest_cid) { hash_del_rcu(&vsock->hash); } spin_unlock_bh(&vhost_vsock_lock); synchronize_rcu(); vsock_for_each_con...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); list_del(&vsock->list); spin_unlock_bh(&vhost_vsock_lock); vsock_for_each_connected_socket(vhost_vsock_reset_orphans); }
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); if (vsock->guest_cid) { hash_del_rcu(&vsock->hash); } spin_unlock_bh(&vhost_vsock_lock); synchronize_rcu(); vsock_for_each_con...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); list_del(&vsock->list); spin_unlock_bh(&vhost_vsock_lock); vsock_for_each_connected_socket(vhost_vsock_reset_orphans); /* PLACEHOLDER: DO ...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); if (vsock->guest_cid) { hash_del_rcu(&vsock->hash); } spin_unlock_bh(&vhost_vsock_lock); synchronize_rcu(); vsock_for_each_con...
static int vhost_vsock_dev_release(struct inode *inode, struct file *file) { struct vhost_vsock *vsock = file->private_data; spin_lock_bh(&vhost_vsock_lock); - list_del(&vsock->list); + if (vsock->guest_cid) { + hash_del_rcu(&vsock->hash); + } spin_unlock_bh(&vhost_vsock_lock); + sync...
CVE-2018-14625
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vsock.c
vhost_vsock_set_cid
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { struct vhost_vsock *other; if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); other = __vhost_vsock_...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { struct vhost_vsock *other; if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); other = vhost_vsock_ge...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { struct vhost_vsock *other; if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); other = __vhost_vsock_...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { struct vhost_vsock *other; if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); other = vhost_vsock_ge...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); other = __vhost_vsock_get(guest_cid); if (other &...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); other = vhost_vsock_get(guest_cid); if (other && ...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); oth...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); oth...
static int vhost_vsock_set_cid(struct vhost_vsock *vsock, u64 guest_cid) { if (guest_cid <= VMADDR_CID_HOST || guest_cid == U32_MAX) { return -EVAL; } if (guest_cid > U32_MAX) { return -EVAL; } spin_lock_bh(&vhost_vsock_lock); - other = __vhost_vsock_get(guest_cid); + o...
CVE-2018-14633
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/target/iscsi/iscsi_target_auth.c
chap_server_compute_md5
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { unsigned long id; unsigned char id_as_uchar; unsigned char digest[MD5_SIGNATURE_SIZE]; unsigned char type, response[MD5_SIGNATURE_SIZE * 2 + 2]; u...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { unsigned long id; unsigned char id_as_uchar; unsigned char digest[MD5_SIGNATURE_SIZE]; unsigned char type, response[MD5_SIGNATURE_SIZE * 2 + 2]; u...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { unsigned long id; unsigned char id_as_uchar; unsigned char digest[MD5_SIGNATURE_SIZE]; unsigned char type, response[MD5_SIGNATURE_SIZE * 2 + 2]; u...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { unsigned long id; unsigned char id_as_uchar; unsigned char digest[MD5_SIGNATURE_SIZE]; unsigned char type, response[MD5_SIGNATURE_SIZE * 2 + 2]; u...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { memset(identifier, 0, 10); memset(chap_n, 0, MAX_CHAP_N_SIZE); memset(chap_r, 0, MAX_RESPONSE_LENGTH); memset(digest, 0, MD5_SIGNATURE_SIZE); mems...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { memset(identifier, 0, 10); memset(chap_n, 0, MAX_CHAP_N_SIZE); memset(chap_r, 0, MAX_RESPONSE_LENGTH); memset(digest, 0, MD5_SIGNATURE_SIZE); mems...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ memset(identifier, 0, 10); memset(chap_n, 0, MAX_CHAP_N_SIZE); memset(chap_r, 0, MAX_RESPONSE_LENGTH); ...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ memset(identifier, 0, 10); memset(chap_n, 0, MAX_CHAP_N_SIZE); memset(chap_r, 0, MAX_RESPONSE_LENGTH); ...
static int chap_server_compute_md5( struct iscsi_conn *conn, struct iscsi_node_auth *auth, char *nr_in_ptr, char *nr_out_ptr, unsigned int *nr_out_len) { memset(identifier, 0, 10); memset(chap_n, 0, MAX_CHAP_N_SIZE); memset(chap_r, 0, MAX_RESPONSE_LENGTH); memset(digest, 0, MD5_SIGNATURE_SIZE); ...
CVE-2018-14634
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/exec.c
get_arg_page
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; int ret; unsigned int gup_flags = FOLL_FORCE; if (write) { ret = expand_downwards(bprm->vma, pos); if (ret < 0) { return NULL; } } if (write) { ...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; int ret; unsigned int gup_flags = FOLL_FORCE; if (write) { ret = expand_downwards(bprm->vma, pos); if (ret < 0) { return NULL; } } if (write) { ...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; int ret; if (write) { ret = expand_downwards(bprm->vma, pos); if (ret < 0) { return NULL; } } ret = get_user_pages(current, bprm->mm, pos, 1, write, 1, &...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { struct page *page; int ret; if (write) { ret = expand_downwards(bprm->vma, pos); if (ret < 0) { return NULL; } } ret = get_user_pages(current, bprm->mm, pos, 1, write, 1, &...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { if (write) { unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; unsigned long ptr_size; struct rlimit *rlim; ptr_size = (bprm->argc + bprm->envc) * sizeof(void *); if (ptr_s...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { if (write) { unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; unsigned long ptr_size, limit; ptr_size = (bprm->argc + bprm->envc) * sizeof(void *); if (ptr_size > ULONG_MAX - size...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (write) { unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; unsigned long ptr_size; struct rlimit *rlim; ptr_size = (bprm->argc...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (write) { unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; unsigned long ptr_size, limit; ptr_size = (bprm->argc + bprm->envc) * sizeo...
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) { if (write) { unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; - unsigned long ptr_size; - struct rlimit *rlim; + unsigned long ptr_size, limit; ptr_size = (bprm->argc + b...
CVE-2018-14734
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/infiniband/core/ucma.c
ucma_alloc_multicast
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { struct ucma_multicast *mc; mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id < ...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { struct ucma_multicast *mc; mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id ...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { struct ucma_multicast *mc; mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id < ...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { struct ucma_multicast *mc; mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id ...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id < 0) { goto error; } ...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL); mutex_unlock(&mut); if (mc->id < 0) { goto error; ...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL); mutex_unlock(&mut)...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL); mutex_unlock(&mu...
static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx) { mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) { return NULL; } mutex_lock(&mut); - mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL); + mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL); ...
CVE-2018-14734
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/infiniband/core/ucma.c
ucma_process_join
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { struct rdma_ucm_create_id_resp resp; struct ucma_context *ctx; struct ucma_multicast *mc; struct sockaddr *addr; int ret; u8 join_state; if (out_len < sizeof(resp)) { return -ENOS...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { struct rdma_ucm_create_id_resp resp; struct ucma_context *ctx; struct ucma_multicast *mc; struct sockaddr *addr; int ret; u8 join_state; if (out_len < sizeof(resp)) { return -ENOS...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { struct rdma_ucm_create_id_resp resp; struct ucma_context *ctx; struct ucma_multicast *mc; struct sockaddr *addr; int ret; if (out_len < sizeof(resp)) { return -ENOSPC; } addr ...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { struct rdma_ucm_create_id_resp resp; struct ucma_context *ctx; struct ucma_multicast *mc; struct sockaddr *addr; int ret; if (out_len < sizeof(resp)) { return -ENOSPC; } addr ...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { if (cmd->join_flags == RDMA_MC_JO_FLAG_FULLMEMBER) { join_state = BIT(FULLMEMBER_JO); } else if (cmd->join_flags == RDMA_MC_JO_FLAG_SENDONLY_FULLMEMBER) { join_state = BIT(SENDONLY_FULLMEMBER...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { if (cmd->join_flags == RDMA_MC_JO_FLAG_FULLMEMBER) { join_state = BIT(FULLMEMBER_JO); } else if (cmd->join_flags == RDMA_MC_JO_FLAG_SENDONLY_FULLMEMBER) { join_state = BIT(SENDONLY_FULLMEMBER...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctx = ucma_get_ctx(file, cmd->id); if (IS_ERR(ctx)) { return PTR_ERR(ctx); } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mc = ucma_allo...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctx = ucma_get_ctx(file, cmd->id); if (IS_ERR(ctx)) { return PTR_ERR(ctx); } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mc = ucma_allo...
static ssize_t ucma_process_join(struct ucma_file *file, struct rdma_ucm_join_mcast *cmd, int out_len) { if (cmd->join_flags == RDMA_MC_JO_FLAG_FULLMEMBER) { join_state = BIT(FULLMEMBER_JO); } else if (cmd->join_flags == RDMA_MC_JO_FLAG_SENDONLY_FULLMEMBER) { join_state = BIT(SENDONLY_FULLM...
CVE-2018-15471
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/xen-netback/hash.c
xenvif_set_hash_mapping
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = &vif->hash.mapping[off]; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.u.gmfn = virt_to_gfn(mapping), .dest.domid = DOMID_SELF, .dest.offset = xen_offset_in_page(mapping)...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = vif->hash.mapping; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.domid = DOMID_SELF, .len = len * sizeof(*mapping), .flags = GNTCOPY_source_gref }; if ((off + len...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = &vif->hash.mapping[off]; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.u.gmfn = virt_to_gfn(mapping), .dest.domid = DOMID_SELF, .dest.offset = xen_offset_in_page(mapping)...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = vif->hash.mapping; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.domid = DOMID_SELF, .len = len * sizeof(*mapping), .flags = GNTCOPY_source_gref }; if ((off + len...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = &vif->hash.mapping[off]; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.u.gmfn = virt_to_gfn(mapping), .dest.domid = DOMID_SELF, .dest.offset = xen_offset_in_page(mapping)...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = vif->hash.mapping; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.domid = DOMID_SELF, .len = len * sizeof(*mapping), .flags = GNTCOPY_source_gref }; if ((off + len...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = &vif->hash.mapping[off]; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.u.gmfn = virt_to_gfn(mapping), .dest.domid = DOMID_SELF, .dest.offset = xen_offset_in_page(mapping)...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { u32 *mapping = vif->hash.mapping; struct gnttab_copy copy_op = { .source.u.ref = gref, .source.domid = vif->domid, .dest.domid = DOMID_SELF, .len = len * sizeof(*mapping), .flags = GNTCOPY_source_gref }; if ((off + len...
u32 xenvif_set_hash_mapping(struct xenvif *vif, u32 gref, u32 len, u32 off) { - u32 *mapping = &vif->hash.mapping[off]; + u32 *mapping = vif->hash.mapping; struct gnttab_copy copy_op = { - .source.u.ref = gref, .source.domid = vif->domid, .dest.u.gmfn = virt_to_gfn(mapping), .dest.domid = DOMID_SELF,...
CVE-2018-15572
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kernel/cpu/bugs.c
spectre_v2_select_mitigation
static void spectre_v2_select_mitigation(void) { enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline(); enum spectre_v2_mitigation mode = SPECTRE_V2_NONE; if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2) && (cmd == SPECTRE_V2_CMD_NONE || cmd == SPECTRE_V2_CMD_AUTO)) { return; } switch (cm...
static void spectre_v2_select_mitigation(void) { enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline(); enum spectre_v2_mitigation mode = SPECTRE_V2_NONE; if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2) && (cmd == SPECTRE_V2_CMD_NONE || cmd == SPECTRE_V2_CMD_AUTO)) { return; } switch (cm...
static void spectre_v2_select_mitigation(void) { enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline(); enum spectre_v2_mitigation mode = SPECTRE_V2_NONE; if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2) && (cmd == SPECTRE_V2_CMD_NONE || cmd == SPECTRE_V2_CMD_AUTO)) { return; } switch (cm...
static void spectre_v2_select_mitigation(void) { enum spectre_v2_mitigation_cmd cmd = spectre_v2_parse_cmdline(); enum spectre_v2_mitigation mode = SPECTRE_V2_NONE; if (!boot_cpu_has_bug(X86_BUG_SPECTRE_V2) && (cmd == SPECTRE_V2_CMD_NONE || cmd == SPECTRE_V2_CMD_AUTO)) { return; } switch (cm...
static void spectre_v2_select_mitigation(void) { pr_info("%s\n", spectre_v2_strings[mode]); if ((!boot_cpu_has(X86_FEATURE_PTI) && !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) { setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); pr_info("Spectre v2 mitigation: Filling RSB on context switch\n")...
static void spectre_v2_select_mitigation(void) { pr_info("%s\n", spectre_v2_strings[mode]); setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); pr_info("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n"); }
static void spectre_v2_select_mitigation(void) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ pr_info("%s\n", spectre_v2_strings[mode]); if ((!boot_cpu_has(X86_FEATURE_KAISER) && !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) { setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); pr_info("Spe...
static void spectre_v2_select_mitigation(void) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ pr_info("%s\n", spectre_v2_strings[mode]); setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); pr_info("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n"); /* PLACEHOLDER: DO NOT DELETE THIS COM...
static void spectre_v2_select_mitigation(void) { pr_info("%s\n", spectre_v2_strings[mode]); - if ((!boot_cpu_has(X86_FEATURE_PTI) && !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) { - setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); - pr_info("Spectre v2 mitigation: Filling RSB on context switc...
CVE-2018-15594
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kernel/paravirt.c
paravirt_patch_call
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (tgt_clobbers & ~site_clobbers) { return len; } if (len < 5) { ...
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { WARN_ONCE("Failing to patch indirect CALL in %ps\n", (void *)add...
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (tgt_clobbers & ~site_clobbers) { return len; } if (len < 5) { ...
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { WARN_ONCE("Failing to patch indirect CALL in %ps\n", (void *)add...
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { unsigned long delta = (unsigned long)target - (addr+5); if (tgt_clobbers & ~site_clobbers) { return len; } if (len < 5) { return len; } }
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { WARN_ONCE("Failing to patch indirect CALL in %ps\n", (void *)addr); return len; } }
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ unsigned long delta = (unsigned long)target - (addr+5); if (tgt_clobbers & ~site_clobbers) { return len; } if...
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { WARN_ONCE("Failing to patch indirect CALL in %...
unsigned paravirt_patch_call(void *insnbuf, const void *target, u16 tgt_clobbers, unsigned long addr, u16 site_clobbers, unsigned len) { unsigned long delta = (unsigned long)target - (addr+5); - if (tgt_clobbers & ~site_clobbers) { - return len; - } if (len < 5) { + WARN_ONCE("Failing to ...
CVE-2018-15594
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kernel/paravirt.c
paravirt_patch_jmp
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { return len; } b->opcode = 0xe9; b->delta = delta; return 5; }
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr); return len; } b->op...
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { return len; } b->opcode = 0xe9; b->delta = delta; return 5; }
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { struct branch *b = insnbuf; unsigned long delta = (unsigned long)target - (addr+5); if (len < 5) { WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr); return len; } b->op...
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { if (len < 5) { return len; } }
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { if (len < 5) { WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr); return len; } }
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (len < 5) { return len; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (len < 5) { WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr); return len; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
unsigned paravirt_patch_jmp(void *insnbuf, const void *target, unsigned long addr, unsigned len) { if (len < 5) { + WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr); return len; } }
CVE-2018-16276
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/misc/yurex.c
yurex_read
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int retval = 0; int bytes_read = 0; char in_buffer[20]; unsigned long flags; dev = file->private_data; mutex_lock(&dev->io_mutex); if (!dev->interface) { retval = -ENOD...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int len = 0; char in_buffer[20]; unsigned long flags; dev = file->private_data; mutex_lock(&dev->io_mutex); if (!dev->interface) { mutex_unlock(&dev->io_mutex); ret...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int retval = 0; int bytes_read = 0; char in_buffer[20]; unsigned long flags; dev = (struct usb_yurex *)file->private_data; mutex_lock(&dev->io_mutex); if (!dev->interface) { ...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int len = 0; char in_buffer[20]; unsigned long flags; dev = (struct usb_yurex *)file->private_data; mutex_lock(&dev->io_mutex); if (!dev->interface) { mutex_unlock(&dev->io...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int retval = 0; int bytes_read = 0; char in_buffer[20]; dev = file->private_data; if (!dev->interface) { retval = -ENODEV; goto exit; } spin_lock_irqsave(&dev->...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int len = 0; char in_buffer[20]; dev = file->private_data; if (!dev->interface) { mutex_unlock(&dev->io_mutex); return -ENODEV; } spin_lock_irqsave(&dev->lock, flag...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int retval = 0; int bytes_read = 0; char in_buffer[20]; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev = (struct usb_yurex *)file->private_data; /* PLACEHOLDER: DO NOT DELETE TH...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; int len = 0; char in_buffer[20]; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev = (struct usb_yurex *)file->private_data; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!dev-...
static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) { struct usb_yurex *dev; - int retval = 0; - int bytes_read = 0; + int len = 0; char in_buffer[20]; dev = file->private_data; if (!dev->interface) { - retval = -ENODEV; - goto exit; + ...
CVE-2018-16658
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/cdrom/cdrom.c
cdrom_ioctl_drive_status
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_DRIVE_STATUS\n"); if (!(cdi->ops->capability & CDC_DRIVE_STATUS)) { return -ENOSYS; } if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { ...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_DRIVE_STATUS\n"); if (!(cdi->ops->capability & CDC_DRIVE_STATUS)) { return -ENOSYS; } if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { ...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_DRIVE_STATUS\n"); if (!(cdi->ops->capability & CDC_DRIVE_STATUS)) { return -ENOSYS; } if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { ...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_DRIVE_STATUS\n"); if (!(cdi->ops->capability & CDC_DRIVE_STATUS)) { return -ENOSYS; } if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { ...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { return cdi->ops->drive_status(cdi, CDSL_CURRENT); } if (((int)arg >= cdi->capacity)) { return -EVAL; } return cdrom_...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { return cdi->ops->drive_status(cdi, CDSL_CURRENT); } if (arg >= cdi->capacity) { return -EVAL; } return cdrom_slot_st...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { return cdi->ops->drive_status(cdi, CDSL_CURRENT); } if (((int)arg >= cdi->capacity...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { return cdi->ops->drive_status(cdi, CDSL_CURRENT); } if (arg >= cdi->capacity) { ...
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi, unsigned long arg) { if (!CDROM_CAN(CDC_SELECT_DISC) || (arg == CDSL_CURRENT || arg == CDSL_NONE)) { return cdi->ops->drive_status(cdi, CDSL_CURRENT); } - if (((int)arg >= cdi->capacity)) { + if (arg >= cdi->capacity) { ...
CVE-2018-16871
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/nfsd/nfs4proc.c
nfsd4_verify_copy
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh, src_stateid, RD_STATE, src, NULL); if (stat...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; if (!cstate->save_fh.fh_dentry) { return nfserr_nofilehandle; } status = nfs4_preprocess_stateid_op(...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh, src_stateid, RD_STATE, src, NULL); if (stat...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; if (!cstate->save_fh.fh_dentry) { return nfserr_nofilehandle; } status = nfs4_preprocess_stateid_op(...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh, src_stateid, RD_STATE, src, NULL); status =...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; if (!cstate->save_fh.fh_dentry) { return nfserr_nofilehandle; } status = nfs4_preprocess_stateid_op(...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh, src_stateid, RD_STATE, src, NULL); /* PLACE...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; if (!cstate->save_fh.fh_dentry) { return nfserr_nofilehandle; } status = nfs4_preprocess_stateid_op(...
static __be32 nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, stateid_t *src_stateid, struct file **src, stateid_t *dst_stateid, struct file **dst) { __be32 status; + if (!cstate->save_fh.fh_dentry) { + return nfserr_nofilehandle; + } status = nfs4_preprocess_state...
CVE-2018-16880
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/net.c
vhost_net_open
static int vhost_net_open(struct inode *inode, struct file *f) { struct vhost_net *n; struct vhost_dev *dev; struct vhost_virtqueue **vqs; void **queue; struct xdp_buff *xdp; int i; n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs...
static int vhost_net_open(struct inode *inode, struct file *f) { struct vhost_net *n; struct vhost_dev *dev; struct vhost_virtqueue **vqs; void **queue; struct xdp_buff *xdp; int i; n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs...
static int vhost_net_open(struct inode *inode, struct file *f) { struct vhost_net *n; struct vhost_dev *dev; struct vhost_virtqueue **vqs; void **queue; int i; n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET...
static int vhost_net_open(struct inode *inode, struct file *f) { struct vhost_net *n; struct vhost_dev *dev; struct vhost_virtqueue **vqs; void **queue; int i; n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET...
static int vhost_net_open(struct inode *inode, struct file *f) { n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET_VQ_MAX, sizeof(*vqs), GFP_KERNEL); if (!vqs) { return -ENOMEM; } queue = kmalloc_array(VHOST_N...
static int vhost_net_open(struct inode *inode, struct file *f) { n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET_VQ_MAX, sizeof(*vqs), GFP_KERNEL); if (!vqs) { return -ENOMEM; } queue = kmalloc_array(VHOST_N...
static int vhost_net_open(struct inode *inode, struct file *f) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET_VQ_MAX, sizeof(*vqs), GFP_KERNEL); if (!vqs) { /* PLACEH...
static int vhost_net_open(struct inode *inode, struct file *f) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET_VQ_MAX, sizeof(*vqs), GFP_KERNEL); if (!vqs) { /* PLACEH...
static int vhost_net_open(struct inode *inode, struct file *f) { n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!n) { return -ENOMEM; } vqs = kmalloc_array(VHOST_NET_VQ_MAX, sizeof(*vqs), GFP_KERNEL); if (!vqs) { return -ENOMEM; } queue = kmalloc_arr...
CVE-2018-16880
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/scsi.c
vhost_scsi_open
static int vhost_scsi_open(struct inode *inode, struct file *f) { struct vhost_scsi *vs; struct vhost_virtqueue **vqs; int r = -ENOMEM, i; vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err...
static int vhost_scsi_open(struct inode *inode, struct file *f) { struct vhost_scsi *vs; struct vhost_virtqueue **vqs; int r = -ENOMEM, i; vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err...
static int vhost_scsi_open(struct inode *inode, struct file *f) { struct vhost_scsi *vs; struct vhost_virtqueue **vqs; int r = -ENOMEM, i; vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err...
static int vhost_scsi_open(struct inode *inode, struct file *f) { struct vhost_scsi *vs; struct vhost_virtqueue **vqs; int r = -ENOMEM, i; vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err...
static int vhost_scsi_open(struct inode *inode, struct file *f) { vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err_vs; } } vqs = kmalloc_array(VHOST_SCSI_MAX_VQ, sizeof(*vqs), GFP_KER...
static int vhost_scsi_open(struct inode *inode, struct file *f) { vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err_vs; } } vqs = kmalloc_array(VHOST_SCSI_MAX_VQ, sizeof(*vqs), GFP_KER...
static int vhost_scsi_open(struct inode *inode, struct file *f) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err_vs; } } vqs = kmal...
static int vhost_scsi_open(struct inode *inode, struct file *f) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err_vs; } } vqs = kmal...
static int vhost_scsi_open(struct inode *inode, struct file *f) { vs = kzalloc(sizeof(*vs), GFP_KERNEL | __GFP_NOWARN | __GFP_RETRY_MAYFAIL); if (!vs) { vs = vzalloc(sizeof(*vs)); if (!vs) { goto err_vs; } } vqs = kmalloc_array(VHOST_SCSI_MAX_VQ, sizeof(*vqs)...
CVE-2018-16880
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vhost.c
vhost_dev_alloc_iovecs
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { struct vhost_virtqueue *vq; int i; for (i = 0; i < dev->nvqs; ++i) { vq = dev->vqs[i]; vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(UIO_MAXIOV, sizeof(*vq->log), GFP_KE...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { struct vhost_virtqueue *vq; int i; for (i = 0; i < dev->nvqs; ++i) { vq = dev->vqs[i]; vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(dev->iov_limit, sizeof(*vq->log), GF...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { struct vhost_virtqueue *vq; int i; for (i = 0; i < dev->nvqs; ++i) { vq = dev->vqs[i]; vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(UIO_MAXIOV, sizeof(*vq->log), GFP_KE...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { struct vhost_virtqueue *vq; int i; for (i = 0; i < dev->nvqs; ++i) { vq = dev->vqs[i]; vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(dev->iov_limit, sizeof(*vq->log), GF...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { for (i = 0; i < dev->nvqs; ++i) { vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(UIO_MAXIOV, sizeof(*vq->log), GFP_KERNEL); vq->heads = kmalloc_array(UIO_MAXIOV, sizeof(*vq->head...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { for (i = 0; i < dev->nvqs; ++i) { vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(dev->iov_limit, sizeof(*vq->log), GFP_KERNEL); vq->heads = kmalloc_array(dev->iov_limit, sizeof(*...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < dev->nvqs; ++i) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(UIO_M...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < dev->nvqs; ++i) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); vq->log = kmalloc_array(dev->...
static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) { for (i = 0; i < dev->nvqs; ++i) { vq->indirect = kmalloc_array(UIO_MAXIOV, sizeof(*vq->indirect), GFP_KERNEL); - vq->log = kmalloc_array(UIO_MAXIOV, sizeof(*vq->log), GFP_KERNEL); - vq->heads = kmalloc_array(UIO_MAXIOV, sizeof(*vq-...
CVE-2018-16880
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vhost.c
vhost_dev_init
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs) { struct vhost_virtqueue *vq; int i; dev->vqs = vqs; dev->nvqs = nvqs; mutex_init(&dev->mutex); dev->log_ctx = NULL; dev->umem = NULL; dev->iotlb = NULL; dev->mm = NULL; dev->worker = NULL; ini...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, int iov_limit) { struct vhost_virtqueue *vq; int i; dev->vqs = vqs; dev->nvqs = nvqs; mutex_init(&dev->mutex); dev->log_ctx = NULL; dev->umem = NULL; dev->iotlb = NULL; dev->mm = NULL; dev->worker ...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs) { struct vhost_virtqueue *vq; int i; dev->vqs = vqs; dev->nvqs = nvqs; mutex_init(&dev->mutex); dev->log_ctx = NULL; dev->umem = NULL; dev->iotlb = NULL; dev->mm = NULL; dev->worker = NULL; ini...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, int iov_limit) { struct vhost_virtqueue *vq; int i; dev->vqs = vqs; dev->nvqs = nvqs; mutex_init(&dev->mutex); dev->log_ctx = NULL; dev->umem = NULL; dev->iotlb = NULL; dev->mm = NULL; dev->worker ...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs) { dev->worker = NULL; init_llist_head(&dev->work_list); for (i = 0; i < dev->nvqs; ++i) { vq->dev = dev; vhost_vq_reset(dev, vq); if (vq->handle_kick) { vhost_poll_init(&vq->poll, vq->handl...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, int iov_limit) { dev->worker = NULL; dev->iov_limit = iov_limit; init_llist_head(&dev->work_list); for (i = 0; i < dev->nvqs; ++i) { vq->dev = dev; vhost_vq_reset(dev, vq); if (vq->handle_kick) { ...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev->worker = NULL; init_llist_head(&dev->work_list); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < dev->nvqs; ++i) { /* PLACEHOLDER: DO NOT DELETE T...
void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, int iov_limit) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev->worker = NULL; dev->iov_limit = iov_limit; init_llist_head(&dev->work_list); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ for (i = 0; i < dev->n...
-void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs) { +void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, int iov_limit) { dev->worker = NULL; + dev->iov_limit = iov_limit; init_llist_head(&dev->work_list); for (i = 0; i < dev->nvqs; ++i)...
CVE-2018-16880
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/vhost/vsock.c
vhost_vsock_dev_open
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { struct vhost_virtqueue **vqs; struct vhost_vsock *vsock; int ret; vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), sizeof(*vqs), GFP_KERNEL); if (!vqs) { goto out; } vsock->...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), sizeof(*vqs), GFP_KERNEL); if (!vqs) { goto out; } vsock->...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), sizeof(*vqs), GFP_KERNEL); ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), sizeof(*vqs), GFP_KERNEL); ...
static int vhost_vsock_dev_open(struct inode *inode, struct file *file) { vsock = kvmalloc(sizeof(*vsock), GFP_KERNEL | __GFP_RETRY_MAYFAIL); if (!vsock) { return -ENOMEM; } vqs = kmalloc_array(ARRAY_SIZE(vsock->vqs), sizeof(*vqs), GFP_KERNEL); if (!vqs) { goto out; } ...
CVE-2018-16882
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kvm/vmx.c
nested_get_vmcs12_pages
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) { struct vmcs12 *vmcs12 = get_vmcs12(vcpu); struct vcpu_vmx *vmx = to_vmx(vcpu); struct page *page; u64 hpa; if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) { if (vmx->nested.apic_access_page) { kvm_...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) { struct vmcs12 *vmcs12 = get_vmcs12(vcpu); struct vcpu_vmx *vmx = to_vmx(vcpu); struct page *page; u64 hpa; if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) { if (vmx->nested.apic_access_page) { kvm_...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct page *page; u64 hpa; if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) { if (vmx->nested.apic_access_page) { kvm_release_page_dirty(vmx-...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct page *page; u64 hpa; if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) { if (vmx->nested.apic_access_page) { kvm_release_page_dirty(vmx-...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) { if (nested_cpu_has_posted_intr(vmcs12)) { if (vmx->nested.pi_desc_page) { vmx->nested.pi_desc_page = NULL; } page = kvm_vcpu_gpa_to_page(vcpu, vmcs12->posted_intr_desc_addr); vmcs_write64(POSTED_TR_DESC_ADDR, pa...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) { if (nested_cpu_has_posted_intr(vmcs12)) { if (vmx->nested.pi_desc_page) { vmx->nested.pi_desc_page = NULL; vmx->nested.pi_desc = NULL; vmcs_write64(POSTED_TR_DESC_ADDR, -1ull); } page = kvm_vcpu_...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nested_cpu_has_posted_intr(vmcs12)) { if (vmx->nested.pi_desc_page) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vmx->nested.pi_desc_page = NULL; ...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nested_cpu_has_posted_intr(vmcs12)) { if (vmx->nested.pi_desc_page) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ vmx->nested.pi_desc_page = NULL; ...
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu) { if (nested_cpu_has_posted_intr(vmcs12)) { if (vmx->nested.pi_desc_page) { vmx->nested.pi_desc_page = NULL; + vmx->nested.pi_desc = NULL; + vmcs_write64(POSTED_TR_DESC_ADDR, -1ull); } page = k...
CVE-2018-16884
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sunrpc/svc.c
bc_svc_process
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *resv = &rqstp->rq_res.head[0]; struct rpc_task *task; int proc_error; int error; dprintk("svc: %s(%p)\n", __func__, req); rqstp->rq_xprt = serv->...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *resv = &rqstp->rq_res.head[0]; struct rpc_task *task; int proc_error; int error; dprintk("svc: %s(%p)\n", __func__, req); rqstp->rq_xid = req->rq...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *resv = &rqstp->rq_res.head[0]; rqstp->rq_xprt = serv->sv_bc_xprt; rqstp->rq_xid = req->rq_xid; rqstp->rq_prot = req->rq_xprt->prot; rqstp->rq_server ...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { struct kvec *argv = &rqstp->rq_arg.head[0]; struct kvec *resv = &rqstp->rq_res.head[0]; rqstp->rq_xid = req->rq_xid; rqstp->rq_prot = req->rq_xprt->prot; rqstp->rq_server = serv; rqstp->rq_bc_net = req->rq_...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { dprintk("svc: %s(%p)\n", __func__, req); rqstp->rq_xprt = serv->sv_bc_xprt; rqstp->rq_xid = req->rq_xid; rqstp->rq_server = serv; rqstp->rq_addrlen = sizeof(req->rq_xprt->addr); proc_error = svc_process_com...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { dprintk("svc: %s(%p)\n", __func__, req); rqstp->rq_xid = req->rq_xid; rqstp->rq_server = serv; rqstp->rq_bc_net = req->rq_xprt->xprt_net; rqstp->rq_addrlen = sizeof(req->rq_xprt->addr); proc_error = svc_pro...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rqstp->rq_xprt = serv->sv_bc_xprt; rqstp->rq_xid = req->rq_xid; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rqstp->rq_server = serv; rqstp->rq_addrlen = sizeo...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rqstp->rq_xid = req->rq_xid; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rqstp->rq_server = serv; rqstp->rq_bc_net = req->rq_xprt->xprt_net; rqstp->rq_addrlen...
int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { dprintk("svc: %s(%p)\n", __func__, req); - rqstp->rq_xprt = serv->sv_bc_xprt; rqstp->rq_xid = req->rq_xid; rqstp->rq_server = serv; + rqstp->rq_bc_net = req->rq_xprt->xprt_net; rqstp->rq_addrlen = sizeof...
CVE-2018-16884
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sunrpc/svc_xprt.c
svc_reserve
void svc_reserve(struct svc_rqst *rqstp, int space) { space += rqstp->rq_res.head[0].iov_len; if (space < rqstp->rq_reserved) { struct svc_xprt *xprt = rqstp->rq_xprt; atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(xprt...
void svc_reserve(struct svc_rqst *rqstp, int space) { struct svc_xprt *xprt = rqstp->rq_xprt; space += rqstp->rq_res.head[0].iov_len; if (xprt && space < rqstp->rq_reserved) { atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(...
void svc_reserve(struct svc_rqst *rqstp, int space) { space += rqstp->rq_res.head[0].iov_len; if (space < rqstp->rq_reserved) { struct svc_xprt *xprt = rqstp->rq_xprt; atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(xprt...
void svc_reserve(struct svc_rqst *rqstp, int space) { struct svc_xprt *xprt = rqstp->rq_xprt; space += rqstp->rq_res.head[0].iov_len; if (xprt && space < rqstp->rq_reserved) { atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(...
void svc_reserve(struct svc_rqst *rqstp, int space) { space += rqstp->rq_res.head[0].iov_len; if (space < rqstp->rq_reserved) { struct svc_xprt *xprt = rqstp->rq_xprt; atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(xprt...
void svc_reserve(struct svc_rqst *rqstp, int space) { struct svc_xprt *xprt = rqstp->rq_xprt; space += rqstp->rq_res.head[0].iov_len; if (xprt && space < rqstp->rq_reserved) { atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(...
void svc_reserve(struct svc_rqst *rqstp, int space) { space += rqstp->rq_res.head[0].iov_len; if (space < rqstp->rq_reserved) { struct svc_xprt *xprt = rqstp->rq_xprt; atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(xprt...
void svc_reserve(struct svc_rqst *rqstp, int space) { struct svc_xprt *xprt = rqstp->rq_xprt; space += rqstp->rq_res.head[0].iov_len; if (xprt && space < rqstp->rq_reserved) { atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved); rqstp->rq_reserved = space; svc_xprt_enqueue(...
void svc_reserve(struct svc_rqst *rqstp, int space) { + struct svc_xprt *xprt = rqstp->rq_xprt; space += rqstp->rq_res.head[0].iov_len; - if (space < rqstp->rq_reserved) { - struct svc_xprt *xprt = rqstp->rq_xprt; + if (xprt && space < rqstp->rq_reserved) { atomic_sub((rqstp->rq_reserved ...
CVE-2018-16884
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sunrpc/svcsock.c
svc_tcp_prep_reply_hdr
static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
-static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { +void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp) { struct kvec *resv = &rqstp->rq_res.head[0]; svc_putnl(resv, 0); }
CVE-2018-17972
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/proc/base.c
proc_pid_stack
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { struct stack_trace trace; unsigned long *entries; int err; int i; entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries), GFP_KERNEL); if (!entries) { return -ENOMEM; ...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { struct stack_trace trace; unsigned long *entries; int err; int i; if (!file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADM)) { return -EACCES; } entries = kmalloc(MAX_...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { struct stack_trace trace; unsigned long *entries; int err; int i; entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries), GFP_KERNEL); if (!entries) { return -ENOMEM; ...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { struct stack_trace trace; unsigned long *entries; int err; int i; if (!file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADM)) { return -EACCES; } entries = kmalloc(MAX_...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { int i; entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries), GFP_KERNEL); if (!err) { for (i = 0; i < trace.nr_entries; i++) { seq_printf(m, "[<%pK>] %pS\n", (void *...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { int i; if (!file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADM)) { return -EACCES; } entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries), GFP_KERNEL); if (!err) { ...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int i; entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries), GFP_KERNEL); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!err) {...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int i; if (!file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADM)) { return -EACCES; } entries = kmalloc(MAX_STACK_TRACE_DEPTH * s...
static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task) { int i; + if (!file_ns_capable(m->file, &init_user_ns, CAP_SYS_ADM)) { + return -EACCES; + } entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries), GFP_KERNEL); if (!err)...
CVE-2018-18021
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/arm64/kvm/guest.c
get_core_reg
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); u32 off; off = core_reg_offset_from_id(reg->id); if (off >= nr_regs || (off +...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); u32 off; off = core_reg_offset_from_id(reg->id); if (off >= nr_regs || (off +...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); u32 off; off = core_reg_offset_from_id(reg->id); if (off >= nr_regs || (off +...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); u32 off; off = core_reg_offset_from_id(reg->id); if (off >= nr_regs || (off +...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (copy_to_user(uaddr, ((u32 *)regs) + off, KVM_REG_SIZE(reg->id))) { return -EFAULT; } }
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (validate_core_offset(reg)) { return -EVAL; } if (copy_to_user(uaddr, ((u32 *)regs) + off, KVM_REG_...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (copy_to_user(uaddr, ((u32 *)regs) + off, KVM_REG_SIZE(reg->id)))...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (validate_core_offset(reg)) { return -EVAL; } if ...
static int get_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; + } + if (validate_core_offset(reg)) { + return -EVAL; } if (copy_to_user(uaddr, ((u32 *)regs) + off, ...
CVE-2018-18021
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/arm64/kvm/guest.c
set_core_reg
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); __uint128_t tmp; void *valp = &tmp; u64 off; int err = 0; off = core_...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); __uint128_t tmp; void *valp = &tmp; u64 off; int err = 0; off = core_...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); __uint128_t tmp; void *valp = &tmp; u64 off; int err = 0; off = core_...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { __u32 *uaddr = (__u32 *)(unsigned long)reg->addr; struct kvm_regs *regs = vcpu_gp_regs(vcpu); int nr_regs = sizeof(*regs) / sizeof(__u32); __uint128_t tmp; void *valp = &tmp; u64 off; int err = 0; off = core_...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (KVM_REG_SIZE(reg->id) > sizeof(tmp)) { return -EVAL; } if (copy_from_user(valp, uaddr, KVM_REG_SIZ...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (validate_core_offset(reg)) { return -EVAL; } if (KVM_REG_SIZE(reg->id) > sizeof(tmp)) { re...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (KVM_REG_SIZE(reg->id) > sizeof(tmp)) { return -EVAL; ...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; } if (validate_core_offset(reg)) { return -EVAL; } if ...
static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) { if (off >= nr_regs || (off + (KVM_REG_SIZE(reg->id) / sizeof(__u32))) >= nr_regs) { return -ENOENT; + } + if (validate_core_offset(reg)) { + return -EVAL; } if (KVM_REG_SIZE(reg->id) > sizeof(tmp)) { ...
CVE-2018-18281
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/huge_memory.c
move_huge_pmd
bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd, bool *need_flush) { spinlock_t *old_ptl, *new_ptl; pmd_t pmd; struct mm_struct *mm = vma->vm_mm; bool force_flush = false; if ((old_addr & ~HPAGE_PMD_...
bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd) { spinlock_t *old_ptl, *new_ptl; pmd_t pmd; struct mm_struct *mm = vma->vm_mm; bool force_flush = false; if ((old_addr & ~HPAGE_PMD_MASK) || (new_addr...
int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd) { spinlock_t *old_ptl, *new_ptl; int ret = 0; pmd_t pmd; struct mm_struct *mm = vma->vm_mm; if ((old_addr & ~HPAGE_PMD_...
int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd) { spinlock_t *old_ptl, *new_ptl; int ret = 0; pmd_t pmd; bool force_flush = false; struct mm_struct *mm = vma->vm_mm; ...
bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd, bool *need_flush) { struct mm_struct *mm = vma->vm_mm; if ((old_addr & ~HPAGE_PMD_MASK) || (new_addr & ~HPAGE_PMD_MASK) || old_end - old_addr < HPAGE_PMD_SIZE) { ...
bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd) { struct mm_struct *mm = vma->vm_mm; if ((old_addr & ~HPAGE_PMD_MASK) || (new_addr & ~HPAGE_PMD_MASK) || old_end - old_addr < HPAGE_PMD_SIZE) { return fal...
int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct mm_struct *mm = vma->vm_mm; if ((old_addr & ~HPAGE_PMD_MASK) || (new_add...
int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ bool force_flush = false; struct mm_struct *mm = vma->vm_mm; if ((old_addr ...
-bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd, bool *need_flush) { +bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr, unsigned long new_addr, unsigned long old_end, pmd_t *old_pmd, pmd_t *new_pmd...
CVE-2018-18281
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/mremap.c
move_ptes
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks, bool *need_flush) { struct mm_struct *mm = vma->vm_mm; pte_t *old_pte, *new_pte, pt...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks) { struct mm_struct *mm = vma->vm_mm; pte_t *old_pte, *new_pte, pte; spinlock_t ...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks) { struct address_space *mapping = NULL; struct anon_vma *anon_vma = NULL; struc...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks) { struct address_space *mapping = NULL; struct anon_vma *anon_vma = NULL; struc...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks, bool *need_flush) { struct mm_struct *mm = vma->vm_mm; unsigned long len = old_end ...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks) { struct mm_struct *mm = vma->vm_mm; unsigned long len = old_end - old_addr; if...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks) { struct address_space *mapping = NULL; struct anon_vma *anon_vma = NULL; struc...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, bool need_rmap_locks) { struct address_space *mapping = NULL; struct anon_vma *anon_vma = NULL; struc...
static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, unsigned long old_addr, unsigned long old_end, struct vm_area_struct *new_vma, pmd_t *new_pmd, unsigned long new_addr, - bool need_rmap_locks, bool *need_flush) { + bool need_rmap_locks) { struct mm_struct ...
CVE-2018-18386
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/tty/n_tty.c
n_tty_ioctl
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct n_tty_data *ldata = tty->disc_data; int retval; switch (cmd) { case TIOCQ: return put_user(tty_chars_in_buffer(tty), (int *) arg); case TIOCQ: down_write(&tty->termios_rwse...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct n_tty_data *ldata = tty->disc_data; int retval; switch (cmd) { case TIOCQ: return put_user(tty_chars_in_buffer(tty), (int *) arg); case TIOCQ: down_write(&tty->termios_rwse...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct n_tty_data *ldata = tty->disc_data; int retval; switch (cmd) { case TIOCQ: return put_user(tty_chars_in_buffer(tty), (int *) arg); case TIOCQ: down_write(&tty->termios_rwse...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct n_tty_data *ldata = tty->disc_data; int retval; switch (cmd) { case TIOCQ: return put_user(tty_chars_in_buffer(tty), (int *) arg); case TIOCQ: down_write(&tty->termios_rwse...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { switch (cmd) { case TIOCQ: down_write(&tty->termios_rwsem); if (L_ICANON(tty)) { retval = inq_canon(ldata); } else { retval = read_cnt(ldata); } ...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { switch (cmd) { case TIOCQ: down_write(&tty->termios_rwsem); if (L_ICANON(tty) && !L_EXTPROC(tty)) { retval = inq_canon(ldata); } else { retval = read_cnt(ldata...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case TIOCQ: down_write(&tty->termios_rwsem); if (L_ICANON(tty)) { ...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case TIOCQ: down_write(&tty->termios_rwsem); if (L_ICANON(tty) && !L_EXTPROC...
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { switch (cmd) { case TIOCQ: down_write(&tty->termios_rwsem); - if (L_ICANON(tty)) { + if (L_ICANON(tty) && !L_EXTPROC(tty)) { retval = inq_canon(ldata); } else ...
CVE-2018-18386
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/tty/n_tty.c
n_tty_set_termios
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); ldata->line_start = ldata->read_tail; if (!L_ICANON(tty) ...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); ldata->line_start = ldata->read_tail; if (!L_...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); ldata->line_start = ldata->read_tail; if (!L_ICANON(tty) ...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); ldata->line_start = ldata->read_tail; if (!L_...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); } ldata->icanon = (L_ICANON(tty) != 0); if (!I_IXON(tty) && o...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); } ldata->icanon = (L_ICANON(tty) != 0); if (!I_IX...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } ldata->icanon...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) { bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } l...
static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) { struct n_tty_data *ldata = tty->disc_data; - if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { + if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) { bitmap_zero(ldata->read_flags, N_TTY_B...
CVE-2018-18397
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/hugetlb.c
hugetlb_mcopy_atomic_pte
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct address_space *mapping; pgoff_t idx; unsigned long size; int vm_shared = dst_vma->vm_flags & VM_SHARED; struct hstate *...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct address_space *mapping; pgoff_t idx; unsigned long size; int vm_shared = dst_vma->vm_flags & VM_SHARED; struct hstate *...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct address_space *mapping; pgoff_t idx; unsigned long size; int vm_shared = dst_vma->vm_flags & VM_SHARED; struct hstate *...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct address_space *mapping; pgoff_t idx; unsigned long size; int vm_shared = dst_vma->vm_flags & VM_SHARED; struct hstate *...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { if (!*pagep) { if (unlikely(ret)) { ret = -EFAULT; *pagep = page; goto out; } } else {...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { if (!*pagep) { if (unlikely(ret)) { ret = -ENOENT; *pagep = page; goto out; } } else {...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!*pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (unlikely(ret)) ...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!*pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (unlikely(ret)) ...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { if (!*pagep) { if (unlikely(ret)) { - ret = -EFAULT; + ret = -ENOENT; *pagep = page; ...
CVE-2018-18397
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/shmem.c
shmem_mfill_atomic_pte
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { struct inode *inode = file_inode(dst_vma->vm_file); struct shmem_inode_info *info = SHMEM_I(inode); struct address...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { struct inode *inode = file_inode(dst_vma->vm_file); struct shmem_inode_info *info = SHMEM_I(inode); struct address...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { struct inode *inode = file_inode(dst_vma->vm_file); struct shmem_inode_info *info = SHMEM_I(inode); struct address...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { struct inode *inode = file_inode(dst_vma->vm_file); struct shmem_inode_info *info = SHMEM_I(inode); struct address...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { if (!*pagep) { if (!zeropage) { if (unlikely(ret)) { shmem_inode_unacct_blocks(inode, ...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { if (!*pagep) { if (!zeropage) { if (unlikely(ret)) { shmem_inode_unacct_blocks(inode, ...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!*pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!*pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ...
static int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, bool zeropage, struct page **pagep) { if (!*pagep) { if (!zeropage) { if (unlikely(ret)) { shmem_inode_unacct_blocks(in...
CVE-2018-18397
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/userfaultfd.c
mcopy_atomic_pte
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct mem_cgroup *memcg; pte_t _dst_pte, *dst_pte; spinlock_t *ptl; void *page_kaddr; int ret; struct page *page; if (...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct mem_cgroup *memcg; pte_t _dst_pte, *dst_pte; spinlock_t *ptl; void *page_kaddr; int ret; struct page *page; if (...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct mem_cgroup *memcg; pte_t _dst_pte, *dst_pte; spinlock_t *ptl; void *page_kaddr; int ret; struct page *page; if (...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct mem_cgroup *memcg; pte_t _dst_pte, *dst_pte; spinlock_t *ptl; void *page_kaddr; int ret; struct page *page; if (...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { if (!*pagep) { if (unlikely(ret)) { ret = -EFAULT; *pagep = page; goto out; } } else { ...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { if (!*pagep) { if (unlikely(ret)) { ret = -ENOENT; *pagep = page; goto out; } } else { ...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!*pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (unlikely(ret)) {...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!*pagep) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (unlikely(ret)) {...
static int mcopy_atomic_pte(struct mm_struct *dst_mm, pmd_t *dst_pmd, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { if (!*pagep) { if (unlikely(ret)) { - ret = -EFAULT; + ret = -ENOENT; *pagep = page; ...
CVE-2018-18559
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/packet/af_packet.c
packet_do_bind
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); struct net_device *dev_curr; __be16 proto_curr; bool need_rehook; struct net_device *dev = NULL; int ret = 0; bool unlisted = false; lock_sock(sk); spin_lock...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); struct net_device *dev_curr; __be16 proto_curr; bool need_rehook; struct net_device *dev = NULL; int ret = 0; bool unlisted = false; lock_sock(sk); spin_lock...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); struct net_device *dev_curr; __be16 proto_curr; bool need_rehook; struct net_device *dev = NULL; int ret = 0; bool unlisted = false; lock_sock(sk); spin_lock...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); struct net_device *dev_curr; __be16 proto_curr; bool need_rehook; struct net_device *dev = NULL; int ret = 0; bool unlisted = false; lock_sock(sk); spin_lock...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); if (need_rehook) { if (po->running) { rcu_read_unlock(); __unregister_prot_hook(sk, true); if (dev) { unlisted = !dev_get_by_...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); if (need_rehook) { if (po->running) { rcu_read_unlock(); po->num = 0; __unregister_prot_hook(sk, true); if (dev) { ...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (need_rehook) { if (po->running) { rcu_read_unlock(); __unregister_prot_hook(sk, true); /* PLACE...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (need_rehook) { if (po->running) { rcu_read_unlock(); po->num = 0; __unregister_prot_hoo...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); if (need_rehook) { if (po->running) { rcu_read_unlock(); + po->num = 0; __unregister_prot_hook(sk, true); if (dev) { ...
CVE-2018-18690
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/xfs/libxfs/xfs_attr.c
xfs_attr_shortform_addname
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { int newsize, forkoff, retval; trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->f...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { int newsize, forkoff, retval; trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->f...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { int newsize, forkoff, retval; trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->f...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { int newsize, forkoff, retval; trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->f...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->flags & ATTR_CREATE) { ...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->flags & ATTR_CREATE) { ...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { ...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { ...
STATIC int xfs_attr_shortform_addname(xfs_da_args_t *args) { trace_xfs_attr_sf_addname(args); retval = xfs_attr_shortform_lookup(args); if ((args->flags & ATTR_REPLACE) && (retval == -ENOATTR)) { return retval; } else if (retval == -EEXIST) { if (args->flags & ATTR_CREATE) { ...
CVE-2018-18710
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/cdrom/cdrom.c
cdrom_ioctl_select_disc
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_SELECT_DISC\n"); if (!CDROM_CAN(CDC_SELECT_DISC)) { return -ENOSYS; } if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if ((int)arg >= cdi->capacity) { ret...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_SELECT_DISC\n"); if (!CDROM_CAN(CDC_SELECT_DISC)) { return -ENOSYS; } if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if (arg >= cdi->capacity) { return -...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_SELECT_DISC\n"); if (!CDROM_CAN(CDC_SELECT_DISC)) { return -ENOSYS; } if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if ((int)arg >= cdi->capacity) { ret...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { cd_dbg(CD_DO_IOCTL, "entering CDROM_SELECT_DISC\n"); if (!CDROM_CAN(CDC_SELECT_DISC)) { return -ENOSYS; } if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if (arg >= cdi->capacity) { return -...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if ((int)arg >= cdi->capacity) { return -EVAL; } } if (cdi->ops->select_disc) { return cdi->ops->select_disc(cdi, arg); } return c...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if (arg >= cdi->capacity) { return -EVAL; } } if (cdi->ops->select_disc) { return cdi->ops->select_disc(cdi, arg); } return cdrom_...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if ((int)arg >= cdi->capacity) { return -EVAL; } } if (cdi->ops->select_disc) { return c...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (arg != CDSL_CURRENT && arg != CDSL_NONE) { if (arg >= cdi->capacity) { return -EVAL; } } if (cdi->ops->select_disc) { return cdi->o...
static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, unsigned long arg) { if (arg != CDSL_CURRENT && arg != CDSL_NONE) { - if ((int)arg >= cdi->capacity) { + if (arg >= cdi->capacity) { return -EVAL; } } if (cdi->ops->select_disc) { return cdi->o...
CVE-2018-18955
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/user_namespace.c
map_write
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { struct seq_file *seq = file->private_data; struct user_namespace *ns = seq->private; struct uid_gid_map new_map; unsigned idx; struct uid...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { struct seq_file *seq = file->private_data; struct user_namespace *ns = seq->private; struct uid_gid_map new_map; unsigned idx; struct uid...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { struct seq_file *seq = file->private_data; struct user_namespace *ns = seq->private; struct uid_gid_map new_map; unsigned idx; struct uid...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { struct seq_file *seq = file->private_data; struct user_namespace *ns = seq->private; struct uid_gid_map new_map; unsigned idx; struct uid...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { if (!new_idmap_permitted(file, ns, cap_setid, &new_map)) { goto out; } ret = sort_idmaps(&new_map); if (ret < 0) { goto out; ...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { if (!new_idmap_permitted(file, ns, cap_setid, &new_map)) { goto out; } ret = -EPERM; for (idx = 0; idx < new_map.nr_extents; idx++) {...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!new_idmap_permitted(file, ns, cap_setid, &new_map)) { goto out; } ret = sort_idmap...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!new_idmap_permitted(file, ns, cap_setid, &new_map)) { goto out; } ret = -EPERM; ...
static ssize_t map_write(struct file *file, const char *buf, size_t count, loff_t *ppos, int cap_setid, struct uid_gid_map *map, struct uid_gid_map *parent_map) { if (!new_idmap_permitted(file, ns, cap_setid, &new_map)) { goto out; } + ret = -EPERM; + for (idx = 0; idx < new_map.nr_extents; id...
CVE-2018-19407
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kvm/x86.c
vcpu_scan_ioapic
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { if (!kvm_apic_hw_enabled(vcpu->arch.apic)) { return; } bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256); if (irqchip_split(vcpu->kvm)) { kvm_scan_ioapic_routes(vcpu, vcpu->arch.ioapic_handled_vectors); } else { if (vcpu...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { if (!kvm_apic_hw_enabled(vcpu->arch.apic)) { return; } bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256); if (irqchip_split(vcpu->kvm)) { kvm_scan_ioapic_routes(vcpu, vcpu->arch.ioapic_handled_vectors); } else { if (vcpu...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { u64 eoi_exit_bitmap[4]; if (!kvm_apic_hw_enabled(vcpu->arch.apic)) { return; } bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256); if (irqchip_split(vcpu->kvm)) { kvm_scan_ioapic_routes(vcpu, vcpu->arch.ioapic_handled_vectors); ...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { u64 eoi_exit_bitmap[4]; if (!kvm_apic_hw_enabled(vcpu->arch.apic)) { return; } bitmap_zero(vcpu->arch.ioapic_handled_vectors, 256); if (irqchip_split(vcpu->kvm)) { kvm_scan_ioapic_routes(vcpu, vcpu->arch.ioapic_handled_vectors); ...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { if (irqchip_split(vcpu->kvm)) { } else { if (vcpu->arch.apicv_active) { kvm_x86_ops->sync_pir_to_irr(vcpu); } kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors); } if (is_guest_mode(vcpu)) { } else ...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { if (irqchip_split(vcpu->kvm)) { } else { if (vcpu->arch.apicv_active) { kvm_x86_ops->sync_pir_to_irr(vcpu); } if (ioapic_in_kernel(vcpu->kvm)) { kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors); ...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (irqchip_split(vcpu->kvm)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else { if (vcpu->arch.apicv_active) { kvm_x86_ops->sync_pir_to_irr(vcpu); } kvm_ioapic_s...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (irqchip_split(vcpu->kvm)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else { if (vcpu->arch.apicv_active) { kvm_x86_ops->sync_pir_to_irr(vcpu); } if (ioapic_i...
static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) { if (irqchip_split(vcpu->kvm)) { } else { if (vcpu->arch.apicv_active) { kvm_x86_ops->sync_pir_to_irr(vcpu); } - kvm_ioapic_scan_entry(vcpu, vcpu->arch.ioapic_handled_vectors); + if (ioapic_in_kernel(vcpu->kvm))...
CVE-2018-19854
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
crypto/crypto_user.c
crypto_report_acomp
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strlcpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } return 0; nla...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strncpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } return 0; nla...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strlcpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } return 0; nla...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strncpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } return 0; nla...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strlcpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } nla_put_failure: ...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strncpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } nla_put_failure: ...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strlcpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } /* PLACEHOLDE...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; strncpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &racomp)) { goto nla_put_failure; } /* PLACEHOLDE...
static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_acomp racomp; - strlcpy(racomp.type, "acomp", sizeof(racomp.type)); + strncpy(racomp.type, "acomp", sizeof(racomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(struct crypto_report_acomp), &rac...
CVE-2018-19854
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
crypto/crypto_user.c
crypto_report_akcipher
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strlcpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strlcpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strlcpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strlcpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(struct crypto_report_akcipher), &rakcipher)) { goto nla_put_failu...
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; - strlcpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); + strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER, sizeof(str...
CVE-2018-19854
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
crypto/crypto_user.c
crypto_report_cipher
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strlcpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; rcipher.max_keysize = alg->cra_cip...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strncpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; rcipher.max_keysize = alg->cra_cip...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strlcpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; rcipher.max_keysize = alg->cra_cip...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strncpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; rcipher.min_keysize = alg->cra_cipher.cia_min_keysize; rcipher.max_keysize = alg->cra_cip...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strlcpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; if (nla_put(skb, CRYPTOCFGA_REPORT_CIPHER, sizeof(struct crypto_report_cipher), &rcipher)) { ...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strncpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; if (nla_put(skb, CRYPTOCFGA_REPORT_CIPHER, sizeof(struct crypto_report_cipher), &rcipher)) { ...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strlcpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nla_put(skb, CRYPTOCFGA_REPORT_CIPHER, ...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; strncpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nla_put(skb, CRYPTOCFGA_REPORT_CIPHER, ...
static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_cipher rcipher; - strlcpy(rcipher.type, "cipher", sizeof(rcipher.type)); + strncpy(rcipher.type, "cipher", sizeof(rcipher.type)); rcipher.blocksize = alg->cra_blocksize; if (nla_put(skb, CRYPTOCFGA_...
CVE-2018-19854
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
crypto/crypto_user.c
crypto_report_comp
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strlcpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } return 0; n...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strncpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } return 0; n...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strlcpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } return 0; n...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strncpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } return 0; n...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strlcpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } nla_put_failure...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strncpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } nla_put_failure...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strlcpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } /* PLACEHOL...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; strncpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp), &rcomp)) { goto nla_put_failure; } /* PLACEHOL...
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_comp rcomp; - strlcpy(rcomp.type, "compression", sizeof(rcomp.type)); + strncpy(rcomp.type, "compression", sizeof(rcomp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS, sizeof(struct crypto_report_comp...
CVE-2018-19854
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
crypto/crypto_user.c
crypto_report_kpp
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strlcpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } return 0; nla_put_failure: ...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } return 0; nla_put_failure: ...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strlcpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } return 0; nla_put_failure: ...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } return 0; nla_put_failure: ...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strlcpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } nla_put_failure: return -EMSGSI...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } nla_put_failure: return -EMSGSI...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strlcpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } /* PLACEHOLDER: DO NOT DELETE T...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nla_put_failure; } /* PLACEHOLDER: DO NOT DELETE T...
static int crypto_report_kpp(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_kpp rkpp; - strlcpy(rkpp.type, "kpp", sizeof(rkpp.type)); + strncpy(rkpp.type, "kpp", sizeof(rkpp.type)); if (nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(struct crypto_report_kpp), &rkpp)) { goto nl...
CVE-2018-19854
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
crypto/crypto_user.c
crypto_report_one
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strlcpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strlcpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strncpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strncpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strncpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strlcpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strlcpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strncpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strncpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strncpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strlcpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strlcpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strncpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strncpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strncpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strlcpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strlcpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { strncpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); strncpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); strncpy(ualg->cru_module_name, module_name(alg->cra_m...
static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { - strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name)); - strlcpy(ualg->cru_driver_name, alg->cra_driver_name, sizeof(ualg->cru_driver_name)); - strlcpy(ualg->cru_module_name, module_name(alg->c...
CVE-2018-19985
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_get_config_data
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->cur_altsetting->desc.bInterfaceNumber; s32 result; if (!config_data) { return -ENOMEM; } if...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->cur_altsetting->desc.bInterfaceNumber; s32 result; if (!config_data) { return -ENOMEM; } if...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->altsetting->desc.bInterfaceNumber; s32 result; if (!config_data) { return -ENOMEM; } if (us...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->altsetting->desc.bInterfaceNumber; s32 result; if (!config_data) { return -ENOMEM; } if (us...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->cur_altsetting->desc.bInterfaceNumber; if (!config_data) { return -ENOMEM; } if (usb_control_ms...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->cur_altsetting->desc.bInterfaceNumber; if (!config_data) { return -ENOMEM; } if (usb_control_ms...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->altsetting->desc.bInterfaceNumber; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!config_data) { ...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->altsetting->desc.bInterfaceNumber; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!config_data) { ...
static int hso_get_config_data(struct usb_interface *interface) { struct usb_device *usbdev = interface_to_usbdev(interface); u8 *config_data = kmalloc(17, GFP_KERNEL); u32 if_num = interface->cur_altsetting->desc.bInterfaceNumber; if (!config_data) { return -ENOMEM; } if (usb_co...
CVE-2018-19985
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/usb/hso.c
hso_probe
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { int mux, i, if_num, port_spec; unsigned char port_mask; struct hso_device *hso_dev = NULL; struct hso_shared_int *shared_int; struct hso_device *tmp_dev = NULL; if (interface->cur_altsetting->desc.bInterfaceC...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { int mux, i, if_num, port_spec; unsigned char port_mask; struct hso_device *hso_dev = NULL; struct hso_shared_int *shared_int; struct hso_device *tmp_dev = NULL; if (interface->cur_altsetting->desc.bInterfaceC...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { int mux, i, if_num, port_spec; unsigned char port_mask; struct hso_device *hso_dev = NULL; struct hso_shared_int *shared_int; struct hso_device *tmp_dev = NULL; if (interface->cur_altsetting->desc.bInterfaceC...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { int mux, i, if_num, port_spec; unsigned char port_mask; struct hso_device *hso_dev = NULL; struct hso_shared_int *shared_int; struct hso_device *tmp_dev = NULL; if (interface->cur_altsetting->desc.bInterfaceC...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { if_num = interface->cur_altsetting->desc.bInterfaceNumber; if (id->driver_info) { port_spec = ((u32 *)(id->driver_info))[if_num]; } else { port_spec = hso_get_config_data(interface); } if (interfa...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { if_num = interface->cur_altsetting->desc.bInterfaceNumber; if (id->driver_info) { for (i = 0; i <= if_num; ++i) if (((u32 *)(id->driver_info))[i] == 0) { goto exit; } p...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if_num = interface->altsetting->desc.bInterfaceNumber; if (id->driver_info) { port_spec = ((u32 *)(id->driver_info))[if_num]; } else { port_spec = hso_get...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if_num = interface->altsetting->desc.bInterfaceNumber; if (id->driver_info) { for (i = 0; i <= if_num; ++i) if (((u32 *)(id->driver_info))[i] == 0) { ...
static int hso_probe(struct usb_interface *interface, const struct usb_device_id *id) { if_num = interface->cur_altsetting->desc.bInterfaceNumber; if (id->driver_info) { + for (i = 0; i <= if_num; ++i) + if (((u32 *)(id->driver_info))[i] == 0) { + goto exit; + } ...
CVE-2018-20169
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/core/hub.c
usb_enumerate_device_otg
static int usb_enumerate_device_otg(struct usb_device *udev) { int err = 0; if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; struct usb_bus *bus = udev->bus; unsigned port1 = udev->portnum; err = __usb_get...
static int usb_enumerate_device_otg(struct usb_device *udev) { int err = 0; if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; struct usb_bus *bus = udev->bus; unsigned port1 = udev->portnum; err = __usb_get...
static int usb_enumerate_device_otg(struct usb_device *udev) { int err = 0; if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; struct usb_bus *bus = udev->bus; if (__usb_get_extra_descriptor (udev->rawdescriptors[0]...
static int usb_enumerate_device_otg(struct usb_device *udev) { int err = 0; if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; struct usb_bus *bus = udev->bus; if (__usb_get_extra_descriptor (udev->rawdescriptors[0]...
static int usb_enumerate_device_otg(struct usb_device *udev) { if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; unsigned port1 = udev->portnum; err = __usb_get_extra_descriptor(udev->rawdescriptors[0], le16_to_cpu(ude...
static int usb_enumerate_device_otg(struct usb_device *udev) { if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; unsigned port1 = udev->portnum; err = __usb_get_extra_descriptor(udev->rawdescriptors[0], le16_to_cpu(ude...
static int usb_enumerate_device_otg(struct usb_device *udev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (__usb_get...
static int usb_enumerate_device_otg(struct usb_device *udev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (__usb_get...
static int usb_enumerate_device_otg(struct usb_device *udev) { if (!udev->bus->is_b_host && udev->config && udev->parent == udev->bus->root_hub) { struct usb_otg_descriptor *desc = NULL; unsigned port1 = udev->portnum; - err = __usb_get_extra_descriptor(udev->rawdescriptors[0], le16_to_cp...
CVE-2018-20169
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/core/usb.c
__usb_get_extra_descriptor
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) { struct usb_descriptor_header *header; while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2) { printk(KERN_ERR "%s: ...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr, size_t minsize) { struct usb_descriptor_header *header; while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2 || header->bLength >...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) { struct usb_descriptor_header *header; while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2) { printk(KERN_ERR "%s: ...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr, size_t minsize) { struct usb_descriptor_header *header; while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2 || header->bLength >...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) { while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2) { printk(KERN_ERR "%s: bogus descriptor, type %d length %d\n", us...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr, size_t minsize) { while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2 || header->bLength > size) { printk(KERN_ERR "%s: ...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2) { printk(KERN_E...
int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr, size_t minsize) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2 || header->b...
-int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) { +int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr, size_t minsize) { while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buff...
CVE-2018-20169
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/host/hwa-hc.c
hwahc_security_create
static int hwahc_security_create(struct hwahc *hwahc) { int result; struct wusbhc *wusbhc = &hwahc->wusbhc; struct usb_device *usb_dev = hwahc->wa.usb_dev; struct device *dev = &usb_dev->dev; struct usb_security_descriptor *secd; struct usb_encryption_descriptor *etd; void *itr, *top; si...
static int hwahc_security_create(struct hwahc *hwahc) { int result; struct wusbhc *wusbhc = &hwahc->wusbhc; struct usb_device *usb_dev = hwahc->wa.usb_dev; struct device *dev = &usb_dev->dev; struct usb_security_descriptor *secd; struct usb_encryption_descriptor *etd; void *itr, *top; si...
static int hwahc_security_create(struct hwahc *hwahc) { int result; struct wusbhc *wusbhc = &hwahc->wusbhc; struct usb_device *usb_dev = hwahc->wa.usb_dev; struct device *dev = &usb_dev->dev; struct usb_security_descriptor *secd; struct usb_encryption_descriptor *etd; void *itr, *top; si...
static int hwahc_security_create(struct hwahc *hwahc) { int result; struct wusbhc *wusbhc = &hwahc->wusbhc; struct usb_device *usb_dev = hwahc->wa.usb_dev; struct device *dev = &usb_dev->dev; struct usb_security_descriptor *secd; struct usb_encryption_descriptor *etd; void *itr, *top; si...
static int hwahc_security_create(struct hwahc *hwahc) { itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); top = itr + itr_size; result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index], le16_to_cpu(usb_dev->actconfig->desc.wTotalLength), USB_DT_SECURITY, (void **) &secd); if (resu...
static int hwahc_security_create(struct hwahc *hwahc) { itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); top = itr + itr_size; result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index], le16_to_cpu(usb_dev->actconfig->desc.wTotalLength), USB_DT_SECURITY, (void **) &secd, sizeof(*secd)...
static int hwahc_security_create(struct hwahc *hwahc) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); top = itr + itr_size; result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index], le16_to_cpu(usb_dev->actconfig->desc.wTotalLength...
static int hwahc_security_create(struct hwahc *hwahc) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); top = itr + itr_size; result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index], le16_to_cpu(usb_dev->actconfig->desc.wTotalLength...
static int hwahc_security_create(struct hwahc *hwahc) { itr_size = le16_to_cpu(usb_dev->actconfig->desc.wTotalLength); top = itr + itr_size; - result = __usb_get_extra_descriptor(usb_dev->rawdescriptors[index], le16_to_cpu(usb_dev->actconfig->desc.wTotalLength), USB_DT_SECURITY, (void **) &secd); + res...
CVE-2018-20511
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/appletalk/ipddp.c
ipddp_ioctl
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ipddp_route *rt = ifr->ifr_data; struct ipddp_route rcp, rcp2, *rp; if(!capable(CAP_NET_ADM)) { return -EPERM; } if(copy_from_user(&rcp, rt, sizeof(rcp))) { return -EFAULT; } switch(cmd) { ...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ipddp_route *rt = ifr->ifr_data; struct ipddp_route rcp, rcp2, *rp; if(!capable(CAP_NET_ADM)) { return -EPERM; } if(copy_from_user(&rcp, rt, sizeof(rcp))) { return -EFAULT; } switch(cmd) { ...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ipddp_route *rt = ifr->ifr_data; struct ipddp_route rcp, rcp2, *rp; if(!capable(CAP_NET_ADM)) { return -EPERM; } if(copy_from_user(&rcp, rt, sizeof(rcp))) { return -EFAULT; } switch(cmd) { ...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ipddp_route *rt = ifr->ifr_data; struct ipddp_route rcp, rcp2, *rp; if(!capable(CAP_NET_ADM)) { return -EPERM; } if(copy_from_user(&rcp, rt, sizeof(rcp))) { return -EFAULT; } switch(cmd) { ...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { switch(cmd) { case SIOCFDIPDDPRT: rp = __ipddp_find_route(&rcp); if (rp) { memcpy(&rcp2, rp, sizeof(rcp2)); } spin_unlock_bh(&ipddp_route_lock); if (rp) { if (copy_to_user...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { switch(cmd) { case SIOCFDIPDDPRT: rp = __ipddp_find_route(&rcp); if (rp) { memset(&rcp2, 0, sizeof(rcp2)); rcp2.ip = rp->ip; rcp2.at = rp->at; rcp2.flags = rp->flags; ...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch(cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case SIOCFDIPDDPRT: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rp = __ipddp_find_route(&rcp); if (...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch(cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case SIOCFDIPDDPRT: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rp = __ipddp_find_route(&rcp); if (...
static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { switch(cmd) { case SIOCFDIPDDPRT: rp = __ipddp_find_route(&rcp); if (rp) { - memcpy(&rcp2, rp, sizeof(rcp2)); + memset(&rcp2, 0, sizeof(rcp2)); + rcp2.ip = rp->ip; + rcp2...
CVE-2018-20784
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/sched/fair.c
print_cfs_stats
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq, *pos; rcu_read_lock(); for_each_leaf_cfs_rq_safe(cpu_rq(cpu), cfs_rq, pos) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq; rcu_read_lock(); for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq, *pos; rcu_read_lock(); for_each_leaf_cfs_rq_safe(cpu_rq(cpu), cfs_rq, pos) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq; rcu_read_lock(); for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq, *pos; rcu_read_lock(); for_each_leaf_cfs_rq_safe(cpu_rq(cpu), cfs_rq, pos) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq; rcu_read_lock(); for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq, *pos; rcu_read_lock(); for_each_leaf_cfs_rq_safe(cpu_rq(cpu), cfs_rq, pos) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { struct cfs_rq *cfs_rq; rcu_read_lock(); for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
void print_cfs_stats(struct seq_file *m, int cpu) { - struct cfs_rq *cfs_rq, *pos; + struct cfs_rq *cfs_rq; rcu_read_lock(); - for_each_leaf_cfs_rq_safe(cpu_rq(cpu), cfs_rq, pos) + for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq) print_cfs_rq(m, cpu, cfs_rq); rcu_read_unlock(); }
CVE-2018-20784
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/sched/fair.c
update_blocked_averages
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq, *pos; const struct sched_class *curr_class; struct rq_flags rf; bool done = true; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq_safe(rq, cfs_rq, pos) { struct ...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq; const struct sched_class *curr_class; struct rq_flags rf; bool done = true; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq(rq, cfs_rq) { struct sched_entity *se...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq, *pos; struct rq_flags rf; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq_safe(rq, cfs_rq, pos) { struct sched_entity *se; if (throttled_hierarchy(cfs_rq)) { ...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq; struct rq_flags rf; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq(rq, cfs_rq) { struct sched_entity *se; if (throttled_hierarchy(cfs_rq)) { continu...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq, *pos; const struct sched_class *curr_class; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq_safe(rq, cfs_rq, pos) { struct sched_entity *se; if (throttled_hierar...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq; const struct sched_class *curr_class; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq(rq, cfs_rq) { struct sched_entity *se; if (throttled_hierarchy(cfs_rq)) { ...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq, *pos; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq_safe(rq, cfs_rq, pos) { struct sched_entity *se; if (throttle...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); struct cfs_rq *cfs_rq; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ rq_lock_irqsave(rq, &rf); update_rq_clock(rq); for_each_leaf_cfs_rq(rq, cfs_rq) { struct sched_entity *se; if (throttled_hierarchy(cfs_...
static void update_blocked_averages(int cpu) { struct rq *rq = cpu_rq(cpu); - struct cfs_rq *cfs_rq, *pos; + struct cfs_rq *cfs_rq; const struct sched_class *curr_class; rq_lock_irqsave(rq, &rf); update_rq_clock(rq); - for_each_leaf_cfs_rq_safe(rq, cfs_rq, pos) { + for_each_leaf_cfs_rq(...
CVE-2018-20836
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/scsi/libsas/sas_expander.c
smp_task_done
static void smp_task_done(struct sas_task *task) { if (!del_timer(&task->slow_task->timer)) { return; } complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { del_timer(&task->slow_task->timer); complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { if (!del_timer(&task->slow_task->timer)) { return; } complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { del_timer(&task->slow_task->timer); complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { if (!del_timer(&task->slow_task->timer)) { return; } complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { del_timer(&task->slow_task->timer); complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { if (!del_timer(&task->slow_task->timer)) { return; } complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { del_timer(&task->slow_task->timer); complete(&task->slow_task->completion); }
static void smp_task_done(struct sas_task *task) { - if (!del_timer(&task->slow_task->timer)) { - return; - } + del_timer(&task->slow_task->timer); complete(&task->slow_task->completion); }
CVE-2018-20836
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/scsi/libsas/sas_expander.c
smp_task_timedout
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; unsigned long flags; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; } spin_unlock_irqre...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; unsigned long flags; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; complete(&task->slo...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; unsigned long flags; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; } spin_unlock_irqre...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; unsigned long flags; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; complete(&task->slo...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; } spin_unlock_irqrestore(&task->task_state_l...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; complete(&task->slow_task->completion); ...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; ...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; ...
static void smp_task_timedout(unsigned long _task) { struct sas_task *task = (void *) _task; spin_lock_irqsave(&task->task_state_lock, flags); if (!(task->task_state_flags & SAS_TASK_STATE_DONE)) { task->task_state_flags |= SAS_TASK_STATE_ABORTED; + complete(&task->slow_task->completion)...
CVE-2018-20856
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
block/blk-core.c
blk_init_allocated_queue
int blk_init_allocated_queue(struct request_queue *q) { WARN_ON_ONCE(q->mq_ops); q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size); if (!q->fq) { return -ENOMEM; } if (q->init_rq_fn && q->init_rq_fn(q, q->fq->flush_rq, GFP_KERNEL)) { goto out_free_flush_queue; } if ...
int blk_init_allocated_queue(struct request_queue *q) { WARN_ON_ONCE(q->mq_ops); q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, q->cmd_size); if (!q->fq) { return -ENOMEM; } if (q->init_rq_fn && q->init_rq_fn(q, q->fq->flush_rq, GFP_KERNEL)) { goto out_free_flush_queue; } if ...
struct request_queue * blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, spinlock_t *lock) { if (!q) { return NULL; } q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, 0); if (!q->fq) { return NULL; } if (blk_init_rl(&q->root_rl, q, GFP_KERNEL)) { goto ...
struct request_queue * blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, spinlock_t *lock) { if (!q) { return NULL; } q->fq = blk_alloc_flush_queue(q, NUMA_NO_NODE, 0); if (!q->fq) { return NULL; } if (blk_init_rl(&q->root_rl, q, GFP_KERNEL)) { goto ...
int blk_init_allocated_queue(struct request_queue *q) { out_free_flush_queue: blk_free_flush_queue(q->fq); return -ENOMEM; }
int blk_init_allocated_queue(struct request_queue *q) { out_free_flush_queue: blk_free_flush_queue(q->fq); q->fq = NULL; return -ENOMEM; }
struct request_queue * blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, spinlock_t *lock) { if (!q) { return NULL; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mutex_unlock(&q->sysfs_lock); return q; fail: blk_free_flush_queue(q->fq); return NULL; }
struct request_queue * blk_init_allocated_queue(struct request_queue *q, request_fn_proc *rfn, spinlock_t *lock) { if (!q) { return NULL; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ mutex_unlock(&q->sysfs_lock); return q; fail: blk_free_flush_queue(q->fq); q->fq = NULL; retur...
int blk_init_allocated_queue(struct request_queue *q) { out_free_flush_queue: blk_free_flush_queue(q->fq); + q->fq = NULL; return -ENOMEM; }
CVE-2018-20961
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/gadget/function/f_midi.c
f_midi_set_alt
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); unsigned i; int err; if (intf != midi->ms_id) { return 0; } err = f_midi_start_ep(midi, f, midi->in_ep); if (err) { return err; } err = f_midi_start...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); unsigned i; int err; if (intf != midi->ms_id) { return 0; } err = f_midi_start_ep(midi, f, midi->in_ep); if (err) { return err; } err = f_midi_start...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); struct usb_composite_dev *cdev = f->config->cdev; unsigned i; int err; if (intf == 0) { return 0; } err = f_midi_start_ep(midi, f, midi->in_ep); if (err) { ...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); struct usb_composite_dev *cdev = f->config->cdev; unsigned i; int err; if (intf == 0) { return 0; } err = f_midi_start_ep(midi, f, midi->in_ep); if (err) { ...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); err = f_midi_start_ep(midi, f, midi->in_ep); err = f_midi_start_ep(midi, f, midi->out_ep); while (kfifo_avail(&midi->in_req_fifo)) { struct usb_request *req = midi_alloc_ep_req...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); err = f_midi_start_ep(midi, f, midi->in_ep); err = f_midi_start_ep(midi, f, midi->out_ep); while (kfifo_avail(&midi->in_req_fifo)) { struct usb_request *req = midi_alloc_ep_req...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err = f_midi_start_ep(midi, f, midi->in_ep); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err = f_midi_start_ep(midi, f, midi->out_ep...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err = f_midi_start_ep(midi, f, midi->in_ep); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err = f_midi_start_ep(midi, f, midi->out_ep...
static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_midi *midi = func_to_midi(f); err = f_midi_start_ep(midi, f, midi->in_ep); err = f_midi_start_ep(midi, f, midi->out_ep); while (kfifo_avail(&midi->in_req_fifo)) { struct usb_request *req = midi_alloc_...
CVE-2018-20961
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/usb/gadget/u_f.h
free_ep_req
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { kfree(req->buf); usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { WARN_ON(req->buf == NULL); kfree(req->buf); req->buf = NULL; usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { kfree(req->buf); usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { WARN_ON(req->buf == NULL); kfree(req->buf); req->buf = NULL; usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { kfree(req->buf); usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { WARN_ON(req->buf == NULL); kfree(req->buf); req->buf = NULL; usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { kfree(req->buf); usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { WARN_ON(req->buf == NULL); kfree(req->buf); req->buf = NULL; usb_ep_free_request(ep, req); }
static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req) { + WARN_ON(req->buf == NULL); kfree(req->buf); + req->buf = NULL; usb_ep_free_request(ep, req); }
CVE-2018-21008
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/wireless/rsi/rsi_91x_mac80211.c
rsi_mac80211_detach
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); adapter->hw = NULL; } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); adapter->hw = NULL; } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); adapter->hw = NULL; } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); adapter->hw = NULL; } rsi_remove_dbgfs(adapter); }
void rsi_mac80211_detach(struct rsi_hw *adapter) { struct ieee80211_hw *hw = adapter->hw; if (hw) { ieee80211_stop_queues(hw); ieee80211_unregister_hw(hw); ieee80211_free_hw(hw); + adapter->hw = NULL; } rsi_remove_dbgfs(adapter); }
CVE-2018-3620
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kernel/cpu/microcode/core.c
check_online_cpus
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { - if (num_online_cpus() == num_present_cpus()) { - return 0; + unsigned int cpu; + for_each_present_cpu(cpu) { + if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { + pr_err("Not all CPUs online, aborting microcode update.\n"); + ...
CVE-2018-3646
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
arch/x86/kernel/cpu/microcode/core.c
check_online_cpus
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { if (num_online_cpus() == num_present_cpus()) { return 0; } pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; }
static int check_online_cpus(void) { unsigned int cpu; for_each_present_cpu(cpu) { if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { pr_err("Not all CPUs online, aborting microcode update.\n"); return -EVAL; } } return 0; }
static int check_online_cpus(void) { - if (num_online_cpus() == num_present_cpus()) { - return 0; + unsigned int cpu; + for_each_present_cpu(cpu) { + if (topology_is_primary_thread(cpu) && !cpu_online(cpu)) { + pr_err("Not all CPUs online, aborting microcode update.\n"); + ...
CVE-2018-5332
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/rds/rdma.c
rds_rdma_extra_size
int rds_rdma_extra_size(struct rds_rdma_args *args) { struct rds_iovec vec; struct rds_iovec *local_vec; int tot_pages = 0; unsigned int nr_pages; unsigned int i; local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; for (i = 0; i < args->nr_local; i++) { if (copy_fro...
int rds_rdma_extra_size(struct rds_rdma_args *args) { struct rds_iovec vec; struct rds_iovec *local_vec; int tot_pages = 0; unsigned int nr_pages; unsigned int i; local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; if (args->nr_local == 0) { return -EVAL; } ...
int rds_rdma_extra_size(struct rds_rdma_args *args) { struct rds_iovec vec; struct rds_iovec *local_vec; int tot_pages = 0; unsigned int nr_pages; unsigned int i; local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; for (i = 0; i < args->nr_local; i++) { if (copy_fro...
int rds_rdma_extra_size(struct rds_rdma_args *args) { struct rds_iovec vec; struct rds_iovec *local_vec; int tot_pages = 0; unsigned int nr_pages; unsigned int i; local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; if (args->nr_local == 0) { return -EVAL; } ...
int rds_rdma_extra_size(struct rds_rdma_args *args) { local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; for (i = 0; i < args->nr_local; i++) { } }
int rds_rdma_extra_size(struct rds_rdma_args *args) { local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; if (args->nr_local == 0) { return -EVAL; } for (i = 0; i < args->nr_local; i++) { } }
int rds_rdma_extra_size(struct rds_rdma_args *args) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; for (i = 0; i < args->nr_local; i++) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } /* PLACEHOLDER: DO NOT DELETE THIS COMM...
int rds_rdma_extra_size(struct rds_rdma_args *args) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; if (args->nr_local == 0) { return -EVAL; } for (i = 0; i < args->nr_local; i++) { /* PLACEHOLDER: DO NOT DELETE THIS C...
int rds_rdma_extra_size(struct rds_rdma_args *args) { local_vec = (struct rds_iovec *)(unsigned long) args->local_vec_addr; + if (args->nr_local == 0) { + return -EVAL; + } for (i = 0; i < args->nr_local; i++) { } }
CVE-2018-5333
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/rds/rdma.c
rds_cmsg_atomic
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { struct page *page = NULL; struct rds_atomic_args *args; int ret = 0; if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) || rm->atomic.op_active) { return -EVAL; } args = CMSG_DATA(cmsg); ...
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { struct page *page = NULL; struct rds_atomic_args *args; int ret = 0; if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) || rm->atomic.op_active) { return -EVAL; } args = CMSG_DATA(cmsg); ...
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { struct page *page = NULL; struct rds_atomic_args *args; int ret = 0; if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) || rm->atomic.op_active) { return -EVAL; } args = CMSG_DATA(cmsg); ...
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { struct page *page = NULL; struct rds_atomic_args *args; int ret = 0; if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_atomic_args)) || rm->atomic.op_active) { return -EVAL; } args = CMSG_DATA(cmsg); ...
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { err: if (page) { put_page(page); } kfree(rm->atomic.op_notifier); }
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { err: if (page) { put_page(page); } rm->atomic.op_active = 0; kfree(rm->atomic.op_notifier); }
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err: if (page) { put_page(page); } kfree(rm->atomic.op_notifier); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ err: if (page) { put_page(page); } rm->atomic.op_active = 0; kfree(rm->atomic.op_notifier); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
int rds_cmsg_atomic(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg) { err: if (page) { put_page(page); } + rm->atomic.op_active = 0; kfree(rm->atomic.op_notifier); }
CVE-2018-5390
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/ipv4/tcp_input.c
tcp_prune_ofo_queue
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); node = &tp->ooo_last_skb->rbnode; do { prev = rb_prev(...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; int goal; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); goal = sk->sk_rcvbuf >> 3; node = &tp->ooo_last_...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); node = &tp->ooo_last_skb->rbnode; do { prev = rb_prev(...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; int goal; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); goal = sk->sk_rcvbuf >> 3; node = &tp->ooo_last_...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); node = &tp->ooo_last_skb->rbnode; do { prev = rb_prev(...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; int goal; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); goal = sk->sk_rcvbuf >> 3; node = &tp->ooo_last_...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); node = &tp->ooo_last_skb->rbnode; do { prev = rb_prev(...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; int goal; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); goal = sk->sk_rcvbuf >> 3; node = &tp->ooo_last_...
static bool tcp_prune_ofo_queue(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); struct rb_node *node, *prev; + int goal; if (RB_EMPTY_ROOT(&tp->out_of_order_queue)) { return false; } NET_C_STATS(sock_net(sk), LUX_MIB_OFOPRUNED); + goal = sk->sk_rcvbuf >> 3; node = &tp-...
CVE-2018-5391
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/ipv4/ip_fragment.c
ip_frag_queue
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct sk_buff *prev, *next; struct net_device *dev; unsigned int fragsize; int flags, offset; int ihl, end; int err = -ENOENT; u8 ecn; if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct net *net = container_of(qp->q.net, struct net, ipv4.frags); struct sk_buff *prev, *next; struct net_device *dev; unsigned int fragsize; int flags, offset; int ihl, end; int err = -ENOENT; u8 ecn; if (qp->q.flags &...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct sk_buff *prev, *next; struct net_device *dev; unsigned int fragsize; int flags, offset; int ihl, end; int err = -ENOENT; u8 ecn; if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct net *net = container_of(qp->q.net, struct net, ipv4.frags); struct sk_buff *prev, *next; struct net_device *dev; unsigned int fragsize; int flags, offset; int ihl, end; int err = -ENOENT; u8 ecn; if (qp->q.flags &...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct sk_buff *prev, *next; if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags & IPSKB_FRAG_COMPLETE) && unlikely(ip_frag_too_far(qp)) && unlikely(err = ip_frag_reinit(qp))) { goto err; } ecn =...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct net *net = container_of(qp->q.net, struct net, ipv4.frags); struct sk_buff *prev, *next; if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags & IPSKB_FRAG_COMPLETE) && unlikely(ip_frag_too_far(qp)) && ...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct sk_buff *prev, *next; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags & IPSKB_FRAG_COMPLETE) && unlikely(ip_frag_too_far(qp)) && unlikely(err = ip_fra...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { struct net *net = container_of(qp->q.net, struct net, ipv4.frags); struct sk_buff *prev, *next; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags & IPSKB_F...
static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) { + struct net *net = container_of(qp->q.net, struct net, ipv4.frags); struct sk_buff *prev, *next; if (qp->q.flags & ET_FRAG_COMPLETE) { goto err; } if (!(IPCB(skb)->flags & IPSKB_FRAG_COMPLETE) && unlikely(ip_frag_too_far(q...
CVE-2018-5703
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/tls/tls_main.c
tls_init
static int tls_init(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); struct tls_context *ctx; int rc = 0; if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) { rc = -ENOMEM; goto out; } ...
static int tls_init(struct sock *sk) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; struct inet_connection_sock *icsk = inet_csk(sk); struct tls_context *ctx; int rc = 0; if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ...
static int tls_init(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); struct tls_context *ctx; int rc = 0; if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) { rc = -ENOMEM; goto out; } ...
static int tls_init(struct sock *sk) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; struct inet_connection_sock *icsk = inet_csk(sk); struct tls_context *ctx; int rc = 0; if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ...
static int tls_init(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx->sk_proto_close = sk->sk_prot->close; ctx->tx_conf = TLS_BASE_TX; update_sk_prot(sk, ctx); }
static int tls_init(struct sock *sk) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; struct inet_connection_sock *icsk = inet_csk(sk); if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx->sk_proto_close = sk->sk_prot->close; if (ip_ver == TLSV6 && unlikely(sk->sk_prot ...
static int tls_init(struct sock *sk) { struct inet_connection_sock *icsk = inet_csk(sk); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ctx->sk_proto_close = sk->sk_prot->close; ct...
static int tls_init(struct sock *sk) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; struct inet_connection_sock *icsk = inet_csk(sk); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } /* PLACEHOLDER: DO NOT DELETE THIS COMME...
static int tls_init(struct sock *sk) { + int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; struct inet_connection_sock *icsk = inet_csk(sk); if (sk->sk_state != TCP_ESTABLISHED) { return -ENOTSUPP; } ctx->sk_proto_close = sk->sk_prot->close; + if (ip_ver == TLSV6 && unlikely(sk->...
CVE-2018-5703
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/tls/tls_main.c
tls_register
static int tls_register(void) { build_protos(tls_prots, &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots[TLSV4], &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots, &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots[TLSV4], &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots, &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots[TLSV4], &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots, &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { build_protos(tls_prots[TLSV4], &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
static int tls_register(void) { - build_protos(tls_prots, &tcp_prot); + build_protos(tls_prots[TLSV4], &tcp_prot); tcp_register_ulp(&tcp_tls_ulp_ops); return 0; }
CVE-2018-5703
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/tls/tls_main.c
update_sk_prot
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { sk->sk_prot = &tls_prots[ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { sk->sk_prot = &tls_prots[ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { sk->sk_prot = &tls_prots[ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { sk->sk_prot = &tls_prots[ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf]; }
static inline void update_sk_prot(struct sock *sk, struct tls_context *ctx) { - sk->sk_prot = &tls_prots[ctx->tx_conf]; + int ip_ver = sk->sk_family == AF_ET6 ? TLSV6 : TLSV4; + sk->sk_prot = &tls_prots[ip_ver][ctx->tx_conf]; }
CVE-2018-5750
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/acpi/sbshc.c
acpi_smbus_hc_add
static int acpi_smbus_hc_add(struct acpi_device *device) { int status; unsigned long long val; struct acpi_smb_hc *hc; if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "error o...
static int acpi_smbus_hc_add(struct acpi_device *device) { int status; unsigned long long val; struct acpi_smb_hc *hc; if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "error o...
static int acpi_smbus_hc_add(struct acpi_device *device) { int status; unsigned long long val; struct acpi_smb_hc *hc; dmi_check_system(acpi_smbus_dmi_table); if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); if (ACPI_FAILURE(status...
static int acpi_smbus_hc_add(struct acpi_device *device) { int status; unsigned long long val; struct acpi_smb_hc *hc; dmi_check_system(acpi_smbus_dmi_table); if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); if (ACPI_FAILURE(status...
static int acpi_smbus_hc_add(struct acpi_device *device) { if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); strcpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS); hc = kzalloc(sizeo...
static int acpi_smbus_hc_add(struct acpi_device *device) { if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); strcpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS); hc = kzalloc(sizeo...
static int acpi_smbus_hc_add(struct acpi_device *device) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ strcpy(acpi_device_name(device), ACPI_S...
static int acpi_smbus_hc_add(struct acpi_device *device) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ strcpy(acpi_device_name(device), ACPI_S...
static int acpi_smbus_hc_add(struct acpi_device *device) { if (!device) { return -EVAL; } status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); strcpy(acpi_device_name(device), ACPI_SMB_HC_DEVICE_NAME); strcpy(acpi_device_class(device), ACPI_SMB_HC_CLASS); hc = kzall...
CVE-2018-5803
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/sctp/sm_make_chunk.c
_sctp_make_chunk
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen, gfp_t gfp) { struct sctp_chunkhdr *chunk_hdr; struct sctp_chunk *retval; struct sk_buff *skb; struct sock *sk; skb = alloc_skb(SCTP_PAD4(sizeof(*chunk_hdr) + paylen), gfp); if (!skb...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen, gfp_t gfp) { struct sctp_chunkhdr *chunk_hdr; struct sctp_chunk *retval; struct sk_buff *skb; struct sock *sk; int chunklen; chunklen = SCTP_PAD4(sizeof(*chunk_hdr) + paylen); i...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen) { struct sctp_chunk *retval; sctp_chunkhdr_t *chunk_hdr; struct sk_buff *skb; struct sock *sk; skb = alloc_skb(WORD_ROUND(sizeof(sctp_chunkhdr_t) + paylen), GFP_ATOMIC); if (!skb) {...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen) { struct sctp_chunk *retval; sctp_chunkhdr_t *chunk_hdr; struct sk_buff *skb; struct sock *sk; int chunklen; chunklen = WORD_ROUND(sizeof(*chunk_hdr) + paylen); if (chunklen > S...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen, gfp_t gfp) { struct sock *sk; skb = alloc_skb(SCTP_PAD4(sizeof(*chunk_hdr) + paylen), gfp); if (!skb) { goto nodata; } chunk_hdr = (struct sctp_chunkhdr *)skb_put(skb, sizeof(*c...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen, gfp_t gfp) { struct sock *sk; int chunklen; chunklen = SCTP_PAD4(sizeof(*chunk_hdr) + paylen); if (chunklen > SCTP_MAX_CHUNK_LEN) { goto nodata; } skb = alloc_skb(chunklen, ...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct sock *sk; skb = alloc_skb(WORD_ROUND(sizeof(sctp_chunkhdr_t) + paylen), GFP_ATOMIC); if (!skb) { goto nodata; } chunk_...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct sock *sk; int chunklen; chunklen = WORD_ROUND(sizeof(*chunk_hdr) + paylen); if (chunklen > SCTP_MAX_CHUNK_LEN) { goto noda...
static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, __u8 type, __u8 flags, int paylen, gfp_t gfp) { struct sock *sk; - skb = alloc_skb(SCTP_PAD4(sizeof(*chunk_hdr) + paylen), gfp); + int chunklen; + chunklen = SCTP_PAD4(sizeof(*chunk_hdr) + paylen); + if (chunklen > SCTP_MA...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_dev.c
stub_disconnect
static void stub_disconnect(struct usb_device *udev) { struct stub_device *sdev; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter disconnect\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { BUG(); ...
static void stub_disconnect(struct usb_device *udev) { struct stub_device *sdev; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter disconnect\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { BUG(); ...
static void stub_disconnect(struct usb_device *udev) { struct stub_device *sdev; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter disconnect\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { BUG(); ...
static void stub_disconnect(struct usb_device *udev) { struct stub_device *sdev; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter disconnect\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { BUG(); ...
static void stub_disconnect(struct usb_device *udev) { const char *udev_busid = dev_name(&udev->dev); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { return; } if (!sdev) { dev_err(&udev->dev, "could not get device"); return; } if (rc) { dev_dbg(&u...
static void stub_disconnect(struct usb_device *udev) { const char *udev_busid = dev_name(&udev->dev); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { return; } if (!sdev) { dev_err(&udev->dev, "could not get device"); goto call_put_busid_priv; } if (rc) { ...
static void stub_disconnect(struct usb_device *udev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ const char *udev_busid = dev_name(&udev->dev); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT...
static void stub_disconnect(struct usb_device *udev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ const char *udev_busid = dev_name(&udev->dev); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT...
static void stub_disconnect(struct usb_device *udev) { const char *udev_busid = dev_name(&udev->dev); busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { return; } if (!sdev) { dev_err(&udev->dev, "could not get device"); - return; + goto call_put_busid_...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_dev.c
stub_probe
static int stub_probe(struct usb_device *udev) { struct stub_device *sdev = NULL; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status == ST...
static int stub_probe(struct usb_device *udev) { struct stub_device *sdev = NULL; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc = 0; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status =...
static int stub_probe(struct usb_device *udev) { struct stub_device *sdev = NULL; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status == ST...
static int stub_probe(struct usb_device *udev) { struct stub_device *sdev = NULL; const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc = 0; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status =...
static int stub_probe(struct usb_device *udev) { const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status == STUB_BUSID_REMOV) || (busid_priv->statu...
static int stub_probe(struct usb_device *udev) { const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc = 0; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status == STUB_BUSID_REMOV) || (busid_priv->s...
static int stub_probe(struct usb_device *udev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv-...
static int stub_probe(struct usb_device *udev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; int rc = 0; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_p...
static int stub_probe(struct usb_device *udev) { const char *udev_busid = dev_name(&udev->dev); struct bus_id_priv *busid_priv; - int rc; + int rc = 0; dev_dbg(&udev->dev, "Enter probe\n"); busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status == STUB_BUSID_REMO...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
add_match_busid
static int add_match_busid(char *busid) { int i; int ret = -1; spin_lock(&busid_table_lock); if (get_busid_idx(busid) >= 0) { ret = 0; goto out; } for (i = 0; i < MAX_BUSID; i++) if (!busid_table[i].name[0]) { strlcpy(busid_table[i].name, busid, BUSID_SIZE); ...
static int add_match_busid(char *busid) { int i; int ret = -1; spin_lock(&busid_table_lock); if (get_busid_idx(busid) >= 0) { ret = 0; goto out; } for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (!busid_table[i].name[0]) { s...
static int add_match_busid(char *busid) { int i; int ret = -1; spin_lock(&busid_table_lock); if (get_busid_idx(busid) >= 0) { ret = 0; goto out; } for (i = 0; i < MAX_BUSID; i++) if (!busid_table[i].name[0]) { strncpy(busid_table[i].name, busid, BUSID_SIZE); ...
static int add_match_busid(char *busid) { int i; int ret = -1; spin_lock(&busid_table_lock); if (get_busid_idx(busid) >= 0) { ret = 0; goto out; } for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (!busid_table[i].name[0]) { s...
static int add_match_busid(char *busid) { if (get_busid_idx(busid) >= 0) { goto out; } for (i = 0; i < MAX_BUSID; i++) if (!busid_table[i].name[0]) { ret = 0; break; } out: spin_unlock(&busid_table_lock); }
static int add_match_busid(char *busid) { if (get_busid_idx(busid) >= 0) { goto out; } for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (!busid_table[i].name[0]) { ret = 0; spin_unlock(&busid_table[i].busid_lock); break; ...
static int add_match_busid(char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (get_busid_idx(busid) >= 0) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ goto out; } for (i = 0; i < MAX_BUSID; i++) if (!busid_table[i].name[0]) { /* PLACEHOLDER: DO NOT DELETE THIS COM...
static int add_match_busid(char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (get_busid_idx(busid) >= 0) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ goto out; } for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (!busid_table[i].name...
static int add_match_busid(char *busid) { if (get_busid_idx(busid) >= 0) { goto out; } - for (i = 0; i < MAX_BUSID; i++) + for (i = 0; i < MAX_BUSID; i++) { + spin_lock(&busid_table[i].busid_lock); if (!busid_table[i].name[0]) { ret = 0; + spin_unlock(&b...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
del_match_busid
int del_match_busid(char *busid) { int idx; int ret = -1; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx < 0) { goto out; } ret = 0; if (busid_table[idx].status == STUB_BUSID_OTHER) { memset(busid_table[idx].name, 0, BUSID_SIZE); } if ((busid_ta...
int del_match_busid(char *busid) { int idx; int ret = -1; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx < 0) { goto out; } ret = 0; spin_lock(&busid_table[idx].busid_lock); if (busid_table[idx].status == STUB_BUSID_OTHER) { memset(busid_table[idx]....
int del_match_busid(char *busid) { int idx; int ret = -1; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx < 0) { goto out; } ret = 0; if (busid_table[idx].status == STUB_BUSID_OTHER) { memset(busid_table[idx].name, 0, BUSID_SIZE); } if ((busid_ta...
int del_match_busid(char *busid) { int idx; int ret = -1; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx < 0) { goto out; } ret = 0; spin_lock(&busid_table[idx].busid_lock); if (busid_table[idx].status == STUB_BUSID_OTHER) { memset(busid_table[idx]....
int del_match_busid(char *busid) { ret = 0; if ((busid_table[idx].status != STUB_BUSID_OTHER) && (busid_table[idx].status != STUB_BUSID_ADDED)) { busid_table[idx].status = STUB_BUSID_REMOV; } out: spin_unlock(&busid_table_lock); }
int del_match_busid(char *busid) { ret = 0; spin_lock(&busid_table[idx].busid_lock); if ((busid_table[idx].status != STUB_BUSID_OTHER) && (busid_table[idx].status != STUB_BUSID_ADDED)) { busid_table[idx].status = STUB_BUSID_REMOV; } spin_unlock(&busid_table[idx].busid_lock); out: spin_un...
int del_match_busid(char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ret = 0; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if ((busid_table[idx].status != STUB_BUSID_OTHER) && (busid_table[idx].status != STUB_BUSID_ADDED)) { busid_table[idx].status = STUB_BUSID_REMOV; } out: ...
int del_match_busid(char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ret = 0; spin_lock(&busid_table[idx].busid_lock); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if ((busid_table[idx].status != STUB_BUSID_OTHER) && (busid_table[idx].status != STUB_BUSID_ADDED)) { busid_table[i...
int del_match_busid(char *busid) { ret = 0; + spin_lock(&busid_table[idx].busid_lock); if ((busid_table[idx].status != STUB_BUSID_OTHER) && (busid_table[idx].status != STUB_BUSID_ADDED)) { busid_table[idx].status = STUB_BUSID_REMOV; } + spin_unlock(&busid_table[idx].busid_lock); out: ...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
get_busid_idx
static int get_busid_idx(const char *busid) { int i; int idx = -1; for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; break; } } return idx; }
static int get_busid_idx(const char *busid) { int i; int idx = -1; for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; spin_unlock(&...
static int get_busid_idx(const char *busid) { int i; int idx = -1; for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; break; } } return idx; }
static int get_busid_idx(const char *busid) { int i; int idx = -1; for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; spin_unlock(&...
static int get_busid_idx(const char *busid) { int idx = -1; for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; break; } } return idx; }
static int get_busid_idx(const char *busid) { int idx = -1; for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; spin_unlock(&busid_table...
static int get_busid_idx(const char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int idx = -1; for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx = i; break; } ...
static int get_busid_idx(const char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int idx = -1; for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { ...
static int get_busid_idx(const char *busid) { int idx = -1; - for (i = 0; i < MAX_BUSID; i++) + for (i = 0; i < MAX_BUSID; i++) { + spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { if (!strncmp(busid_table[i].name, busid, BUSID_SIZE)) { idx =...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
get_busid_priv
struct bus_id_priv *get_busid_priv(const char *busid) { int idx; struct bus_id_priv *bid = NULL; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx >= 0) { bid = &(busid_table[idx]); } spin_unlock(&busid_table_lock); return bid; }
struct bus_id_priv *get_busid_priv(const char *busid) { int idx; struct bus_id_priv *bid = NULL; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx >= 0) { bid = &(busid_table[idx]); spin_lock(&bid->busid_lock); } spin_unlock(&busid_table_lock); return bid;...
struct bus_id_priv *get_busid_priv(const char *busid) { int idx; struct bus_id_priv *bid = NULL; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx >= 0) { bid = &(busid_table[idx]); } spin_unlock(&busid_table_lock); return bid; }
struct bus_id_priv *get_busid_priv(const char *busid) { int idx; struct bus_id_priv *bid = NULL; spin_lock(&busid_table_lock); idx = get_busid_idx(busid); if (idx >= 0) { bid = &(busid_table[idx]); spin_lock(&bid->busid_lock); } spin_unlock(&busid_table_lock); return bid;...
struct bus_id_priv *get_busid_priv(const char *busid) { if (idx >= 0) { bid = &(busid_table[idx]); } spin_unlock(&busid_table_lock); }
struct bus_id_priv *get_busid_priv(const char *busid) { if (idx >= 0) { bid = &(busid_table[idx]); spin_lock(&bid->busid_lock); } spin_unlock(&busid_table_lock); }
struct bus_id_priv *get_busid_priv(const char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (idx >= 0) { bid = &(busid_table[idx]); } spin_unlock(&busid_table_lock); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
struct bus_id_priv *get_busid_priv(const char *busid) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (idx >= 0) { bid = &(busid_table[idx]); spin_lock(&bid->busid_lock); } spin_unlock(&busid_table_lock); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
struct bus_id_priv *get_busid_priv(const char *busid) { if (idx >= 0) { bid = &(busid_table[idx]); + spin_lock(&bid->busid_lock); } spin_unlock(&busid_table_lock); }
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
init_busid_table
static void init_busid_table(void) { memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); }
static void init_busid_table(void) { int i; memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) spin_lock_init(&busid_table[i].busid_lock); }
static void init_busid_table(void) { memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); }
static void init_busid_table(void) { int i; memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) spin_lock_init(&busid_table[i].busid_lock); }
static void init_busid_table(void) { memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); }
static void init_busid_table(void) { int i; memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) spin_lock_init(&busid_table[i].busid_lock); }
static void init_busid_table(void) { memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); }
static void init_busid_table(void) { int i; memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) spin_lock_init(&busid_table[i].busid_lock); }
static void init_busid_table(void) { + int i; memset(busid_table, 0, sizeof(busid_table)); spin_lock_init(&busid_table_lock); + for (i = 0; i < MAX_BUSID; i++) + spin_lock_init(&busid_table[i].busid_lock); }
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
rebind_store
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { int ret; int len; struct bus_id_priv *bid; len = strnlen(buf, BUSID_SIZE); if (!(len < BUSID_SIZE)) { return -EVAL; } bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } b...
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { int ret; int len; struct bus_id_priv *bid; len = strnlen(buf, BUSID_SIZE); if (!(len < BUSID_SIZE)) { return -EVAL; } bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } b...
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { int ret; int len; struct bus_id_priv *bid; len = strnlen(buf, BUSID_SIZE); if (!(len < BUSID_SIZE)) { return -EVAL; } bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } b...
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { int ret; int len; struct bus_id_priv *bid; len = strnlen(buf, BUSID_SIZE); if (!(len < BUSID_SIZE)) { return -EVAL; } bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } b...
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { len = strnlen(buf, BUSID_SIZE); bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } ret = do_rebind((char *) buf, bid); if (ret < 0) { return ret; } }
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { len = strnlen(buf, BUSID_SIZE); bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } put_busid_priv(bid); ret = do_rebind((char *) buf, bid); if (ret < 0) { return ret; } }
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ len = strnlen(buf, BUSID_SIZE); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } /* PLACEHOLDER:...
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ len = strnlen(buf, BUSID_SIZE); /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } /* PLACEHOLDER:...
static ssize_t rebind_store(struct device_driver *dev, const char *buf, size_t count) { len = strnlen(buf, BUSID_SIZE); bid = get_busid_priv(buf); if (!bid) { return -ENODEV; } + put_busid_priv(bid); ret = do_rebind((char *) buf, bid); if (ret < 0) { return ret; ...
CVE-2018-5814
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/staging/usbip/stub_main.c
show_match_busid
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { int i; char *out = buf; spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name); } spin_unlock(&busid_table_lock); ...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { int i; char *out = buf; spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name)...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { int i; char *out = buf; spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name); } spin_unlock(&busid_table_lock); ...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { int i; char *out = buf; spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name)...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name); } spin_unlock(&busid_table_lock); }
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name); } spin_unlock(...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_table[i].name); } spin_unlock(&bu...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ spin_lock(&busid_table_lock); for (i = 0; i < MAX_BUSID; i++) { spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { out += sprintf(out, "%s ", bu...
static ssize_t show_match_busid(struct device_driver *drv, char *buf) { spin_lock(&busid_table_lock); - for (i = 0; i < MAX_BUSID; i++) + for (i = 0; i < MAX_BUSID; i++) { + spin_lock(&busid_table[i].busid_lock); if (busid_table[i].name[0]) { out += sprintf(out, "%s ", busid_tab...
CVE-2018-5848
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/wireless/ath/wil6210/wmi.c
wmi_set_ie
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { static const char *const names[] = { [WMI_FRAME_BEACON] = "BEACON", [WMI_FRAME_PROBE_REQ] = "PROBE_REQ", [WMI_FRAME_PROBE_RESP] = "WMI_FRAME_PROBE_RESP", [WMI_FRAME_ASSOC_REQ] = "WMI_FRAME_ASSOC_REQ", [WMI_FRAME_ASSOC_RESP] = "W...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { static const char *const names[] = { [WMI_FRAME_BEACON] = "BEACON", [WMI_FRAME_PROBE_REQ] = "PROBE_REQ", [WMI_FRAME_PROBE_RESP] = "WMI_FRAME_PROBE_RESP", [WMI_FRAME_ASSOC_REQ] = "WMI_FRAME_ASSOC_REQ", [WMI_FRAME_ASSOC_RESP] = "W...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { int rc; u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); if (!cmd) { return -ENOMEM; } if (!ie) { ie_len = 0; } cmd->mgmt_frm_type...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { int rc; u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; struct wmi_set_appie_cmd *cmd; if (len < ie_len) { return -EVAL; } cmd = kzalloc(len, GFP_KERNEL); if (!cmd) { return -ENOMEM; } ...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); if (!cmd) { goto out; } cmd->ie_len = cpu_to_le16(ie_len); memcpy(cmd->ie_info, ie, ie_len); ...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; struct wmi_set_appie_cmd *cmd; if (len < ie_len) { rc = -EVAL; goto out; } cmd = kzalloc(len, GFP_KERNEL); if (!cmd) { goto out; } ...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); if (!cmd) { return -ENOMEM; } /* PLACEHOLDER: DO NO...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; struct wmi_set_appie_cmd *cmd; if (len < ie_len) { return -EVAL; } cmd = kzalloc(len, GFP_KERNEL); if (!c...
int wmi_set_ie(struct wil6210_priv *wil, u8 type, u16 ie_len, const void *ie) { u16 len = sizeof(struct wmi_set_appie_cmd) + ie_len; - struct wmi_set_appie_cmd *cmd = kzalloc(len, GFP_KERNEL); + struct wmi_set_appie_cmd *cmd; + if (len < ie_len) { + rc = -EVAL; + goto out; + } + cmd =...
CVE-2018-5873
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
fs/nsfs.c
ns_get_path
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; struct dentry *dentry; struct inode *inode; struct ns_common *ns; unsigned long d; again: ns = ns_ops->get(t...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; struct dentry *dentry; struct inode *inode; struct ns_common *ns; unsigned long d; again: ns = ns_ops->get(t...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; struct dentry *dentry; struct inode *inode; struct ns_common *ns; unsigned long d; again: ns = ns_ops->get(t...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; struct dentry *dentry; struct inode *inode; struct ns_common *ns; unsigned long d; again: ns = ns_ops->get(t...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; again: ns = ns_ops->get(task); if (!ns) { return ERR_PTR(-ENOENT); } d = atomic_long_read(&ns->stashed);...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; again: ns = ns_ops->get(task); if (!ns) { return ERR_PTR(-ENOENT); } d = atomic_long_read(&ns->stashed);...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ again: ns = ns_ops->get(task); if (!ns) { /* PLACEHOLDER: DO NOT D...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ again: ns = ns_ops->get(task); if (!ns) { /* PLACEHOLDER: DO NOT D...
void *ns_get_path(struct path *path, struct task_struct *task, const struct proc_ns_operations *ns_ops) { struct vfsmount *mnt = mntget(nsfs_mnt); struct qstr qname = { .name = "", }; again: ns = ns_ops->get(task); if (!ns) { return ERR_PTR(-ENOENT); } d = atomic_long_read(&ns->...
CVE-2018-5953
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
lib/swiotlb.c
swiotlb_init
void swiotlb_init(int verbose) { size_t default_size = IO_TLB_DEFAULT_SIZE; unsigned char *vstart; unsigned long bytes; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } bytes = io_tlb_nslabs << IO_TLB_SH...
void swiotlb_init(int verbose) { size_t default_size = IO_TLB_DEFAULT_SIZE; unsigned char *vstart; unsigned long bytes; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } bytes = io_tlb_nslabs << IO_TLB_SH...
void swiotlb_init(int verbose) { size_t default_size = IO_TLB_DEFAULT_SIZE; unsigned char *vstart; unsigned long bytes; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } bytes = io_tlb_nslabs << IO_TLB_SH...
void swiotlb_init(int verbose) { size_t default_size = IO_TLB_DEFAULT_SIZE; unsigned char *vstart; unsigned long bytes; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } bytes = io_tlb_nslabs << IO_TLB_SH...
void swiotlb_init(int verbose) { if (io_tlb_start) { memblock_free_early(io_tlb_start, PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT)); } pr_warn("Cannot allocate SWIOTLB buffer"); no_iotlb_memory = true; }
void swiotlb_init(int verbose) { if (io_tlb_start) { memblock_free_early(io_tlb_start, PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT)); } pr_warn("Cannot allocate buffer"); no_iotlb_memory = true; }
void swiotlb_init(int verbose) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (io_tlb_start) { memblock_free_early(io_tlb_start, PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT)); } pr_warn("Cannot allocate SWIOTLB buffer"); no_iotlb_memory = true; }
void swiotlb_init(int verbose) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (io_tlb_start) { memblock_free_early(io_tlb_start, PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT)); } pr_warn("Cannot allocate buffer"); no_iotlb_memory = true; }
void swiotlb_init(int verbose) { if (io_tlb_start) { memblock_free_early(io_tlb_start, PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT)); } - pr_warn("Cannot allocate SWIOTLB buffer"); + pr_warn("Cannot allocate buffer"); no_iotlb_memory = true; }
CVE-2018-5953
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
lib/swiotlb.c
swiotlb_late_init_with_default_size
int swiotlb_late_init_with_default_size(size_t default_size) { unsigned long bytes, req_nslabs = io_tlb_nslabs; unsigned char *vstart = NULL; unsigned int order; int rc = 0; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_...
int swiotlb_late_init_with_default_size(size_t default_size) { unsigned long bytes, req_nslabs = io_tlb_nslabs; unsigned char *vstart = NULL; unsigned int order; int rc = 0; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_...
int swiotlb_late_init_with_default_size(size_t default_size) { unsigned long bytes, req_nslabs = io_tlb_nslabs; unsigned char *vstart = NULL; unsigned int order; int rc = 0; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_...
int swiotlb_late_init_with_default_size(size_t default_size) { unsigned long bytes, req_nslabs = io_tlb_nslabs; unsigned char *vstart = NULL; unsigned int order; int rc = 0; if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_...
int swiotlb_late_init_with_default_size(size_t default_size) { if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } order = get_order(io_tlb_nslabs << IO_TLB_SHIFT); io_tlb_nslabs = SLABS_PER_PAGE << order; byte...
int swiotlb_late_init_with_default_size(size_t default_size) { if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } order = get_order(io_tlb_nslabs << IO_TLB_SHIFT); io_tlb_nslabs = SLABS_PER_PAGE << order; byte...
int swiotlb_late_init_with_default_size(size_t default_size) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } order = get_order(io_tlb_nslabs << IO_TLB_SHIFT); ...
int swiotlb_late_init_with_default_size(size_t default_size) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } order = get_order(io_tlb_nslabs << IO_TLB_SHIFT); ...
int swiotlb_late_init_with_default_size(size_t default_size) { if (!io_tlb_nslabs) { io_tlb_nslabs = (default_size >> IO_TLB_SHIFT); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); } order = get_order(io_tlb_nslabs << IO_TLB_SHIFT); io_tlb_nslabs = SLABS_PER_PAGE << order; ...
CVE-2018-5953
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
lib/swiotlb.c
swiotlb_print_info
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; unsigned char *vstart, *vend; if (no_iotlb_memory) { pr_warn("software IO TLB: No low mem\n"); return; } vstart = phys_to_virt(io_tlb_start); vend = phys_to_virt(io_tlb_end); printk(KERN_FO "...
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; if (no_iotlb_memory) { pr_warn("No low mem\n"); return; } pr_info("mapped [mem %#010llx-%#010llx] (%luMB)\n", (unsigned long long)io_tlb_start, (unsigned long long)io_tlb_end, bytes >> 20); }
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; unsigned char *vstart, *vend; if (no_iotlb_memory) { pr_warn("software IO TLB: No low mem\n"); return; } vstart = phys_to_virt(io_tlb_start); vend = phys_to_virt(io_tlb_end); printk(KERN_FO "...
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; if (no_iotlb_memory) { pr_warn("No low mem\n"); return; } pr_info("mapped [mem %#010llx-%#010llx] (%luMB)\n", (unsigned long long)io_tlb_start, (unsigned long long)io_tlb_end, bytes >> 20); }
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; unsigned char *vstart, *vend; if (no_iotlb_memory) { pr_warn("software IO TLB: No low mem\n"); return; } vstart = phys_to_virt(io_tlb_start); vend = phys_to_virt(io_tlb_end); printk(KERN_FO "...
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; if (no_iotlb_memory) { pr_warn("No low mem\n"); return; } pr_info("mapped [mem %#010llx-%#010llx] (%luMB)\n", (unsigned long long)io_tlb_start, (unsigned long long)io_tlb_end, bytes >> 20); }
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; unsigned char *vstart, *vend; if (no_iotlb_memory) { pr_warn("software IO TLB: No low mem\n"); return; } vstart = phys_to_virt(io_tlb_start); vend = phys_to_virt(io_tlb_end); printk(KERN_FO "...
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; if (no_iotlb_memory) { pr_warn("No low mem\n"); return; } pr_info("mapped [mem %#010llx-%#010llx] (%luMB)\n", (unsigned long long)io_tlb_start, (unsigned long long)io_tlb_end, bytes >> 20); }
void swiotlb_print_info(void) { unsigned long bytes = io_tlb_nslabs << IO_TLB_SHIFT; - unsigned char *vstart, *vend; if (no_iotlb_memory) { - pr_warn("software IO TLB: No low mem\n"); + pr_warn("No low mem\n"); return; } - vstart = phys_to_virt(io_tlb_start); - vend = phy...
CVE-2018-5995
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/percpu.c
pcpu_embed_first_chunk
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; void **areas = NULL; struct pcpu_alloc_info *ai; size_t size_sum, areas_size; unsig...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; void **areas = NULL; struct pcpu_alloc_info *ai; size_t size_sum, areas_size; unsig...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; void **areas = NULL; struct pcpu_alloc_info *ai; size_t size_sum, areas_size, max_dista...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; void **areas = NULL; struct pcpu_alloc_info *ai; size_t size_sum, areas_size, max_dista...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; ai = pcpu_build_alloc_info(reserved_size, dyn_size, atom_size, cpu_distance_fn); if (IS_ERR...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; ai = pcpu_build_alloc_info(reserved_size, dyn_size, atom_size, cpu_distance_fn); if (IS_ERR...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ai = pcpu_build_alloc_info(reserved_size, dyn...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ ai = pcpu_build_alloc_info(reserved_size, dyn...
int pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, size_t atom_size, pcpu_fc_cpu_distance_fn_t cpu_distance_fn, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn) { void *base = (void *)ULONG_MAX; ai = pcpu_build_alloc_info(reserved_size, dyn_size, atom_size, cpu_distance_fn); if (IS...
CVE-2018-5995
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
mm/percpu.c
pcpu_page_first_chunk
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { static struct vm_struct vm; struct pcpu_alloc_info *ai; char psize_str[16]; int unit_pages; size_t pages_size; struct page **pages; int unit, i...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { static struct vm_struct vm; struct pcpu_alloc_info *ai; char psize_str[16]; int unit_pages; size_t pages_size; struct page **pages; int unit, i...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { static struct vm_struct vm; struct pcpu_alloc_info *ai; char psize_str[16]; int unit_pages; size_t pages_size; struct page **pages; int unit, i...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { static struct vm_struct vm; struct pcpu_alloc_info *ai; char psize_str[16]; int unit_pages; size_t pages_size; struct page **pages; int unit, i...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { snprintf(psize_str, sizeof(psize_str), "%luK", PAGE_SIZE >> 10); ai = pcpu_build_alloc_info(reserved_size, 0, PAGE_SIZE, NULL); if (IS_ERR(ai)) { retur...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { snprintf(psize_str, sizeof(psize_str), "%luK", PAGE_SIZE >> 10); ai = pcpu_build_alloc_info(reserved_size, 0, PAGE_SIZE, NULL); if (IS_ERR(ai)) { retur...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ snprintf(psize_str, sizeof(psize_str), "%luK", PAGE_SIZE >> 10); ai = pcpu_build_alloc_info(reserved_size, 0, PAG...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ snprintf(psize_str, sizeof(psize_str), "%luK", PAGE_SIZE >> 10); ai = pcpu_build_alloc_info(reserved_size, 0, PAG...
int pcpu_page_first_chunk(size_t reserved_size, pcpu_fc_alloc_fn_t alloc_fn, pcpu_fc_free_fn_t free_fn, pcpu_fc_populate_pte_fn_t populate_pte_fn) { snprintf(psize_str, sizeof(psize_str), "%luK", PAGE_SIZE >> 10); ai = pcpu_build_alloc_info(reserved_size, 0, PAGE_SIZE, NULL); if (IS_ERR(ai)) { ...
CVE-2018-6412
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/video/fbdev/sbuslib.c
sbusfb_ioctl_helper
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOGTYPE: { struct fbtype *f = (struct fbtype *) arg; if (put_user(type, &f->fb_type) || __put_user(info->var.yres, &f->fb_height) || __put_use...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOGTYPE: { struct fbtype *f = (struct fbtype *) arg; if (put_user(type, &f->fb_type) || __put_user(info->var.yres, &f->fb_height) || __put_use...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOGTYPE: { struct fbtype *f = (struct fbtype *) arg; if (put_user(type, &f->fb_type) || __put_user(info->var.yres, &f->fb_height) || __put_use...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOGTYPE: { struct fbtype *f = (struct fbtype *) arg; if (put_user(type, &f->fb_type) || __put_user(info->var.yres, &f->fb_height) || __put_use...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOPUTCMAP_SPARC: { unsigned char *ublue; int index, count, i; if (get_user(index, &c->index) || __get_user(count, &c->count) || __get_...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOPUTCMAP_SPARC: { unsigned char *ublue; unsigned int index, count, i; if (get_user(index, &c->index) || __get_user(count, &c->count) ...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case FBIOPUTCMAP_SPARC: { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ unsigned char *ublue; i...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ case FBIOPUTCMAP_SPARC: { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ unsigned char *ublue; u...
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg, struct fb_info *info, int type, int fb_depth, unsigned long fb_size) { switch(cmd) { case FBIOPUTCMAP_SPARC: { unsigned char *ublue; - int index, count, i; + unsigned int index, count, i; if (get_user(index, &c->ind...
CVE-2018-6554
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/irda/af_irda.c
irda_bind
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct sockaddr_irda *addr = (struct sockaddr_irda *) uaddr; struct irda_sock *self = irda_sk(sk); int err; pr_debug("%s(%p)\n", __func__, self); if (addr_len != sizeof(struct sockaddr_i...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct sockaddr_irda *addr = (struct sockaddr_irda *) uaddr; struct irda_sock *self = irda_sk(sk); int err; pr_debug("%s(%p)\n", __func__, self); if (addr_len != sizeof(struct sockaddr_i...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct sockaddr_irda *addr = (struct sockaddr_irda *) uaddr; struct irda_sock *self = irda_sk(sk); int err; IRDA_DEBUG(2, "%s(%p)\n", __func__, self); if (addr_len != sizeof(struct socka...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; struct sockaddr_irda *addr = (struct sockaddr_irda *) uaddr; struct irda_sock *self = irda_sk(sk); int err; IRDA_DEBUG(2, "%s(%p)\n", __func__, self); if (addr_len != sizeof(struct socka...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { lock_sock(sk); if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) { if (self->pid & 0x80) { goto out; } if (err < 0) { goto out; } goto out; ...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { lock_sock(sk); if (self->ias_obj) { err = -EVAL; goto out; } if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) { if (self->pid & 0x80) { goto out; } ...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ lock_sock(sk); if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (self->pid & 0x80) { /* P...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ lock_sock(sk); if (self->ias_obj) { err = -EVAL; goto out; } if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) { /* PLACEHOLDER: ...
static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { lock_sock(sk); + if (self->ias_obj) { + err = -EVAL; + goto out; + } if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) { if (self->pid & 0x80) { goto out; ...
CVE-2018-6555
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/irda/af_irda.c
irda_setsockopt
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); struct irda_ias_set *ias_opt; struct ias_object *ias_obj; struct ias_attrib * ias_attr; int opt, free_ias = 0, err = 0; ...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); struct irda_ias_set *ias_opt; struct ias_object *ias_obj; struct ias_attrib * ias_attr; int opt, free_ias = 0, err = 0; ...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); struct irda_ias_set *ias_opt; struct ias_object *ias_obj; struct ias_attrib * ias_attr; int opt, free_ias = 0, err = 0; ...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct irda_sock *self = irda_sk(sk); struct irda_ias_set *ias_opt; struct ias_object *ias_obj; struct ias_attrib * ias_attr; int opt, free_ias = 0, err = 0; ...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { switch (optname) { case IRLMP_IAS_SET: switch(ias_opt->irda_attrib_type) { case IAS_TEGER: irias_add_integer_attrib( ias_obj, ias_opt->irda_attrib_name, ias_opt->attribute.ird...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { switch (optname) { case IRLMP_IAS_SET: switch(ias_opt->irda_attrib_type) { case IAS_TEGER: irias_add_integer_attrib( ias_obj, ias_opt->irda_attrib_name, ias_opt->attribute.ird...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (optname) { case IRLMP_IAS_SET: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch(ias_opt->irda_attrib_type) { case IAS_TEG...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch (optname) { case IRLMP_IAS_SET: /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ switch(ias_opt->irda_attrib_type) { case IAS_TEG...
static int irda_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) { switch (optname) { case IRLMP_IAS_SET: switch(ias_opt->irda_attrib_type) { case IAS_TEGER: irias_add_integer_attrib( ias_obj, ias_opt->irda_attrib_name, ias_opt->attribu...
CVE-2018-6927
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
kernel/futex.c
futex_requeue
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_IT, key2 = FUTEX_KEY_IT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bucket *hb1, *hb...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_IT, key2 = FUTEX_KEY_IT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bucket *hb1, *hb...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_IT, key2 = FUTEX_KEY_IT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bucket *hb1, *hb...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_IT, key2 = FUTEX_KEY_IT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bucket *hb1, *hb...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { WAKE_Q(wake_q); if (requeue_pi) { if (nr_wake != 1) { return -EVAL; } } retry: ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_RE...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { WAKE_Q(wake_q); if (nr_wake < 0 || nr_requeue < 0) { return -EVAL; } if (requeue_pi) { if (nr_wake != 1) { return -EVAL; } } retry: ...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (requeue_pi) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nr_wake != 1) { return -EVAL; } ...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ if (nr_wake < 0 || nr_requeue < 0) { return -EVAL; } if (requeue_pi) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT *...
static int futex_requeue(u32 *uaddr1, unsigned int flags, u32 *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { WAKE_Q(wake_q); + if (nr_wake < 0 || nr_requeue < 0) { + return -EVAL; + } if (requeue_pi) { if (nr_wake != 1) { return -EVAL; } ...
CVE-2018-7191
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
drivers/net/tun.c
tun_set_iff
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { struct tun_struct *tun; struct tun_file *tfile = file->private_data; struct net_device *dev; int err; if (tfile->detached) { return -EVAL; } dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { ...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { struct tun_struct *tun; struct tun_file *tfile = file->private_data; struct net_device *dev; int err; if (tfile->detached) { return -EVAL; } dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { ...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { struct tun_struct *tun; struct tun_file *tfile = file->private_data; struct net_device *dev; int err; if (tfile->detached) { return -EVAL; } dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { ...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { struct tun_struct *tun; struct tun_file *tfile = file->private_data; struct net_device *dev; int err; if (tfile->detached) { return -EVAL; } dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { ...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { } else { int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ? MAX_TAP_QUEUES : 1; if (ifr->ifr_flags & IFF_TUN) { name = "tun%d"; } else if (...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { } else { int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ? MAX_TAP_QUEUES : 1; if (ifr->ifr_flags & IFF_TUN) { name = "tun%d"; } else if (...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int q...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ } else { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int q...
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) { dev = __dev_get_by_name(net, ifr->ifr_name); if (dev) { } else { int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ? MAX_TAP_QUEUES : 1; if (ifr->ifr_flags & IFF_TUN) { name = "tun%d"; } e...
CVE-2018-7191
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/core/dev.c
dev_get_valid_name
static int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { BUG_ON(!net); if (!dev_valid_name(name)) { return -EVAL; } if (strchr(name, '%')) { return dev_alloc_name_ns(net, dev, name); } else if (__dev_get_by_name(net, name)) { return -EEXIST; ...
int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { BUG_ON(!net); if (!dev_valid_name(name)) { return -EVAL; } if (strchr(name, '%')) { return dev_alloc_name_ns(net, dev, name); } else if (__dev_get_by_name(net, name)) { return -EEXIST; } e...
static int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { BUG_ON(!net); if (!dev_valid_name(name)) { return -EVAL; } if (strchr(name, '%')) { return dev_alloc_name_ns(net, dev, name); } else if (__dev_get_by_name(net, name)) { return -EEXIST; ...
int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { BUG_ON(!net); if (!dev_valid_name(name)) { return -EVAL; } if (strchr(name, '%')) { return dev_alloc_name_ns(net, dev, name); } else if (__dev_get_by_name(net, name)) { return -EEXIST; } e...
static int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { }
int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { }
static int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ }
-static int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { +int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { }
CVE-2018-7480
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
block/blk-cgroup.c
blkcg_init_queue
int blkcg_init_queue(struct request_queue *q) { struct blkcg_gq *new_blkg, *blkg; bool preloaded; int ret; new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } preloaded = !radix_tree_preload(GFP_KERNEL); rcu_read_lock(); spin_lock_irq(q->queu...
int blkcg_init_queue(struct request_queue *q) { struct blkcg_gq *new_blkg, *blkg; bool preloaded; int ret; new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } preloaded = !radix_tree_preload(GFP_KERNEL); rcu_read_lock(); spin_lock_irq(q->queu...
int blkcg_init_queue(struct request_queue *q) { struct blkcg_gq *new_blkg, *blkg; bool preloaded; int ret; new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } preloaded = !radix_tree_preload(GFP_KERNEL); rcu_read_lock(); spin_lock_irq(q->queu...
int blkcg_init_queue(struct request_queue *q) { struct blkcg_gq *new_blkg, *blkg; bool preloaded; int ret; new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } preloaded = !radix_tree_preload(GFP_KERNEL); rcu_read_lock(); spin_lock_irq(q->queu...
int blkcg_init_queue(struct request_queue *q) { new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } blkg = blkg_create(&blkcg_root, q, new_blkg); if (IS_ERR(blkg)) { blkg_free(new_blkg); return PTR_ERR(blkg); } }
int blkcg_init_queue(struct request_queue *q) { new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } blkg = blkg_create(&blkcg_root, q, new_blkg); if (IS_ERR(blkg)) { return PTR_ERR(blkg); } }
int blkcg_init_queue(struct request_queue *q) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ blkg = blkg_create(&blkcg_root, q, new_blkg); /* PLACEHOLD...
int blkcg_init_queue(struct request_queue *q) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ blkg = blkg_create(&blkcg_root, q, new_blkg); /* PLACEHOLD...
int blkcg_init_queue(struct request_queue *q) { new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) { return -ENOMEM; } blkg = blkg_create(&blkcg_root, q, new_blkg); if (IS_ERR(blkg)) { - blkg_free(new_blkg); return PTR_ERR(blkg); } }
CVE-2018-7492
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
net/rds/rdma.c
__rds_rdma_map
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct rds_mr *mr = NULL, *found; unsigned int nr_pages; struct page **pages = NULL; struct scatterlist *sg; void *trans_private; unsigned long flags; rds_rdma_cookie_t coo...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct rds_mr *mr = NULL, *found; unsigned int nr_pages; struct page **pages = NULL; struct scatterlist *sg; void *trans_private; unsigned long flags; rds_rdma_cookie_t coo...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct rds_mr *mr = NULL, *found; unsigned int nr_pages; struct page **pages = NULL; struct scatterlist *sg; void *trans_private; unsigned long flags; rds_rdma_cookie_t coo...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct rds_mr *mr = NULL, *found; unsigned int nr_pages; struct page **pages = NULL; struct scatterlist *sg; void *trans_private; unsigned long flags; rds_rdma_cookie_t coo...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct page **pages = NULL; int ret; if (rs->rs_bound_addr == 0) { ret = -ENOTCONN; goto out; } if (!rs->rs_transport->get_mr) { goto out; } mr->r_t...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct page **pages = NULL; int ret; if (rs->rs_bound_addr == 0 || !rs->rs_transport) { ret = -ENOTCONN; goto out; } if (!rs->rs_transport->get_mr) { goto o...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct page **pages = NULL; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int ret; if (rs->rs_bound_addr == 0) { ret = -ENOTCO...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ struct page **pages = NULL; /* PLACEHOLDER: DO NOT DELETE THIS COMMENT */ int ret; if (rs->rs_bound_addr == 0 || !rs->rs_transport) { ...
static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args, u64 *cookie_ret, struct rds_mr **mr_ret) { struct page **pages = NULL; int ret; - if (rs->rs_bound_addr == 0) { + if (rs->rs_bound_addr == 0 || !rs->rs_transport) { ret = -ENOTCONN; goto out; } if (...
CVE-2018-7566
linux
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
sound/core/seq/seq_clientmgr.c
snd_seq_write
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err = -EVAL; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; }...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; } if ...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err = -EVAL; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; }...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; } if ...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err = -EVAL; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; }...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; } if ...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err = -EVAL; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; }...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; int err; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { return -ENXIO; } if ...
static ssize_t snd_seq_write(struct file *file, const char *buf, size_t count, loff_t *offset) { struct snd_seq_client *client = file->private_data; int written = 0, len; - int err = -EVAL; + int err; struct snd_seq_event event; if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_PUT)) { ...