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-2019-19947 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | kvaser_usb_leaf_flush_queue | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_FLUSH_QUEUE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_flush_queue);
cmd->u.f... | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_FLUSH_QUEUE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_flush_queue);
cmd->u.f... | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_FLUSH_QUEUE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_flush_queue);
cmd->u.f... | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_FLUSH_QUEUE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_flush_queue);
cmd->u.f... | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
rc = kvaser_usb_send_cmd(priv->dev, cmd, cmd->len);
kfree(cmd);
return rc;
}
| static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
rc = kvaser_usb_send_cmd(priv->dev, cmd, cmd->len);
kfree(cmd);
return rc;
}
| static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rc = kvaser_usb_send_cmd(priv->dev, cm... | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rc = kvaser_usb_send_cmd(priv->dev, cm... | static int kvaser_usb_leaf_flush_queue(struct kvaser_usb_net_priv *priv) {
int rc;
- cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
rc = kvaser_usb_send_cmd(priv->dev, cmd, cmd->len);
kfree(cmd);
return rc;
... |
CVE-2019-19947 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | kvaser_usb_leaf_set_opt_mode | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_SET_CTRL_MODE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_ctrl_mode);
c... | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_SET_CTRL_MODE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_ctrl_mode);
c... | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_SET_CTRL_MODE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_ctrl_mode);
c... | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
struct kvaser_cmd *cmd;
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
cmd->id = CMD_SET_CTRL_MODE;
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_ctrl_mode);
c... | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
rc = kvaser_usb_send_cmd(priv->dev, cmd, cmd->len);
kfree(cmd);
return rc;
}
| static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
rc = kvaser_usb_send_cmd(priv->dev, cmd, cmd->len);
kfree(cmd);
return rc;
}
| static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rc = kvaser_usb_send_cmd(priv->... | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rc = kvaser_usb_send_cmd(priv->... | static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) {
int rc;
- cmd = kmalloc(sizeof(*cmd), GFP_KERNEL);
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
return -ENOMEM;
}
rc = kvaser_usb_send_cmd(priv->dev, cmd, cmd->len);
kfree(cmd);
retu... |
CVE-2019-19947 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c | kvaser_usb_leaf_simple_cmd_async | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
struct kvaser_cmd *cmd;
int err;
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_simple);
cmd->id = cmd_id;
cmd->... | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
struct kvaser_cmd *cmd;
int err;
cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_simple);
cmd->id = cmd_id;
cmd->... | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
struct kvaser_cmd *cmd;
int err;
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_simple);
cmd->id = cmd_id;
cmd->... | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
struct kvaser_cmd *cmd;
int err;
cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_simple);
cmd->id = cmd_id;
cmd->... | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
int err;
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
err = kvaser_usb_send_cmd_async(priv, cmd, cmd->len);
if (err) {
kfree(cmd);
}
return err;
}
| static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
int err;
cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
err = kvaser_usb_send_cmd_async(priv, cmd, cmd->len);
if (err) {
kfree(cmd);
}
return err;
}
| static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err;
cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = kvaser_usb_send... | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err;
cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = kvaser_usb_send... | static int kvaser_usb_leaf_simple_cmd_async(struct kvaser_usb_net_priv *priv, u8 cmd_id) {
int err;
- cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC);
+ cmd = kzalloc(sizeof(*cmd), GFP_ATOMIC);
if (!cmd) {
return -ENOMEM;
}
err = kvaser_usb_send_cmd_async(priv, cmd, cmd->len);
if (err) ... |
CVE-2019-19965 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/libsas/sas_discover.c | sas_get_port_device | static int sas_get_port_device(struct asd_sas_port *port) {
struct asd_sas_phy *phy;
struct sas_rphy *rphy;
struct domain_device *dev;
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
spin_lock_irq(&port->phy_list_lock);
if (list_empty(&port->phy_list... | static int sas_get_port_device(struct asd_sas_port *port) {
struct asd_sas_phy *phy;
struct sas_rphy *rphy;
struct domain_device *dev;
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
spin_lock_irq(&port->phy_list_lock);
if (list_empty(&port->phy_list... | static int sas_get_port_device(struct asd_sas_port *port) {
struct asd_sas_phy *phy;
struct sas_rphy *rphy;
struct domain_device *dev;
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
spin_lock_irq(&port->phy_list_lock);
if (list_empty(&port->phy_list... | static int sas_get_port_device(struct asd_sas_port *port) {
struct asd_sas_phy *phy;
struct sas_rphy *rphy;
struct domain_device *dev;
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
spin_lock_irq(&port->phy_list_lock);
if (list_empty(&port->phy_list... | static int sas_get_port_device(struct asd_sas_port *port) {
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
if (dev->frame_rcvd[0] == 0x34 && port->oob_mode == SATA_OOB_MODE) {
dev->tproto = SAS_PROTOCOL_SATA;
} else {
struct sas_identify_frame *... | static int sas_get_port_device(struct asd_sas_port *port) {
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
if (dev->frame_rcvd[0] == 0x34 && port->oob_mode == SATA_OOB_MODE) {
dev->tproto = SAS_PROTOCOL_SATA;
} else if (port->oob_mode == SAS_OOB_MODE) {... | static int sas_get_port_device(struct asd_sas_port *port) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dev->frame_rcvd[0] == 0x34 && port->oob_mode == SATA_O... | static int sas_get_port_device(struct asd_sas_port *port) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dev->frame_rcvd[0] == 0x34 && port->oob_mode == SATA_O... | static int sas_get_port_device(struct asd_sas_port *port) {
int rc = -ENODEV;
dev = sas_alloc_device();
if (!dev) {
return -ENOMEM;
}
if (dev->frame_rcvd[0] == 0x34 && port->oob_mode == SATA_OOB_MODE) {
dev->tproto = SAS_PROTOCOL_SATA;
- } else {
+ } else if (port->oob_... |
CVE-2019-19966 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/cpia2/cpia2_v4l.c | cpia2_init | static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
cpia2_usb_init();
return 0;
} | static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
return cpia2_usb_init();
} | static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
cpia2_usb_init();
return 0;
} | static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
return cpia2_usb_init();
} | static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
cpia2_usb_init();
return 0;
}
| static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
return cpia2_usb_init();
}
| static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
cpia2_usb_init();
return 0;
}
| static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
return cpia2_usb_init();
} | static int cpia2_init(void) {
LOG("%s v%s\n", AB, CPIA_VERSION);
check_parameters();
- cpia2_usb_init();
- return 0;
+ return cpia2_usb_init();
} |
CVE-2019-1999 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_alloc_free_page | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
struct mm_struct *mm = NULL;
struct binder_lru_page *page = container_of(item, struct binder_lru_page, lru);
struct binder_alloc *alloc;
uintptr_t page_addr;
size_t index;
s... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
struct mm_struct *mm = NULL;
struct binder_lru_page *page = container_of(item, struct binder_lru_page, lru);
struct binder_alloc *alloc;
uintptr_t page_addr;
size_t index;
s... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
struct mm_struct *mm = NULL;
struct binder_lru_page *page = container_of(item, struct binder_lru_page, lru);
struct binder_alloc *alloc;
uintptr_t page_addr;
size_t index;
s... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
struct mm_struct *mm = NULL;
struct binder_lru_page *page = container_of(item, struct binder_lru_page, lru);
struct binder_alloc *alloc;
uintptr_t page_addr;
size_t index;
s... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
alloc = page->alloc;
page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
vma = binder_alloc_get_vma(alloc);
if (vma) {
if (!mmget_not_zero(alloc->vma_vm_mm)) {
... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
alloc = page->alloc;
page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
mm = alloc->vma_vm_mm;
if (!mmget_not_zero(mm)) {
goto err_mmget;
}
if (!down_write_tr... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
alloc = page->alloc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
vma = ... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
alloc = page->alloc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
mm = a... | enum lru_status binder_alloc_free_page(struct list_head *item, struct list_lru_one *lru, spinlock_t *lock, void *cb_arg) {
alloc = page->alloc;
page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
+ mm = alloc->vma_vm_mm;
+ if (!mmget_not_zero(mm)) {
+ goto err_mmget;
+ }
+ if (!down_... |
CVE-2019-20054 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/proc/proc_sysctl.c | drop_sysctl_table | static void drop_sysctl_table(struct ctl_table_header *header) {
struct ctl_dir *parent = header->parent;
if (--header->nreg) {
return;
}
put_links(header);
start_unregistering(header);
if (!--header->count) {
kfree_rcu(header, rcu);
}
if (parent) {
drop_sysctl_ta... | static void drop_sysctl_table(struct ctl_table_header *header) {
struct ctl_dir *parent = header->parent;
if (--header->nreg) {
return;
}
if (parent) {
put_links(header);
}
start_unregistering(header);
if (!--header->count) {
kfree_rcu(header, rcu);
}
if (pare... | static void drop_sysctl_table(struct ctl_table_header *header) {
struct ctl_dir *parent = header->parent;
if (--header->nreg) {
return;
}
put_links(header);
start_unregistering(header);
if (!--header->count) {
kfree_rcu(header, rcu);
}
if (parent) {
drop_sysctl_ta... | static void drop_sysctl_table(struct ctl_table_header *header) {
struct ctl_dir *parent = header->parent;
if (--header->nreg) {
return;
}
if (parent) {
put_links(header);
}
start_unregistering(header);
if (!--header->count) {
kfree_rcu(header, rcu);
}
if (pare... | static void drop_sysctl_table(struct ctl_table_header *header) {
if (--header->nreg) {
return;
}
put_links(header);
start_unregistering(header);
}
| static void drop_sysctl_table(struct ctl_table_header *header) {
if (--header->nreg) {
return;
}
if (parent) {
put_links(header);
}
start_unregistering(header);
}
| static void drop_sysctl_table(struct ctl_table_header *header) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (--header->nreg) {
return;
}
put_links(header);
start_unregistering(header);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void drop_sysctl_table(struct ctl_table_header *header) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (--header->nreg) {
return;
}
if (parent) {
put_links(header);
}
start_unregistering(header);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void drop_sysctl_table(struct ctl_table_header *header) {
if (--header->nreg) {
return;
}
- put_links(header);
+ if (parent) {
+ put_links(header);
+ }
start_unregistering(header);
} |
CVE-2019-20095 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/marvell/mwifiex/cfg80211.c | mwifiex_tm_cmd | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
struct mwifiex_ds_misc_cmd *hostcmd;
struct nlattr *tb[MWIFIEX_TM_ATTR_MAX + 1];
struct sk_buff *skb;
int err;
if (!priv) {
... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
struct mwifiex_ds_misc_cmd *hostcmd;
struct nlattr *tb[MWIFIEX_TM_ATTR_MAX + 1];
struct sk_buff *skb;
int err;
if (!priv) {
... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
struct mwifiex_ds_misc_cmd *hostcmd;
struct nlattr *tb[MWIFIEX_TM_ATTR_MAX + 1];
struct mwifiex_adapter *adapter;
struct sk_buff *skb... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
struct mwifiex_ds_misc_cmd *hostcmd;
struct nlattr *tb[MWIFIEX_TM_ATTR_MAX + 1];
struct mwifiex_adapter *adapter;
struct sk_buff *skb... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
if (!priv) {
return -EVAL;
}
switch (nla_get_u32(tb[MWIFIEX_TM_ATTR_CMD])) {
case MWIFIEX_TM_CMD_HOSTCMD:
hostcmd = k... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
if (!priv) {
return -EVAL;
}
switch (nla_get_u32(tb[MWIFIEX_TM_ATTR_CMD])) {
case MWIFIEX_TM_CMD_HOSTCMD:
hostcmd = k... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!priv) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!priv) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int mwifiex_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev, void *data, int len) {
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
if (!priv) {
return -EVAL;
}
switch (nla_get_u32(tb[MWIFIEX_TM_ATTR_CMD])) {
case MWIFIEX_TM_CMD_HOSTCMD:
hos... |
CVE-2019-20096 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/dccp/feat.c | __feat_register_sp | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
dccp_feat_val fval;
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, s... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
dccp_feat_val fval;
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, s... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
dccp_feat_val fval;
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, s... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
dccp_feat_val fval;
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, s... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, sp_len)) {
return... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, sp_len)) {
return... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !cc... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !cc... | static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local, u8 mandatory, u8 const *sp_val, u8 sp_len) {
if (dccp_feat_type(feat) != FEAT_SP || !dccp_feat_sp_list_ok(feat, sp_val, sp_len)) {
return -EVAL;
}
if (feat == DCCPF_CCID && !ccid_support_check(sp_val, sp_len)) {
... |
CVE-2019-2024 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/em28xx/em28xx-dvb.c | em28xx_dvb_fini | static int em28xx_dvb_fini(struct em28xx *dev) {
struct em28xx_dvb *dvb;
struct i2c_client *client;
if (dev->is_audio_only) {
return 0;
}
if (!dev->board.has_dvb) {
return 0;
}
if (!dev->dvb) {
return 0;
}
dev_info(&dev->intf->dev, "Closing DVB extension\n");
... | static int em28xx_dvb_fini(struct em28xx *dev) {
struct em28xx_dvb *dvb;
struct i2c_client *client;
if (dev->is_audio_only) {
return 0;
}
if (!dev->board.has_dvb) {
return 0;
}
if (!dev->dvb) {
return 0;
}
dev_info(&dev->intf->dev, "Closing DVB extension\n");
... | static int em28xx_dvb_fini(struct em28xx *dev) {
struct em28xx_dvb *dvb;
struct i2c_client *client;
if (dev->is_audio_only) {
return 0;
}
if (!dev->board.has_dvb) {
return 0;
}
if (!dev->dvb) {
return 0;
}
em28xx_info("Closing DVB extension\n");
dvb = dev-... | static int em28xx_dvb_fini(struct em28xx *dev) {
struct em28xx_dvb *dvb;
struct i2c_client *client;
if (dev->is_audio_only) {
return 0;
}
if (!dev->board.has_dvb) {
return 0;
}
if (!dev->dvb) {
return 0;
}
em28xx_info("Closing DVB extension\n");
dvb = dev-... | static int em28xx_dvb_fini(struct em28xx *dev) {
if (!dev->dvb) {
return 0;
}
dvb = dev->dvb;
if (dev->disconnected) {
if (dvb->fe[1]) {
dvb->fe[1]->exit = DVB_FE_DEVICE_REMOVED;
}
}
client = dvb->i2c_client_sec;
if (client) {
i2c_unregister_device... | static int em28xx_dvb_fini(struct em28xx *dev) {
if (!dev->dvb) {
return 0;
}
dvb = dev->dvb;
if (dev->disconnected) {
if (dvb->fe[1]) {
dvb->fe[1]->exit = DVB_FE_DEVICE_REMOVED;
}
}
em28xx_unregister_dvb(dvb);
client = dvb->i2c_client_sec;
if (client)... | static int em28xx_dvb_fini(struct em28xx *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dev->dvb) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dvb = dev->dvb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dev->disconnected) {
/* PLACEHOLDER: DO NOT ... | static int em28xx_dvb_fini(struct em28xx *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dev->dvb) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dvb = dev->dvb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dev->disconnected) {
/* PLACEHOLDER: DO NOT ... | static int em28xx_dvb_fini(struct em28xx *dev) {
if (!dev->dvb) {
return 0;
}
dvb = dev->dvb;
if (dev->disconnected) {
if (dvb->fe[1]) {
dvb->fe[1]->exit = DVB_FE_DEVICE_REMOVED;
}
}
+ em28xx_unregister_dvb(dvb);
client = dvb->i2c_client_sec;
... |
CVE-2019-2025 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_thread_write | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
uint32_t cmd;
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
uint32_t cmd;
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
uint32_t cmd;
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
uint32_t cmd;
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
void *end = buff... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
void *end = buff... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
vo... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
vo... | static int binder_thread_write(struct binder_proc *proc, struct binder_thread *thread, binder_uintptr_t binder_buffer, size_t size, binder_size_t *consumed) {
struct binder_context *context = proc->context;
void *buffer = (void *)(uintptr_t)binder_buffer;
void *ptr = buffer + *consumed;
void *end =... |
CVE-2019-2025 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_transaction | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *tcomplete;
binder_size_t *offp, *off_end, *off_start;
binder_size_t off... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *tcomplete;
binder_size_t *offp, *off_end, *off_start;
binder_size_t off... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *tcomplete;
binder_size_t *offp, *off_end, *off_start;
binder_size_t off... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *tcomplete;
binder_size_t *offp, *off_end, *off_start;
binder_size_t off... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
if (IS_ERR(t->buffer)) {
goto err_binder_alloc_buf_failed;
}
t->buffer->allow_user_free = 0;
t->buffer->debug_id = t->debug_id... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
if (IS_ERR(t->buffer)) {
goto err_binder_alloc_buf_failed;
}
t->buffer->debug_id = t->debug_id;
trace_binder_transaction_alloc... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_ERR(t->buffer)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto err_bind... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_ERR(t->buffer)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto err_bind... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
if (IS_ERR(t->buffer)) {
goto err_binder_alloc_buf_failed;
}
- t->buffer->allow_user_free = 0;
t->buffer->debug_id = t->de... |
CVE-2019-2025 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_alloc_new_buf_locked | static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
struct rb_node *n = alloc->free_buffers.rb_node;
struct binder_buffer *buffer;
size_t buffer_size;
struct rb_node *best_fit = NULL;
... | static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
struct rb_node *n = alloc->free_buffers.rb_node;
struct binder_buffer *buffer;
size_t buffer_size;
struct rb_node *best_fit = NULL;
... | struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
struct rb_node *n = alloc->free_buffers.rb_node;
struct binder_buffer *buffer;
size_t buffer_size;
struct rb_node *best_fit = NULL;
void *ha... | struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
struct rb_node *n = alloc->free_buffers.rb_node;
struct binder_buffer *buffer;
size_t buffer_size;
struct rb_node *best_fit = NULL;
void *ha... | static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
buffer->free = 0;
buffer->free_in_progress = 0;
binder_insert_allocated_buffer_locked(alloc, buffer);
binder_alloc_debug(BDER_DEBUG_BUFF... | static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
buffer->free = 0;
buffer->allow_user_free = 0;
binder_insert_allocated_buffer_locked(alloc, buffer);
binder_alloc_debug(BDER_DEBUG_BUFFE... | struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
buffer->free = 0;
buffer->free_in_progress = 0;
binder_insert_allocated_buffer_locked(alloc, buffe... | struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
buffer->free = 0;
buffer->allow_user_free = 0;
binder_insert_allocated_buffer_locked(alloc, buffer... | static struct binder_buffer *binder_alloc_new_buf_locked( struct binder_alloc *alloc, size_t data_size, size_t offsets_size, size_t extra_buffers_size, int is_async) {
buffer->free = 0;
- buffer->free_in_progress = 0;
+ buffer->allow_user_free = 0;
binder_insert_allocated_buffer_locked(alloc, buffer);
... |
CVE-2019-2025 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_alloc_prepare_to_free_locked | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
struct rb_node *n = alloc->allocated_buffers.rb_node;
struct binder_buffer *buffer;
void *kern_ptr;
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffe... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
struct rb_node *n = alloc->allocated_buffers.rb_node;
struct binder_buffer *buffer;
void *kern_ptr;
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffe... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
struct rb_node *n = alloc->allocated_buffers.rb_node;
struct binder_buffer *buffer;
void *kern_ptr;
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffe... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
struct rb_node *n = alloc->allocated_buffers.rb_node;
struct binder_buffer *buffer;
void *kern_ptr;
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffe... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON(buffer->free);
if (kern_ptr < buffer->dat... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON(buffer->free);
if (kern_ptr < buffer->dat... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON... | static struct binder_buffer *binder_alloc_prepare_to_free_locked( struct binder_alloc *alloc, uintptr_t user_ptr) {
kern_ptr = (void *)(user_ptr - alloc->user_buffer_offset);
while (n) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON(buffer->free);
if (kern_ptr < buffe... |
CVE-2019-20636 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/input/input.c | input_default_setkeycode | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
unsigned int index;
int error;
int i;
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
unsigned int index;
int error;
int i;
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
unsigned int index;
int error;
int i;
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
unsigned int index;
int error;
int i;
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
error = input_scancode_to_scalar(ke, &index);
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
error = input_scancode_to_scalar(ke, &index);
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
... | static int input_default_setkeycode(struct input_dev *dev, const struct input_keymap_entry *ke, unsigned int *old_keycode) {
if (!dev->keycodesize) {
return -EVAL;
}
if (ke->flags & PUT_KEYMAP_BY_DEX) {
index = ke->index;
} else {
error = input_scancode_to_scalar(ke, &ind... |
CVE-2019-20636 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/input/input.c | input_set_keycode | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
unsigned long flags;
unsigned int old_keycode;
int retval;
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
spin_lock_irqsave(&dev->event_lock, flags);
retval = dev->setkeycode(dev, ke, &old_keycode);
... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
unsigned long flags;
unsigned int old_keycode;
int retval;
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
spin_lock_irqsave(&dev->event_lock, flags);
retval = dev->setkeycode(dev, ke, &old_keycode);
... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
unsigned long flags;
unsigned int old_keycode;
int retval;
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
spin_lock_irqsave(&dev->event_lock, flags);
retval = dev->setkeycode(dev, ke, &old_keycode);
... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
unsigned long flags;
unsigned int old_keycode;
int retval;
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
spin_lock_irqsave(&dev->event_lock, flags);
retval = dev->setkeycode(dev, ke, &old_keycode);
... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
retval = dev->setkeycode(dev, ke, &old_keycode);
__clear_bit(KEY_RESERVED, dev->keybit);
if (test_bit(EV_KEY, dev->evbit) && !is_event_supported(old_keycode, dev->... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
retval = dev->setkeycode(dev, ke, &old_keycode);
__clear_bit(KEY_RESERVED, dev->keybit);
if (old_keycode > KEY_MAX) {
dev_warn(dev->dev.parent ?: &dev->dev... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retval = dev->setkeycode(dev, ke, &old_keycode);
/* PLACEHOLDER: DO... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retval = dev->setkeycode(dev, ke, &old_keycode);
/* PLACEHOLDER: DO... | int input_set_keycode(struct input_dev *dev, const struct input_keymap_entry *ke) {
if (ke->keycode > KEY_MAX) {
return -EVAL;
}
retval = dev->setkeycode(dev, ke, &old_keycode);
__clear_bit(KEY_RESERVED, dev->keybit);
- if (test_bit(EV_KEY, dev->evbit) && !is_event_supported(old_keycode... |
CVE-2019-20806 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/pci/tw5864/tw5864-video.c | tw5864_handle_frame | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
struct tw5864_input *input = frame->input;
struct tw5864_dev *dev = input->root;
struct tw5864_buf *vb;
struct vb2_v4l2_buffer *v4l2_buf;
int frame_len = frame->vlc_len - SKIP_VLCBUF_BYTES;
u8 *dst = input->buf_cur_ptr;
u8 ta... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
struct tw5864_input *input = frame->input;
struct tw5864_dev *dev = input->root;
struct tw5864_buf *vb;
struct vb2_v4l2_buffer *v4l2_buf;
int frame_len = frame->vlc_len - SKIP_VLCBUF_BYTES;
u8 *dst = input->buf_cur_ptr;
u8 ta... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
struct tw5864_input *input = frame->input;
struct tw5864_dev *dev = input->root;
struct tw5864_buf *vb;
struct vb2_v4l2_buffer *v4l2_buf;
int frame_len = frame->vlc_len - SKIP_VLCBUF_BYTES;
u8 *dst = input->buf_cur_ptr;
u8 ta... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
struct tw5864_input *input = frame->input;
struct tw5864_dev *dev = input->root;
struct tw5864_buf *vb;
struct vb2_v4l2_buffer *v4l2_buf;
int frame_len = frame->vlc_len - SKIP_VLCBUF_BYTES;
u8 *dst = input->buf_cur_ptr;
u8 ta... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
spin_unlock_irqrestore(&input->slock, flags);
v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
if (!vb) {
return;
}
if (input->buf_cur_space_left < frame_len * 5 / 4) {
return;
}
if (frame->gop_seqno && tw5864_... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
spin_unlock_irqrestore(&input->slock, flags);
if (!vb) {
return;
}
v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
if (input->buf_cur_space_left < frame_len * 5 / 4) {
return;
}
if (frame->gop_seqno && tw5864_... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_unlock_irqrestore(&input->slock, flags);
v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
if (!vb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
if (input-... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_unlock_irqrestore(&input->slock, flags);
if (!vb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return;
}
v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
if (input-... | static void tw5864_handle_frame(struct tw5864_h264_frame *frame) {
spin_unlock_irqrestore(&input->slock, flags);
- v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
if (!vb) {
return;
}
+ v4l2_buf = to_vb2_v4l2_buffer(&vb->vb.vb2_buf);
if (input->buf_cur_space_left < frame_len * 5 / 4)... |
CVE-2019-20810 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/go7007/snd-go7007.c | go7007_snd_init | int go7007_snd_init(struct go7007 *go) {
static int dev;
struct go7007_snd *gosnd;
int ret = 0;
if (dev >= SNDRV_CARDS) {
return -ENODEV;
}
if (!enable[dev]) {
dev++;
return -ENOENT;
}
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) ... | int go7007_snd_init(struct go7007 *go) {
static int dev;
struct go7007_snd *gosnd;
int ret = 0;
if (dev >= SNDRV_CARDS) {
return -ENODEV;
}
if (!enable[dev]) {
dev++;
return -ENOENT;
}
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) ... | int go7007_snd_init(struct go7007 *go) {
static int dev;
struct go7007_snd *gosnd;
int ret;
if (dev >= SNDRV_CARDS) {
return -ENODEV;
}
if (!enable[dev]) {
dev++;
return -ENOENT;
}
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
... | int go7007_snd_init(struct go7007 *go) {
static int dev;
struct go7007_snd *gosnd;
int ret;
if (dev >= SNDRV_CARDS) {
return -ENODEV;
}
if (!enable[dev]) {
dev++;
return -ENOENT;
}
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
... | int go7007_snd_init(struct go7007 *go) {
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
return -ENOMEM;
}
ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE, 0, &gosnd->card);
if (ret < 0) {
kfree(gosnd);
return ret;
}
ret = snd... | int go7007_snd_init(struct go7007 *go) {
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
return -ENOMEM;
}
ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE, 0, &gosnd->card);
if (ret < 0) {
goto free_snd;
}
ret = snd_device_new(gosnd->... | int go7007_snd_init(struct go7007 *go) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE... | int go7007_snd_init(struct go7007 *go) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
return -ENOMEM;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE... | int go7007_snd_init(struct go7007 *go) {
gosnd = kmalloc(sizeof(struct go7007_snd), GFP_KERNEL);
if (gosnd == NULL) {
return -ENOMEM;
}
ret = snd_card_new(go->dev, index[dev], id[dev], THIS_MODULE, 0, &gosnd->card);
if (ret < 0) {
- kfree(gosnd);
- return ret;
+ g... |
CVE-2019-20811 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/net-sysfs.c | netdev_queue_add_kobject | static int netdev_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_queue *queue = dev->_tx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = dev->queues_kset;
error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, "tx-%u", index);
if (error) {
... | static int netdev_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_queue *queue = dev->_tx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = dev->queues_kset;
error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, "tx-%u", index);
if (error) {
... | static int netdev_queue_add_kobject(struct net_device *net, int index) {
struct netdev_queue *queue = net->_tx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = net->queues_kset;
error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, "tx-%u", index);
if (error) {
... | static int netdev_queue_add_kobject(struct net_device *net, int index) {
struct netdev_queue *queue = net->_tx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = net->queues_kset;
error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, "tx-%u", index);
if (error) {
... | static int netdev_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_queue *queue = dev->_tx + index;
if (error) {
return error;
}
error = sysfs_create_group(kobj, &dql_group);
kobject_uevent(kobj, KOBJ_ADD);
dev_hold(queue->dev);
return 0;
}
| static int netdev_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_queue *queue = dev->_tx + index;
if (error) {
return error;
}
dev_hold(queue->dev);
error = sysfs_create_group(kobj, &dql_group);
kobject_uevent(kobj, KOBJ_ADD);
return 0;
}
| static int netdev_queue_add_kobject(struct net_device *net, int index) {
struct netdev_queue *queue = net->_tx + index;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (error) {
return error;
}
error = sysfs_create_group(kobj, &dql_group);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int netdev_queue_add_kobject(struct net_device *net, int index) {
struct netdev_queue *queue = net->_tx + index;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (error) {
return error;
}
dev_hold(queue->dev);
error = sysfs_create_group(kobj, &dql_group);
/* PLACEHOLDER: DO NO... | static int netdev_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_queue *queue = dev->_tx + index;
if (error) {
return error;
}
+ dev_hold(queue->dev);
error = sysfs_create_group(kobj, &dql_group);
kobject_uevent(kobj, KOBJ_ADD);
- dev_hold(queue->dev);
... |
CVE-2019-20811 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/net-sysfs.c | rx_queue_add_kobject | static int rx_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_rx_queue *queue = dev->_rx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = dev->queues_kset;
error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, "rx-%u", index);
if (error) {
... | static int rx_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_rx_queue *queue = dev->_rx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = dev->queues_kset;
error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, "rx-%u", index);
if (error) {
... | static int rx_queue_add_kobject(struct net_device *net, int index) {
struct netdev_rx_queue *queue = net->_rx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = net->queues_kset;
error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, "rx-%u", index);
if (error) {
... | static int rx_queue_add_kobject(struct net_device *net, int index) {
struct netdev_rx_queue *queue = net->_rx + index;
struct kobject *kobj = &queue->kobj;
int error = 0;
kobj->kset = net->queues_kset;
error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, "rx-%u", index);
if (error) {
... | static int rx_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_rx_queue *queue = dev->_rx + index;
if (error) {
return error;
}
kobject_uevent(kobj, KOBJ_ADD);
dev_hold(queue->dev);
return error;
}
| static int rx_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_rx_queue *queue = dev->_rx + index;
if (error) {
return error;
}
dev_hold(queue->dev);
kobject_uevent(kobj, KOBJ_ADD);
return error;
}
| static int rx_queue_add_kobject(struct net_device *net, int index) {
struct netdev_rx_queue *queue = net->_rx + index;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (error) {
return error;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kobject_uevent(kobj, KOBJ_ADD);
dev_hold(que... | static int rx_queue_add_kobject(struct net_device *net, int index) {
struct netdev_rx_queue *queue = net->_rx + index;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (error) {
return error;
}
dev_hold(queue->dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
kobject_uevent(kobj, K... | static int rx_queue_add_kobject(struct net_device *dev, int index) {
struct netdev_rx_queue *queue = dev->_rx + index;
if (error) {
return error;
}
+ dev_hold(queue->dev);
kobject_uevent(kobj, KOBJ_ADD);
- dev_hold(queue->dev);
return error;
} |
CVE-2019-20812 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/packet/af_packet.c | prb_calc_retire_blk_tmo | static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
struct net_device *dev;
unsigned int mbits = 0, msec = 0, div = 0, tmo = 0;
struct ethtool_link_ksettings ecmd;
int err;
rtnl_lock();
dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex);
if (unlikely(!de... | static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
struct net_device *dev;
unsigned int mbits = 0, msec = 0, div = 0, tmo = 0;
struct ethtool_link_ksettings ecmd;
int err;
rtnl_lock();
dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex);
if (unlikely(!de... | static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
struct net_device *dev;
unsigned int mbits = 0, msec = 0, div = 0, tmo = 0;
struct ethtool_cmd ecmd;
int err;
u32 speed;
rtnl_lock();
dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex);
if (unlikely... | static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
struct net_device *dev;
unsigned int mbits = 0, msec = 0, div = 0, tmo = 0;
struct ethtool_cmd ecmd;
int err;
u32 speed;
rtnl_lock();
dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex);
if (unlikely... | static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
if (!err) {
}
}
| static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
if (!err) {
} else {
return DEFAULT_PRB_RETIRE_TOV;
}
}
| static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!err) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!err) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
return DEFAULT_PRB_RETIRE_TOV;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static int prb_calc_retire_blk_tmo(struct packet_sock *po, int blk_size_in_bytes) {
if (!err) {
+ } else {
+ return DEFAULT_PRB_RETIRE_TOV;
}
} |
CVE-2019-2101 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/uvc/uvc_driver.c | uvc_parse_standard_control | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
struct usb_device *udev = dev->udev;
struct uvc_entity *unit, *term;
struct usb_interface *intf;
struct usb_host_interface *alts = dev->intf->cur_altsetting;
unsigned int i, n, p, len;
u16 ty... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
struct usb_device *udev = dev->udev;
struct uvc_entity *unit, *term;
struct usb_interface *intf;
struct usb_host_interface *alts = dev->intf->cur_altsetting;
unsigned int i, n, p, len;
u16 ty... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
struct usb_device *udev = dev->udev;
struct uvc_entity *unit, *term;
struct usb_interface *intf;
struct usb_host_interface *alts = dev->intf->cur_altsetting;
unsigned int i, n, p, len;
__u16 ... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
struct usb_device *udev = dev->udev;
struct uvc_entity *unit, *term;
struct usb_interface *intf;
struct usb_host_interface *alts = dev->intf->cur_altsetting;
unsigned int i, n, p, len;
__u16 ... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
switch (buffer[2]) {
case UVC_VC_PUT_TERMAL:
type = get_unaligned_le16(&buffer[4]);
if ((type & 0xff00) == 0) {
uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol " "interface %d ... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
switch (buffer[2]) {
case UVC_VC_PUT_TERMAL:
type = get_unaligned_le16(&buffer[4]);
if ((type & 0x7f00) == 0 || (type & 0x8000) != 0) {
uvc_trace(UVC_TRACE_DESCR, "device %d video... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (buffer[2]) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case UVC_VC_PUT_TERMAL:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
type... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (buffer[2]) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case UVC_VC_PUT_TERMAL:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
type... | static int uvc_parse_standard_control(struct uvc_device *dev, const unsigned char *buffer, int buflen) {
switch (buffer[2]) {
case UVC_VC_PUT_TERMAL:
type = get_unaligned_le16(&buffer[4]);
- if ((type & 0xff00) == 0) {
+ if ((type & 0x7f00) == 0 || (type & 0x8000) != 0) {
... |
CVE-2019-2182 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/arm64/mm/mmu.c | pmd_set_huge | int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pmd_present(READ_ONCE(*pmdp))) {
return 0;
}
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pmd_present(READ_ONCE(*pmdp))) {
return 0;
}
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
}
| int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pmd_present(READ_ONCE(*pmdp))) {
return 0;
}
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
}
| int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
}
| int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pmd_present(READ_ONCE(*pmdp))) {
return 0;
}
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
+ if (pmd_present(READ_ONCE(*pmdp))) {
+ return 0;
+ }
BUG_ON(phys & ~PMD_MASK);
set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot));
retur... |
CVE-2019-2182 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/arm64/mm/mmu.c | pud_set_huge | int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pud_present(READ_ONCE(*pudp))) {
return 0;
}
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pud_present(READ_ONCE(*pudp))) {
return 0;
}
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
}
| int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pud_present(READ_ONCE(*pudp))) {
return 0;
}
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
}
| int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
}
| int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
if (pud_present(READ_ONCE(*pudp))) {
return 0;
}
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
} | int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) {
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | pgprot_val(mk_sect_prot(prot)));
+ if (pud_present(READ_ONCE(*pudp))) {
+ return 0;
+ }
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
retur... |
CVE-2019-25045 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/key/af_key.c | parse_ipsecrequest | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
struct net *net = xp_net(xp);
struct xfrm_tmpl *t = xp->xfrm_vec + xp->xfrm_nr;
int mode;
if (xp->xfrm_nr >= XFRM_MAX_DEPTH) {
return -ELOOP;
}
if (rq->sadb_x_ipsecrequest_mode == 0) {
return ... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
struct net *net = xp_net(xp);
struct xfrm_tmpl *t = xp->xfrm_vec + xp->xfrm_nr;
int mode;
if (xp->xfrm_nr >= XFRM_MAX_DEPTH) {
return -ELOOP;
}
if (rq->sadb_x_ipsecrequest_mode == 0) {
return ... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
struct net *net = xp_net(xp);
struct xfrm_tmpl *t = xp->xfrm_vec + xp->xfrm_nr;
int mode;
if (xp->xfrm_nr >= XFRM_MAX_DEPTH) {
return -ELOOP;
}
if (rq->sadb_x_ipsecrequest_mode == 0) {
return ... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
struct net *net = xp_net(xp);
struct xfrm_tmpl *t = xp->xfrm_vec + xp->xfrm_nr;
int mode;
if (xp->xfrm_nr >= XFRM_MAX_DEPTH) {
return -ELOOP;
}
if (rq->sadb_x_ipsecrequest_mode == 0) {
return ... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
if (rq->sadb_x_ipsecrequest_mode == 0) {
return -EVAL;
}
t->id.proto = rq->sadb_x_ipsecrequest_proto;
if (t->mode == XFRM_MODE_TUNNEL) {
err = parse_sockaddr_pair( (struct sockaddr *)(rq + 1), rq->sad... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
if (rq->sadb_x_ipsecrequest_mode == 0) {
return -EVAL;
}
if (!xfrm_id_proto_valid(rq->sadb_x_ipsecrequest_proto)) {
return -EVAL;
}
t->id.proto = rq->sadb_x_ipsecrequest_proto;
if (t->mode == ... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (rq->sadb_x_ipsecrequest_mode == 0) {
return -EVAL;
}
t->id.proto = rq->sadb_x_ipsecrequest_proto;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (t-... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (rq->sadb_x_ipsecrequest_mode == 0) {
return -EVAL;
}
if (!xfrm_id_proto_valid(rq->sadb_x_ipsecrequest_proto)) {
return -EVAL;
}
t->id.proto = ... | static int parse_ipsecrequest(struct xfrm_policy *xp, struct sadb_x_ipsecrequest *rq) {
if (rq->sadb_x_ipsecrequest_mode == 0) {
+ return -EVAL;
+ }
+ if (!xfrm_id_proto_valid(rq->sadb_x_ipsecrequest_proto)) {
return -EVAL;
}
t->id.proto = rq->sadb_x_ipsecrequest_proto;
if (t-... |
CVE-2019-25045 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/xfrm/xfrm_state.c | xfrm_state_fini | void xfrm_state_fini(struct net *net) {
unsigned int sz;
flush_work(&net->xfrm.state_hash_work);
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, IPSEC_PROTO_ANY, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
WAR... | void xfrm_state_fini(struct net *net) {
unsigned int sz;
flush_work(&net->xfrm.state_hash_work);
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, 0, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
WARN_ON(!hlist_em... | void xfrm_state_fini(struct net *net) {
unsigned int sz;
flush_work(&net->xfrm.state_hash_work);
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, IPSEC_PROTO_ANY, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
WAR... | void xfrm_state_fini(struct net *net) {
unsigned int sz;
flush_work(&net->xfrm.state_hash_work);
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, 0, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
sz = (net->xfrm.state_hmask + 1) * sizeof(struct hlist_head);
WARN_ON(!hlist_em... | void xfrm_state_fini(struct net *net) {
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, IPSEC_PROTO_ANY, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
}
| void xfrm_state_fini(struct net *net) {
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, 0, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
}
| void xfrm_state_fini(struct net *net) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, IPSEC_PROTO_ANY, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void xfrm_state_fini(struct net *net) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
flush_work(&xfrm_state_gc_work);
xfrm_state_flush(net, 0, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void xfrm_state_fini(struct net *net) {
flush_work(&xfrm_state_gc_work);
- xfrm_state_flush(net, IPSEC_PROTO_ANY, false, true);
+ xfrm_state_flush(net, 0, false, true);
WARN_ON(!list_empty(&net->xfrm.state_all));
} |
CVE-2019-25045 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/xfrm/xfrm_user.c | validate_tmpl | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
u16 prev_family;
int i;
if (nr > XFRM_MAX_DEPTH) {
return -EVAL;
}
prev_family = family;
for (i = 0; i < nr; i++) {
if (!ut[i].family) {
ut[i].family = family;
}
switch (ut[i].mo... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
u16 prev_family;
int i;
if (nr > XFRM_MAX_DEPTH) {
return -EVAL;
}
prev_family = family;
for (i = 0; i < nr; i++) {
if (!ut[i].family) {
ut[i].family = family;
}
switch (ut[i].mo... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
u16 prev_family;
int i;
if (nr > XFRM_MAX_DEPTH) {
return -EVAL;
}
prev_family = family;
for (i = 0; i < nr; i++) {
if (!ut[i].family) {
ut[i].family = family;
}
switch (ut[i].mo... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
u16 prev_family;
int i;
if (nr > XFRM_MAX_DEPTH) {
return -EVAL;
}
prev_family = family;
for (i = 0; i < nr; i++) {
if (!ut[i].family) {
ut[i].family = family;
}
switch (ut[i].mo... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
for (i = 0; i < nr; i++) {
switch (ut[i].family) {
}
switch (ut[i].id.proto) {
case IPPROTO_AH:
case IPPROTO_ESP:
case IPPROTO_COMP:
case IPPROTO_RG:
case IPPROTO_DSTOPTS:
... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
for (i = 0; i < nr; i++) {
switch (ut[i].family) {
}
if (!xfrm_id_proto_valid(ut[i].id.proto)) {
return -EVAL;
}
}
}
| static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < nr; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (ut[i].family) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
switch (ut[i].i... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < nr; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (ut[i].family) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
if (!xfrm_id_pr... | static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family) {
for (i = 0; i < nr; i++) {
switch (ut[i].family) {
}
- switch (ut[i].id.proto) {
- case IPPROTO_AH:
- case IPPROTO_ESP:
- case IPPROTO_COMP:
- case IPPROTO_RG:
- case IPPROTO_DSTOP... |
CVE-2019-25162 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/i2c/i2c-core-base.c | i2c_put_adapter | void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
put_device(&adap->dev);
module_put(adap->owner);
} | void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
module_put(adap->owner);
put_device(&adap->dev);
} | void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
put_device(&adap->dev);
module_put(adap->owner);
} | void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
module_put(adap->owner);
put_device(&adap->dev);
} | void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
put_device(&adap->dev);
module_put(adap->owner);
}
| void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
module_put(adap->owner);
put_device(&adap->dev);
}
| void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
put_device(&adap->dev);
module_put(adap->owner);
}
| void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
module_put(adap->owner);
put_device(&adap->dev);
} | void i2c_put_adapter(struct i2c_adapter *adap) {
if (!adap) {
return;
}
+ module_put(adap->owner);
put_device(&adap->dev);
- module_put(adap->owner);
} |
CVE-2019-3016 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | kvm_steal_time_set_preempted | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
vcpu->arch.st.steal.preempted = KVM_VCPU_PREEMPTED;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, &vcpu->arch.st.steal.preempted, offsetof(struct kvm_ste... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
if (vcpu->arch.st.steal.preempted) {
return;
}
vcpu->arch.st.steal.preempted = KVM_VCPU_PREEMPTED;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
vcpu->arch.st.steal.preempted = 1;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, &vcpu->arch.st.steal.preempted, offsetof(struct kvm_steal_time, preempte... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
if (vcpu->arch.st.steal.preempted) {
return;
}
vcpu->arch.st.steal.preempted = 1;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, &vcpu->ar... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
vcpu->arch.st.steal.preempted = KVM_VCPU_PREEMPTED;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, &vcpu->arch.st.steal.preempted, offsetof(struct kvm_ste... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
if (vcpu->arch.st.steal.preempted) {
return;
}
vcpu->arch.st.steal.preempted = KVM_VCPU_PREEMPTED;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
vcpu->arch.st.steal.preempted = 1;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, &vcpu->arch.st.steal.preempted, offsetof(struct kvm_steal_time, preempte... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
return;
}
if (vcpu->arch.st.steal.preempted) {
return;
}
vcpu->arch.st.steal.preempted = 1;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu->arch.st.stime, &vcpu->ar... | static void kvm_steal_time_set_preempted(struct kvm_vcpu *vcpu) {
if (!(vcpu->arch.st.msr_val & KVM_MSR_ENABLED)) {
+ return;
+ }
+ if (vcpu->arch.st.steal.preempted) {
return;
}
vcpu->arch.st.steal.preempted = KVM_VCPU_PREEMPTED;
kvm_write_guest_offset_cached(vcpu->kvm, &vcpu... |
CVE-2019-3459 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_conf_rfc_get | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_RFC:
if (olen != sizeof(r... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
if (len < 0) {
break;
}
switch (type) {
c... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type,... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type,... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
BT_DBG("chan %p, rsp %p, len %d", chan, rsp, len);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+ if (len < 0) {
+ break;
+ }
switch (type) {
... |
CVE-2019-3459 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_parse_conf_req | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
void *req = chan->conf_req;
int len = chan->conf_len;
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
hint = type & L2CAP_CONF_HT;
type &= L2CAP_CONF_MAS... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
void *req = chan->conf_req;
int len = chan->conf_len;
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
if (len < 0) {
break;
}
hint = ... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
void *req = chan->conf_req;
int len = chan->conf_len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_con... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
void *req = chan->conf_req;
int len = chan->conf_len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_con... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
void *req = chan->conf_req;
int len = chan->conf_len;
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
+ if (len < 0) {
+ break;
+ }
... |
CVE-2019-3459 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_parse_conf_rsp | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
if (len < 0) {
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &ty... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &ty... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
+ if (len < 0) {
+ ... |
CVE-2019-3460 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_conf_rfc_get | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
int type, olen;
unsigned long val;
u16 txwin_ext = chan->ack_win;
struct l2cap_conf_rfc rfc = {
.mode = chan->mode, .retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO), .monitor_timeout = cpu_to_le16(L2CAP_DEFAULT... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_RFC:
if (olen == sizeof(rfc)) {
memcpy(&rfc, (void *)val, olen);... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_RFC:
if (olen != sizeof(rfc)) {
break;
}
... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
if (len < 0) {
break;
}
switch (type) {
case L... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
if (len < 0) {
break;
}
switch (type) {
case L... | static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_RFC:
- if (olen == sizeof(rfc)) {
- memcpy(&rfc, (void *)val,... |
CVE-2019-3460 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_parse_conf_req | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *endptr = data + data_size;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
hint = type & L2CAP_CONF_HT;
type &= L2CAP_CONF_MASK;
switch (type) {
case L2CAP_CONF_MTU:
... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
hint = type & L2CAP_CONF_HT;
type &= L2CAP_CONF_MASK;
switch (type) {
case L2CAP_CONF_MTU:
... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
if (len < 0) {
break;
}
hint = type & L2CAP... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
if (len < 0) {
break;
}
hint = type & L2CAP... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &olen, &val);
hint = type & L2CAP_CONF_HT;
type &= L2CAP_CONF_MASK;
switch (type) {
case L2CAP_CONF_MTU:... |
CVE-2019-3460 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_parse_conf_rsp | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &ty... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &ty... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
... |
CVE-2019-3701 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/can/gw.c | can_can_gw_rcv | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
struct can_frame *cf;
struct sk_buff *nskb;
int modidx = 0;
BUG_ON(skb->ip_summed != CHECKSUM_UNNECESSARY);
if (cgw_hops(skb) >= max_hops) {
gwj->deleted_frames++;
return;
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
struct can_frame *cf;
struct sk_buff *nskb;
int modidx = 0;
BUG_ON(skb->ip_summed != CHECKSUM_UNNECESSARY);
if (cgw_hops(skb) >= max_hops) {
gwj->deleted_frames++;
return;
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
struct can_frame *cf;
struct sk_buff *nskb;
int modidx = 0;
BUG_ON(skb->ip_summed != CHECKSUM_UNNECESSARY);
if (cgw_hops(skb) >= max_hops) {
gwj->deleted_frames++;
return;
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
struct can_frame *cf;
struct sk_buff *nskb;
int modidx = 0;
BUG_ON(skb->ip_summed != CHECKSUM_UNNECESSARY);
if (cgw_hops(skb) >= max_hops) {
gwj->deleted_frames++;
return;
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
int modidx = 0;
if (cgw_hops(skb) >= max_hops) {
return;
}
if (!(gwj->flags & CGW_FLAGS_CAN_IIF_TX_OK) && can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex) {
return;
}
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
int modidx = 0;
if (cgw_hops(skb) >= max_hops) {
return;
}
if (!(gwj->flags & CGW_FLAGS_CAN_IIF_TX_OK) && can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex) {
return;
}
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int modidx = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cgw_hops(skb) >= max_hops) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int modidx = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cgw_hops(skb) >= max_hops) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void can_can_gw_rcv(struct sk_buff *skb, void *data) {
struct cgw_job *gwj = (struct cgw_job *)data;
int modidx = 0;
if (cgw_hops(skb) >= max_hops) {
return;
}
if (!(gwj->flags & CGW_FLAGS_CAN_IIF_TX_OK) && can_skb_prv(skb)->ifindex == gwj->dst.dev->ifindex) {
return;
... |
CVE-2019-3819 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-debug.c | hid_debug_event | void hid_debug_event(struct hid_device *hdev, char *buf) {
unsigned i;
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node) {
for (i = 0; buf[i]; i++)
list->hid_debug_buf[(list->tail... | void hid_debug_event(struct hid_device *hdev, char *buf) {
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node)
kfifo_in(&list->hid_debug_fifo, buf, strlen(buf));
spin_unlock_irqrestore(&hdev->debug... | void hid_debug_event(struct hid_device *hdev, char *buf) {
unsigned i;
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node) {
for (i = 0; buf[i]; i++)
list->hid_debug_buf[(list->tail... | void hid_debug_event(struct hid_device *hdev, char *buf) {
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node)
kfifo_in(&list->hid_debug_fifo, buf, strlen(buf));
spin_unlock_irqrestore(&hdev->debug... | void hid_debug_event(struct hid_device *hdev, char *buf) {
unsigned i;
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node) {
for (i = 0; buf[i]; i++)
list->hid_debug_buf[(list->tail... | void hid_debug_event(struct hid_device *hdev, char *buf) {
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node)
kfifo_in(&list->hid_debug_fifo, buf, strlen(buf));
spin_unlock_irqrestore(&hdev->debug... | void hid_debug_event(struct hid_device *hdev, char *buf) {
unsigned i;
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node) {
for (i = 0; buf[i]; i++)
list->hid_debug_buf[(list->tail... | void hid_debug_event(struct hid_device *hdev, char *buf) {
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
list_for_each_entry(list, &hdev->debug_list, node)
kfifo_in(&list->hid_debug_fifo, buf, strlen(buf));
spin_unlock_irqrestore(&hdev->debug... | void hid_debug_event(struct hid_device *hdev, char *buf) {
- unsigned i;
struct hid_debug_list *list;
unsigned long flags;
spin_lock_irqsave(&hdev->debug_list_lock, flags);
- list_for_each_entry(list, &hdev->debug_list, node) {
- for (i = 0; buf[i]; i++)
- list->hid_debug_buf[(li... |
CVE-2019-3819 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-debug.c | hid_debug_events_open | static int hid_debug_events_open(struct inode *inode, struct file *file) {
int err = 0;
struct hid_debug_list *list;
unsigned long flags;
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
err = -ENOMEM;
goto out;
}
if (!(list->hid_debug_buf = kzalloc(HID_DEBUG_B... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
int err = 0;
struct hid_debug_list *list;
unsigned long flags;
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
err = -ENOMEM;
goto out;
}
err = kfifo_alloc(&list->hid_debug_fifo, HID_DE... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
int err = 0;
struct hid_debug_list *list;
unsigned long flags;
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
err = -ENOMEM;
goto out;
}
if (!(list->hid_debug_buf = kzalloc(HID_DEBUG_B... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
int err = 0;
struct hid_debug_list *list;
unsigned long flags;
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
err = -ENOMEM;
goto out;
}
err = kfifo_alloc(&list->hid_debug_fifo, HID_DE... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
goto out;
}
if (!(list->hid_debug_buf = kzalloc(HID_DEBUG_BUFSIZE, GFP_KERNEL))) {
err = -ENOMEM;
kfree(list);
goto out;
}
li... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
goto out;
}
err = kfifo_alloc(&list->hid_debug_fifo, HID_DEBUG_FIFOSIZE, GFP_KERNEL);
if (err) {
kfree(list);
goto out;
}
list->h... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out;
}
if (!(list->hid_debug_buf = kzalloc(HID_DEBUG... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out;
}
err = kfifo_alloc(&list->hid_debug_fifo, HID_... | static int hid_debug_events_open(struct inode *inode, struct file *file) {
if (!(list = kzalloc(sizeof(struct hid_debug_list), GFP_KERNEL))) {
goto out;
}
- if (!(list->hid_debug_buf = kzalloc(HID_DEBUG_BUFSIZE, GFP_KERNEL))) {
- err = -ENOMEM;
+ err = kfifo_alloc(&list->hid_debug_fifo,... |
CVE-2019-3819 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-debug.c | hid_debug_events_poll | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (list->head != list->tail) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return EPOLLERR | EPO... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (!kfifo_is_empty(&list->hid_debug_fifo)) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return ... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (list->head != list->tail) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return EPOLLERR | EPO... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (!kfifo_is_empty(&list->hid_debug_fifo)) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return ... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (list->head != list->tail) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return EPOLLERR | EPO... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (!kfifo_is_empty(&list->hid_debug_fifo)) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return ... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (list->head != list->tail) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return EPOLLERR | EPO... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
if (!kfifo_is_empty(&list->hid_debug_fifo)) {
return EPOLL | EPOLLRDNORM;
}
if (!list->hdev->debug) {
return ... | static __poll_t hid_debug_events_poll(struct file *file, poll_table *wait) {
struct hid_debug_list *list = file->private_data;
poll_wait(file, &list->hdev->debug_wait, wait);
- if (list->head != list->tail) {
+ if (!kfifo_is_empty(&list->hid_debug_fifo)) {
return EPOLL | EPOLLRDNORM;
}
... |
CVE-2019-3819 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-debug.c | hid_debug_events_read | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, copied;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
if (kfifo_is_empty(&list->hid_debug_fifo)) {
add_wait_qu... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, copied;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
if (kfifo_is_empty(&list->hid_debug_fifo)) {
add_wait_qu... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, copied;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
if (kfifo_is_empty(&list->hid_debug_fifo)) {
add_wait_qu... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, len;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
while (ret == 0) {
if (list->head == list->tail) {
... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
int ret = 0, copied;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
if (kfifo_is_empty(&list->hid_debug_fifo)) {
add_wait_qu... | static ssize_t hid_debug_events_read(struct file *file, char *buffer, size_t count, loff_t *ppos) {
struct hid_debug_list *list = file->private_data;
- int ret = 0, len;
+ int ret = 0, copied;
DECLARE_WAITQUEUE(wait, current);
mutex_lock(&list->read_mutex);
- while (ret == 0) {
- if (lis... |
CVE-2019-3819 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-debug.c | hid_debug_events_release | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
unsigned long flags;
spin_lock_irqsave(&list->hdev->debug_list_lock, flags);
list_del(&list->node);
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfree(l... | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
unsigned long flags;
spin_lock_irqsave(&list->hdev->debug_list_lock, flags);
list_del(&list->node);
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfifo_f... | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
unsigned long flags;
spin_lock_irqsave(&list->hdev->debug_list_lock, flags);
list_del(&list->node);
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfree(l... | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
unsigned long flags;
spin_lock_irqsave(&list->hdev->debug_list_lock, flags);
list_del(&list->node);
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfifo_f... | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfree(list->hid_debug_buf);
kfree(list);
}
| static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfifo_free(&list->hid_debug_fifo);
kfree(list);
}
| static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfree(list->hid_debug_buf);
kfree(list);
/* PLACEHOLDER: DO N... | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
kfifo_free(&list->hid_debug_fifo);
kfree(list);
/* PLACEHOLDE... | static int hid_debug_events_release(struct inode *inode, struct file *file) {
struct hid_debug_list *list = file->private_data;
spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
- kfree(list->hid_debug_buf);
+ kfifo_free(&list->hid_debug_fifo);
kfree(list);
} |
CVE-2019-3846 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/mwifiex/scan.c | mwifiex_update_bss_desc_with_ie | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
int ret = 0;
u8 element_id;
struct ieee_types_fh_param_set *fh_param_set;
struct ieee_types_ds_param_set *ds_param_set;
struct ieee_types_cf_param_set *cf_param_set;
struct ieee_types_... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
int ret = 0;
u8 element_id;
struct ieee_types_fh_param_set *fh_param_set;
struct ieee_types_ds_param_set *ds_param_set;
struct ieee_types_cf_param_set *cf_param_set;
struct ieee_types_... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
int ret = 0;
u8 element_id;
struct ieee_types_fh_param_set *fh_param_set;
struct ieee_types_ds_param_set *ds_param_set;
struct ieee_types_cf_param_set *cf_param_set;
struct ieee_types_... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
int ret = 0;
u8 element_id;
struct ieee_types_fh_param_set *fh_param_set;
struct ieee_types_ds_param_set *ds_param_set;
struct ieee_types_cf_param_set *cf_param_set;
struct ieee_types_... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
current_ptr = bss_entry->beacon_buf;
while (bytes_left >= 2) {
element_id = *current_ptr;
element_len = *(current_ptr + 1);
total_ie_len = element_len + sizeof(struct ieee_type... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
current_ptr = bss_entry->beacon_buf;
while (bytes_left >= 2) {
element_id = *current_ptr;
element_len = *(current_ptr + 1);
total_ie_len = element_len + sizeof(struct ieee_type... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
current_ptr = bss_entry->beacon_buf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (bytes_left >= 2) {
element_id = *current_ptr;
... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
current_ptr = bss_entry->beacon_buf;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (bytes_left >= 2) {
element_id = *current_ptr;
... | int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, struct mwifiex_bssdescriptor *bss_entry) {
current_ptr = bss_entry->beacon_buf;
while (bytes_left >= 2) {
element_id = *current_ptr;
element_len = *(current_ptr + 1);
total_ie_len = element_len + sizeof(struct iee... |
CVE-2019-3882 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/vfio_iommu_type1.c | vfio_dma_do_map | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
int ret = 0, prot = 0;
uint64_t mask;
struct vfio_dma *dma;
if (map->size != size || map->vaddr != vaddr || map... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
int ret = 0, prot = 0;
uint64_t mask;
struct vfio_dma *dma;
if (map->size != size || map->vaddr != vaddr || map... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
long npage;
int ret = 0, prot = 0;
uint64_t mask;
struct vfio_dma *dma;
unsigned long pfn;
if (map->siz... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
long npage;
int ret = 0, prot = 0;
uint64_t mask;
struct vfio_dma *dma;
unsigned long pfn;
if (map->siz... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
int ret = 0, prot = 0;
if (map->size != size || map->vaddr != vaddr || map->iova != iova) {
return -EVAL;
}... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
int ret = 0, prot = 0;
if (map->size != size || map->vaddr != vaddr || map->iova != iova) {
return -EVAL;
}... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0, prot = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0, prot = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int vfio_dma_do_map(struct vfio_iommu *iommu, struct vfio_iommu_type1_dma_map *map) {
dma_addr_t iova = map->iova;
unsigned long vaddr = map->vaddr;
size_t size = map->size;
int ret = 0, prot = 0;
if (map->size != size || map->vaddr != vaddr || map->iova != iova) {
return -EVAL... |
CVE-2019-3882 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/vfio_iommu_type1.c | vfio_iommu_type1_open | static void *vfio_iommu_type1_open(unsigned long arg) {
struct vfio_iommu *iommu;
iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
if (!iommu) {
return ERR_PTR(-ENOMEM);
}
switch (arg) {
case VFIO_TYPE1_IOMMU:
break;
case VFIO_TYPE1_NESTG_IOMMU:
iommu->nesting = true;
... | static void *vfio_iommu_type1_open(unsigned long arg) {
struct vfio_iommu *iommu;
iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
if (!iommu) {
return ERR_PTR(-ENOMEM);
}
switch (arg) {
case VFIO_TYPE1_IOMMU:
break;
case VFIO_TYPE1_NESTG_IOMMU:
iommu->nesting = true;
... | static void *vfio_iommu_type1_open(unsigned long arg) {
struct vfio_iommu *iommu;
iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
if (!iommu) {
return ERR_PTR(-ENOMEM);
}
switch (arg) {
case VFIO_TYPE1_IOMMU:
break;
case VFIO_TYPE1_NESTG_IOMMU:
iommu->nesting = true;
... | static void *vfio_iommu_type1_open(unsigned long arg) {
struct vfio_iommu *iommu;
iommu = kzalloc(sizeof(*iommu), GFP_KERNEL);
if (!iommu) {
return ERR_PTR(-ENOMEM);
}
switch (arg) {
case VFIO_TYPE1_IOMMU:
break;
case VFIO_TYPE1_NESTG_IOMMU:
iommu->nesting = true;
... | static void *vfio_iommu_type1_open(unsigned long arg) {
iommu->dma_list = RB_ROOT;
mutex_init(&iommu->lock);
return iommu;
}
| static void *vfio_iommu_type1_open(unsigned long arg) {
iommu->dma_list = RB_ROOT;
iommu->dma_avail = dma_entry_limit;
mutex_init(&iommu->lock);
return iommu;
}
| static void *vfio_iommu_type1_open(unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
iommu->dma_list = RB_ROOT;
mutex_init(&iommu->lock);
return iommu;
}
| static void *vfio_iommu_type1_open(unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
iommu->dma_list = RB_ROOT;
iommu->dma_avail = dma_entry_limit;
mutex_init(&iommu->lock);
return iommu;
} | static void *vfio_iommu_type1_open(unsigned long arg) {
iommu->dma_list = RB_ROOT;
+ iommu->dma_avail = dma_entry_limit;
mutex_init(&iommu->lock);
return iommu;
} |
CVE-2019-3882 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vfio/vfio_iommu_type1.c | vfio_remove_dma | static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma, true);
vfio_unlink_dma(iommu, dma);
put_task_struct(dma->task);
kfree(dma);
} | static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma, true);
vfio_unlink_dma(iommu, dma);
put_task_struct(dma->task);
kfree(dma);
iommu->dma_avail++;
} | static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma);
vfio_unlink_dma(iommu, dma);
kfree(dma);
} | static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma);
vfio_unlink_dma(iommu, dma);
kfree(dma);
iommu->dma_avail++;
} | static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma, true);
vfio_unlink_dma(iommu, dma);
put_task_struct(dma->task);
kfree(dma);
}
| static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma, true);
vfio_unlink_dma(iommu, dma);
put_task_struct(dma->task);
kfree(dma);
iommu->dma_avail++;
}
| static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma);
vfio_unlink_dma(iommu, dma);
kfree(dma);
}
| static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma);
vfio_unlink_dma(iommu, dma);
kfree(dma);
iommu->dma_avail++;
} | static void vfio_remove_dma(struct vfio_iommu *iommu, struct vfio_dma *dma) {
vfio_unmap_unpin(iommu, dma, true);
vfio_unlink_dma(iommu, dma);
put_task_struct(dma->task);
kfree(dma);
+ iommu->dma_avail++;
} |
CVE-2019-3900 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vhost/net.c | handle_rx | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned uninitialized_var(in), log;
struct vhost_log *vq_log;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .m... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned uninitialized_var(in), log;
struct vhost_log *vq_log;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .m... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned uninitialized_var(in), log;
struct vhost_log *vq_log;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .m... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned uninitialized_var(in), log;
struct vhost_log *vq_log;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .m... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG_DONTWAIT,
};
size_t total_l... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG_DONTWAIT,
};
size_t total_l... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .m... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .m... | static void handle_rx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG_DONTWAIT,
};
size_t ... |
CVE-2019-3900 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/vhost/net.c | handle_tx | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned out, in;
int head;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned out, in;
int head;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned out, in;
int head;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned out, in;
int head;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG_DONTWAIT,
};
size_t len, to... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG_DONTWAIT,
};
size_t len, to... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .m... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .m... | static void handle_tx(struct vhost_net *net) {
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
struct msghdr msg = {
.msg_name = NULL, .msg_namelen = 0, .msg_control = NULL, .msg_controllen = 0, .msg_flags = MSG_DONTWAIT,
};
size_t ... |
CVE-2019-3900 | 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;
struct sk_buff **queue;
int i;
n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL);
if (!n) {
return -ENOMEM;
}
vqs = kmalloc(VHOST... | static int vhost_net_open(struct inode *inode, struct file *f) {
struct vhost_net *n;
struct vhost_dev *dev;
struct vhost_virtqueue **vqs;
struct sk_buff **queue;
int i;
n = kvmalloc(sizeof *n, GFP_KERNEL | __GFP_RETRY_MAYFAIL);
if (!n) {
return -ENOMEM;
}
vqs = kmalloc(VHOST... | static int vhost_net_open(struct inode *inode, struct file *f) {
struct vhost_net *n;
struct vhost_dev *dev;
struct vhost_virtqueue **vqs;
int i;
n = kmalloc(sizeof *n, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
if (!n) {
n = vmalloc(sizeof *n);
if (!n) {
return -ENOM... | static int vhost_net_open(struct inode *inode, struct file *f) {
struct vhost_net *n;
struct vhost_dev *dev;
struct vhost_virtqueue **vqs;
int i;
n = kmalloc(sizeof *n, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
if (!n) {
n = vmalloc(sizeof *n);
if (!n) {
return -ENOM... | 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(VHOST_NET_VQ_MAX * sizeof(*vqs), GFP_KERNEL);
if (!vqs) {
return -ENOMEM;
}
dev = &n->dev;
for (i = 0; i <... | 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(VHOST_NET_VQ_MAX * sizeof(*vqs), GFP_KERNEL);
if (!vqs) {
return -ENOMEM;
}
dev = &n->dev;
for (i = 0; i <... | static int vhost_net_open(struct inode *inode, struct file *f) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
n = kmalloc(sizeof *n, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
if (!n) {
n = vmalloc(sizeof *n);
if (!n) {
return -ENOMEM;
}
}
vqs = kmalloc(VHOST_NET... | static int vhost_net_open(struct inode *inode, struct file *f) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
n = kmalloc(sizeof *n, GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT);
if (!n) {
n = vmalloc(sizeof *n);
if (!n) {
return -ENOMEM;
}
}
vqs = kmalloc(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(VHOST_NET_VQ_MAX * sizeof(*vqs), GFP_KERNEL);
if (!vqs) {
return -ENOMEM;
}
dev = &n->dev;
for ... |
CVE-2019-3901 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/events/core.c | find_lively_task_by_vpid | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
int err;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
rcu_read_unlock();
if (!task... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
rcu_read_unlock();
if (!task) {
r... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
int err;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
rcu_read_unlock();
if (!task... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
rcu_read_unlock();
if (!task) {
r... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
int err;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
if (!task) {
return ERR_... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
if (!task) {
return ERR_PTR(-ESRCH);
... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
int err;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
/* PLACEHOLDER: DO NOT DELETE TH... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static struct task_struct * find_lively_task_by_vpid(pid_t vpid) {
struct task_struct *task;
- int err;
rcu_read_lock();
if (!vpid) {
task = current;
} else {
task = find_task_by_vpid(vpid);
}
if (task) {
get_task_struct(task);
}
if (!task) {
... |
CVE-2019-5108 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mac80211/cfg.c | ieee80211_add_station | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *sdata;
int err;
int layer2_update;
if (params->vlan) {
... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *sdata;
int err;
if (params->vlan) {
sdata = IEEE80211_DEV_T... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *sdata;
int err;
int layer2_update;
if (params->vlan) {
... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *sdata;
int err;
if (params->vlan) {
sdata = IEEE80211_DEV_T... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
int err;
int layer2_update;
if (params->vlan) {
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN && sdata->vif.type != NL80211_IFTYPE_AP) {
return -EVAL;
... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
int err;
if (params->vlan) {
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN && sdata->vif.type != NL80211_IFTYPE_AP) {
return -EVAL;
}
} else {
}
... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err;
int layer2_update;
if (params->vlan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sdata->vif.type !=... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err;
if (params->vlan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN... | static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
int err;
- int layer2_update;
if (params->vlan) {
if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN && sdata->vif.type != NL80211_IFTYPE_AP) {
return -EVAL;
... |
CVE-2019-5108 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mac80211/cfg.c | ieee80211_change_station | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
switch (sdata->vif.type) {
case NL80211_IFTYPE_MESH_POT:
if (sdata->u.mesh.user_mpm) {
statype = CFG8021... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
switch (sdata->vif.type) {
case NL80211_IFTYPE_MESH_POT:
if (sdata->u.mesh.user_mpm) {
statype = CFG8021... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ieee80211_local *local = wiphy_priv(wiphy);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (sdata->vif.type) {
... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ieee80211_local *local = wiphy_priv(wiphy);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (sdata->vif.type) {
... | static int ieee80211_change_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_parameters *params) {
struct ieee80211_local *local = wiphy_priv(wiphy);
switch (sdata->vif.type) {
case NL80211_IFTYPE_MESH_POT:
if (sdata->u.mesh.user_mpm) {
statype = C... |
CVE-2019-5108 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mac80211/sta_info.c | sta_info_move_state | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
might_sleep();
if (sta->sta_state == new_state) {
return 0;
}
switch (new_state) {
case IEEE80211_STA_NONE:
if (sta->sta_state != IEEE80211_STA_AUTH) {
return -EVAL;
}
brea... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
might_sleep();
if (sta->sta_state == new_state) {
return 0;
}
switch (new_state) {
case IEEE80211_STA_NONE:
if (sta->sta_state != IEEE80211_STA_AUTH) {
return -EVAL;
}
brea... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
might_sleep();
if (sta->sta_state == new_state) {
return 0;
}
switch (new_state) {
case IEEE80211_STA_NONE:
if (sta->sta_state != IEEE80211_STA_AUTH) {
return -EVAL;
}
brea... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
might_sleep();
if (sta->sta_state == new_state) {
return 0;
}
switch (new_state) {
case IEEE80211_STA_NONE:
if (sta->sta_state != IEEE80211_STA_AUTH) {
return -EVAL;
}
brea... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
switch (new_state) {
case IEEE80211_STA_AUTHORIZED:
if (sta->sta_state == IEEE80211_STA_ASSOC) {
ieee80211_check_fast_rx(sta);
}
break;
}
sta->sta_state = new_state;
}
| int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
switch (new_state) {
case IEEE80211_STA_AUTHORIZED:
if (sta->sta_state == IEEE80211_STA_ASSOC) {
ieee80211_check_fast_rx(sta);
}
if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN || sta->sdat... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (new_state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case IEEE80211_STA_AUTHORIZED:
if (sta->sta_state == IEEE80211_STA_ASSOC) {
/* PLACEHOLDER: DO ... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (new_state) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case IEEE80211_STA_AUTHORIZED:
if (sta->sta_state == IEEE80211_STA_ASSOC) {
/* PLACEHOLDER: DO ... | int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) {
switch (new_state) {
case IEEE80211_STA_AUTHORIZED:
if (sta->sta_state == IEEE80211_STA_ASSOC) {
ieee80211_check_fast_rx(sta);
}
+ if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN || st... |
CVE-2019-6974 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | virt/kvm/kvm_main.c | kvm_ioctl_create_device | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
if (cd->type >= ARRAY_SIZE(kvm_device_ops_table)) {
return -ENODEV;
}
ops = kvm_devi... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
if (cd->type >= ARRAY_SIZE(kvm_device_ops_table)) {
return -ENODEV;
}
ops = kvm_devi... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
switch (cd->type) {
case KVM_DEV_TYPE_FSL_MPIC_20:
case KVM_DEV_TYPE_FSL_MPIC_42:
op... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
struct kvm_device_ops *ops = NULL;
struct kvm_device *dev;
bool test = cd->flags & KVM_CREATE_DEVICE_TEST;
int ret;
switch (cd->type) {
case KVM_DEV_TYPE_FSL_MPIC_20:
case KVM_DEV_TYPE_FSL_MPIC_42:
op... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
if (ops->init) {
ops->init(dev);
}
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
mutex_lock(&kvm->lock);
mutex_unlock(&kvm->lock);
return ret... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
if (ops->init) {
ops->init(dev);
}
kvm_get_kvm(kvm);
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
kvm_put_kvm(kvm);
mutex_lock(&kvm->lock);
... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ops->init) {
ops->init(dev);
}
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
mutex_lock(&kvm->lock);
... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ops->init) {
ops->init(dev);
}
kvm_get_kvm(kvm);
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
kvm_... | static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) {
if (ops->init) {
ops->init(dev);
}
+ kvm_get_kvm(kvm);
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
if (ret < 0) {
+ kvm_put_kvm(kvm);
mutex_lock(&kvm->lo... |
CVE-2019-7221 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/vmx.c | free_nested | static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
vmx->nested.vmxon = false;
free_vpid(vmx->nested.vpid02);
nested_release_vmcs12(vmx);
if (enable_shadow_vmcs) {
vmcs_clear(vmx->vmcs01.shadow_vmcs);
free_vmcs(vmx->vmcs01.shadow_vmcs);
... | static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
hrtimer_cancel(&vmx->nested.preemption_timer);
vmx->nested.vmxon = false;
free_vpid(vmx->nested.vpid02);
nested_release_vmcs12(vmx);
if (enable_shadow_vmcs) {
vmcs_clear(vmx->vmcs01.shadow_vmc... | static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
vmx->nested.vmxon = false;
if (vmx->nested.current_vmptr != -1ull) {
nested_release_vmcs12(vmx);
vmx->nested.current_vmptr = -1ull;
vmx->nested.current_vmcs12 = NULL;
}
if (enable_... | static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
hrtimer_cancel(&vmx->nested.preemption_timer);
vmx->nested.vmxon = false;
if (vmx->nested.current_vmptr != -1ull) {
nested_release_vmcs12(vmx);
vmx->nested.current_vmptr = -1ull;
vmx->... | static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
vmx->nested.vmxon = false;
}
| static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
hrtimer_cancel(&vmx->nested.preemption_timer);
vmx->nested.vmxon = false;
}
| static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
vmx->nested.vmxon = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
hrtimer_cancel(&vmx->nested.preemption_timer);
vmx->nested.vmxon = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void free_nested(struct vcpu_vmx *vmx) {
if (!vmx->nested.vmxon) {
return;
}
+ hrtimer_cancel(&vmx->nested.preemption_timer);
vmx->nested.vmxon = false;
} |
CVE-2019-7222 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | kvm_read_guest_virt | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
} | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
memset(exception, 0, sizeof(*exception));
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, excep... | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
} | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
memset(exception, 0, sizeof(*exception));
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, excep... | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
}
| int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
memset(exception, 0, sizeof(*exception));
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, excep... | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
}
| int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
memset(exception, 0, sizeof(*exception));
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, excep... | int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) {
u32 access = (kvm_x86_ops->get_cpl(vcpu) == 3) ? PFERR_USER_MASK : 0;
+ memset(exception, 0, sizeof(*exception));
return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, e... |
CVE-2019-7308 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/verifier.c | adjust_scalar_min_max_vals | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
bool src_known, dst_known;
s64 smin_val, smax_val;
u64 umin_val, umax_... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
bool src_known, dst_known;
s64 smin_val, smax_val;
u64 umin_val, umax_... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
bool src_known, dst_known;
s64 smin_val, smax_val;
u64 umin_val, umax_... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u8 opcode = BPF_OP(insn->code);
bool src_known, dst_known;
s64 smin_val, smax_val;
u64 umin_val, umax_... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32;
switch (opcode) {
case BPF_ADD:
... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32;
u32 dst = insn->dst_reg;
int ret;
s... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 3... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 3... | static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) {
struct bpf_reg_state *regs = cur_regs(env);
u64 insn_bitness = (BPF_CLASS(insn->code) == BPF_ALU64) ? 64 : 32;
+ u32 dst = insn->dst_reg;
+ int ret;
... |
CVE-2019-7308 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/verifier.c | sanitize_ptr_alu | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = ptr_reg == dst_reg;
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = ptr_reg == dst_reg;
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = ptr_reg == dst_reg;
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = ptr_reg == dst_reg;
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_insn_aux_data *aux = cur_aux(env);
u8 opcode = BPF_OP(insn->code);
bool ret;
if (env->allow_ptr_leaks || BPF_SRC(insn->code) ... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_insn_aux_data *aux = cur_aux(env);
u8 opcode = BPF_OP(insn->code);
bool ret;
if (can_skip_alu_sanitation(env, insn)) {
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct bpf_insn_aux_data *aux = cur_aux(env);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct bpf_insn_aux_data *aux = cur_aux(env);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int sanitize_ptr_alu(struct bpf_verifier_env *env, struct bpf_insn *insn, const struct bpf_reg_state *ptr_reg, struct bpf_reg_state *dst_reg, bool off_is_neg) {
struct bpf_insn_aux_data *aux = cur_aux(env);
u8 opcode = BPF_OP(insn->code);
bool ret;
- if (env->allow_ptr_leaks || BPF_SRC(insn->c... |
CVE-2019-8912 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | crypto/af_alg.c | af_alg_release | int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
}
return 0;
} | int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
sock->sk = NULL;
}
return 0;
} | int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
}
return 0;
} | int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
sock->sk = NULL;
}
return 0;
} | int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
}
return 0;
}
| int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
sock->sk = NULL;
}
return 0;
}
| int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
}
return 0;
}
| int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
sock->sk = NULL;
}
return 0;
} | int af_alg_release(struct socket *sock) {
if (sock->sk) {
sock_put(sock->sk);
+ sock->sk = NULL;
}
return 0;
} |
CVE-2019-8956 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sctp/socket.c | sctp_sendmsg | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_transport *transport = NULL;
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc;
struct sctp_cmsgs cmsgs;
union sctp_addr *daddr;
bool new ... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_transport *transport = NULL;
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc, *tmp;
struct sctp_cmsgs cmsgs;
union sctp_addr *daddr;
boo... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_transport *transport = NULL;
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc;
struct sctp_cmsgs cmsgs;
union sctp_addr *daddr;
bool new ... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_transport *transport = NULL;
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc, *tmp;
struct sctp_cmsgs cmsgs;
union sctp_addr *daddr;
boo... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc;
struct sctp_cmsgs cmsgs;
if ((sflags & SCTP_SENDALL) && sctp_style(sk, UDP)) {
list_for_each_entry(... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc, *tmp;
struct sctp_cmsgs cmsgs;
if ((sflags & SCTP_SENDALL) && sctp_style(sk, UDP)) {
list_for_each_... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc;
struct sctp_cmsgs cmsgs;
/* PLACEHOLDER: DO NOT DELETE TH... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sctp_sndrcvinfo _sinfo, *sinfo;
struct sctp_association *asoc, *tmp;
struct sctp_cmsgs cmsgs;
/* PLACEHOLDER: DO NOT DEL... | static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_sndrcvinfo _sinfo, *sinfo;
- struct sctp_association *asoc;
+ struct sctp_association *asoc, *tmp;
struct sctp_cmsgs cmsgs;
if ((sflags & SCTP_SENDALL) && sct... |
CVE-2019-8980 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/exec.c | kernel_read_file | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
loff_t i_size, pos;
ssize_t bytes = 0;
int ret;
if (!S_ISREG(file_inode(file)->i_mode) || max_size < 0) {
return -EVAL;
}
ret = deny_write_access(file);
if (ret) {
... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
loff_t i_size, pos;
ssize_t bytes = 0;
int ret;
if (!S_ISREG(file_inode(file)->i_mode) || max_size < 0) {
return -EVAL;
}
ret = deny_write_access(file);
if (ret) {
... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
loff_t i_size, pos;
ssize_t bytes = 0;
int ret;
if (!S_ISREG(file_inode(file)->i_mode) || max_size < 0) {
return -EVAL;
}
ret = security_kernel_read_file(file, id);
if (r... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
loff_t i_size, pos;
ssize_t bytes = 0;
int ret;
if (!S_ISREG(file_inode(file)->i_mode) || max_size < 0) {
return -EVAL;
}
ret = security_kernel_read_file(file, id);
if (r... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
while (pos < i_size) {
bytes = kernel_read(file, *buf + pos, i_size - pos, &pos);
if (bytes < 0) {
ret = bytes;
goto out;
}
if (bytes == 0) {
... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
while (pos < i_size) {
bytes = kernel_read(file, *buf + pos, i_size - pos, &pos);
if (bytes < 0) {
ret = bytes;
goto out_free;
}
if (bytes == 0) {... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (pos < i_size) {
bytes = kernel_read(file, pos, (char *)(*buf) + pos, i_size - pos);
if (bytes < 0) {
ret = bytes;
... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (pos < i_size) {
bytes = kernel_read(file, pos, (char *)(*buf) + pos, i_size - pos);
if (bytes < 0) {
ret = bytes;
... | int kernel_read_file(struct file *file, void **buf, loff_t *size, loff_t max_size, enum kernel_read_file_id id) {
while (pos < i_size) {
bytes = kernel_read(file, *buf + pos, i_size - pos, &pos);
if (bytes < 0) {
ret = bytes;
- goto out;
+ goto out_free;
... |
CVE-2019-9003 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_msghandler.c | free_user | static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
kfree(user);
} | static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
cleanup_srcu_struct(&user->release_barrier);
kfree(user);
} | static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
kfree(user);
} | static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
cleanup_srcu_struct(&user->release_barrier);
kfree(user);
} | static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
kfree(user);
}
| static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
cleanup_srcu_struct(&user->release_barrier);
kfree(user);
}
| static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
kfree(user);
}
| static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
cleanup_srcu_struct(&user->release_barrier);
kfree(user);
} | static void free_user(struct kref *ref) {
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
+ cleanup_srcu_struct(&user->release_barrier);
kfree(user);
} |
CVE-2019-9003 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/ipmi/ipmi_msghandler.c | ipmi_destroy_user | int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
} | int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
kref_put(&user->refcount, free_user);
return 0;
} | int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
} | int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
kref_put(&user->refcount, free_user);
return 0;
} | int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
}
| int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
kref_put(&user->refcount, free_user);
return 0;
}
| int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
}
| int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
kref_put(&user->refcount, free_user);
return 0;
} | int ipmi_destroy_user(struct ipmi_user *user) {
_ipmi_destroy_user(user);
- cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
} |
CVE-2019-9162 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/nf_nat_snmp_basic_main.c | snmp_helper | int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata = (__be32 *)data;
if (*pdata == ctx->from) {
pr_debug("%s: %pI4 to %pI4\n", __func__, (void *)&ctx->from, (void *)&ctx->to);
i... | int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata;
if (datalen != 4) {
return -EVAL;
}
pdata = (__be32 *)data;
if (*pdata == ctx->from) {
pr_debug("%s: %pI4 to %pI4... | int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata = (__be32 *)data;
if (*pdata == ctx->from) {
pr_debug("%s: %pI4 to %pI4\n", __func__, (void *)&ctx->from, (void *)&ctx->to);
i... | int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata;
if (datalen != 4) {
return -EVAL;
}
pdata = (__be32 *)data;
if (*pdata == ctx->from) {
pr_debug("%s: %pI4 to %pI4... | int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata = (__be32 *)data;
}
| int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata;
if (datalen != 4) {
return -EVAL;
}
pdata = (__be32 *)data;
}
| int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata = (__be32 *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
__be32 *pdata;
if (datalen != 4) {
return -EVAL;
}
pdata = (__be32 *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | int snmp_helper(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
struct snmp_ctx *ctx = (struct snmp_ctx *)context;
- __be32 *pdata = (__be32 *)data;
+ __be32 *pdata;
+ if (datalen != 4) {
+ return -EVAL;
+ }
+ pdata = (__be32 *)data;
} |
CVE-2019-9162 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/nf_nat_snmp_basic_main.c | snmp_version | int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
} | int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (datalen != 1) {
return -EVAL;
}
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
} | int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
} | int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (datalen != 1) {
return -EVAL;
}
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
} | int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
}
| int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (datalen != 1) {
return -EVAL;
}
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
}
| int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
}
| int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
if (datalen != 1) {
return -EVAL;
}
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
} | int snmp_version(void *context, size_t hdrlen, unsigned char tag, const void *data, size_t datalen) {
+ if (datalen != 1) {
+ return -EVAL;
+ }
if (*(unsigned char *)data > 1) {
return -ENOTSUPP;
}
return 1;
} |
CVE-2019-9213 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/mmap.c | expand_downwards | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
int error;
address &= PAGE_MASK;
error = security_mmap_addr(address);
if (error) {
return error;
}
prev = vma->vm_prev;
if (prev && !(prev... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
int error = 0;
address &= PAGE_MASK;
if (address < mmap_min_addr) {
return -EPERM;
}
prev = vma->vm_prev;
if (prev && !(prev->vm_flags & VM_GR... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct vm_area_struct *prev;
int error;
address &= PAGE_MASK;
error = security_mmap_addr(address);
if (error) {
return error;
}
prev = vma->vm_prev;
if (prev && !(prev->vm_flags & VM_GROWSDOWN) && (prev->vm... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct vm_area_struct *prev;
int error = 0;
address &= PAGE_MASK;
if (address < mmap_min_addr) {
return -EPERM;
}
prev = vma->vm_prev;
if (prev && !(prev->vm_flags & VM_GROWSDOWN) && (prev->vm_flags & (VM_WRITE... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
int error;
address &= PAGE_MASK;
error = security_mmap_addr(address);
if (error) {
return error;
}
prev = vma->vm_prev;
if (prev && !(prev... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
int error = 0;
address &= PAGE_MASK;
if (address < mmap_min_addr) {
return -EPERM;
}
prev = vma->vm_prev;
if (prev && !(prev->vm_flags & VM_GR... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct vm_area_struct *prev;
int error;
address &= PAGE_MASK;
error = security_mmap_addr(address);
if (error) {
return error;
}
prev = vma->vm_prev;
if (prev && !(prev->vm_flags & VM_GROWSDOWN) && (prev->vm... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct vm_area_struct *prev;
int error = 0;
address &= PAGE_MASK;
if (address < mmap_min_addr) {
return -EPERM;
}
prev = vma->vm_prev;
if (prev && !(prev->vm_flags & VM_GROWSDOWN) && (prev->vm_flags & (VM_WRITE... | int expand_downwards(struct vm_area_struct *vma, unsigned long address) {
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *prev;
- int error;
+ int error = 0;
address &= PAGE_MASK;
- error = security_mmap_addr(address);
- if (error) {
- return error;
+ if (address < mmap_m... |
CVE-2019-9245 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/xattr.c | f2fs_getxattr | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
int error = 0;
unsigned int size, len;
void *base_addr = NULL;
if (name == NULL) {
return -EVAL;
}
len = strlen(name);
... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
int error = 0;
unsigned int size, len;
void *base_addr = NULL;
int base_size;
if (name == NULL) {
return -EVAL;
}
len... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
int error = 0;
unsigned int size, len;
void *base_addr = NULL;
if (name == NULL) {
return -EVAL;
}
len = strlen(name);
... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
int error = 0;
unsigned int size, len;
void *base_addr = NULL;
int base_size;
if (name == NULL) {
return -EVAL;
}
len... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
void *base_addr = NULL;
if (name == NULL) {
return -EVAL;
}
len = strlen(name);
if (len > F2FS_NAME_LEN) {
return -ER... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
void *base_addr = NULL;
int base_size;
if (name == NULL) {
return -EVAL;
}
len = strlen(name);
if (len > F2FS_NAME_LEN) {... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
void *base_addr = NULL;
if (name == NULL) {
return -EVAL;
}
len = strlen(name);... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
void *base_addr = NULL;
int base_size;
if (name == NULL) {
return -EVAL;
}
... | int f2fs_getxattr(struct inode *inode, int index, const char *name, void *buffer, size_t buffer_size, struct page *ipage) {
struct f2fs_xattr_entry *entry = NULL;
void *base_addr = NULL;
+ int base_size;
if (name == NULL) {
return -EVAL;
}
len = strlen(name);
if (len > F2FS_NA... |
CVE-2019-9245 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/xattr.c | lookup_all_xattrs | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ? VALID_XATTR_BLO... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ?... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ? VALID_XATTR_BLO... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ?... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr) {
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ? VALID_XATTR_BLOCK_SIZE : 0;
unsigned int inline_size = inline_xa... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ? VALID_XATTR_BLOCK_SIZE : 0;
unsigned int inline_... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ? VALID_XATTR_BLOCK_... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ? VA... | -static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr) {
+static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xatt... |
CVE-2019-9445 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/dir.c | f2fs_fill_dentries | int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
unsigned char d_type = DT_UNKNOWN;
unsigned int bit_pos;
struct f2fs_dir_entry *de = NULL;
struct fscrypt_str de_name = FSTR_IT(NULL, 0);
struct f2fs_sb_info *sbi = F2FS_I_S... | int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
unsigned char d_type = DT_UNKNOWN;
unsigned int bit_pos;
struct f2fs_dir_entry *de = NULL;
struct fscrypt_str de_name = FSTR_IT(NULL, 0);
struct f2fs_sb_info *sbi = F2FS_I_S... | bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
unsigned char d_type = DT_UNKNOWN;
unsigned int bit_pos;
struct f2fs_dir_entry *de = NULL;
struct fscrypt_str de_name = FSTR_IT(NULL, 0);
bit_pos = ((unsigned long)ctx->pos... | bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
unsigned char d_type = DT_UNKNOWN;
unsigned int bit_pos;
struct f2fs_dir_entry *de = NULL;
struct fscrypt_str de_name = FSTR_IT(NULL, 0);
bit_pos = ((unsigned long)ctx->pos... | int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
bit_pos = ((unsigned long)ctx->pos % d->max);
while (bit_pos < d->max) {
bit_pos = find_next_bit_le(d->bitmap, d->max, bit_pos);
if (bit_pos >= d->max) {
bre... | int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
bit_pos = ((unsigned long)ctx->pos % d->max);
while (bit_pos < d->max) {
bit_pos = find_next_bit_le(d->bitmap, d->max, bit_pos);
if (bit_pos >= d->max) {
bre... | bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bit_pos = ((unsigned long)ctx->pos % d->max);
while (bit_pos < d->max) {
bit_pos = find_next_bit_le(d->bitmap, d->max, bit_pos... | bool f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bit_pos = ((unsigned long)ctx->pos % d->max);
while (bit_pos < d->max) {
bit_pos = find_next_bit_le(d->bitmap, d->max, bit_pos... | int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, unsigned int start_pos, struct fscrypt_str *fstr) {
bit_pos = ((unsigned long)ctx->pos % d->max);
while (bit_pos < d->max) {
bit_pos = find_next_bit_le(d->bitmap, d->max, bit_pos);
if (bit_pos >= d->max) {
... |
CVE-2019-9453 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/xattr.c | __f2fs_setxattr | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr;
int found, newsize;
size_t len;
__u32 new_hsize;
int error = 0;
if (name == NULL) {
ret... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr, *last_base_addr;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
int found, newsize;
size_t len;
__u32 new... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr;
int found, newsize;
size_t len;
__u32 new_hsize;
int error = 0;
if (name == NULL) {
ret... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr, *last_base_addr;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
int found, newsize;
size_t len;
__u32 new... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr;
int found, newsize;
int error = 0;
if (name == NULL) {
return -EVAL;
}
if (value == NUL... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr, *last_base_addr;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
int found, newsize;
int error = 0;
if (na... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr;
int found, newsize;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int error = 0;
if (name == NULL) ... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
void *base_addr, *last_base_addr;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
int found, newsize;
/* PLACEHOLDER: DO NOT DE... | static int __f2fs_setxattr(struct inode *inode, int index, const char *name, const void *value, size_t size, struct page *ipage, int flags) {
struct f2fs_xattr_entry *here, *last;
- void *base_addr;
+ void *base_addr, *last_base_addr;
+ nid_t xnid = F2FS_I(inode)->i_xattr_nid;
int found, newsize;
... |
CVE-2019-9453 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/xattr.c | __find_xattr | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, int index, size_t len, const char *name) {
struct f2fs_xattr_entry *entry;
list_for_each_xattr(entry, base_addr) {
if (entry->e_name_index != index) {
continue;
}
if (entry->e_name_len != len) {
continu... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, void *last_base_addr, int index, size_t len, const char *name) {
struct f2fs_xattr_entry *entry;
list_for_each_xattr(entry, base_addr) {
if ((void *)(entry) + sizeof(__u32) > last_base_addr || (void *)XATTR_NEXT_ENTRY(entry) > last_base_addr)... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, int index, size_t len, const char *name) {
struct f2fs_xattr_entry *entry;
list_for_each_xattr(entry, base_addr) {
if (entry->e_name_index != index) {
continue;
}
if (entry->e_name_len != len) {
continu... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, void *last_base_addr, int index, size_t len, const char *name) {
struct f2fs_xattr_entry *entry;
list_for_each_xattr(entry, base_addr) {
if ((void *)(entry) + sizeof(__u32) > last_base_addr || (void *)XATTR_NEXT_ENTRY(entry) > last_base_addr)... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, int index, size_t len, const char *name) {
list_for_each_xattr(entry, base_addr) {
if (entry->e_name_index != index) {
continue;
}
if (entry->e_name_len != len) {
continue;
}
if (!memcmp(ent... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, void *last_base_addr, int index, size_t len, const char *name) {
list_for_each_xattr(entry, base_addr) {
if ((void *)(entry) + sizeof(__u32) > last_base_addr || (void *)XATTR_NEXT_ENTRY(entry) > last_base_addr) {
return NULL;
... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, int index, size_t len, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_xattr(entry, base_addr) {
if (entry->e_name_index != index) {
continue;
}
if (entry->e_name_len != len) {
... | static struct f2fs_xattr_entry *__find_xattr(void *base_addr, void *last_base_addr, int index, size_t len, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_xattr(entry, base_addr) {
if ((void *)(entry) + sizeof(__u32) > last_base_addr || (void *)XATTR_NEXT_ENTRY(entry) > l... | -static struct f2fs_xattr_entry *__find_xattr(void *base_addr, int index, size_t len, const char *name) {
+static struct f2fs_xattr_entry *__find_xattr(void *base_addr, void *last_base_addr, int index, size_t len, const char *name) {
list_for_each_xattr(entry, base_addr) {
+ if ((void *)(entry) + sizeof(__u... |
CVE-2019-9453 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/xattr.c | lookup_all_xattrs | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ?... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_txattr_addr;
void *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ?... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_txattr_addr;
void *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ?... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_txattr_addr;
void *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
unsigned int size = xnid ?... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
void *cur_addr, *txattr_addr, *last_txattr_addr;
void *last_addr = NULL;
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
... | static int lookup_all_xattrs(struct inode *inode, struct page *ipage, unsigned int index, unsigned int len, const char *name, struct f2fs_xattr_entry **xe, void **base_addr, int *base_size) {
- void *cur_addr, *txattr_addr, *last_addr = NULL;
+ void *cur_addr, *txattr_addr, *last_txattr_addr;
+ void *last_add... |
CVE-2019-9455 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/common/videobuf2/videobuf2-v4l2.c | vb2_warn_zero_bytesused | static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
static bool check_once;
if (check_once) {
return;
}
check_once = true;
WARN_ON(1);
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
if (vb->vb2_queue->allow_zero_bytesused) {
pr_w... | static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
static bool check_once;
if (check_once) {
return;
}
check_once = true;
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
if (vb->vb2_queue->allow_zero_bytesused) {
pr_warn("use VIDIOC_... | static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
static bool check_once;
if (check_once) {
return;
}
check_once = true;
WARN_ON(1);
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
if (vb->vb2_queue->allow_zero_bytesused) {
pr_w... | static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
static bool check_once;
if (check_once) {
return;
}
check_once = true;
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
if (vb->vb2_queue->allow_zero_bytesused) {
pr_warn("use VIDIOC_... | static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
check_once = true;
WARN_ON(1);
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
}
| static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
check_once = true;
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
}
| static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
check_once = true;
WARN_ON(1);
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
check_once = true;
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void vb2_warn_zero_bytesused(struct vb2_buffer *vb) {
check_once = true;
- WARN_ON(1);
pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
} |
CVE-2019-9456 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/mon/mon_text.c | mon_text_read_t | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
mutex_lock(&rp->... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
mutex_lock(&rp->... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
mutex_lock(&rp->printf_lock);
ptr.cnt = 0;
... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(rp, file);
if (IS_ERR(e... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = ... | static ssize_t mon_text_read_t(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_text_ptr ptr;
- ep = mon_text_read_wait(rp, file);
- if (IS_ERR(ep)) {
- return PTR_ERR(ep);
+ ssize_t ret;
+ mutex_lock(&rp->printf_lock)... |
CVE-2019-9456 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/mon/mon_text.c | mon_text_read_u | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
mutex_lock(&rp->... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
mutex_lock(&rp->... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
mutex_lock(&rp->printf_lock);
ptr.cnt = 0;
... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(rp, file);
if (IS_ERR(e... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mon_text_ptr ptr;
ep = mon_text_read_wait(rp, file);
if (IS_ERR(ep)) {
return PTR_ERR(ep);
}
... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = ... | static ssize_t mon_text_read_u(struct file *file, char *buf, size_t nbytes, loff_t *ppos) {
struct mon_reader_text *rp = file->private_data;
struct mon_text_ptr ptr;
- ep = mon_text_read_wait(rp, file);
- if (IS_ERR(ep)) {
- return PTR_ERR(ep);
+ ssize_t ret;
+ mutex_lock(&rp->printf_lock)... |
CVE-2019-9457 | 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-2019-9458 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-event.c | __v4l2_event_queue_fh | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
struct v4l2_subscribed_event *sev;
struct v4l2_kevent *kev;
bool copy_payload = true;
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
if (!s... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
struct v4l2_subscribed_event *sev;
struct v4l2_kevent *kev;
bool copy_payload = true;
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
fh->se... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
struct v4l2_subscribed_event *sev;
struct v4l2_kevent *kev;
bool copy_payload = true;
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
if (!s... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
struct v4l2_subscribed_event *sev;
struct v4l2_kevent *kev;
bool copy_payload = true;
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
fh->se... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
if (!sev->elems) {
return;
}
fh->sequence++;
if (sev->in_use == sev->elems) {
... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
fh->sequence++;
if (sev->in_use == sev->elems) {
kev = sev->events + sev_pos(sev, 0);
... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
if (!sev->elems) {
return;
}
fh->seque... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
return;
}
fh->sequence++;
if (sev->in_use == sev->elems) {
... | static void __v4l2_event_queue_fh(struct v4l2_fh *fh, const struct v4l2_event *ev, const struct timespec *ts) {
sev = v4l2_event_subscribed(fh, ev->type, ev->id);
if (sev == NULL) {
- return;
- }
- if (!sev->elems) {
return;
}
fh->sequence++;
if (sev->in_use == sev->elems... |
CVE-2019-9458 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-event.c | v4l2_event_subscribe | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
struct v4l2_subscribed_event *sev, *found_ev;
unsigned long flags;
unsigned i;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (ele... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
struct v4l2_subscribed_event *sev, *found_ev;
unsigned long flags;
unsigned i;
int ret = 0;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
struct v4l2_subscribed_event *sev, *found_ev;
unsigned long flags;
unsigned i;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (ele... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
struct v4l2_subscribed_event *sev, *found_ev;
unsigned long flags;
unsigned i;
int ret = 0;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
unsigned i;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (elems < 1) {
elems = 1;
}
sev = kvzalloc(struct_size(sev, even... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
unsigned i;
int ret = 0;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (elems < 1) {
elems = 1;
}
sev = kvzalloc(stru... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned i;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (elems < 1) {
elems =... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned i;
int ret = 0;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (elems < 1) ... | int v4l2_event_subscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub, unsigned elems, const struct v4l2_subscribed_event_ops *ops) {
unsigned i;
+ int ret = 0;
if (sub->type == V4L2_EVENT_ALL) {
return -EVAL;
}
if (elems < 1) {
elems = 1;
}
sev = kvz... |
CVE-2019-9458 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-event.c | v4l2_event_unsubscribe | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
struct v4l2_subscribed_event *sev;
unsigned long flags;
int i;
if (sub->type == V4L2_EVENT_ALL) {
v4l2_event_unsubscribe_all(fh);
return 0;
}
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
struct v4l2_subscribed_event *sev;
unsigned long flags;
int i;
if (sub->type == V4L2_EVENT_ALL) {
v4l2_event_unsubscribe_all(fh);
return 0;
}
mutex_lock(&fh->subscribe_lock);
spin_lock... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
struct v4l2_subscribed_event *sev;
unsigned long flags;
int i;
if (sub->type == V4L2_EVENT_ALL) {
v4l2_event_unsubscribe_all(fh);
return 0;
}
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
struct v4l2_subscribed_event *sev;
unsigned long flags;
int i;
if (sub->type == V4L2_EVENT_ALL) {
v4l2_event_unsubscribe_all(fh);
return 0;
}
mutex_lock(&fh->subscribe_lock);
spin_lock... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
if (sub->type == V4L2_EVENT_ALL) {
return 0;
}
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
sev = v4l2_event_subscribed(fh, sub->type, sub->id);
if (sev && sev->ops && sev->ops->del) {
sev->o... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
if (sub->type == V4L2_EVENT_ALL) {
return 0;
}
mutex_lock(&fh->subscribe_lock);
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
sev = v4l2_event_subscribed(fh, sub->type, sub->id);
if (sev && sev->o... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sub->type == V4L2_EVENT_ALL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return 0;
}
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
sev = v4l2_... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sub->type == V4L2_EVENT_ALL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return 0;
}
mutex_lock(&fh->subscribe_lock);
spin_lock_irqsave(&fh->v... | int v4l2_event_unsubscribe(struct v4l2_fh *fh, const struct v4l2_event_subscription *sub) {
if (sub->type == V4L2_EVENT_ALL) {
return 0;
}
+ mutex_lock(&fh->subscribe_lock);
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
sev = v4l2_event_subscribed(fh, sub->type, sub->id);
if (sev &... |
CVE-2019-9458 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-fh.c | v4l2_fh_exit | void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l_disable_media_source(fh->vdev);
v4l2_event_unsubscribe_all(fh);
fh->vdev = NULL;
} | void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l_disable_media_source(fh->vdev);
v4l2_event_unsubscribe_all(fh);
mutex_destroy(&fh->subscribe_lock);
fh->vdev = NULL;
} | void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l2_event_unsubscribe_all(fh);
fh->vdev = NULL;
} | void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l2_event_unsubscribe_all(fh);
mutex_destroy(&fh->subscribe_lock);
fh->vdev = NULL;
} | void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l_disable_media_source(fh->vdev);
v4l2_event_unsubscribe_all(fh);
fh->vdev = NULL;
}
| void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l_disable_media_source(fh->vdev);
v4l2_event_unsubscribe_all(fh);
mutex_destroy(&fh->subscribe_lock);
fh->vdev = NULL;
}
| void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l2_event_unsubscribe_all(fh);
fh->vdev = NULL;
}
| void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l2_event_unsubscribe_all(fh);
mutex_destroy(&fh->subscribe_lock);
fh->vdev = NULL;
} | void v4l2_fh_exit(struct v4l2_fh *fh) {
if (fh->vdev == NULL) {
return;
}
v4l_disable_media_source(fh->vdev);
v4l2_event_unsubscribe_all(fh);
+ mutex_destroy(&fh->subscribe_lock);
fh->vdev = NULL;
} |
CVE-2019-9458 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-fh.c | v4l2_fh_init | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->vdev = vdev;
fh->ctrl_handler = vdev->ctrl_handler;
IT_LIST_HEAD(&fh->list);
set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
set_bit(_IOC_NR(VIDIOC_G_PRIORITY), vdev->valid_ioctls);
set_bit(_IOC_NR(VIDIOC_S_PRIORITY), vdev->... | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->vdev = vdev;
fh->ctrl_handler = vdev->ctrl_handler;
IT_LIST_HEAD(&fh->list);
set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
set_bit(_IOC_NR(VIDIOC_G_PRIORITY), vdev->valid_ioctls);
set_bit(_IOC_NR(VIDIOC_S_PRIORITY), vdev->... | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->vdev = vdev;
fh->ctrl_handler = vdev->ctrl_handler;
IT_LIST_HEAD(&fh->list);
set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
fh->prio = V4L2_PRIORITY_UNSET;
init_waitqueue_head(&fh->wait);
IT_LIST_HEAD(&fh->available);
... | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->vdev = vdev;
fh->ctrl_handler = vdev->ctrl_handler;
IT_LIST_HEAD(&fh->list);
set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
fh->prio = V4L2_PRIORITY_UNSET;
init_waitqueue_head(&fh->wait);
IT_LIST_HEAD(&fh->available);
... | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->sequence = -1;
}
| void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->sequence = -1;
mutex_init(&fh->subscribe_lock);
}
| void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fh->sequence = -1;
}
| void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fh->sequence = -1;
mutex_init(&fh->subscribe_lock);
} | void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) {
fh->sequence = -1;
+ mutex_init(&fh->subscribe_lock);
} |
CVE-2019-9500 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | brcmf_wowl_nd_results | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
brcmf_dbg(SCAN, "Enter\n");
if (e->datalen < (sizeof(*pfn_res... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
brcmf_dbg(SCAN, "Enter\n");
if (e->datalen < (sizeof(*pfn_res... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
brcmf_dbg(SCAN, "Enter\n");
if (e->datalen < (sizeof(*pfn_res... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
brcmf_dbg(SCAN, "Enter\n");
if (e->datalen < (sizeof(*pfn_res... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
pfn_result = (struct brcmf_pno_scanresults_le *)data;
netinfo = brcmf_get_netinfo_array(pfn_result);
memcpy(cfg->wowl.nd->ssid.ssid, netinfo->SSID, netinfo->SSID_len);
cfg->wowl.nd->ssid.ssid_len = neti... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
pfn_result = (struct brcmf_pno_scanresults_le *)data;
netinfo = brcmf_get_netinfo_array(pfn_result);
if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN) {
netinfo->SSID_len = IEEE80211_MAX_SSID_LEN;
... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pfn_result = (struct brcmf_pno_scanresults_le *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data += sizeof(struct brcmf_pno_scanresults_le);
net... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pfn_result = (struct brcmf_pno_scanresults_le *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data += sizeof(struct brcmf_pno_scanresults_le);
net... | static s32 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) {
pfn_result = (struct brcmf_pno_scanresults_le *)data;
netinfo = brcmf_get_netinfo_array(pfn_result);
+ if (netinfo->SSID_len > IEEE80211_MAX_SSID_LEN) {
+ netinfo->SSID_len = IEEE80211_MAX_SSID_LEN... |
CVE-2019-9506 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_check_enc_key_size | static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon->enc_key_size > HCI_M_ENC_KEY_SIZE);
} | static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon->enc_key_size >= HCI_M_ENC_KEY_SIZE);
} | static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!(hcon->link_mode & HCI_LM_ENCRYPT) || hcon->enc_key_size > HCI_M_ENC_KEY_SIZE);
} | static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!(hcon->link_mode & HCI_LM_ENCRYPT) || hcon->enc_key_size >= HCI_M_ENC_KEY_SIZE);
} | static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon->enc_key_size > HCI_M_ENC_KEY_SIZE);
}
| static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon->enc_key_size >= HCI_M_ENC_KEY_SIZE);
}
| static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!(hcon->link_mode & HCI_LM_ENCRYPT) || hcon->enc_key_size > HCI_M_ENC_KEY_SIZE);
}
| static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
return (!(hcon->link_mode & HCI_LM_ENCRYPT) || hcon->enc_key_size >= HCI_M_ENC_KEY_SIZE);
} | static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
- return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon->enc_key_size > HCI_M_ENC_KEY_SIZE);
+ return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) || hcon->enc_key_size >= HCI_M_ENC_KEY_SIZE);
} |
CVE-2019-9857 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/notify/inotify/inotify_user.c | inotify_update_existing_watch | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
struct fsnotify_mark *fsn_mark;
struct inotify_inode_mark *i_mark;
__u32 old_mask, new_mask;
__u32 mask;
int add = (arg & _MASK_ADD);
int create = (arg & _MASK_CREATE);
int ret;
mask = ... | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
struct fsnotify_mark *fsn_mark;
struct inotify_inode_mark *i_mark;
__u32 old_mask, new_mask;
__u32 mask;
int add = (arg & _MASK_ADD);
int create = (arg & _MASK_CREATE);
int ret;
mask = ... | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
struct fsnotify_mark *fsn_mark;
struct inotify_inode_mark *i_mark;
__u32 old_mask, new_mask;
__u32 mask;
int add = (arg & _MASK_ADD);
int create = (arg & _MASK_CREATE);
int ret;
mask = ... | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
struct fsnotify_mark *fsn_mark;
struct inotify_inode_mark *i_mark;
__u32 old_mask, new_mask;
__u32 mask;
int add = (arg & _MASK_ADD);
int create = (arg & _MASK_CREATE);
int ret;
mask = ... | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
if (!fsn_mark) {
return -ENOENT;
} else if (create) {
return -EEXIST;
}
ret = i_mark->wd;
fsnotify_put_mark(fsn_mark);
return ret;
}
| static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
if (!fsn_mark) {
return -ENOENT;
} else if (create) {
ret = -EEXIST;
goto out;
}
ret = i_mark->wd;
out:
fsnotify_put_mark(fsn_mark);
return ret;
}
| static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!fsn_mark) {
return -ENOENT;
} else if (create) {
return -EEXIST;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = i_mark-... | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!fsn_mark) {
return -ENOENT;
} else if (create) {
ret = -EEXIST;
goto out;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int inotify_update_existing_watch(struct fsnotify_group *group, struct inode *inode, u32 arg) {
if (!fsn_mark) {
return -ENOENT;
} else if (create) {
- return -EEXIST;
+ ret = -EEXIST;
+ goto out;
}
ret = i_mark->wd;
+out:
fsnotify_put_mark(fsn_mark);
... |
CVE-2020-0009 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/staging/android/ashmem.c | ashmem_mmap | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
struct ashmem_area *asma = file->private_data;
int ret = 0;
mutex_lock(&ashmem_mutex);
if (unlikely(!asma->size)) {
ret = -EVAL;
goto out;
}
if (vma->vm_end - vma->vm_start > PAGE_ALIGN(asma->size)) {
... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
static struct file_operations vmfile_fops;
struct ashmem_area *asma = file->private_data;
int ret = 0;
mutex_lock(&ashmem_mutex);
if (unlikely(!asma->size)) {
ret = -EVAL;
goto out;
}
if (vma->vm_end - vm... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
struct ashmem_area *asma = file->private_data;
int ret = 0;
mutex_lock(&ashmem_mutex);
if (unlikely(!asma->size)) {
ret = -EVAL;
goto out;
}
if (unlikely((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask)) ... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
static struct file_operations vmfile_fops;
struct ashmem_area *asma = file->private_data;
int ret = 0;
mutex_lock(&ashmem_mutex);
if (unlikely(!asma->size)) {
ret = -EVAL;
goto out;
}
if (unlikely((vma->v... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
struct ashmem_area *asma = file->private_data;
if (!asma->file) {
asma->file = vmfile;
}
get_file(asma->file);
}
| static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
static struct file_operations vmfile_fops;
struct ashmem_area *asma = file->private_data;
if (!asma->file) {
asma->file = vmfile;
if (!vmfile_fops.mmap) {
vmfile_fops = *vmfile->f_op;
vmfile_fops.... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
struct ashmem_area *asma = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!asma->file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
asma->file = vmfile;
}
get_file(asma->file);
/* PLACEH... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
static struct file_operations vmfile_fops;
struct ashmem_area *asma = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!asma->file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
asma->file = vmfile... | static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) {
+ static struct file_operations vmfile_fops;
struct ashmem_area *asma = file->private_data;
if (!asma->file) {
asma->file = vmfile;
+ if (!vmfile_fops.mmap) {
+ vmfile_fops = *vmfile->f_op;
+ vmfi... |
CVE-2020-0041 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_transaction | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *w;
struct binder_work *tcomplete;
binder_size_t buffer_offset = 0;
... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *w;
struct binder_work *tcomplete;
binder_size_t buffer_offset = 0;
... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *w;
struct binder_work *tcomplete;
binder_size_t buffer_offset = 0;
... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
int ret;
struct binder_transaction *t;
struct binder_work *w;
struct binder_work *tcomplete;
binder_size_t buffer_offset = 0;
... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
struct binder_proc *target_proc = NULL;
struct binder_node *target_node = NULL;
struct binder_transaction *in_reply_to = NULL;
uint32_... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
struct binder_proc *target_proc = NULL;
struct binder_node *target_node = NULL;
struct binder_transaction *in_reply_to = NULL;
uint32_... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct binder_proc *target_proc = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
st... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct binder_proc *target_proc = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
st... | static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, struct binder_transaction_data *tr, int reply, binder_size_t extra_buffers_size) {
struct binder_proc *target_proc = NULL;
struct binder_node *target_node = NULL;
struct binder_transaction *in_reply_to = NULL;
ui... |
CVE-2020-0066 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netlink/af_netlink.c | netlink_dump | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct netlink_callback *cb;
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh;
int len, err = -ENOBUFS;
int alloc_size;
mutex_lock(nlk->cb_mutex);
if (!nlk->cb_running) {
err = -EVAL;
goto e... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct netlink_callback *cb;
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh;
int len, err = -ENOBUFS;
int alloc_min_size;
int alloc_size;
mutex_lock(nlk->cb_mutex);
if (!nlk->cb_running) {
err... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct netlink_callback *cb;
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh;
struct module *module;
int err = -ENOBUFS;
int alloc_size;
mutex_lock(nlk->cb_mutex);
if (!nlk->cb_running) {
err =... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct netlink_callback *cb;
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh;
struct module *module;
int err = -ENOBUFS;
int alloc_min_size;
int alloc_size;
mutex_lock(nlk->cb_mutex);
if (!nlk->cb_... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct sk_buff *skb = NULL;
int len, err = -ENOBUFS;
int alloc_size;
if (!nlk->cb_running) {
goto errout_skb;
}
cb = &nlk->cb;
alloc_size = max_t(int, cb->min_dump_alloc, NLMSG_GOODSIZE);
if (!n... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct sk_buff *skb = NULL;
int len, err = -ENOBUFS;
int alloc_min_size;
int alloc_size;
if (!nlk->cb_running) {
goto errout_skb;
}
if (!netlink_rx_is_mmaped(sk) && atomic_read(&sk->sk_rmem_alloc) >... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sk_buff *skb = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct module *module;
int err = -ENOBUFS;
int alloc_size;
/* PLACEHOLDER: DO NOT DELE... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sk_buff *skb = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct module *module;
int err = -ENOBUFS;
int alloc_min_size;
int alloc_size;
/* ... | static int netlink_dump(struct sock *sk) {
struct netlink_sock *nlk = nlk_sk(sk);
struct sk_buff *skb = NULL;
int len, err = -ENOBUFS;
+ int alloc_min_size;
int alloc_size;
if (!nlk->cb_running) {
goto errout_skb;
}
- cb = &nlk->cb;
- alloc_size = max_t(int, cb->min_dump... |
CVE-2020-0067 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/xattr.c | f2fs_listxattr | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
struct f2fs_xattr_entry *entry;
void *base_addr;
int error = 0;
size_t rest = buffer_size;
down_read(&F2FS_I(inode)->i_xattr_sem);
error = read_all_xattrs(inode, NULL, &ba... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
struct f2fs_xattr_entry *entry;
void *base_addr, *last_base_addr;
int error = 0;
size_t rest = buffer_size;
down_read(&F2FS_I(inod... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
struct f2fs_xattr_entry *entry;
void *base_addr;
int error = 0;
size_t rest = buffer_size;
down_read(&F2FS_I(inode)->i_xattr_sem);
error = read_all_xattrs(inode, NULL, &ba... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
struct f2fs_xattr_entry *entry;
void *base_addr, *last_base_addr;
int error = 0;
size_t rest = buffer_size;
down_read(&F2FS_I(inod... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
struct f2fs_xattr_entry *entry;
void *base_addr;
int error = 0;
down_read(&F2FS_I(inode)->i_xattr_sem);
error = read_all_xattrs(inode, NULL, &base_addr);
up_read(&F2FS_I(i... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
struct f2fs_xattr_entry *entry;
void *base_addr, *last_base_addr;
int error = 0;
down_read(&F2FS_I(inode)->i_xattr_sem);
error = r... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
struct f2fs_xattr_entry *entry;
void *base_addr;
int error = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
down_read(&F2FS_I(inode)->i_xattr_sem);
error = read_all_xatt... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
nid_t xnid = F2FS_I(inode)->i_xattr_nid;
struct f2fs_xattr_entry *entry;
void *base_addr, *last_base_addr;
int error = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dow... | ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size) {
struct inode *inode = d_inode(dentry);
+ nid_t xnid = F2FS_I(inode)->i_xattr_nid;
struct f2fs_xattr_entry *entry;
- void *base_addr;
+ void *base_addr, *last_base_addr;
int error = 0;
down_read(&F2FS_I(inode)... |
CVE-2020-0110 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sched/psi.c | psi_write | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
char buf[32];
size_t buf_size;
struct seq_file *seq;
struct psi_trigger *new;
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
buf_size = min(nbytes, sizeof(buf));
... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
char buf[32];
size_t buf_size;
struct seq_file *seq;
struct psi_trigger *new;
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
if (!nbytes) {
return -EVAL;
... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
char buf[32];
size_t buf_size;
struct seq_file *seq;
struct psi_trigger *new;
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
buf_size = min(nbytes, sizeof(buf));
... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
char buf[32];
size_t buf_size;
struct seq_file *seq;
struct psi_trigger *new;
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
if (!nbytes) {
return -EVAL;
... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
buf_size = min(nbytes, sizeof(buf));
if (copy_from_user(buf, user_buf, buf_size)) {
return -EFAULT;
}
buf[buf_size... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
if (!nbytes) {
return -EVAL;
}
buf_size = min(nbytes, sizeof(buf));
if (copy_from_user(buf, user_buf, buf_size)) {... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
buf_size = min(nbytes, sizeof(buf));
if (copy_from_user(buf, user_buf, buf_size)... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
}
if (!nbytes) {
return -EVAL;
}
buf_size = min(nbytes, sizeof(buf));
... | static ssize_t psi_write(struct file *file, const char *user_buf, size_t nbytes, enum psi_res res) {
if (static_branch_likely(&psi_disabled)) {
return -EOPNOTSUPP;
+ }
+ if (!nbytes) {
+ return -EVAL;
}
buf_size = min(nbytes, sizeof(buf));
if (copy_from_user(buf, user_buf, buf... |
CVE-2020-0255 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/selinux/hooks.c | selinux_nlmsg_perm | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int err = 0;
u32 perm;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
if (skb->len < NLMSG_HDRLEN) {
err = -EVAL;
goto out;
}
nlh = nlmsg_hdr(skb);
err = selinux_nlmsg_lookup(... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
int rc = 0;
unsigned int msg_len;
unsigned int data_len = skb->len;
unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
u16 sclass = sksec->sclass;
u32 perm;
w... | static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) {
- int err = 0;
- u32 perm;
+ int rc = 0;
+ unsigned int msg_len;
+ unsigned int data_len = skb->len;
+ unsigned char *data = skb->data;
struct nlmsghdr *nlh;
struct sk_security_struct *sksec = sk->sk_security;
- if (sk... |
CVE-2020-0305 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/char_dev.c | cdev_get | static struct kobject *cdev_get(struct cdev *p) {
struct module *owner = p->owner;
struct kobject *kobj;
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get(&p->kobj);
if (!kobj) {
module_put(owner);
}
return kobj;
} | static struct kobject *cdev_get(struct cdev *p) {
struct module *owner = p->owner;
struct kobject *kobj;
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get_unless_zero(&p->kobj);
if (!kobj) {
module_put(owner);
}
return kobj;
} | static struct kobject *cdev_get(struct cdev *p) {
struct module *owner = p->owner;
struct kobject *kobj;
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get(&p->kobj);
if (!kobj) {
module_put(owner);
}
return kobj;
} | static struct kobject *cdev_get(struct cdev *p) {
struct module *owner = p->owner;
struct kobject *kobj;
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get_unless_zero(&p->kobj);
if (!kobj) {
module_put(owner);
}
return kobj;
} | static struct kobject *cdev_get(struct cdev *p) {
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get(&p->kobj);
return kobj;
}
| static struct kobject *cdev_get(struct cdev *p) {
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get_unless_zero(&p->kobj);
return kobj;
}
| static struct kobject *cdev_get(struct cdev *p) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get(&p->kobj);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return kobj;
}
| static struct kobject *cdev_get(struct cdev *p) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (owner && !try_module_get(owner)) {
return NULL;
}
kobj = kobject_get_unless_zero(&p->kobj);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return kobj;
} | static struct kobject *cdev_get(struct cdev *p) {
if (owner && !try_module_get(owner)) {
return NULL;
}
- kobj = kobject_get(&p->kobj);
+ kobj = kobject_get_unless_zero(&p->kobj);
return kobj;
} |
CVE-2020-0404 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/uvc/uvc_driver.c | uvc_scan_chain_backward | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
struct uvc_entity *entity = *_entity;
struct uvc_entity *term;
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_EXTENSION_UNIT:
case UVC_VC_PROCESSG_UNIT:
id = entity->baSour... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
struct uvc_entity *entity = *_entity;
struct uvc_entity *term;
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_EXTENSION_UNIT:
case UVC_VC_PROCESSG_UNIT:
id = entity->baSour... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
struct uvc_entity *entity = *_entity;
struct uvc_entity *term;
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_EXTENSION_UNIT:
case UVC_VC_PROCESSG_UNIT:
id = entity->baSour... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
struct uvc_entity *entity = *_entity;
struct uvc_entity *term;
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_EXTENSION_UNIT:
case UVC_VC_PROCESSG_UNIT:
id = entity->baSour... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_SELECTOR_UNIT:
for (i = 0; i < entity->bNrInPins; ++i) {
id = entity->baSourceID[i];
term = uvc_entity_by_id(chai... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_SELECTOR_UNIT:
for (i = 0; i < entity->bNrInPins; ++i) {
id = entity->baSourceID[i];
term = uvc_entity_by_id(chai... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case UVC_VC_SELECTOR_UNIT:
/* PLACEHOLDER: DO NOT DEL... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case UVC_VC_SELECTOR_UNIT:
/* PLACEHOLDER: DO NOT DEL... | static int uvc_scan_chain_backward(struct uvc_video_chain *chain, struct uvc_entity **_entity) {
int id = -EVAL, i;
switch (UVC_ENTITY_TYPE(entity)) {
case UVC_VC_SELECTOR_UNIT:
for (i = 0; i < entity->bNrInPins; ++i) {
id = entity->baSourceID[i];
term = uvc_entity_by_... |
CVE-2020-0404 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/uvc/uvc_driver.c | uvc_scan_chain_forward | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
struct uvc_entity *forward;
int found;
forward = NULL;
found = 0;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
struct uvc_entity *forward;
int found;
forward = NULL;
found = 0;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
struct uvc_entity *forward;
int found;
forward = NULL;
found = 0;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
struct uvc_entity *forward;
int found;
forward = NULL;
found = 0;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
forward = NULL;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL) {
break;
}
if (forward == prev) ... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
forward = NULL;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL) {
break;
}
if (forward == prev) ... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
forward = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id,... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
forward = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id,... | static int uvc_scan_chain_forward(struct uvc_video_chain *chain, struct uvc_entity *entity, struct uvc_entity *prev) {
forward = NULL;
while (1) {
forward = uvc_entity_by_reference(chain->dev, entity->id, forward);
if (forward == NULL) {
break;
}
if (forward =... |
CVE-2020-0423 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder.c | binder_release_work | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
while (1) {
w = binder_dequeue_work_head(proc, list);
if (!w) {
return;
}
switch (w->type) {
case BDER_WORK_TRANSACTION: {
struct binder_tran... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
enum binder_work_type wtype;
while (1) {
binder_inner_proc_lock(proc);
w = binder_dequeue_work_head_ilocked(list);
wtype = w ? w->type : 0;
binder_inner_proc_unlock(proc... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
while (1) {
w = binder_dequeue_work_head(proc, list);
if (!w) {
return;
}
switch (w->type) {
case BDER_WORK_TRANSACTION: {
struct binder_tran... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
enum binder_work_type wtype;
while (1) {
binder_inner_proc_lock(proc);
w = binder_dequeue_work_head_ilocked(list);
wtype = w ? w->type : 0;
binder_inner_proc_unlock(proc... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
while (1) {
w = binder_dequeue_work_head(proc, list);
if (!w) {
return;
}
switch (w->type) {
case BDER_WORK_TRANSACTION: {
struct binder_tran... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
enum binder_work_type wtype;
while (1) {
binder_inner_proc_lock(proc);
w = binder_dequeue_work_head_ilocked(list);
wtype = w ? w->type : 0;
binder_inner_proc_unlock(proc... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
while (1) {
w = binder_dequeue_work_head(proc, list);
if (!w) {
return;
}
switch (w->type) {
case BDER_WORK_TRANSACTION: {
struct binder_tran... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
enum binder_work_type wtype;
while (1) {
binder_inner_proc_lock(proc);
w = binder_dequeue_work_head_ilocked(list);
wtype = w ? w->type : 0;
binder_inner_proc_unlock(proc... | static void binder_release_work(struct binder_proc *proc, struct list_head *list) {
struct binder_work *w;
+ enum binder_work_type wtype;
while (1) {
- w = binder_dequeue_work_head(proc, list);
+ binder_inner_proc_lock(proc);
+ w = binder_dequeue_work_head_ilocked(list);
+ wtyp... |
CVE-2020-0427 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/pinctrl/devicetree.c | dt_free_map | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
if (pctldev) {
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
if (ops->dt_free_map) {
ops->dt_free_map(pctldev, map, num_maps);
}
} else {
kfree(map);
}
} | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
int i;
for (i = 0; i < num_maps; ++i) {
kfree_const(map[i].dev_name);
map[i].dev_name = NULL;
}
if (pctldev) {
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
if (op... | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
if (pctldev) {
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
ops->dt_free_map(pctldev, map, num_maps);
} else {
kfree(map);
}
} | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
int i;
for (i = 0; i < num_maps; ++i) {
kfree_const(map[i].dev_name);
map[i].dev_name = NULL;
}
if (pctldev) {
const struct pinctrl_ops *ops = pctldev->desc->pctlops;
ops->d... | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
if (pctldev) {
if (ops->dt_free_map) {
ops->dt_free_map(pctldev, map, num_maps);
}
} else {
}
}
| static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
int i;
for (i = 0; i < num_maps; ++i) {
kfree_const(map[i].dev_name);
map[i].dev_name = NULL;
}
if (pctldev) {
if (ops->dt_free_map) {
ops->dt_free_map(pctldev, map, num... | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
if (pctldev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ops->dt_free_map(pctldev, map, num_maps);
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
}
| static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
int i;
for (i = 0; i < num_maps; ++i) {
kfree_const(map[i].dev_name);
map[i].dev_name = NULL;
}
if (pctldev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ops->dt_free_map(pct... | static void dt_free_map(struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) {
+ int i;
+ for (i = 0; i < num_maps; ++i) {
+ kfree_const(map[i].dev_name);
+ map[i].dev_name = NULL;
+ }
if (pctldev) {
if (ops->dt_free_map) {
ops->dt_free_map(pctldev,... |
CVE-2020-0429 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_core.c | l2tp_session_delete | int l2tp_session_delete(struct l2tp_session *session) {
if (session->ref) {
(*session->ref)(session);
}
__l2tp_session_unhash(session);
l2tp_session_queue_purge(session);
if (session->session_close != NULL) {
(*session->session_close)(session);
}
if (session->deref) {
... | int l2tp_session_delete(struct l2tp_session *session) {
if (test_and_set_bit(0, &session->dead)) {
return 0;
}
if (session->ref) {
(*session->ref)(session);
}
__l2tp_session_unhash(session);
l2tp_session_queue_purge(session);
if (session->session_close != NULL) {
(*se... | int l2tp_session_delete(struct l2tp_session *session) {
if (session->ref) {
(*session->ref)(session);
}
__l2tp_session_unhash(session);
l2tp_session_queue_purge(session);
if (session->session_close != NULL) {
(*session->session_close)(session);
}
if (session->deref) {
... | int l2tp_session_delete(struct l2tp_session *session) {
if (test_and_set_bit(0, &session->dead)) {
return 0;
}
if (session->ref) {
(*session->ref)(session);
}
__l2tp_session_unhash(session);
l2tp_session_queue_purge(session);
if (session->session_close != NULL) {
(*se... | int l2tp_session_delete(struct l2tp_session *session) {
}
| int l2tp_session_delete(struct l2tp_session *session) {
if (test_and_set_bit(0, &session->dead)) {
return 0;
}
}
| int l2tp_session_delete(struct l2tp_session *session) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int l2tp_session_delete(struct l2tp_session *session) {
if (test_and_set_bit(0, &session->dead)) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | int l2tp_session_delete(struct l2tp_session *session) {
+ if (test_and_set_bit(0, &session->dead)) {
+ return 0;
+ }
} |
CVE-2020-0429 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_core.c | l2tp_tunnel_closeall | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
int hash;
struct hlist_node *walk;
struct hlist_node *tmp;
struct l2tp_session *session;
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
write_lock_bh(&tunnel->hlist_lock);
... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
int hash;
struct hlist_node *walk;
struct hlist_node *tmp;
struct l2tp_session *session;
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
write_lock_bh(&tunnel->hlist_lock);
... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
int hash;
struct hlist_node *walk;
struct hlist_node *tmp;
struct l2tp_session *session;
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
write_lock_bh(&tunnel->hlist_lock);
... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
int hash;
struct hlist_node *walk;
struct hlist_node *tmp;
struct l2tp_session *session;
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
write_lock_bh(&tunnel->hlist_lock);
... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
for (hash = 0; hash < L2TP_HASH_SIZE; hash++) {
again:
hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
l2tp_i... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
for (hash = 0; hash < L2TP_HASH_SIZE; hash++) {
again:
hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
l2tp_i... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hash = 0; hash < L2TP_HASH_SIZE; hash++... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hash = 0; hash < L2TP_HASH_SIZE; hash++... | void l2tp_tunnel_closeall(struct l2tp_tunnel *tunnel) {
BUG_ON(tunnel == NULL);
l2tp_info(tunnel, L2TP_MSG_CONTROL, "%s: closing all sessions...\n", tunnel->name);
for (hash = 0; hash < L2TP_HASH_SIZE; hash++) {
again:
hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
... |
CVE-2020-0430 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/verifier.c | check_func_arg | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
int err = 0;
if (arg_type == ARG_DONTCARE) {
return... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
int err = 0;
if (arg_type == ARG_DONTCARE) {
return... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
int err = 0;
if (arg_type == ARG_DONTCARE) {
return... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
int err = 0;
if (arg_type == ARG_DONTCARE) {
return... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
err = check_reg_arg(env, regno, SRC_OP);
if (type_is_pkt_po... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
err = check_reg_arg(env, regno, SRC_OP);
if (type_is_pkt_po... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = check_r... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err = check_r... | static int check_func_arg(struct bpf_verifier_env *env, u32 regno, enum bpf_arg_type arg_type, struct bpf_call_arg_meta *meta) {
struct bpf_reg_state *regs = cur_regs(env), *reg = ®s[regno];
enum bpf_reg_type expected_type, type = reg->type;
err = check_reg_arg(env, regno, SRC_OP);
if (type_is_p... |
CVE-2020-0430 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/verifier.c | check_mem_access | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;
struct bpf_func_state *state;
int size, e... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;
struct bpf_func_state *state;
int size, e... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_verifier_state *state = env->cur_state;
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + r... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_verifier_state *state = env->cur_state;
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + r... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;
size = bpf_size_to_bytes(bpf_size);
if (s... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;
size = bpf_size_to_bytes(bpf_size);
if (s... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;... | static int check_mem_access(struct bpf_verifier_env *env, int insn_idx, u32 regno, int off, int bpf_size, enum bpf_access_type t, int value_regno, bool strict_alignment_once) {
struct bpf_reg_state *regs = cur_regs(env);
struct bpf_reg_state *reg = regs + regno;
size = bpf_size_to_bytes(bpf_size);
... |
CVE-2020-0431 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-input.c | hidinput_configure_usage | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
struct input_dev *input = hidinput->input;
struct hid_device *device = input_get_drvdata(input);
int max = 0, code;
unsigned long *bit = NULL;
field->hidinput = hidinput;
if (fiel... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
if (field->flags & HID_MA_ITEM_CONSTANT) {
goto ignore;
}
if (field->report_count < 1) {
goto ignore;
}
if (field->report_type == HID_PUT_REPORT && (usage->hid & HID_U... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
if (field->flags & HID_MA_ITEM_CONSTANT) {
goto ignore;
}
if (field->report_count < 1) {
goto ignore;
}
if (field->report_type == HID_PUT_REPORT && (usage->hid & HID_U... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (field->flags & HID_MA_ITEM_CONSTANT) {
goto ignore;
}
if (field->report_count < 1) {
goto ignore;
}
if (field->re... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (field->flags & HID_MA_ITEM_CONSTANT) {
goto ignore;
}
if (field->report_count < 1) {
goto ignore;
}
if (field->re... | static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_field *field, struct hid_usage *usage) {
if (field->flags & HID_MA_ITEM_CONSTANT) {
goto ignore;
}
if (field->report_count < 1) {
goto ignore;
}
if (field->report_type == HID_PUT_REPORT && (usage->hid... |
CVE-2020-0433 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | block/blk-mq-tag.c | blk_mq_queue_tag_busy_iter | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
struct blk_mq_hw_ctx *hctx;
int i;
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags *tags = hctx->tags;
if (!blk_mq_hw_queue_mapped(hctx)) {
continue;
}
if (tags->nr_res... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
struct blk_mq_hw_ctx *hctx;
int i;
rcu_read_lock();
if (percpu_ref_is_zero(&q->q_usage_counter)) {
rcu_read_unlock();
return;
}
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags ... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
struct blk_mq_hw_ctx *hctx;
int i;
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags *tags = hctx->tags;
if (!blk_mq_hw_queue_mapped(hctx)) {
continue;
}
if (tags->nr_res... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
struct blk_mq_hw_ctx *hctx;
int i;
rcu_read_lock();
if (percpu_ref_is_zero(&q->q_usage_counter)) {
rcu_read_unlock();
return;
}
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags ... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
int i;
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags *tags = hctx->tags;
if (!blk_mq_hw_queue_mapped(hctx)) {
continue;
}
if (tags->nr_reserved_tags) {
bt_for... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
int i;
rcu_read_lock();
if (percpu_ref_is_zero(&q->q_usage_counter)) {
rcu_read_unlock();
return;
}
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags *tags = hctx->tags;
if (... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int i;
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags *tags = hctx->tags;
if (!blk_mq_hw_queue_mapped(hctx)) {
continue;
}
... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int i;
rcu_read_lock();
if (percpu_ref_is_zero(&q->q_usage_counter)) {
rcu_read_unlock();
return;
}
queue_for_each_hw_ctx(q, hctx, i) {
s... | void blk_mq_queue_tag_busy_iter(struct request_queue *q, busy_iter_fn *fn, void *priv) {
int i;
+ rcu_read_lock();
+ if (percpu_ref_is_zero(&q->q_usage_counter)) {
+ rcu_read_unlock();
+ return;
+ }
queue_for_each_hw_ctx(q, hctx, i) {
struct blk_mq_tags *tags = hctx->tags;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.