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-2017-1000 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/ip6_output.c | ip6_append_data | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
... |
CVE-2017-1000111 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/packet/af_packet.c | packet_setsockopt | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
int ret;
if (level != SOL_PACKET) {
return -ENOPROTOOPT;
}
switch (optname) {
case PACKET_ADD_MEMBERSHIP:
... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
int ret;
if (level != SOL_PACKET) {
return -ENOPROTOOPT;
}
switch (optname) {
case PACKET_ADD_MEMBERSHIP:
... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
int ret;
if (level != SOL_PACKET) {
return -ENOPROTOOPT;
}
switch (optname) {
case PACKET_ADD_MEMBERSHIP:
... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
int ret;
if (level != SOL_PACKET) {
return -ENOPROTOOPT;
}
switch (optname) {
case PACKET_ADD_MEMBERSHIP:
... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
switch (optname) {
case PACKET_RESERVE: {
if (optlen != sizeof(val)) {
return -EVAL;
}
if (p... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
switch (optname) {
case PACKET_RESERVE: {
if (optlen != sizeof(val)) {
return -EVAL;
}
if (c... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (optname) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case PACK... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (optname) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case PACK... | static int packet_setsockopt(struct socket *sock, int level, int optname, char *optval, unsigned int optlen) {
struct sock *sk = sock->sk;
struct packet_sock *po = pkt_sk(sk);
switch (optname) {
case PACKET_RESERVE: {
if (optlen != sizeof(val)) {
return -EVAL;
}
- ... |
CVE-2017-1000112 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/ip_output.c | __ip_append_data | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {
... | static int __ip_append_data(struct sock *sk, struct flowi4 *fl4, struct sk_buff_head *queue, struct inet_cork *cork, struct page_frag *pfrag, int getfrag(void *from, char *to, int offset, int len,
int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, unsigned int flags) {... |
CVE-2017-1000112 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/udp.c | udp_send_skb | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
struct udphdr *uh;
int err = 0;
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
int len = skb->len - offset;
__wsum csum = 0;
u... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
struct udphdr *uh;
int err = 0;
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
int len = skb->len - offset;
__wsum csum = 0;
u... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
struct udphdr *uh;
int err = 0;
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
int len = skb->len - offset;
__wsum csum = 0;
u... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
struct udphdr *uh;
int err = 0;
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
int len = skb->len - offset;
__wsum csum = 0;
u... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
uh = udp_hdr(skb);
if (is_udplite) {
} else if (sk->sk_no_check_tx) {
skb->ip_s... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
uh = udp_hdr(skb);
if (is_udplite) {
} else if (sk->sk_no_check_tx && !skb_is_gso(skb))... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4) {
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
uh = udp_hdr(skb);
if (is_udplite) {
- } else if (sk->sk_no_check_tx) {
+ } el... |
CVE-2017-1000112 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/ip6_output.c | ip6_append_data | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
str... | int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass,
struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) {
... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | __l2cap_connect_rsp_defer | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn_rsp rsp;
struct l2cap_conn *conn = chan->conn;
u8 buf[128];
u8 rsp_code;
rsp.scid = cpu_to_le16(chan->dcid);
rsp.dcid = cpu_to_le16(chan->scid);
rsp.result = cpu_to_le16(L2CAP_CR_SUCCESS);
rsp.status = cpu_to_le1... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn_rsp rsp;
struct l2cap_conn *conn = chan->conn;
u8 buf[128];
u8 rsp_code;
rsp.scid = cpu_to_le16(chan->dcid);
rsp.dcid = cpu_to_le16(chan->scid);
rsp.result = cpu_to_le16(L2CAP_CR_SUCCESS);
rsp.status = cpu_to_le1... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn_rsp rsp;
struct l2cap_conn *conn = chan->conn;
u8 buf[128];
u8 rsp_code;
rsp.scid = cpu_to_le16(chan->dcid);
rsp.dcid = cpu_to_le16(chan->scid);
rsp.result = cpu_to_le16(L2CAP_CR_SUCCESS);
rsp.status = cpu_to_le1... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn_rsp rsp;
struct l2cap_conn *conn = chan->conn;
u8 buf[128];
u8 rsp_code;
rsp.scid = cpu_to_le16(chan->dcid);
rsp.dcid = cpu_to_le16(chan->scid);
rsp.result = cpu_to_le16(L2CAP_CR_SUCCESS);
rsp.status = cpu_to_le1... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
if (chan->hs_hcon) {
rsp_code = L2CAP_CREATE_CHAN_RSP;
} else {
rsp_code = L2CAP_CONN_RSP;
}
BT_DBG("chan %p rsp_code %u", chan, rsp_code);
l2cap_send_cmd(conn, chan->ident, rsp_code, ... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
if (chan->hs_hcon) {
rsp_code = L2CAP_CREATE_CHAN_RSP;
} else {
rsp_code = L2CAP_CONN_RSP;
}
BT_DBG("chan %p rsp_code %u", chan, rsp_code);
l2cap_send_cmd(conn, chan->ident, rsp_code, ... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_conn *conn = chan->conn;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (chan->hs_hcon) {
rsp_code = L2CAP_CREATE_CHAN_RSP;
} else {
rsp_code = L2CAP_CONN_RSP;
}... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_conn *conn = chan->conn;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (chan->hs_hcon) {
rsp_code = L2CAP_CREATE_CHAN_RSP;
} else {
rsp_code = L2CAP_CONN_RSP;
}... | void __l2cap_connect_rsp_defer(struct l2cap_chan *chan) {
struct l2cap_conn *conn = chan->conn;
if (chan->hs_hcon) {
rsp_code = L2CAP_CREATE_CHAN_RSP;
} else {
rsp_code = L2CAP_CONN_RSP;
}
BT_DBG("chan %p rsp_code %u", chan, rsp_code);
l2cap_send_cmd(conn, chan->ident, r... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_add_conf_opt | static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) {
struct l2cap_conf_opt *opt = *ptr;
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
opt->type = type;
opt->len = len;
switch (len) {
case 1:
*((u8 *) opt->val) = val;
break;
case 2:
... | static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val, size_t size) {
struct l2cap_conf_opt *opt = *ptr;
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
if (size < L2CAP_CONF_OPT_SIZE + len) {
return;
}
opt->type = type;
opt->len = len;
switch (len) {... | static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) {
struct l2cap_conf_opt *opt = *ptr;
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
opt->type = type;
opt->len = len;
switch (len) {
case 1:
*((u8 *) opt->val) = val;
break;
case 2:
... | static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val, size_t size) {
struct l2cap_conf_opt *opt = *ptr;
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
if (size < L2CAP_CONF_OPT_SIZE + len) {
return;
}
opt->type = type;
opt->len = len;
switch (len) {... | static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) {
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
opt->type = type;
}
| static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val, size_t size) {
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
if (size < L2CAP_CONF_OPT_SIZE + len) {
return;
}
opt->type = type;
}
| static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
opt->type = type;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
if (size < L2CAP_CONF_OPT_SIZE + len) {
return;
}
opt->type = type;
/* PLACEHOLDER: DO NOT ... | -static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val) {
+static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val, size_t size) {
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
+ if (size < L2CAP_CONF_OPT_SIZE + len) {
+ return;
+ }
opt->ty... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_add_opt_efs | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan) {
struct l2cap_conf_efs efs;
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.id = chan->local_id;
efs.stype = chan->local_stype;
efs.msdu = cpu_to_le16(chan->local_msdu);
efs.sdu_itime = cpu_to_le32(chan->loca... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size) {
struct l2cap_conf_efs efs;
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.id = chan->local_id;
efs.stype = chan->local_stype;
efs.msdu = cpu_to_le16(chan->local_msdu);
efs.sdu_itime = cpu_to_le... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan) {
struct l2cap_conf_efs efs;
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.id = chan->local_id;
efs.stype = chan->local_stype;
efs.msdu = cpu_to_le16(chan->local_msdu);
efs.sdu_itime = cpu_to_le32(chan->loca... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size) {
struct l2cap_conf_efs efs;
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.id = chan->local_id;
efs.stype = chan->local_stype;
efs.msdu = cpu_to_le16(chan->local_msdu);
efs.sdu_itime = cpu_to_le... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan) {
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.flush_to = cpu_to_le32(L2CAP_EFS_DEFAULT_FLUSH_TO);
break;
case L2CAP_MODE_STREAMG:
efs.flush_to = 0;
break;
}
l2cap_add_conf_opt(ptr, L2CAP_CONF_EFS, ... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size) {
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.flush_to = cpu_to_le32(L2CAP_EFS_DEFAULT_FLUSH_TO);
break;
case L2CAP_MODE_STREAMG:
efs.flush_to = 0;
break;
}
l2cap_add_conf_opt(ptr, L2C... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (chan->mode) {
case L2CAP_MODE_ERTM:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
efs.flush_to = cpu_to_le32(L2CAP_EFS_DEFAULT_FLUSH_TO);
break;
case L2CAP_MODE_... | static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (chan->mode) {
case L2CAP_MODE_ERTM:
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
efs.flush_to = cpu_to_le32(L2CAP_EFS_DEFAULT_FLUSH_TO);
break;
cas... | -static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan) {
+static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size) {
switch (chan->mode) {
case L2CAP_MODE_ERTM:
efs.flush_to = cpu_to_le32(L2CAP_EFS_DEFAULT_FLUSH_TO);
break;
case L2CAP_MODE_STREAMG:
... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_build_conf_req | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
u16 size;
BT_DBG("chan %p", chan);
if (chan->num_conf_req || chan->num_conf_rsp) {
goto done;
}
swi... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
void *endptr = data + data_size;
u16 size;
BT_DBG("chan %p", chan);
if (chan->num_conf_req ||... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
u16 size;
BT_DBG("chan %p", chan);
if (chan->num_conf_req || chan->num_conf_rsp) {
goto done;
}
swi... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
void *endptr = data + data_size;
u16 size;
BT_DBG("chan %p", chan);
if (chan->num_conf_req ||... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
u16 size;
BT_DBG("chan %p", chan);
done:
if (chan->imtu != L2CAP_DEFAULT_MTU) {
l2cap_add_conf_opt(&ptr, L2... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
void *endptr = data + data_size;
u16 size;
BT_DBG("chan %p", chan);
done:
if (chan->imtu != L... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
u16 size;
BT_DBG("chan %p", chan);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
done:
if (chan->imtu != L2CAP_... | static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
void *endptr = data + data_size;
u16 size;
BT_DBG("chan %p", chan);
/* PLACEHOLDER: DO NOT DE... | -static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) {
+static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) {
struct l2cap_conf_req *req = data;
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
void *ptr = req->data;
+ void *endptr = data + data_s... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_config_req | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
u16 dcid, flags;
u8 rsp[64];
struct l2cap_chan *chan;
int len, err = 0;
if (cmd_len < sizeof(*req)) {
return -EPROT... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid 0x%4.4x flags 0x%2.2x", dcid, flags);
chan = l... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid 0x%4.4x flags 0x%2.2x", dcid, flags);
chan = l... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid ... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid ... | static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_req *req = (struct l2cap_conf_req *) data;
dcid = __le16_to_cpu(req->dcid);
flags = __le16_to_cpu(req->flags);
BT_DBG("dcid 0x%4.4x flags 0x%2.2x", dcid, flags);
ch... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_config_rsp | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
u16 scid, flags, result;
struct l2cap_chan *chan;
int len = cmd_len - sizeof(*rsp);
int err = 0;
if (cmd_len < sizeof(*rsp))... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
u16 scid, flags, result;
struct l2cap_chan *chan;
int len = cmd_len - sizeof(*rsp);
int err = 0;
if (cmd_len < sizeof(*rsp))... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
u16 scid, flags, result;
struct l2cap_chan *chan;
int len = cmd_len - sizeof(*rsp);
int err = 0;
if (cmd_len < sizeof(*rsp))... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
u16 scid, flags, result;
struct l2cap_chan *chan;
int len = cmd_len - sizeof(*rsp);
int err = 0;
if (cmd_len < sizeof(*rsp))... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
int len = cmd_len - sizeof(*rsp);
scid = __le16_to_cpu(rsp->scid);
flags = __le16_to_cpu(rsp->flags);
result = __le16_to_cpu(rsp... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
int len = cmd_len - sizeof(*rsp);
scid = __le16_to_cpu(rsp->scid);
flags = __le16_to_cpu(rsp->flags);
result = __le16_to_cpu(rsp... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int len = cmd_len - sizeof(*rsp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sc... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int len = cmd_len - sizeof(*rsp);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
sc... | static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data;
int len = cmd_len - sizeof(*rsp);
scid = __le16_to_cpu(rsp->scid);
flags = __le16_to_cpu(rsp->flags);
result = __le16_to_c... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_conn_start | static void l2cap_conn_start(struct l2cap_conn *conn) {
struct l2cap_chan *chan, *tmp;
BT_DBG("conn %p", conn);
mutex_lock(&conn->chan_lock);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
l... | static void l2cap_conn_start(struct l2cap_conn *conn) {
struct l2cap_chan *chan, *tmp;
BT_DBG("conn %p", conn);
mutex_lock(&conn->chan_lock);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
l... | static void l2cap_conn_start(struct l2cap_conn *conn) {
struct l2cap_chan *chan, *tmp;
BT_DBG("conn %p", conn);
mutex_lock(&conn->chan_lock);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
l... | static void l2cap_conn_start(struct l2cap_conn *conn) {
struct l2cap_chan *chan, *tmp;
BT_DBG("conn %p", conn);
mutex_lock(&conn->chan_lock);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
l... | static void l2cap_conn_start(struct l2cap_conn *conn) {
BT_DBG("conn %p", conn);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->state == BT_CONNECT) {
} else if (chan->state == BT_CONNECT2) {
if (l2cap_chan_check_security(chan, fal... | static void l2cap_conn_start(struct l2cap_conn *conn) {
BT_DBG("conn %p", conn);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->state == BT_CONNECT) {
} else if (chan->state == BT_CONNECT2) {
if (l2cap_chan_check_security(chan, fal... | static void l2cap_conn_start(struct l2cap_conn *conn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("conn %p", conn);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
/* PLACEHOLDER: DO NOT DELETE THIS CO... | static void l2cap_conn_start(struct l2cap_conn *conn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("conn %p", conn);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
/* PLACEHOLDER: DO NOT DELETE THIS CO... | static void l2cap_conn_start(struct l2cap_conn *conn) {
BT_DBG("conn %p", conn);
list_for_each_entry_safe(chan, tmp, &conn->chan_l, list) {
l2cap_chan_lock(chan);
if (chan->state == BT_CONNECT) {
} else if (chan->state == BT_CONNECT2) {
if (l2cap_chan_check_security(ch... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_connect | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_conn_rsp rsp;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dci... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_conn_rsp rsp;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dci... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_conn_rsp rsp;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dci... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_conn_rsp rsp;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dci... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dcid = 0, scid = __le16_to_cpu(req... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dcid = 0, scid = __le16_to_cpu(req... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS... | static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data, u8 rsp_code, u8 amp_id) {
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_FO;
u16 dcid = 0, scid = __le16_to_cp... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_connect_create_rsp | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
u16 scid, dcid, result, status;
struct l2cap_chan *chan;
u8 req[128];
int err;
if (cmd_len < sizeof(*rsp)) {
retur... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
u16 scid, dcid, result, status;
struct l2cap_chan *chan;
u8 req[128];
int err;
if (cmd_len < sizeof(*rsp)) {
retur... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
u16 scid, dcid, result, status;
struct l2cap_chan *chan;
u8 req[128];
int err;
if (cmd_len < sizeof(*rsp)) {
retur... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
u16 scid, dcid, result, status;
struct l2cap_chan *chan;
u8 req[128];
int err;
if (cmd_len < sizeof(*rsp)) {
retur... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
scid = __le16_to_cpu(rsp->scid);
dcid = __le16_to_cpu(rsp->dcid);
result = __le16_to_cpu(rsp->result);
status = __le16_to_cpu(... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
scid = __le16_to_cpu(rsp->scid);
dcid = __le16_to_cpu(rsp->dcid);
result = __le16_to_cpu(rsp->result);
status = __le16_to_cpu(... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
scid = __le16_to_cpu(rsp->scid);
dcid = __le16_to_cpu(rsp->dcid);
result = __le1... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
scid = __le16_to_cpu(rsp->scid);
dcid = __le16_to_cpu(rsp->dcid);
result = __le1... | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) {
struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data;
scid = __le16_to_cpu(rsp->scid);
dcid = __le16_to_cpu(rsp->dcid);
result = __le16_to_cpu(rsp->result);
status = __le16_t... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_do_create | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
chan->fcs = L2CAP_FCS_NONE;
if (chan->state == BT_CONNECT) {
if (result == L2CAP_CR_SUCCESS) {
... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
chan->fcs = L2CAP_FCS_NONE;
if (chan->state == BT_CONNECT) {
if (result == L2CAP_CR_SUCCESS) {
... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
chan->fcs = L2CAP_FCS_NONE;
if (chan->state == BT_CONNECT) {
if (result == L2CAP_CR_SUCCESS) {
... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
chan->fcs = L2CAP_FCS_NONE;
if (chan->state == BT_CONNECT) {
if (result == L2CAP_CR_SUCCESS) {
... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
if (__l2cap_no_conn_pending(chan)) {
l2cap_send_cmd(chan->conn, chan->ident, L2CAP_CREATE_CHAN_RSP, ... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
if (__l2cap_no_conn_pending(chan)) {
l2cap_send_cmd(chan->conn, chan->ident, L2CAP_CREATE_CHAN_RSP, ... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (__l2cap_no_conn_pending(chan)) {
/* PLACEHOLDER: D... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (__l2cap_no_conn_pending(chan)) {
/* PLACEHOLDER: D... | static void l2cap_do_create(struct l2cap_chan *chan, int result, u8 local_amp_id, u8 remote_amp_id) {
BT_DBG("chan %p state %s %u -> %u", chan, state_to_string(chan->state), local_amp_id, remote_amp_id);
if (__l2cap_no_conn_pending(chan)) {
l2cap_send_cmd(chan->conn, chan->ident, L2CAP_CREATE_CHAN_R... |
CVE-2017-1000251 | 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) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct... | 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) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *req = chan->conf_req;
int len = chan->conf_len;
int type, hint, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct... | 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) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *req = chan->conf_req;
u16 mtu = L2CAP_DEFAULT_MTU;
BT_DBG("chan %p", chan);
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&req, &type, &... | 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;
u16 mtu = L2CAP_DEFAULT_MTU;
BT_DBG("chan %p", chan);
while (len >= L2CAP_CONF_OPT_S... | static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data) {
struct l2cap_conf_rsp *rsp = data;
void *ptr = rsp->data;
void *req = chan->conf_req;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u16 mtu = L2CAP_DEFAULT_MTU;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("chan %... | 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;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u16 mtu = L2CAP_DEFAULT_MTU;
/* PLACEH... | -static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data) {
+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;
u16 mtu = L2CA... |
CVE-2017-1000251 | 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, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct l2cap_conf_efs efs;
BT_DBG("ch... | 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, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct l2cap_conf_efs efs;
BT_DBG("ch... | 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, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
int type, olen;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data);... | 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;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
BT_DBG("chan %p, rs... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, u16 *result) {
struct l2cap_conf_req *req = data;
void *ptr = req->data;
int type, olen;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
/* PLACEHOLDER... | 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;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct l2cap_conf_rfc rfc = { .... | -static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, u16 *result) {
+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 + si... |
CVE-2017-1000251 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/l2cap_core.c | l2cap_security_cfm | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
struct l2cap_chan *chan;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
mutex_lock(&conn->chan_lock);
list_for_each_entry(c... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
struct l2cap_chan *chan;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
mutex_lock(&conn->chan_lock);
list_for_each_entry(c... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
struct l2cap_chan *chan;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
if (hcon->type == LE_LK) {
if (!status && encry... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
struct l2cap_chan *chan;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
if (hcon->type == LE_LK) {
if (!status && encry... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
list_for_each_entry(chan, &conn->chan_l, list) {
l2cap_chan_lock(chan);
... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
list_for_each_entry(chan, &conn->chan_l, list) {
l2cap_chan_lock(chan);
... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
/* PLACEHOLDER: DO NOT DELETE THIS... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
/* PLACEHOLDER: DO NOT DELETE THIS... | int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) {
struct l2cap_conn *conn = hcon->l2cap_data;
if (!conn) {
return 0;
}
BT_DBG("conn %p status 0x%2.2x encrypt %u", conn, status, encrypt);
list_for_each_entry(chan, &conn->chan_l, list) {
l2cap_chan_lock(cha... |
CVE-2017-1000252 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/vmx.c | vmx_update_pi_irte | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct kvm_kernel_irq_routing_entry *e;
struct kvm_irq_routing_table *irq_rt;
struct kvm_lapic_irq irq;
struct kvm_vcpu *vcpu;
struct vcpu_data vcpu_info;
int idx, ret = -EVAL;
if (!kvm_arch... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct kvm_kernel_irq_routing_entry *e;
struct kvm_irq_routing_table *irq_rt;
struct kvm_lapic_irq irq;
struct kvm_vcpu *vcpu;
struct vcpu_data vcpu_info;
int idx, ret = 0;
if (!kvm_arch_has... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct kvm_kernel_irq_routing_entry *e;
struct kvm_irq_routing_table *irq_rt;
struct kvm_lapic_irq irq;
struct kvm_vcpu *vcpu;
struct vcpu_data vcpu_info;
int idx, ret = -EVAL;
if (!kvm_arch... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct kvm_kernel_irq_routing_entry *e;
struct kvm_irq_routing_table *irq_rt;
struct kvm_lapic_irq irq;
struct kvm_vcpu *vcpu;
struct vcpu_data vcpu_info;
int idx, ret = 0;
if (!kvm_arch_has... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct vcpu_data vcpu_info;
int idx, ret = -EVAL;
if (!kvm_arch_has_assigned_device(kvm) || !irq_remapping_cap(IRQ_POSTG_CAP)) {
return 0;
}
irq_rt = srcu_dereference(kvm->irq_routing, &kvm-... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct vcpu_data vcpu_info;
int idx, ret = 0;
if (!kvm_arch_has_assigned_device(kvm) || !irq_remapping_cap(IRQ_POSTG_CAP)) {
return 0;
}
irq_rt = srcu_dereference(kvm->irq_routing, &kvm->irq... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct vcpu_data vcpu_info;
int idx, ret = -EVAL;
if (!kvm_arch_has_assigned_device(kvm) || !irq_remapping_cap(IRQ_POSTG_CAP) || !kvm_vcpu_apicv_active(kvm-... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct vcpu_data vcpu_info;
int idx, ret = 0;
if (!kvm_arch_has_assigned_device(kvm) || !irq_remapping_cap(IRQ_POSTG_CAP) || !kvm_vcpu_apicv_active(kvm->vcp... | static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, bool set) {
struct vcpu_data vcpu_info;
- int idx, ret = -EVAL;
+ int idx, ret = 0;
if (!kvm_arch_has_assigned_device(kvm) || !irq_remapping_cap(IRQ_POSTG_CAP)) {
return 0;
}
irq_rt = srcu_deref... |
CVE-2017-1000253 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | load_elf_binary | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retv... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int retv... | static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss,... | static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata;
unsigned long elf_bss,... | static int load_elf_binary(struct linux_binprm *bprm) {
unsigned long load_addr = 0, load_bias = 0;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
if (loc->elf_ex.e_phnum < 1 ||... | static int load_elf_binary(struct linux_binprm *bprm) {
unsigned long load_addr = 0, load_bias = 0;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
if (loc->elf_ex.e_phnum < 1 ||... | static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long load_addr = 0, load_bias = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int executable_stack = EXSTACK_DEFAULT;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long load_addr = 0, load_bias = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int executable_stack = EXSTACK_DEFAULT;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int load_elf_binary(struct linux_binprm *bprm) {
unsigned long load_addr = 0, load_bias = 0;
int executable_stack = EXSTACK_DEFAULT;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
if (loc->elf_ex.e_phn... |
CVE-2017-1000363 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/char/lp.c | lp_setup | static int lp_setup (char *str) {
static int parport_ptr;
int x;
if (get_option(&str, &x)) {
if (x == 0) {
parport_nr[0] = LP_PARPORT_OFF;
} else {
printk(KERN_WARNG "warning: 'lp=0x%x' is deprecated, ignored\n", x);
return 0;
}
} else if (!str... | static int lp_setup (char *str) {
static int parport_ptr;
int x;
if (get_option(&str, &x)) {
if (x == 0) {
parport_nr[0] = LP_PARPORT_OFF;
} else {
printk(KERN_WARNG "warning: 'lp=0x%x' is deprecated, ignored\n", x);
return 0;
}
} else if (!str... | static int lp_setup (char *str) {
static int parport_ptr;
int x;
if (get_option(&str, &x)) {
if (x == 0) {
parport_nr[0] = LP_PARPORT_OFF;
} else {
printk(KERN_WARNG "warning: 'lp=0x%x' is deprecated, ignored\n", x);
return 0;
}
} else if (!str... | static int lp_setup (char *str) {
static int parport_ptr;
int x;
if (get_option(&str, &x)) {
if (x == 0) {
parport_nr[0] = LP_PARPORT_OFF;
} else {
printk(KERN_WARNG "warning: 'lp=0x%x' is deprecated, ignored\n", x);
return 0;
}
} else if (!str... | static int lp_setup (char *str) {
if (get_option(&str, &x)) {
} else if (!strncmp(str, "parport", 7)) {
} else if (!strcmp(str, "auto")) {
} else if (!strcmp(str, "none")) {
parport_nr[parport_ptr++] = LP_PARPORT_NONE;
} else if (!strcmp(str, "reset")) {
}
return 1;
}
| static int lp_setup (char *str) {
if (get_option(&str, &x)) {
} else if (!strncmp(str, "parport", 7)) {
} else if (!strcmp(str, "auto")) {
} else if (!strcmp(str, "none")) {
if (parport_ptr < LP_NO) {
parport_nr[parport_ptr++] = LP_PARPORT_NONE;
} else {
printk(KE... | static int lp_setup (char *str) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (get_option(&str, &x)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (!strncmp(str, "parport", 7)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (!strcmp(str, "auto")) {
/* PLACEHOLDER:... | static int lp_setup (char *str) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (get_option(&str, &x)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (!strncmp(str, "parport", 7)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else if (!strcmp(str, "auto")) {
/* PLACEHOLDER:... | static int lp_setup (char *str) {
if (get_option(&str, &x)) {
} else if (!strncmp(str, "parport", 7)) {
} else if (!strcmp(str, "auto")) {
} else if (!strcmp(str, "none")) {
- parport_nr[parport_ptr++] = LP_PARPORT_NONE;
+ if (parport_ptr < LP_NO) {
+ parport_nr[parport_ptr... |
CVE-2017-1000365 | 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;
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) {
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) {
ret = expand_downwards(bprm->vma, pos);
}
ret = get_user_pages(current, bprm->mm, pos, 1, write, 1, &page, NULL);
if (write) {
unsigned long size = bprm->vma->vm_end - bprm->vma->vm_s... | static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) {
if (write) {
ret = expand_downwards(bprm->vma, pos);
}
ret = get_user_pages(current, bprm->mm, pos, 1, write, 1, &page, NULL);
if (write) {
unsigned long size = bprm->vma->vm_end - bprm->vma->vm_s... | static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (write) {
ret = expand_downwards(bprm->vma, pos);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
ret = get_user_pages(current, bprm->mm, pos, 1, write... | static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (write) {
ret = expand_downwards(bprm->vma, pos);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
ret = get_user_pages(current, bprm->mm, pos, 1, write... | static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) {
if (write) {
ret = expand_downwards(bprm->vma, pos);
}
ret = get_user_pages(current, bprm->mm, pos, 1, write, 1, &page, NULL);
if (write) {
unsigned long size = bprm->vma->vm_end - bprm->vm... |
CVE-2017-1000370 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | load_elf_binary | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file);
if (!elf_phdata) {
goto out;
}
for (i = 0; i < ... | static int load_elf_binary(struct linux_binprm *bprm) {
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file);
if (!elf_phdata) {
goto out;
}
for (i = 0; i < ... | static int load_elf_binary(struct linux_binprm *bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
/* PLACEHOLDER: DO NOT... | static int load_elf_binary(struct linux_binprm *bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
/* PLACEHOLDER: DO NOT... | static int load_elf_binary(struct linux_binprm *bprm) {
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file);
if (!elf_phdata) {
goto out;
}
for (... |
CVE-2017-1000371 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | load_elf_binary | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
struct file *interpreter = NULL;
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long elf... | static int load_elf_binary(struct linux_binprm *bprm) {
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file);
if (!elf_phdata) {
goto out;
}
for (i = 0; i < ... | static int load_elf_binary(struct linux_binprm *bprm) {
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file);
if (!elf_phdata) {
goto out;
}
for (i = 0; i < ... | static int load_elf_binary(struct linux_binprm *bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
/* PLACEHOLDER: DO NOT... | static int load_elf_binary(struct linux_binprm *bprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
/* PLACEHOLDER: DO NOT... | static int load_elf_binary(struct linux_binprm *bprm) {
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
goto out_ret;
}
loc->elf_ex = *((struct elfhdr *)bprm->buf);
elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file);
if (!elf_phdata) {
goto out;
}
for (... |
CVE-2017-1000380 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/timer.c | snd_timer_user_read | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
mutex_lock... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
mutex_lock... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_irq(&tu->qlock);
while ((long)count - result >= unit) {
while (!tu->qused) {
... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
mutex_lock(&tu->ioctl_lock);
spin_lock_irq(&tu->qlock);
while ((long)count - result >= unit)... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_irq(&tu->qlock);
while ((long)count ... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
mutex_lock(&tu->ioctl_lock);
spin_lock_irq(&tu... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
+ mutex_lock(&tu->ioctl_lock);
spin_lock_irq(&tu->qlock);
while ((long)count - result >=... |
CVE-2017-1000405 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/huge_memory.c | follow_trans_huge_pmd | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page = NULL;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page = NULL;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page = NULL;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page = NULL;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
}
if ((flags & FOLL_DUMP... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
}
if ((flags & FOLL_DUMP... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
... | struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
assert_spin_locked(pmd_lockptr(mm, pmd));
if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) {
goto out;
}
if ((flags & FO... |
CVE-2017-1000407 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/vmx.c | hardware_setup | static int hardware_setup(void) {
int r = -ENOMEM, i, msr;
rdmsrl_safe(MSR_EFER, &host_efer);
for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i)
kvm_define_shared_msr(i, vmx_msr_index[i]);
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
... | static int hardware_setup(void) {
int r = -ENOMEM, i, msr;
rdmsrl_safe(MSR_EFER, &host_efer);
for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i)
kvm_define_shared_msr(i, vmx_msr_index[i]);
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
... | static int hardware_setup(void) {
int r = -ENOMEM, i, msr;
rdmsrl_safe(MSR_EFER, &host_efer);
for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i)
kvm_define_shared_msr(i, vmx_msr_index[i]);
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
... | static int hardware_setup(void) {
int r = -ENOMEM, i, msr;
rdmsrl_safe(MSR_EFER, &host_efer);
for (i = 0; i < ARRAY_SIZE(vmx_msr_index); ++i)
kvm_define_shared_msr(i, vmx_msr_index[i]);
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
... | static int hardware_setup(void) {
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
}
vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
vmx_msr_bitmap_legacy = (unsigned long *)__get_free_page(GFP_KERNEL);
vmx_msr_bitmap_legac... | static int hardware_setup(void) {
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
}
vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
vmx_msr_bitmap_legacy = (unsigned long *)__get_free_page(GFP_KERNEL);
vmx_msr_bitmap_legac... | static int hardware_setup(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
}
vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | static int hardware_setup(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
}
vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | static int hardware_setup(void) {
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a) {
return r;
}
vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
vmx_msr_bitmap_legacy = (unsigned long *)__get_free_page(GFP_KERNEL);
vmx_msr_bitm... |
CVE-2017-1000410 | 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);
hint = type & L2CAP_CONF_HT;
type &= L2CAP_CONF_MASK;
s... | 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);
hint = type & L2CAP_CONF_HT;
type &= L2CAP_CONF_MASK;
s... | 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-2017-1000410 | 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) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_MTU:
if (val < L2CAP_DEFAULT_M_MTU) {
... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_MTU:
if (val < L2CAP_DEFAULT_M_MTU) {
... | 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 */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_MTU... | 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 */
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_MTU... | static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, void *data, size_t size, u16 *result) {
while (len >= L2CAP_CONF_OPT_SIZE) {
len -= l2cap_get_conf_opt(&rsp, &type, &olen, &val);
switch (type) {
case L2CAP_CONF_MTU:
if (val < L2CAP_DEFAULT_M_MTU)... |
CVE-2017-10661 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/timerfd.c | timerfd_setup_cancel | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel = true;
spin_lock(&ca... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
spin_lock(&ctx->cancel_lock);
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel = true;
spin_lock(&ca... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
spin_lock(&ctx->cancel_lock);
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
ctx->might_cancel... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
spin_unlock(&cancel_lock);
}
} else if ... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
spin_lock(&ctx->cancel_lock);
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
spin_unlock(&canc... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
spin_lock(&ctx->cancel_lock);
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
/* PLACEHOLDER: DO NOT DE... | static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags) {
+ spin_lock(&ctx->cancel_lock);
if ((ctx->clockid == CLOCK_REALTIME || ctx->clockid == CLOCK_REALTIME_ALARM) && (flags & TFD_TIMER_ABSTIME) && (flags & TFD_TIMER_CANCEL_ON_SET)) {
if (!ctx->might_cancel) {
spin_unlock(... |
CVE-2017-10662 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/super.c | sanity_check_raw_super | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
unsigned int blocksize;
if (F2FS_SUPER_MAGIC != le32_to_cpu(raw_super->magic)) {
f2fs_msg(sb, KERN_FO, "Magic Mismatch, valid(0x%x) - read(0x%x)", F2FS_SUPER_MAGIC, le32_to_cpu(raw_super->magic));
ret... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
unsigned int blocksize;
if (F2FS_SUPER_MAGIC != le32_to_cpu(raw_super->magic)) {
f2fs_msg(sb, KERN_FO, "Magic Mismatch, valid(0x%x) - read(0x%x)", F2FS_SUPER_MAGIC, le32_to_cpu(raw_super->magic));
ret... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
unsigned int blocksize;
if (F2FS_SUPER_MAGIC != le32_to_cpu(raw_super->magic)) {
f2fs_msg(sb, KERN_FO, "Magic Mismatch, valid(0x%x) - read(0x%x)", F2FS_SUPER_MAGIC, le32_to_cpu(raw_super->magic));
ret... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
unsigned int blocksize;
if (F2FS_SUPER_MAGIC != le32_to_cpu(raw_super->magic)) {
f2fs_msg(sb, KERN_FO, "Magic Mismatch, valid(0x%x) - read(0x%x)", F2FS_SUPER_MAGIC, le32_to_cpu(raw_super->magic));
ret... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
if (le32_to_cpu(raw_super->node_ino) != 1 || le32_to_cpu(raw_super->meta_ino) != 2 || le32_to_cpu(raw_super->root_ino) != 3) {
return 1;
}
if (sanity_check_area_boundary(sb, raw_super)) {
return 1... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
if (le32_to_cpu(raw_super->node_ino) != 1 || le32_to_cpu(raw_super->meta_ino) != 2 || le32_to_cpu(raw_super->root_ino) != 3) {
return 1;
}
if (le32_to_cpu(raw_super->segment_count) > F2FS_MAX_SEGMENT) {
... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (le32_to_cpu(raw_super->node_ino) != 1 || le32_to_cpu(raw_super->meta_ino) != 2 || le32_to_cpu(raw_super->root_ino) != 3) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (le32_to_cpu(raw_super->node_ino) != 1 || le32_to_cpu(raw_super->meta_ino) != 2 || le32_to_cpu(raw_super->root_ino) != 3) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int sanity_check_raw_super(struct super_block *sb, struct f2fs_super_block *raw_super) {
if (le32_to_cpu(raw_super->node_ino) != 1 || le32_to_cpu(raw_super->meta_ino) != 2 || le32_to_cpu(raw_super->root_ino) != 3) {
+ return 1;
+ }
+ if (le32_to_cpu(raw_super->segment_count) > F2FS_MAX_SEGMENT... |
CVE-2017-10663 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/f2fs/super.c | sanity_check_ckpt | int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
unsigned int total, fsmeta;
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int ovp_segments, reserved_segments;
total = le32_to_cpu(raw_super->segment_count);
fsmeta = le32_to_cpu... | int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
unsigned int total, fsmeta;
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int ovp_segments, reserved_segments;
unsigned int main_segs, blocks_per_seg;
int i;
total = le32_to_... | static int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
unsigned int total, fsmeta;
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
total = le32_to_cpu(raw_super->segment_count);
fsmeta = le32_to_cpu(raw_super->segment_count_ckpt);
fsmeta... | static int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
unsigned int total, fsmeta;
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int main_segs, blocks_per_seg;
int i;
total = le32_to_cpu(raw_super->segment_count);
fsmeta =... | int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int ovp_segments, reserved_segments;
total = le32_to_cpu(raw_super->segment_count);
if (unlikely(fsmeta < F2FS_M_SEGMENTS || ovp_segment... | int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int ovp_segments, reserved_segments;
unsigned int main_segs, blocks_per_seg;
int i;
total = le32_to_cpu(raw_super->segment_count);
... | static int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
total = le32_to_cpu(raw_super->segment_count);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int main_segs, blocks_per_seg;
int i;
total = le32_to_cpu(raw_super->segment_co... | int sanity_check_ckpt(struct f2fs_sb_info *sbi) {
struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
unsigned int ovp_segments, reserved_segments;
+ unsigned int main_segs, blocks_per_seg;
+ int i;
total = le32_to_cpu(raw_super->segment_co... |
CVE-2017-10810 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/virtio/virtgpu_object.c | virtio_gpu_object_create | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
struct virtio_gpu_object *bo;
enum ttm_bo_type type;
size_t acc_size;
int ret;
if (kernel) {
type = ttm_bo_type_kernel;
} else {
type =... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
struct virtio_gpu_object *bo;
enum ttm_bo_type type;
size_t acc_size;
int ret;
if (kernel) {
type = ttm_bo_type_kernel;
} else {
type =... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
struct virtio_gpu_object *bo;
enum ttm_bo_type type;
size_t acc_size;
int ret;
if (kernel) {
type = ttm_bo_type_kernel;
} else {
type =... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
struct virtio_gpu_object *bo;
enum ttm_bo_type type;
size_t acc_size;
int ret;
if (kernel) {
type = ttm_bo_type_kernel;
} else {
type =... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
bo = kzalloc(sizeof(struct virtio_gpu_object), GFP_KERNEL);
if (bo == NULL) {
return -ENOMEM;
}
if (ret != 0) {
return ret;
}
}
| int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
bo = kzalloc(sizeof(struct virtio_gpu_object), GFP_KERNEL);
if (bo == NULL) {
return -ENOMEM;
}
if (ret != 0) {
kfree(bo);
return ret;
... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bo = kzalloc(sizeof(struct virtio_gpu_object), GFP_KERNEL);
if (bo == NULL) {
return -ENOMEM;
}
/* PL... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bo = kzalloc(sizeof(struct virtio_gpu_object), GFP_KERNEL);
if (bo == NULL) {
return -ENOMEM;
}
/* PL... | int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, unsigned long size, bool kernel, bool pinned, struct virtio_gpu_object **bo_ptr) {
bo = kzalloc(sizeof(struct virtio_gpu_object), GFP_KERNEL);
if (bo == NULL) {
return -ENOMEM;
}
if (ret != 0) {
+ kfree(bo);
retu... |
CVE-2017-10911 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/block/xen-blkback/blkback.c | make_response | static void make_response(struct xen_blkif_ring *ring, u64 id, unsigned short op, int st) {
struct blkif_response resp;
unsigned long flags;
union blkif_back_rings *blk_rings;
int notify;
resp.id = id;
resp.operation = op;
resp.status = st;
spin_lock_irqsave(&ring->blk_ring_lock, flags);... | static void make_response(struct xen_blkif_ring *ring, u64 id, unsigned short op, int st) {
struct blkif_response *resp;
unsigned long flags;
union blkif_back_rings *blk_rings;
int notify;
spin_lock_irqsave(&ring->blk_ring_lock, flags);
blk_rings = &ring->blk_rings;
switch (ring->blkif->blk_... | static void make_response(struct xen_blkif *blkif, u64 id, unsigned short op, int st) {
struct blkif_response resp;
unsigned long flags;
union blkif_back_rings *blk_rings = &blkif->blk_rings;
int notify;
resp.id = id;
resp.operation = op;
resp.status = st;
spin_lock_irqsave(&blkif->blk_r... | static void make_response(struct xen_blkif *blkif, u64 id, unsigned short op, int st) {
struct blkif_response *resp;
unsigned long flags;
union blkif_back_rings *blk_rings = &blkif->blk_rings;
int notify;
spin_lock_irqsave(&blkif->blk_ring_lock, flags);
switch (blkif->blk_protocol) {
case BL... | static void make_response(struct xen_blkif_ring *ring, u64 id, unsigned short op, int st) {
struct blkif_response resp;
unsigned long flags;
int notify;
resp.id = id;
resp.operation = op;
resp.status = st;
spin_lock_irqsave(&ring->blk_ring_lock, flags);
blk_rings = &ring->blk_rings;
... | static void make_response(struct xen_blkif_ring *ring, u64 id, unsigned short op, int st) {
struct blkif_response *resp;
unsigned long flags;
int notify;
spin_lock_irqsave(&ring->blk_ring_lock, flags);
blk_rings = &ring->blk_rings;
switch (ring->blkif->blk_protocol) {
case BLKIF_PROTOCOL_NAT... | static void make_response(struct xen_blkif *blkif, u64 id, unsigned short op, int st) {
struct blkif_response resp;
unsigned long flags;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int notify;
resp.id = id;
resp.operation = op;
resp.status = st;
spin_lock_irqsave(&blkif->blk_ring_lock,... | static void make_response(struct xen_blkif *blkif, u64 id, unsigned short op, int st) {
struct blkif_response *resp;
unsigned long flags;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int notify;
spin_lock_irqsave(&blkif->blk_ring_lock, flags);
switch (blkif->blk_protocol) {
case BLKIF_PROTO... | static void make_response(struct xen_blkif_ring *ring, u64 id, unsigned short op, int st) {
- struct blkif_response resp;
+ struct blkif_response *resp;
unsigned long flags;
int notify;
- resp.id = id;
- resp.operation = op;
- resp.status = st;
spin_lock_irqsave(&ring->blk_ring_lock, flag... |
CVE-2017-11472 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/acpi/acpica/nsutils.c | acpi_ns_terminate | void acpi_ns_terminate(void) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_terminate);
{
union acpi_operand_object *prev;
union acpi_operand_object *next;
next = acpi_gbl_module_code_list;
while (next) {
prev = next;
next = next->method.mutex;
... | void acpi_ns_terminate(void) {
acpi_status status;
union acpi_operand_object *prev;
union acpi_operand_object *next;
ACPI_FUNCTION_TRACE(ns_terminate);
next = acpi_gbl_module_code_list;
while (next) {
prev = next;
next = next->method.mutex;
prev->method.mutex = NULL;
... | void acpi_ns_terminate(void) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_terminate);
{
union acpi_operand_object *prev;
union acpi_operand_object *next;
next = acpi_gbl_module_code_list;
while (next) {
prev = next;
next = next->method.mutex;
... | void acpi_ns_terminate(void) {
acpi_status status;
union acpi_operand_object *prev;
union acpi_operand_object *next;
ACPI_FUNCTION_TRACE(ns_terminate);
next = acpi_gbl_module_code_list;
while (next) {
prev = next;
next = next->method.mutex;
prev->method.mutex = NULL;
... | void acpi_ns_terminate(void) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_terminate);
{
union acpi_operand_object *prev;
union acpi_operand_object *next;
next = acpi_gbl_module_code_list;
}
}
| void acpi_ns_terminate(void) {
acpi_status status;
union acpi_operand_object *prev;
union acpi_operand_object *next;
ACPI_FUNCTION_TRACE(ns_terminate);
next = acpi_gbl_module_code_list;
}
| void acpi_ns_terminate(void) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_terminate);
{
union acpi_operand_object *prev;
union acpi_operand_object *next;
next = acpi_gbl_module_code_list;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS C... | void acpi_ns_terminate(void) {
acpi_status status;
union acpi_operand_object *prev;
union acpi_operand_object *next;
ACPI_FUNCTION_TRACE(ns_terminate);
next = acpi_gbl_module_code_list;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void acpi_ns_terminate(void) {
acpi_status status;
+ union acpi_operand_object *prev;
+ union acpi_operand_object *next;
ACPI_FUNCTION_TRACE(ns_terminate);
- {
- union acpi_operand_object *prev;
- union acpi_operand_object *next;
- next = acpi_gbl_module_code_list;
- }
+ n... |
CVE-2017-11473 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/acpi/boot.c | mp_override_legacy_irq | static void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
int ioapic;
int pin;
struct mpc_intsrc mp_irq;
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) {
return;
}
pin = mp_find_ioapic_pin(ioapic, gsi);
if ((bus_irq == 0) && (trigger == 3)) {
trigg... | static void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
int ioapic;
int pin;
struct mpc_intsrc mp_irq;
if (bus_irq >= NR_IRQS_LEGACY) {
pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq);
return;
}
ioapic = mp_find_ioapic(gsi);
if (ioapic ... | void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
int ioapic;
int pin;
struct mpc_intsrc mp_irq;
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) {
return;
}
pin = mp_find_ioapic_pin(ioapic, gsi);
if ((bus_irq == 0) && (trigger == 3)) {
trigger = 1;... | void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
int ioapic;
int pin;
struct mpc_intsrc mp_irq;
if (bus_irq >= NR_IRQS_LEGACY) {
pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq);
return;
}
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) {
... | static void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
struct mpc_intsrc mp_irq;
ioapic = mp_find_ioapic(gsi);
mp_irq.irqflag = (trigger << 2) | polarity;
mp_irq.srcbusirq = bus_irq;
mp_save_irq(&mp_irq);
}
| static void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
struct mpc_intsrc mp_irq;
if (bus_irq >= NR_IRQS_LEGACY) {
pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq);
return;
}
ioapic = mp_find_ioapic(gsi);
mp_irq.irqflag = (trigger << 2) | polari... | void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpc_intsrc mp_irq;
ioapic = mp_find_ioapic(gsi);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mp_irq.irqflag = (trigger << 2) | polarity;
/* PLACEHOLDER: DO NOT DELET... | void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mpc_intsrc mp_irq;
if (bus_irq >= NR_IRQS_LEGACY) {
pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq);
return;
}
ioapic = mp_find_ioapic(gsi);
... | static void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) {
struct mpc_intsrc mp_irq;
+ if (bus_irq >= NR_IRQS_LEGACY) {
+ pr_warn("Invalid bus_irq %u for legacy override\n", bus_irq);
+ return;
+ }
ioapic = mp_find_ioapic(gsi);
mp_irq.irqflag = (trigger << 2) ... |
CVE-2017-11600 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/xfrm/xfrm_policy.c | xfrm_migrate | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net, struct xfrm_encap_tmpl *encap) {
int i, err, nx_cur = 0, nx_new = 0;
struct xfrm_policy *pol = NULL;
struct xfrm_state *x, *xc;
struct xfrm_state *x_cur[... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net, struct xfrm_encap_tmpl *encap) {
int i, err, nx_cur = 0, nx_new = 0;
struct xfrm_policy *pol = NULL;
struct xfrm_state *x, *xc;
struct xfrm_state *x_cur[... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net) {
int i, err, nx_cur = 0, nx_new = 0;
struct xfrm_policy *pol = NULL;
struct xfrm_state *x, *xc;
struct xfrm_state *x_cur[XFRM_MAX_DEPTH];
struct xfr... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net) {
int i, err, nx_cur = 0, nx_new = 0;
struct xfrm_policy *pol = NULL;
struct xfrm_state *x, *xc;
struct xfrm_state *x_cur[XFRM_MAX_DEPTH];
struct xfr... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net, struct xfrm_encap_tmpl *encap) {
if ((err = xfrm_migrate_check(m, num_migrate)) < 0) {
goto out;
}
if ((pol = xfrm_migrate_policy_find(sel, dir, type... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net, struct xfrm_encap_tmpl *encap) {
if ((err = xfrm_migrate_check(m, num_migrate)) < 0) {
goto out;
}
if (dir >= XFRM_POLICY_MAX) {
err = -EVAL;... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((err = xfrm_migrate_check(m, num_migrate)) < 0) {
goto out;
}
if ((pol = xfrm_migrate_policy_... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((err = xfrm_migrate_check(m, num_migrate)) < 0) {
goto out;
}
if (dir >= XFRM_POLICY_MAX) {
... | int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, struct xfrm_migrate *m, int num_migrate, struct xfrm_kmaddress *k, struct net *net, struct xfrm_encap_tmpl *encap) {
if ((err = xfrm_migrate_check(m, num_migrate)) < 0) {
+ goto out;
+ }
+ if (dir >= XFRM_POLICY_MAX) {
+ err = ... |
CVE-2017-12134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/xen/biomerge.c | xen_biovec_phys_mergeable | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && ((bfn1 == bfn2) || ((bfn1+1) == bfn2));
return ... | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
return bfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == bfn2;
return 0;
} | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long mfn1 = pfn_to_mfn(page_to_pfn(vec1->bv_page));
unsigned long mfn2 = pfn_to_mfn(page_to_pfn(vec2->bv_page));
return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && ((mfn1 == mfn2) || ((mfn1+1) == mfn2));
} | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long mfn1 = pfn_to_mfn(page_to_pfn(vec1->bv_page));
unsigned long mfn2 = pfn_to_mfn(page_to_pfn(vec2->bv_page));
return mfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == mfn2;
} | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && ((bfn1 == bfn2) || ((bfn1+1) == bfn2));
return ... | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
return bfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == bfn2;
return 0;
}
| bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long mfn1 = pfn_to_mfn(page_to_pfn(vec1->bv_page));
unsigned long mfn2 = pfn_to_mfn(page_to_pfn(vec2->bv_page));
return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && ((mfn1 == mfn2) || ((mfn1+1) == mfn2));
}
| bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long mfn1 = pfn_to_mfn(page_to_pfn(vec1->bv_page));
unsigned long mfn2 = pfn_to_mfn(page_to_pfn(vec2->bv_page));
return mfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == mfn2;
} | bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, const struct bio_vec *vec2) {
unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
- return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && ((bfn1 == bfn2) || ((bfn1+1) == bfn2));
+ re... |
CVE-2017-12146 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/base/platform.c | driver_override_show | static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
return sprintf(buf, "%s\n", pdev->driver_override);
} | static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
ssize_t len;
device_lock(dev);
len = sprintf(buf, "%s\n", pdev->driver_override);
device_unlock(dev);
return len;
} | static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
return sprintf(buf, "%s\n", pdev->driver_override);
} | static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
ssize_t len;
device_lock(dev);
len = sprintf(buf, "%s\n", pdev->driver_override);
device_unlock(dev);
return len;
} | static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
return sprintf(buf, "%s\n", pdev->driver_override);
}
| static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
ssize_t len;
device_lock(dev);
len = sprintf(buf, "%s\n", pdev->driver_override);
device_unlock(dev);
return len;
}
| static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
return sprintf(buf, "%s\n", pdev->driver_override);
}
| static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
ssize_t len;
device_lock(dev);
len = sprintf(buf, "%s\n", pdev->driver_override);
device_unlock(dev);
return len;
} | static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) {
struct platform_device *pdev = to_platform_device(dev);
- return sprintf(buf, "%s\n", pdev->driver_override);
+ ssize_t len;
+ device_lock(dev);
+ len = sprintf(buf, "%s\n", pdev->driver_override);
+ ... |
CVE-2017-12146 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/base/platform.c | driver_override_store | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old = pdev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override =... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GF... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old = pdev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override =... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
driver_override = kstrndup(buf, count, GF... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old = pdev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
if (cp) {
... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
if (cp) {
*cp = '\0';
}
d... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old = pdev->driver_override, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
/* PLACEHOLDER: D... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
char *driver_override, *old, *cp;
if (count > PATH_MAX) {
return -EVAL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMEN... | static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {
struct platform_device *pdev = to_platform_device(dev);
- char *driver_override, *old = pdev->driver_override, *cp;
+ char *driver_override, *old, *cp;
if (count > PATH_MAX) {
... |
CVE-2017-12153 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/wireless/nl80211.c | nl80211_set_rekey_data | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct nlattr *tb[NUM_NL80211_REKEY_DATA];
struct cfg80211_gtk_rek... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct nlattr *tb[NUM_NL80211_REKEY_DATA];
struct cfg80211_gtk_rek... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct nlattr *tb[NUM_NL80211_REKEY_DATA];
struct cfg80211_gtk_rek... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct nlattr *tb[NUM_NL80211_REKEY_DATA];
struct cfg80211_gtk_rek... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
if (!info->attrs[NL80211_ATTR_REKEY_DATA]) {
return -EVAL;
}
err = nla_parse(tb, MAX_NL80211_REKEY_DATA, nla_data(info->attrs[NL80211_ATTR_REKEY_DATA]), nla_len(info->attrs[NL80211_ATTR_REKEY_DATA]), nl80211_rekey_polic... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
if (!info->attrs[NL80211_ATTR_REKEY_DATA]) {
return -EVAL;
}
err = nla_parse(tb, MAX_NL80211_REKEY_DATA, nla_data(info->attrs[NL80211_ATTR_REKEY_DATA]), nla_len(info->attrs[NL80211_ATTR_REKEY_DATA]), nl80211_rekey_polic... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!info->attrs[NL80211_ATTR_REKEY_DATA]) {
return -EVAL;
}
err = nla_parse(tb, MAX_NL80211_REKEY_DATA, nla_data(info->attrs[NL80211_ATTR_REKEY_DATA]), nla_len(info->at... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!info->attrs[NL80211_ATTR_REKEY_DATA]) {
return -EVAL;
}
err = nla_parse(tb, MAX_NL80211_REKEY_DATA, nla_data(info->attrs[NL80211_ATTR_REKEY_DATA]), nla_len(info->at... | static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info) {
if (!info->attrs[NL80211_ATTR_REKEY_DATA]) {
return -EVAL;
}
err = nla_parse(tb, MAX_NL80211_REKEY_DATA, nla_data(info->attrs[NL80211_ATTR_REKEY_DATA]), nla_len(info->attrs[NL80211_ATTR_REKEY_DATA]), nl80211_rekey_... |
CVE-2017-12154 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/vmx.c | prepare_vmcs02 | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 exec_control;
vmcs_write16(GUEST_ES_SELECTOR, vmcs12->guest_es_selector);
vmcs_write16(GUEST_CS_SELECTOR, vmcs12->guest_cs_selector);
vmcs_write16(GUEST_SS_SELECTOR, vmcs12->guest_ss_s... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 exec_control;
vmcs_write16(GUEST_ES_SELECTOR, vmcs12->guest_es_selector);
vmcs_write16(GUEST_CS_SELECTOR, vmcs12->guest_cs_selector);
vmcs_write16(GUEST_SS_SELECTOR, vmcs12->guest_ss_s... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 exec_control;
vmcs_write16(GUEST_ES_SELECTOR, vmcs12->guest_es_selector);
vmcs_write16(GUEST_CS_SELECTOR, vmcs12->guest_cs_selector);
vmcs_write16(GUEST_SS_SELECTOR, vmcs12->guest_ss_s... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 exec_control;
vmcs_write16(GUEST_ES_SELECTOR, vmcs12->guest_es_selector);
vmcs_write16(GUEST_CS_SELECTOR, vmcs12->guest_cs_selector);
vmcs_write16(GUEST_SS_SELECTOR, vmcs12->guest_ss_s... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (cpu_has_secondary_exec_ctrls()) {
exec_control = vmx_secondary_exec_control(vmx);
}
vmx_set_constant_host_state(vmx);
exec_control = vmx_exec_control(vmx);
exec_control &= ... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (cpu_has_secondary_exec_ctrls()) {
exec_control = vmx_secondary_exec_control(vmx);
}
vmx_set_constant_host_state(vmx);
exec_control = vmx_exec_control(vmx);
exec_control &= ... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cpu_has_secondary_exec_ctrls()) {
exec_control = vmx_secondary_exec_control(vmx);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (cpu_has_secondary_exec_ctrls()) {
exec_control = vmx_secondary_exec_control(vmx);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
... | static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) {
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (cpu_has_secondary_exec_ctrls()) {
exec_control = vmx_secondary_exec_control(vmx);
}
vmx_set_constant_host_state(vmx);
exec_control = vmx_exec_control(vmx);
exec_con... |
CVE-2017-12188 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/mmu.c | kvm_init_shadow_ept_mmu | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly) {
struct kvm_mmu *context = &vcpu->arch.mmu;
MMU_WARN_ON(VALID_PAGE(context->root_hpa));
context->shadow_root_level = kvm_x86_ops->get_tdp_level();
context->nx = true;
context->page_fault = ept_page_fault;
context->gva_to_gpa = e... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly) {
struct kvm_mmu *context = &vcpu->arch.mmu;
MMU_WARN_ON(VALID_PAGE(context->root_hpa));
context->shadow_root_level = kvm_x86_ops->get_tdp_level();
context->nx = true;
context->page_fault = ept_page_fault;
context->gva_to_gpa = e... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly, bool accessed_dirty) {
struct kvm_mmu *context = &vcpu->arch.mmu;
MMU_WARN_ON(VALID_PAGE(context->root_hpa));
context->shadow_root_level = kvm_x86_ops->get_tdp_level();
context->nx = true;
context->ept_ad = accessed_dirty;
contex... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly, bool accessed_dirty) {
struct kvm_mmu *context = &vcpu->arch.mmu;
MMU_WARN_ON(VALID_PAGE(context->root_hpa));
context->shadow_root_level = kvm_x86_ops->get_tdp_level();
context->nx = true;
context->ept_ad = accessed_dirty;
contex... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly) {
struct kvm_mmu *context = &vcpu->arch.mmu;
update_permission_bitmask(vcpu, context, true);
update_pkru_bitmask(vcpu, context, true);
reset_rsvds_bits_mask_ept(vcpu, context, execonly);
reset_ept_shadow_zero_bits_mask(vcpu, context,... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly) {
struct kvm_mmu *context = &vcpu->arch.mmu;
update_permission_bitmask(vcpu, context, true);
update_pkru_bitmask(vcpu, context, true);
update_last_nonleaf_level(vcpu, context);
reset_rsvds_bits_mask_ept(vcpu, context, execonly);
... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly, bool accessed_dirty) {
struct kvm_mmu *context = &vcpu->arch.mmu;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
update_permission_bitmask(vcpu, context, true);
update_pkru_bitmask(vcpu, context, true);
reset_rsvds_bits_mask_ept(vcpu,... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly, bool accessed_dirty) {
struct kvm_mmu *context = &vcpu->arch.mmu;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
update_permission_bitmask(vcpu, context, true);
update_pkru_bitmask(vcpu, context, true);
update_last_nonleaf_level(vcpu,... | void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, bool execonly) {
struct kvm_mmu *context = &vcpu->arch.mmu;
update_permission_bitmask(vcpu, context, true);
update_pkru_bitmask(vcpu, context, true);
+ update_last_nonleaf_level(vcpu, context);
reset_rsvds_bits_mask_ept(vcpu, context, execonly)... |
CVE-2017-12190 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/bio.c | __bio_map_user_iov | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, const struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int i, j;
int nr_pages = 0;
struct page **pages;
struct bio *bio;
int cur_page = 0;
int ret, offset;
for (i = 0; i < iov_cou... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, const struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int i, j;
int nr_pages = 0;
struct page **pages;
struct bio *bio;
int cur_page = 0;
int ret, offset;
for (i = 0; i < iov_cou... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int i, j;
int nr_pages = 0;
struct page **pages;
struct bio *bio;
int cur_page = 0;
int ret, offset;
for (i = 0; i < iov_count; i+... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int i, j;
int nr_pages = 0;
struct page **pages;
struct bio *bio;
int cur_page = 0;
int ret, offset;
for (i = 0; i < iov_count; i+... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, const struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int nr_pages = 0;
for (i = 0; i < iov_count; i++) {
unsigned long uaddr = (unsigned long)iov[i].iov_base;
unsigned long len = io... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, const struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int nr_pages = 0;
for (i = 0; i < iov_count; i++) {
unsigned long uaddr = (unsigned long)iov[i].iov_base;
unsigned long len = io... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nr_pages = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < iov_count; i++) ... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int nr_pages = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < iov_count; i++) ... | static struct bio *__bio_map_user_iov(struct request_queue *q, struct block_device *bdev, const struct sg_iovec *iov, int iov_count, int write_to_vm, gfp_t gfp_mask) {
int nr_pages = 0;
for (i = 0; i < iov_count; i++) {
unsigned long uaddr = (unsigned long)iov[i].iov_base;
unsigned long len... |
CVE-2017-12192 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/keyctl.c | keyctl_read_key | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_permission(key_ref, K... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit(KEY_FLAG_NEGATIVE,... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_permission(key_ref, K... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit(KEY_FLAG_NEGATIVE,... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_permission(key_ref, KEY_NEED_READ);
error2:
key_put(key);
error:
return ret;
}
| long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
ret = -ENOKEY;
goto error2;
}
ret = key_... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_pe... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
+ if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
+ ret = -ENOKEY;
+ goto error2;
+ }
... |
CVE-2017-12193 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | lib/assoc_array.c | assoc_array_insert_into_terminal_node | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
struct assoc_array_shortcut *shortcut, *new_s0;
struct assoc_array_node *node, *new_n0, *new_n1, *side;
struct assoc_array_ptr ... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
struct assoc_array_shortcut *shortcut, *new_s0;
struct assoc_array_node *node, *new_n0, *new_n1, *side;
struct assoc_array_ptr ... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
struct assoc_array_shortcut *shortcut, *new_s0;
struct assoc_array_node *node, *new_n0, *new_n1, *side;
struct assoc_array_ptr ... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
struct assoc_array_shortcut *shortcut, *new_s0;
struct assoc_array_node *node, *new_n0, *new_n1, *side;
struct assoc_array_ptr ... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
node = result->terminal_node.node;
pr_devel("-->%s()\n", __func__);
for (i = 0; i < ASSOC_ARRAY_FAN_; i++) {
}
new_n0 =... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
node = result->terminal_node.node;
pr_devel("-->%s()\n", __func__);
for (i = 0; i < ASSOC_ARRAY_FAN_; i++) {
}
new_n0 =... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
node = result->terminal_node.node;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
node = result->terminal_node.node;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) {
node = result->terminal_node.node;
pr_devel("-->%s()\n", __func__);
for (i = 0; i < ASSOC_ARRAY_FAN_; i++) {
}
ne... |
CVE-2017-12762 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/isdn/i4l/isdn_common.c | isdn_ioctl | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
uint minor = iminor(file_inode(file));
isdn_ctrl c;
int drvidx;
int ret;
int i;
char *p;
char *s;
union iocpar {
char name[10];
char bname[22];
isdn_ioctl_struct iocts;
isdn_net_ioctl_phone ph... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
uint minor = iminor(file_inode(file));
isdn_ctrl c;
int drvidx;
int ret;
int i;
char *p;
char *s;
union iocpar {
char name[10];
char bname[22];
isdn_ioctl_struct iocts;
isdn_net_ioctl_phone ph... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
uint minor = iminor(file_inode(file));
isdn_ctrl c;
int drvidx;
int ret;
int i;
char *p;
char *s;
union iocpar {
char name[10];
char bname[22];
isdn_ioctl_struct iocts;
isdn_net_ioctl_phone ph... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
uint minor = iminor(file_inode(file));
isdn_ctrl c;
int drvidx;
int ret;
int i;
char *p;
char *s;
union iocpar {
char name[10];
char bname[22];
isdn_ioctl_struct iocts;
isdn_net_ioctl_phone ph... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
if (minor <= ISDN_MOR_CTRLMAX) {
switch (cmd) {
case IIOCNETASL:
if (arg) {
if (copy_from_user(bname, argp, sizeof(bname) - 1)) {
return -EFAULT;
}
} else {
... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
if (minor <= ISDN_MOR_CTRLMAX) {
switch (cmd) {
case IIOCNETASL:
if (arg) {
if (copy_from_user(bname, argp, sizeof(bname) - 1)) {
return -EFAULT;
}
bname[si... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (minor <= ISDN_MOR_CTRLMAX) {
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case IIOCNETASL:
if (arg) {
if (copy_from_user(bname, argp, ... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (minor <= ISDN_MOR_CTRLMAX) {
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case IIOCNETASL:
if (arg) {
if (copy_from_user(bname, argp, ... | static int isdn_ioctl(struct file *file, uint cmd, ulong arg) {
if (minor <= ISDN_MOR_CTRLMAX) {
switch (cmd) {
case IIOCNETASL:
if (arg) {
if (copy_from_user(bname, argp, sizeof(bname) - 1)) {
return -EFAULT;
}
+ ... |
CVE-2017-12762 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/isdn/i4l/isdn_net.c | isdn_net_newslave | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
isdn_net_dev *n;
char newname[10];
if (p) {
if (!strlen(p + 1)) {
return NULL;
}
strcpy(newname, p + 1);
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
}
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
isdn_net_dev *n;
char newname[10];
if (p) {
if (strscpy(newname, p + 1, sizeof(newname)) <= 0) {
return NULL;
}
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
}
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
isdn_net_dev *n;
char newname[10];
if (p) {
if (!strlen(p + 1)) {
return NULL;
}
strcpy(newname, p + 1);
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
}
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
isdn_net_dev *n;
char newname[10];
if (p) {
if (strscpy(newname, p + 1, sizeof(newname)) <= 0) {
return NULL;
}
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
}
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
if (p) {
if (!strlen(p + 1)) {
return NULL;
}
strcpy(newname, p + 1);
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
}
if (n->local->master) {
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
if (p) {
if (strscpy(newname, p + 1, sizeof(newname)) <= 0) {
return NULL;
}
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
}
if (n->local->master) {
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (p) {
if (!strlen(p + 1)) {
return NULL;
}
strcpy(newname, p + 1);
*p = 0;
if (!(n = isdn_net_findif(parm))) {
return NULL;
... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (p) {
if (strscpy(newname, p + 1, sizeof(newname)) <= 0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
*p = 0;
if (!(n = isdn_net_findif(parm))... | char * isdn_net_newslave(char *parm) {
char *p = strchr(parm, ',');
if (p) {
- if (!strlen(p + 1)) {
+ if (strscpy(newname, p + 1, sizeof(newname)) <= 0) {
return NULL;
}
- strcpy(newname, p + 1);
*p = 0;
if (!(n = isdn_net_findif(parm))) {
... |
CVE-2017-13080 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mac80211/key.c | ieee80211_key_link | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
struct ieee80211_local *local = sdata->local;
struct ieee80211_key *old_key;
int idx, ret;
bool pairwise;
if (WARN_ON(!sdata || !key)) {
return -EVAL;
}
pairwise = key->conf... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
struct ieee80211_local *local = sdata->local;
struct ieee80211_key *old_key;
int idx, ret;
bool pairwise;
if (WARN_ON(!sdata || !key)) {
return -EVAL;
}
pairwise = key->conf... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
struct ieee80211_local *local = sdata->local;
struct ieee80211_key *old_key;
int idx, ret;
bool pairwise;
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyid... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
struct ieee80211_local *local = sdata->local;
struct ieee80211_key *old_key;
int idx, ret;
bool pairwise;
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyid... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
if (WARN_ON(!sdata || !key)) {
return -EVAL;
}
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyidx;
key->local = sdata->local;
key->sdata = sdata;
... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
if (WARN_ON(!sdata || !key)) {
return -EVAL;
}
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyidx;
mutex_lock(&sdata->local->key_mtx);
if (sta && p... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyidx;
key->local = sdata->local;
key->sdata = sdata;
key->sta =... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyidx;
mutex_lock(&sdata->local->key_mtx);
if (sta && pairwise) {
... | int ieee80211_key_link(struct ieee80211_key *key, struct ieee80211_sub_if_data *sdata, struct sta_info *sta) {
if (WARN_ON(!sdata || !key)) {
return -EVAL;
}
pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
idx = key->conf.keyidx;
- key->local = sdata->local;
- key->sdata = ... |
CVE-2017-13166 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-ioctl.c | v4l_enum_fmt | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = -EVAL;
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikely(!ops->... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = -EVAL;
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikely(!ops->... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = -EVAL;
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikely(!ops->... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = -EVAL;
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikely(!ops->... | static int v4l_enum_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_fmtdesc *p = arg;
- struct video_device *vfd = video_devdata(file);
- bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
- bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
- bool is_tch = vfd->vfl... |
CVE-2017-13166 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-ioctl.c | v4l_g_fmt | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
case V4L2_BUF_TYPE_VIDEO_PUT_OVERLAY: {
... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
case V4L2_BUF_TYPE_VIDEO_PUT_OVERLAY: {
... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
switch (p->type) {
}
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlikel... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
switch (p->type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
switch (p->type) {
cas... | static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
- struct video_device *vfd = video_devdata(file);
- bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
- bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
- bool is_tch = vfd->vfl_typ... |
CVE-2017-13166 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-ioctl.c | v4l_s_fmt | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = v4l_enable_media_source(vfd);
if (ret) {
... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = v4l_enable_media_source(vfd);
if (ret) {
... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = v4l_enable_media_source(vfd);
if (ret) {
... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type == V... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
ret = v4l_enable_media_source(vfd);
if (ret) {
... | static int v4l_s_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
- bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
- bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
- bool is_tch = vfd->vfl_typ... |
CVE-2017-13166 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/v4l2-core/v4l2-ioctl.c | v4l_try_fmt | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ==... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
v4l_sanitize_format(p);
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlike... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ==... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
v4l_sanitize_format(p);
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlike... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ==... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
v4l_sanitize_format(p);
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlike... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
struct video_device *vfd = video_devdata(file);
bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
bool is_tch = vfd->vfl_type ==... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
int ret = check_fmt(file, p->type);
if (ret) {
return ret;
}
v4l_sanitize_format(p);
switch (p->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
if (unlike... | static int v4l_try_fmt(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) {
struct v4l2_format *p = arg;
- struct video_device *vfd = video_devdata(file);
- bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
- bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR;
- bool is_tch = vfd->vfl_t... |
CVE-2017-13167 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/timer.c | snd_timer_user_read | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_irq(&tu->qlock)... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_irq(&tu->qlock)... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
struct snd_timer_user *tu;
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
unit = tu->tread ? sizeof(struct snd_timer_tread) : sizeof(struct snd_timer_read);
spin_lock_... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
long result = 0, unit;
int err = 0;
tu = file->private_data;
while ((long)count - result >= unit) {
while (!tu->qused) {
wait_queue_t wait;
if ((file->f_flags & O_NONBLOCK)... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
while ((long)count - result >= unit) {
while (!tu->qused) {
wait_queue_t wait;
if ((file->f_flag... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
long result = 0, unit;
int err = 0;
tu = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((long)count - result >= unit) {
... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
long result = 0, unit;
int qhead;
int err = 0;
tu = file->private_data;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while ((long)count - result ... | static ssize_t snd_timer_user_read(struct file *file, char *buffer, size_t count, loff_t *offset) {
long result = 0, unit;
+ int qhead;
int err = 0;
tu = file->private_data;
while ((long)count - result >= unit) {
while (!tu->qused) {
wait_queue_t wait;
if ((fil... |
CVE-2017-13168 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/sg.c | sg_read | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
int req_pack_id = -1;
sg_io_hdr_t *hp;
struct sg_header *old_hdr = NULL;
int retval = 0;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
int req_pack_id = -1;
sg_io_hdr_t *hp;
struct sg_header *old_hdr = NULL;
int retval = 0;
retval = sg_check_file_access(filp, __func__);
if (retval) {
... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
int req_pack_id = -1;
sg_io_hdr_t *hp;
struct sg_header *old_hdr = NULL;
int retval = 0;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
int req_pack_id = -1;
sg_io_hdr_t *hp;
struct sg_header *old_hdr = NULL;
int retval = 0;
retval = sg_check_file_access(filp, __func__);
if (retval) {
... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
int retval = 0;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
SCSI_LOG_TIME(3, sg_printk(KERN_FO, sdp, "sg_read: count=%d\n", (int) count));
if (sfp->force_packid... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
int retval = 0;
retval = sg_check_file_access(filp, __func__);
if (retval) {
return retval;
}
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
SCSI_L... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retval = 0;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
SCSI_LOG_TIME(3, printk("sg_read: %s, count=%d\n", sdp... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retval = 0;
retval = sg_check_file_access(filp, __func__);
if (retval) {
return retval;
}
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->par... | static ssize_t sg_read(struct file *filp, char *buf, size_t count, loff_t * ppos) {
int retval = 0;
+ retval = sg_check_file_access(filp, __func__);
+ if (retval) {
+ return retval;
+ }
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}
... |
CVE-2017-13168 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/sg.c | sg_write | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[SG_MAX_CDB_SI... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[SG_MAX_CDB_SI... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[MAX_COMMAND_S... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[MAX_COMMAND_S... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
unsigned char cmnd[SG_MAX_CDB_SIZE];
if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
return -EVAL;
}
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
return -ENXIO;
}... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
unsigned char cmnd[SG_MAX_CDB_SIZE];
int retval;
retval = sg_check_file_access(filp, __func__);
if (retval) {
return retval;
}
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned char cmnd[MAX_COMMAND_SIZE];
if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
return -EVAL;
}
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sd... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned char cmnd[MAX_COMMAND_SIZE];
int retval;
retval = sg_check_file_access(filp, __func__);
if (retval) {
return retval;
}
if ((!(sfp = (Sg_fd... | static ssize_t sg_write(struct file *filp, const char *buf, size_t count, loff_t * ppos) {
unsigned char cmnd[SG_MAX_CDB_SIZE];
- if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
- return -EVAL;
+ int retval;
+ retval = sg_check_file_access(filp, __func__);
+ if (retval) {
+ return retva... |
CVE-2017-13215 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | crypto/algif_skcipher.c | skcipher_recvmsg | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
unsigned bs = crypto_ablkcipher_blocksize(crypto_ablkcipher_reqtfm( &ctx->req));... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
unsigned bs = crypto_ablkcipher_blocksize(crypto_ablkcipher_reqtfm( &ctx->req));... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
unsigned bs = crypto_ablkcipher_blocksize(crypto_ablkcipher_reqtfm( &ctx->req));... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
unsigned bs = crypto_ablkcipher_blocksize(crypto_ablkcipher_reqtfm( &ctx->req));... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
iovlen--, iov++) {
while (seglen) {
sgl = list_first_entry(&ctx->tsgl, struct skcipher_sg_list, list)... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
iovlen--, iov++) {
while (seglen) {
used = ctx->used;
if (!used) {
err = ... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
iovlen--, iov++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
iovlen--, iov++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, struct msghdr *msg, size_t ignored, int flags) {
for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
iovlen--, iov++) {
while (seglen) {
- sgl = list_first_entry(&ctx->tsgl, struct skcipher_sg_list, ... |
CVE-2017-13216 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/staging/android/ashmem.c | ashmem_ioctl | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
struct ashmem_area *asma = file->private_data;
long ret = -ENOTTY;
switch (cmd) {
case ASHMEM_SET_NAME:
ret = set_name(asma, (void *) arg);
break;
case ASHMEM_GET_NAME:
ret = get_name(asma, (vo... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
struct ashmem_area *asma = file->private_data;
long ret = -ENOTTY;
switch (cmd) {
case ASHMEM_SET_NAME:
ret = set_name(asma, (void *) arg);
break;
case ASHMEM_GET_NAME:
ret = get_name(asma, (vo... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
struct ashmem_area *asma = file->private_data;
long ret = -ENOTTY;
switch (cmd) {
case ASHMEM_SET_NAME:
ret = set_name(asma, (void *)arg);
break;
case ASHMEM_GET_NAME:
ret = get_name(asma, (voi... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
struct ashmem_area *asma = file->private_data;
long ret = -ENOTTY;
switch (cmd) {
case ASHMEM_SET_NAME:
ret = set_name(asma, (void *)arg);
break;
case ASHMEM_GET_NAME:
ret = get_name(asma, (voi... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
switch (cmd) {
case ASHMEM_SET_SIZE:
ret = -EVAL;
if (!asma->file) {
asma->size = (size_t) arg;
}
break;
}
return ret;
}
| static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
switch (cmd) {
case ASHMEM_SET_SIZE:
ret = -EVAL;
mutex_lock(&ashmem_mutex);
if (!asma->file) {
asma->size = (size_t) arg;
}
mutex_unlock(&ashmem_mutex);
break;
}
... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case ASHMEM_SET_SIZE:
ret = -EVAL;
if (!asma->file) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case ASHMEM_SET_SIZE:
ret = -EVAL;
mutex_lock(&ashmem_mutex);
if (!asma->file) {
/* PL... | static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) {
switch (cmd) {
case ASHMEM_SET_SIZE:
ret = -EVAL;
+ mutex_lock(&ashmem_mutex);
if (!asma->file) {
asma->size = (size_t) arg;
}
+ mutex_unlock(&ashmem_mutex);
break... |
CVE-2017-13305 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/encrypted-keys/encrypted.c | valid_master_desc | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
if (!memcmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
if (strlen(new_desc) == KEY_TRUSTED_PREFIX_LEN) {
goto out;
}
if (orig_desc) {
if (memcmp(new_desc, orig_desc, KEY_TRUSTED_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
int prefix_len;
if (!strncmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
prefix_len = KEY_TRUSTED_PREFIX_LEN;
} else if (!strncmp(new_desc, KEY_USER_PREFIX, KEY_USER_PREFIX_LEN)) {
prefix_len = KEY_USER_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
if (!memcmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
if (strlen(new_desc) == KEY_TRUSTED_PREFIX_LEN) {
goto out;
}
if (orig_desc) {
if (memcmp(new_desc, orig_desc, KEY_TRUSTED_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
int prefix_len;
if (!strncmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
prefix_len = KEY_TRUSTED_PREFIX_LEN;
} else if (!strncmp(new_desc, KEY_USER_PREFIX, KEY_USER_PREFIX_LEN)) {
prefix_len = KEY_USER_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
if (!memcmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
if (strlen(new_desc) == KEY_TRUSTED_PREFIX_LEN) {
goto out;
}
if (orig_desc) {
if (memcmp(new_desc, orig_desc, KEY_TRUSTED_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
int prefix_len;
if (!strncmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
prefix_len = KEY_TRUSTED_PREFIX_LEN;
} else if (!strncmp(new_desc, KEY_USER_PREFIX, KEY_USER_PREFIX_LEN)) {
prefix_len = KEY_USER_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
if (!memcmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
if (strlen(new_desc) == KEY_TRUSTED_PREFIX_LEN) {
goto out;
}
if (orig_desc) {
if (memcmp(new_desc, orig_desc, KEY_TRUSTED_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
int prefix_len;
if (!strncmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
prefix_len = KEY_TRUSTED_PREFIX_LEN;
} else if (!strncmp(new_desc, KEY_USER_PREFIX, KEY_USER_PREFIX_LEN)) {
prefix_len = KEY_USER_... | static int valid_master_desc(const char *new_desc, const char *orig_desc) {
- if (!memcmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN)) {
- if (strlen(new_desc) == KEY_TRUSTED_PREFIX_LEN) {
- goto out;
- }
- if (orig_desc) {
- if (memcmp(new_desc, orig_desc, KEY_T... |
CVE-2017-13695 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/acpi/acpica/nseval.c | acpi_ns_evaluate | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_evaluate);
if (!info) {
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &in... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_evaluate);
if (!info) {
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &in... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_evaluate);
if (!info) {
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &in... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
acpi_status status;
ACPI_FUNCTION_TRACE(ns_evaluate);
if (!info) {
return_ACPI_STATUS(AE_BAD_PARAMETER);
}
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &in... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &info->node);
}
info->return_object = NULL;
info->obj_desc = acpi_ns_get_attached_object(info->node);
ACPI_DEBUG_PRT((... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &info->node);
}
info->return_object = NULL;
info->obj_desc = acpi_ns_get_attached_object(info->node);
ACPI_DEBUG_PRT((... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &info->node);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHO... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &info->node);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHO... | acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info) {
if (!info->node) {
status = acpi_ns_get_node(info->prefix_node, info->relative_pathname, ACPI_NS_NO_UPSEARCH, &info->node);
}
info->return_object = NULL;
info->obj_desc = acpi_ns_get_attached_object(info->node);
ACPI_DEBU... |
CVE-2017-14051 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/qla2xxx/qla_attr.c | qla2x00_sysfs_write_optrom_ctl | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, struct device, kobj)));
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, struct device, kobj)));
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, struct device, kobj)));
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, struct device, kobj)));
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
uint32_t size = ha->optrom_size;
if (start > ha->optrom_size) {
return -EVAL;
}
... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
uint32_t size = ha->optrom_size;
if (start > ha->optrom_size) {
return -EVAL;
}
... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
uint32_t size = ha->optrom_size;
/* PLACEH... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
uint32_t size = ha->optrom_size;
/* PLACEH... | static ssize_t qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) {
struct qla_hw_data *ha = vha->hw;
uint32_t start = 0;
uint32_t size = ha->optrom_size;
if (start > ha->optrom_size) {
return -EVAL;
... |
CVE-2017-14106 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp.c | tcp_disconnect | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int err = 0;
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int err = 0;
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int err = 0;
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (... | int tcp_disconnect(struct sock *sk, int flags) {
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int err = 0;
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE) {
tcp_set_state(sk, TCP_CLOSE);
}
if (... | int tcp_disconnect(struct sock *sk, int flags) {
inet_csk_delack_init(sk);
tcp_init_send_head(sk);
}
| int tcp_disconnect(struct sock *sk, int flags) {
inet_csk_delack_init(sk);
icsk->icsk_ack.rcv_mss = TCP_M_MSS;
tcp_init_send_head(sk);
}
| int tcp_disconnect(struct sock *sk, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inet_csk_delack_init(sk);
tcp_init_send_head(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int tcp_disconnect(struct sock *sk, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inet_csk_delack_init(sk);
icsk->icsk_ack.rcv_mss = TCP_M_MSS;
tcp_init_send_head(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | int tcp_disconnect(struct sock *sk, int flags) {
inet_csk_delack_init(sk);
+ icsk->icsk_ack.rcv_mss = TCP_M_MSS;
tcp_init_send_head(sk);
} |
CVE-2017-14156 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/video/fbdev/aty/atyfb_base.c | atyfb_ioctl | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
struct atyfb_par *par = (struct atyfb_par *) info->par;
struct fbtype fbtyp;
switch (cmd) {
case FBIOGTYPE:
fbtyp.fb_type = FBTYPE_PCI_GENERIC;
fbtyp.fb_width = par->crtc.vxres;
fbtyp.fb_height = par->crtc.vyre... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
struct atyfb_par *par = (struct atyfb_par *) info->par;
struct fbtype fbtyp;
switch (cmd) {
case FBIOGTYPE:
fbtyp.fb_type = FBTYPE_PCI_GENERIC;
fbtyp.fb_width = par->crtc.vxres;
fbtyp.fb_height = par->crtc.vyre... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
struct atyfb_par *par = (struct atyfb_par *) info->par;
struct fbtype fbtyp;
switch (cmd) {
case FBIOGTYPE:
fbtyp.fb_type = FBTYPE_PCI_GENERIC;
fbtyp.fb_width = par->crtc.vxres;
fbtyp.fb_height = par->crtc.vyre... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
struct atyfb_par *par = (struct atyfb_par *) info->par;
struct fbtype fbtyp;
switch (cmd) {
case FBIOGTYPE:
fbtyp.fb_type = FBTYPE_PCI_GENERIC;
fbtyp.fb_width = par->crtc.vxres;
fbtyp.fb_height = par->crtc.vyre... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
switch (cmd) {
case ATYIO_CLKR:
if (M64_HAS(TEGRATED)) {
struct atyclk clk;
union aty_pll *pll = &par->pll;
if (copy_to_user((struct atyclk *) arg, &clk, sizeof(clk))) {
return -EFAU... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
switch (cmd) {
case ATYIO_CLKR:
if (M64_HAS(TEGRATED)) {
struct atyclk clk = { 0 };
union aty_pll *pll = &par->pll;
if (copy_to_user((struct atyclk *) arg, &clk, sizeof(clk))) {
retu... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case ATYIO_CLKR:
if (M64_HAS(TEGRATED)) {
struct atyclk clk;
union aty_pll *pll = &par->pll;
... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case ATYIO_CLKR:
if (M64_HAS(TEGRATED)) {
struct atyclk clk = { 0 };
union aty_pll *pll = &par-... | static int atyfb_ioctl(struct fb_info *info, u_int cmd, u_long arg) {
switch (cmd) {
case ATYIO_CLKR:
if (M64_HAS(TEGRATED)) {
- struct atyclk clk;
+ struct atyclk clk = { 0 };
union aty_pll *pll = &par->pll;
if (copy_to_user((struct atyclk *) arg, &cl... |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_conn_attr_is_visible | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_conn *conn = transport_class_to_conn(cdev);
struct iscsi_transport *t = conn->transport;
int param;
if (attr == &dev_attr_c... | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_conn *conn = transport_class_to_conn(cdev);
struct iscsi_transport *t = conn->transport;
int param;
if (attr == &dev_attr_c... | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_conn *conn = transport_class_to_conn(cdev);
struct iscsi_transport *t = conn->transport;
int param;
if (attr == &dev_attr_c... | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_conn *conn = transport_class_to_conn(cdev);
struct iscsi_transport *t = conn->transport;
int param;
if (attr == &dev_attr_c... | static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
}
| static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
}
| static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_conn_match | static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct iscsi_cls_conn *conn;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_conn_dev(dev)) {
return 0;
}
conn = iscsi_dev_to_conn(dev);
sess... | static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct iscsi_cls_conn *conn;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_conn_dev(dev)) {
return 0;
}
conn = iscsi_dev_to_conn(dev);
sess... | static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct iscsi_cls_conn *conn;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_conn_dev(dev)) {
return 0;
}
conn = iscsi_dev_to_conn(dev);
sess... | static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct iscsi_cls_conn *conn;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_conn_dev(dev)) {
return 0;
}
conn = iscsi_dev_to_conn(dev);
sess... | static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
}
| static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
}
| static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int iscsi_conn_match(struct attribute_container *cont, struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_host_attr_is_visible | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct Scsi_Host *shost = transport_class_to_shost(cdev);
struct iscsi_internal *priv = to_iscsi_internal(shost->transportt);
int param;
if ... | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct Scsi_Host *shost = transport_class_to_shost(cdev);
struct iscsi_internal *priv = to_iscsi_internal(shost->transportt);
int param;
if ... | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct Scsi_Host *shost = transport_class_to_shost(cdev);
struct iscsi_internal *priv = to_iscsi_internal(shost->transportt);
int param;
if ... | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct Scsi_Host *shost = transport_class_to_shost(cdev);
struct iscsi_internal *priv = to_iscsi_internal(shost->transportt);
int param;
if ... | static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
}
| static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
}
| static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static umode_t iscsi_host_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_host_match | static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!scsi_is_host_device(dev)) {
return 0;
}
shost = dev_to_shost(dev);
if (!shost->transportt || shost->transportt->host_attrs.ac.class != &iscsi_hos... | static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!scsi_is_host_device(dev)) {
return 0;
}
shost = dev_to_shost(dev);
if (!shost->transportt || shost->transportt->host_attrs.ac.class != &iscsi_hos... | static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!scsi_is_host_device(dev)) {
return 0;
}
shost = dev_to_shost(dev);
if (!shost->transportt || shost->transportt->host_attrs.ac.class != &iscsi_hos... | static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!scsi_is_host_device(dev)) {
return 0;
}
shost = dev_to_shost(dev);
if (!shost->transportt || shost->transportt->host_attrs.ac.class != &iscsi_hos... | static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
}
| static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
}
| static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int iscsi_host_match(struct attribute_container *cont, struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_register_transport | struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
struct iscsi_internal *priv;
unsigned long flags;
int err;
BUG_ON(!tt);
priv = iscsi_if_transport_lookup(tt);
if (priv) {
return NULL;
}
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!pri... | struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
struct iscsi_internal *priv;
unsigned long flags;
int err;
BUG_ON(!tt);
priv = iscsi_if_transport_lookup(tt);
if (priv) {
return NULL;
}
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!pri... | struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
struct iscsi_internal *priv;
unsigned long flags;
int err;
BUG_ON(!tt);
priv = iscsi_if_transport_lookup(tt);
if (priv) {
return NULL;
}
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!pri... | struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
struct iscsi_internal *priv;
unsigned long flags;
int err;
BUG_ON(!tt);
priv = iscsi_if_transport_lookup(tt);
if (priv) {
return NULL;
}
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!pri... | struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
}
| struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
}
| struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| struct scsi_transport_template * iscsi_register_transport(struct iscsi_transport *tt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_session_attr_is_visible | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_session *session = transport_class_to_session(cdev);
struct iscsi_transport *t = session->transport;
int param;
if (attr... | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_session *session = transport_class_to_session(cdev);
struct iscsi_transport *t = session->transport;
int param;
if (attr... | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_session *session = transport_class_to_session(cdev);
struct iscsi_transport *t = session->transport;
int param;
if (attr... | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_session *session = transport_class_to_session(cdev);
struct iscsi_transport *t = session->transport;
int param;
if (attr... | static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
}
| static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
}
| static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static umode_t iscsi_session_attr_is_visible(struct kobject *kobj, struct attribute *attr, int i) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_session_match | static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_session_dev(dev)) {
return 0;
}
session = iscsi_dev_to_session(dev);
shost = iscsi_session_to_... | static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_session_dev(dev)) {
return 0;
}
session = iscsi_dev_to_session(dev);
shost = iscsi_session_to_... | static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_session_dev(dev)) {
return 0;
}
session = iscsi_dev_to_session(dev);
shost = iscsi_session_to_... | static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
struct iscsi_cls_session *session;
struct Scsi_Host *shost;
struct iscsi_internal *priv;
if (!iscsi_is_session_dev(dev)) {
return 0;
}
session = iscsi_dev_to_session(dev);
shost = iscsi_session_to_... | static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
}
| static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
}
| static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int iscsi_session_match(struct attribute_container *cont, struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14489 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/scsi_transport_iscsi.c | iscsi_transport_init | static int iscsi_transport_init(void) {
int err;
struct netlink_kernel_cfg cfg = {
.groups = 1, .input = iscsi_if_rx,
};
printk(KERN_FO "Loading iSCSI transport class v%s.\n", ISCSI_TRANSPORT_VERSION);
atomic_set(&iscsi_session_nr, 0);
err = class_register(&iscsi_transport_class);
if... | static int iscsi_transport_init(void) {
int err;
struct netlink_kernel_cfg cfg = {
.groups = 1, .input = iscsi_if_rx,
};
printk(KERN_FO "Loading iSCSI transport class v%s.\n", ISCSI_TRANSPORT_VERSION);
atomic_set(&iscsi_session_nr, 0);
err = class_register(&iscsi_transport_class);
if... | static int iscsi_transport_init(void) {
int err;
struct netlink_kernel_cfg cfg = {
.groups = 1, .input = iscsi_if_rx,
};
printk(KERN_FO "Loading iSCSI transport class v%s.\n", ISCSI_TRANSPORT_VERSION);
atomic_set(&iscsi_session_nr, 0);
err = class_register(&iscsi_transport_class);
if... | static int iscsi_transport_init(void) {
int err;
struct netlink_kernel_cfg cfg = {
.groups = 1, .input = iscsi_if_rx,
};
printk(KERN_FO "Loading iSCSI transport class v%s.\n", ISCSI_TRANSPORT_VERSION);
atomic_set(&iscsi_session_nr, 0);
err = class_register(&iscsi_transport_class);
if... | static int iscsi_transport_init(void) {
}
| static int iscsi_transport_init(void) {
}
| static int iscsi_transport_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int iscsi_transport_init(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | |
CVE-2017-14497 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/packet/af_packet.c | tpacket_rcv | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct sock *sk;
struct packet_sock *po;
struct sockaddr_ll *sll;
union tpacket_uhdr h;
u8 *skb_head = skb->data;
int skb_len = skb->len;
unsigned int snaplen, res;
... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct sock *sk;
struct packet_sock *po;
struct sockaddr_ll *sll;
union tpacket_uhdr h;
u8 *skb_head = skb->data;
int skb_len = skb->len;
unsigned int snaplen, res;
... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct sock *sk;
struct packet_sock *po;
struct sockaddr_ll *sll;
union tpacket_uhdr h;
u8 *skb_head = skb->data;
int skb_len = skb->len;
unsigned int snaplen, res;
... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct sock *sk;
struct packet_sock *po;
struct sockaddr_ll *sll;
union tpacket_uhdr h;
u8 *skb_head = skb->data;
int skb_len = skb->len;
unsigned int snaplen, res;
... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
bool is_drop_n_account = false;
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
if (sk->sk_type == SOCK_DGRAM) {
} else {
if (po->has_vnet_hdr) {
netoff += siz... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
bool is_drop_n_account = false;
bool do_vnet = false;
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
if (sk->sk_type == SOCK_DGRAM) {
} else {
if (po->has_vnet_hdr) {... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool is_drop_n_account = false;
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool is_drop_n_account = false;
bool do_vnet = false;
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
/* PLACEHOLDER: DO NOT DELE... | static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
bool is_drop_n_account = false;
+ bool do_vnet = false;
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
if (sk->sk_type == SOCK_DGRAM) {
} else {
if (po->has_vnet... |
CVE-2017-14991 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/sg.c | sg_fill_request_table | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
Sg_request *srp;
int val;
unsigned int ms;
val = 0;
list_for_each_entry(srp, &sfp->rq_list, entry) {
if (val > SG_MAX_QUEUE) {
break;
}
memset(&rinfo[val], 0, SZ_SG_REQ_FO);
rinfo[val].r... | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
Sg_request *srp;
int val;
unsigned int ms;
val = 0;
list_for_each_entry(srp, &sfp->rq_list, entry) {
if (val > SG_MAX_QUEUE) {
break;
}
rinfo[val].req_state = srp->done + 1;
rinfo[val].p... | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
Sg_request *srp;
int val;
unsigned int ms;
val = 0;
list_for_each_entry(srp, &sfp->rq_list, entry) {
if (val > SG_MAX_QUEUE) {
break;
}
memset(&rinfo[val], 0, SZ_SG_REQ_FO);
rinfo[val].r... | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
Sg_request *srp;
int val;
unsigned int ms;
val = 0;
list_for_each_entry(srp, &sfp->rq_list, entry) {
if (val > SG_MAX_QUEUE) {
break;
}
rinfo[val].req_state = srp->done + 1;
rinfo[val].p... | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
list_for_each_entry(srp, &sfp->rq_list, entry) {
memset(&rinfo[val], 0, SZ_SG_REQ_FO);
rinfo[val].req_state = srp->done + 1;
}
}
| static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
list_for_each_entry(srp, &sfp->rq_list, entry) {
rinfo[val].req_state = srp->done + 1;
}
}
| static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry(srp, &sfp->rq_list, entry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memset(&rinfo[val], 0, SZ_SG_REQ_FO);
rinfo[val].req_state = srp->done + 1;
/... | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry(srp, &sfp->rq_list, entry) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rinfo[val].req_state = srp->done + 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static void sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) {
list_for_each_entry(srp, &sfp->rq_list, entry) {
- memset(&rinfo[val], 0, SZ_SG_REQ_FO);
rinfo[val].req_state = srp->done + 1;
}
} |
CVE-2017-14991 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/sg.c | sg_ioctl | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
int *ip = p;
int result, val, read_only;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
unsigned long iflags;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
int *ip = p;
int result, val, read_only;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
unsigned long iflags;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
int *ip = p;
int result, val, read_only;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
unsigned long iflags;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
int *ip = p;
int result, val, read_only;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
unsigned long iflags;
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp))) {
... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
switch (cmd_in) {
case SG_GET_REQUEST_TABLE:
if (!access_ok(VERIFY_WRITE, p, SZ_SG_REQ_FO * SG_MAX_QUEUE)) {
return -EFAULT;
} else {
sg_req_info_t *rinfo;
... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
switch (cmd_in) {
case SG_GET_REQUEST_TABLE:
if (!access_ok(VERIFY_WRITE, p, SZ_SG_REQ_FO * SG_MAX_QUEUE)) {
return -EFAULT;
} else {
sg_req_info_t *rinfo;
... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd_in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case SG_GET_REQUEST_TABLE:
if (!access_ok(VERIFY_WRITE, p, SZ_SG_REQ_FO * SG_... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (cmd_in) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case SG_GET_REQUEST_TABLE:
if (!access_ok(VERIFY_WRITE, p, SZ_SG_REQ_FO * SG_... | static long sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg) {
void *p = (void *)arg;
switch (cmd_in) {
case SG_GET_REQUEST_TABLE:
if (!access_ok(VERIFY_WRITE, p, SZ_SG_REQ_FO * SG_MAX_QUEUE)) {
return -EFAULT;
} else {
sg_req_info_t *rinfo;... |
CVE-2017-15102 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/misc/legousbtower.c | tower_probe | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
struct lego_usb_tower *dev = NULL;
struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor* endpoi... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
struct lego_usb_tower *dev = NULL;
struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor* endpoi... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
struct lego_usb_tower *dev = NULL;
struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor* endpoi... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
struct lego_usb_tower *dev = NULL;
struct usb_host_interface *iface_desc;
struct usb_endpoint_descriptor* endpoi... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
if (dev == NULL) {
goto exit;
}
dev->inte... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
if (dev == NULL) {
goto exit;
}
dev->inte... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
if (dev... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
if (dev... | static int tower_probe (struct usb_interface *interface, const struct usb_device_id *id) {
struct device *idev = &interface->dev;
struct usb_device *udev = interface_to_usbdev(interface);
dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
if (dev == NULL) {
goto exit;
}
d... |
CVE-2017-15115 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sctp/socket.c | sctp_do_peeloff | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
struct socket *sock;
int err = 0;
if (!asoc) {
return -EVAL;
}
if (waitqueue_active(&asoc->wait)) {
return... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
struct socket *sock;
int err = 0;
if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) {
return -EVAL;
}
if (!asoc... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
struct socket *sock;
int err = 0;
if (!asoc) {
return -EVAL;
}
if (!sctp_style(sk, UDP)) {
return -EVAL;
... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
struct socket *sock;
int err = 0;
if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) {
return -EVAL;
}
if (!asoc... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
int err = 0;
if (!asoc) {
return -EVAL;
}
if (!sctp_style(sk, UDP)) {
return -EVAL;
}
err = sock_creat... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
int err = 0;
if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) {
return -EVAL;
}
if (!asoc) {
return -EVAL;... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
if (!asoc) {
return -EVAL;
}
if (!sctp_style(sk, UDP)) ... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) {
return -... | int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) {
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
int err = 0;
+ if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) {
+ return -EVAL;
+ }
if (!asoc) {
retu... |
CVE-2017-15129 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/core/net_namespace.c | get_net_ns_by_id | struct net *get_net_ns_by_id(struct net *net, int id) {
struct net *peer;
if (id < 0) {
return NULL;
}
rcu_read_lock();
spin_lock_bh(&net->nsid_lock);
peer = idr_find(&net->netns_ids, id);
if (peer) {
get_net(peer);
}
spin_unlock_bh(&net->nsid_lock);
rcu_read_unlo... | struct net *get_net_ns_by_id(struct net *net, int id) {
struct net *peer;
if (id < 0) {
return NULL;
}
rcu_read_lock();
spin_lock_bh(&net->nsid_lock);
peer = idr_find(&net->netns_ids, id);
if (peer) {
peer = maybe_get_net(peer);
}
spin_unlock_bh(&net->nsid_lock);
... | struct net *get_net_ns_by_id(struct net *net, int id) {
unsigned long flags;
struct net *peer;
if (id < 0) {
return NULL;
}
rcu_read_lock();
spin_lock_irqsave(&net->nsid_lock, flags);
peer = idr_find(&net->netns_ids, id);
if (peer) {
get_net(peer);
}
spin_unlock_i... | struct net *get_net_ns_by_id(struct net *net, int id) {
unsigned long flags;
struct net *peer;
if (id < 0) {
return NULL;
}
rcu_read_lock();
spin_lock_irqsave(&net->nsid_lock, flags);
peer = idr_find(&net->netns_ids, id);
if (peer) {
peer = maybe_get_net(peer);
}
... | struct net *get_net_ns_by_id(struct net *net, int id) {
if (id < 0) {
return NULL;
}
peer = idr_find(&net->netns_ids, id);
if (peer) {
get_net(peer);
}
spin_unlock_bh(&net->nsid_lock);
return peer;
}
| struct net *get_net_ns_by_id(struct net *net, int id) {
if (id < 0) {
return NULL;
}
peer = idr_find(&net->netns_ids, id);
if (peer) {
peer = maybe_get_net(peer);
}
spin_unlock_bh(&net->nsid_lock);
return peer;
}
| struct net *get_net_ns_by_id(struct net *net, int id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (id < 0) {
return NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
peer = idr_find(&net->netns_ids, id);
if (peer) {
get_net(peer);
}
spin_unlock_irqrestore(&net-... | struct net *get_net_ns_by_id(struct net *net, int id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (id < 0) {
return NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
peer = idr_find(&net->netns_ids, id);
if (peer) {
peer = maybe_get_net(peer);
}
spin_unlock_irq... | struct net *get_net_ns_by_id(struct net *net, int id) {
if (id < 0) {
return NULL;
}
peer = idr_find(&net->netns_ids, id);
if (peer) {
- get_net(peer);
+ peer = maybe_get_net(peer);
}
spin_unlock_bh(&net->nsid_lock);
return peer;
} |
CVE-2017-15265 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/seq/seq_clientmgr.c | snd_seq_ioctl_create_port | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_client_port *port;
struct snd_seq_port_info info;
struct snd_seq_port_callback *callback;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
if (info.addr.client != client->numb... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_client_port *port;
struct snd_seq_port_info info;
struct snd_seq_port_callback *callback;
int port_idx;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
if (info.addr.clie... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_client_port *port;
struct snd_seq_port_info info;
struct snd_seq_port_callback *callback;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
if (info.addr.client != client->numb... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_client_port *port;
struct snd_seq_port_info info;
struct snd_seq_port_callback *callback;
int port_idx;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
if (info.addr.clie... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_port_callback *callback;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
port = snd_seq_create_port(client, (info.flags & SNDRV_SEQ_PORT_FLG_GIVEN_PORT) ? info.addr.port : -1);
i... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_port_callback *callback;
int port_idx;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
port = snd_seq_create_port(client, (info.flags & SNDRV_SEQ_PORT_FLG_GIVEN_PORT) ? info.addr... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct snd_seq_port_callback *callback;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
port = sn... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct snd_seq_port_callback *callback;
int port_idx;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMEN... | static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void *arg) {
struct snd_seq_port_callback *callback;
+ int port_idx;
if (copy_from_user(&info, arg, sizeof(info))) {
return -EFAULT;
}
port = snd_seq_create_port(client, (info.flags & SNDRV_SEQ_PORT_FLG_GIVEN_PORT) ? in... |
CVE-2017-15265 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/seq/seq_ports.c | snd_seq_create_port | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
unsigned long flags;
struct snd_seq_client_port *new_port, *p;
int num = -1;
if (snd_BUG_ON(!client)) {
return NULL;
}
if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
pr_warn("ALSA: seq... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
unsigned long flags;
struct snd_seq_client_port *new_port, *p;
int num = -1;
if (snd_BUG_ON(!client)) {
return NULL;
}
if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
pr_warn("ALSA: seq... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
unsigned long flags;
struct snd_seq_client_port *new_port, *p;
int num = -1;
if (snd_BUG_ON(!client)) {
return NULL;
}
if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
snd_printk(KERN_WA... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
unsigned long flags;
struct snd_seq_client_port *new_port, *p;
int num = -1;
if (snd_BUG_ON(!client)) {
return NULL;
}
if (client->num_ports >= SNDRV_SEQ_MAX_PORTS - 1) {
snd_printk(KERN_WA... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
int num = -1;
new_port = kzalloc(sizeof(*new_port), GFP_KERNEL);
if (!new_port) {
return NULL;
}
sprintf(new_port->name, "port-%d", num);
port_subs_info_init(&new_port->c_dest);
num = port >= 0... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
int num = -1;
new_port = kzalloc(sizeof(*new_port), GFP_KERNEL);
if (!new_port) {
return NULL;
}
sprintf(new_port->name, "port-%d", num);
port_subs_info_init(&new_port->c_dest);
snd_use_lock_us... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int num = -1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
new_port = kzalloc(sizeof(*new_port), GFP_KERNEL);
if (! new_port) {
/* PLACEHOLDER: DO NOT DELETE ... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int num = -1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
new_port = kzalloc(sizeof(*new_port), GFP_KERNEL);
if (! new_port) {
/* PLACEHOLDER: DO NOT DELETE ... | struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client, int port) {
int num = -1;
new_port = kzalloc(sizeof(*new_port), GFP_KERNEL);
if (!new_port) {
return NULL;
}
sprintf(new_port->name, "port-%d", num);
port_subs_info_init(&new_port->c_dest);
+ snd_us... |
CVE-2017-15274 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/keyctl.c | keyctl_update_key | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
key_ref_t key_ref;
void *payload;
long ret;
ret = -EVAL;
if (plen > PAGE_SIZE) {
goto error;
}
payload = NULL;
if (_payload) {
ret = -ENOMEM;
payload = kmalloc(plen, GFP_KERNEL);
... | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
key_ref_t key_ref;
void *payload;
long ret;
ret = -EVAL;
if (plen > PAGE_SIZE) {
goto error;
}
payload = NULL;
if (plen) {
ret = -ENOMEM;
payload = kmalloc(plen, GFP_KERNEL);
if (... | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
key_ref_t key_ref;
void *payload;
long ret;
ret = -EVAL;
if (plen > PAGE_SIZE) {
goto error;
}
payload = NULL;
if (_payload) {
ret = -ENOMEM;
payload = kmalloc(plen, GFP_KERNEL);
... | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
key_ref_t key_ref;
void *payload;
long ret;
ret = -EVAL;
if (plen > PAGE_SIZE) {
goto error;
}
payload = NULL;
if (plen) {
ret = -ENOMEM;
payload = kmalloc(plen, GFP_KERNEL);
if (... | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
payload = NULL;
if (_payload) {
ret = -ENOMEM;
}
key_ref = lookup_user_key(id, 0, KEY_NEED_WRITE);
}
| long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
payload = NULL;
if (plen) {
ret = -ENOMEM;
}
key_ref = lookup_user_key(id, 0, KEY_NEED_WRITE);
}
| long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
payload = NULL;
if (_payload) {
ret = -ENOMEM;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
key_ref = lookup_user_key(id, 0, KEY_NEED_WRITE);
/* PLACEHOLDER: ... | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
payload = NULL;
if (plen) {
ret = -ENOMEM;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
key_ref = lookup_user_key(id, 0, KEY_NEED_WRITE);
/* PLACEHOLDER: DO N... | long keyctl_update_key(key_serial_t id, const void *_payload, size_t plen) {
payload = NULL;
- if (_payload) {
+ if (plen) {
ret = -ENOMEM;
}
key_ref = lookup_user_key(id, 0, KEY_NEED_WRITE);
} |
CVE-2017-15299 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/key.c | key_create_or_update | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
struct keyring_index_key index_key = {
.description = description,
};
struct key_preparsed_payload prep;
struct assoc_array_e... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
struct keyring_index_key index_key = {
.description = description,
};
struct key_preparsed_payload prep;
struct assoc_array_e... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
unsigned long prealloc;
const struct cred *cred = current_cred();
struct key_type *ktype;
struct key *keyring, *key = NULL;
key_r... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
unsigned long prealloc;
const struct cred *cred = current_cred();
struct key_type *ktype;
struct key *keyring, *key = NULL;
key_r... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
struct keyring_index_key index_key = {
.description = description,
};
keyring = key_ref_to_ptr(keyring_ref);
ret = key_permis... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
struct keyring_index_key index_key = {
.description = description,
};
keyring = key_ref_to_ptr(keyring_ref);
ret = key_permis... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
unsigned long prealloc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
keyring = key_ref_to_ptr(keyring_ref);
/* PLACEHOLDER: DO NOT D... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
unsigned long prealloc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
keyring = key_ref_to_ptr(keyring_ref);
/* PLACEHOLDER: DO NOT D... | key_ref_t key_create_or_update(key_ref_t keyring_ref, const char *type, const char *description, const void *payload, size_t plen, key_perm_t perm, unsigned long flags) {
struct keyring_index_key index_key = {
.description = description,
};
keyring = key_ref_to_ptr(keyring_ref);
ret = key_... |
CVE-2017-15306 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/powerpc/kvm/powerpc.c | kvm_vm_ioctl_check_extension | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int r;
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_BOOKE_SREGS:
case KVM_CAP_PPC_BOOKE_WATCHDOG:
case KVM_CAP_PPC_EPR:
case KVM_CAP_P... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int r;
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_BOOKE_SREGS:
case KVM_CAP_PPC_BOOKE_WATCHDOG:
case KVM_CAP_PPC_EPR:
case KVM_CAP_P... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int r;
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_BOOKE_SREGS:
case KVM_CAP_PPC_BOOKE_WATCHDOG:
case KVM_CAP_PPC_EPR:
case KVM_CAP_P... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int r;
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_BOOKE_SREGS:
case KVM_CAP_PPC_BOOKE_WATCHDOG:
case KVM_CAP_PPC_EPR:
case KVM_CAP_P... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_HTM:
r = cpu_has_feature(CPU_FTR_TM_COMP) && is_kvmppc_hv_enabled(kvm);
break;
}
... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_HTM:
r = cpu_has_feature(CPU_FTR_TM_COMP) && hv_enabled;
break;
}
return r;
}
| int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case KVM_CAP_PPC_HTM:
... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case KVM_CAP_PPC_HTM:
... | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) {
int hv_enabled = kvmppc_hv_ops ? 1 : 0;
if (kvm) {
hv_enabled = is_kvmppc_hv_enabled(kvm);
}
switch (ext) {
case KVM_CAP_PPC_HTM:
- r = cpu_has_feature(CPU_FTR_TM_COMP) && is_kvmppc_hv_enabled(kvm);
+ r = cpu_... |
CVE-2017-15649 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/packet/af_packet.c | packet_do_bind | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) {
struct packet_sock *po = pkt_sk(sk);
struct net_device *dev_curr;
__be16 proto_curr;
bool need_rehook;
struct net_device *dev = NULL;
int ret = 0;
bool unlisted = false;
if (po->fanout) {
re... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) {
struct packet_sock *po = pkt_sk(sk);
struct net_device *dev_curr;
__be16 proto_curr;
bool need_rehook;
struct net_device *dev = NULL;
int ret = 0;
bool unlisted = false;
lock_sock(sk);
spin_lock... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 protocol) {
struct packet_sock *po = pkt_sk(sk);
struct net_device *dev_curr;
struct net_device *dev = NULL;
int ret = 0;
bool unlisted = false;
if (po->fanout) {
return -EVAL;
}
lock_sock(sk);
s... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 protocol) {
struct packet_sock *po = pkt_sk(sk);
struct net_device *dev_curr;
struct net_device *dev = NULL;
int ret = 0;
bool unlisted = false;
lock_sock(sk);
spin_lock(&po->bind_lock);
rcu_read_lock();
... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) {
bool unlisted = false;
if (po->fanout) {
return -EVAL;
}
lock_sock(sk);
rcu_read_lock();
if (name) {
} else if (ifindex) {
}
out_unlock:
rcu_read_unlock();
return ret;
}
| static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) {
bool unlisted = false;
lock_sock(sk);
rcu_read_lock();
if (po->fanout) {
ret = -EVAL;
goto out_unlock;
}
if (name) {
} else if (ifindex) {
}
out_unlock:
rcu_read_unlock();
re... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 protocol) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool unlisted = false;
if (po->fanout) {
return -EVAL;
}
lock_sock(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rcu_read_lock();
if (na... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 protocol) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool unlisted = false;
lock_sock(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
rcu_read_lock();
if (po->fanout) {
ret = -EVAL;
goto out_... | static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) {
bool unlisted = false;
- if (po->fanout) {
- return -EVAL;
- }
lock_sock(sk);
rcu_read_lock();
+ if (po->fanout) {
+ ret = -EVAL;
+ goto out_unlock;
+ }
if (name) {
} else... |
CVE-2017-15868 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/bnep/core.c | bnep_add_connection | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
struct net_device *dev;
struct bnep_session *s, *ss;
u8 dst[ETH_ALEN], src[ETH_ALEN];
int err;
BT_DBG("");
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
struct net_device *dev;
struct bnep_session *s, *ss;
u8 dst[ETH_ALEN], src[ETH_ALEN];
int err;
BT_DBG("");
if (!l2cap_is_socket(sock)) {
return -EBADFD;
}
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
struct net_device *dev;
struct bnep_session *s, *ss;
u8 dst[ETH_ALEN], src[ETH_ALEN];
int err;
BT_DBG("");
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
struct net_device *dev;
struct bnep_session *s, *ss;
u8 dst[ETH_ALEN], src[ETH_ALEN];
int err;
BT_DBG("");
if (!l2cap_is_socket(sock)) {
return -EBADFD;
}
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
BT_DBG("");
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
s->sock = sock;
bnep_set_default_proto_filter(s);
SET_NETDEV_DEV(dev, bnep_get_device(s));
SET_... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
BT_DBG("");
if (!l2cap_is_socket(sock)) {
return -EBADFD;
}
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
s->sock = sock;
bnep_set_default_proto_... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("");
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->sock... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("");
if (!l2cap_is_socket(sock)) {
return -EBADFD;
}
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src... | int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) {
BT_DBG("");
+ if (!l2cap_is_socket(sock)) {
+ return -EBADFD;
+ }
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
s->sock = sock;
bnep_set_defau... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/dns_resolver/dns_key.c | dns_resolver_describe | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
seq_printf(m, ": %d", err);
} else {
seq_printf(m, ": %u",... | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
seq_puts(m, key->description);
if (key_is_positive(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
seq_printf(m, ": %d", err);
} else {
seq_printf(m, ": %u", key... | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
seq_printf(m, ": %d", err);
} else {
seq_printf(m, ": %u",... | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
seq_puts(m, key->description);
if (key_is_positive(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
seq_printf(m, ": %d", err);
} else {
seq_printf(m, ": %u", key... | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
if (key_is_instantiated(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
} else {
seq_printf(m, ": %u", key->datalen);
}
}
}
| static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
if (key_is_positive(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
} else {
seq_printf(m, ": %u", key->datalen);
}
}
}
| static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (key_is_instantiated(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
... | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (key_is_positive(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
... | static void dns_resolver_describe(const struct key *key, struct seq_file *m) {
- if (key_is_instantiated(key)) {
+ if (key_is_positive(key)) {
int err = PTR_ERR(key->payload.data[dns_key_error]);
if (err) {
} else {
seq_printf(m, ": %u", key->datalen);
}
}
} |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/big_key.c | big_key_describe | void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
} | void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
} | void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
} | void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
} | void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
}
| void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
}
| void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
}
| void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
}
} | void big_key_describe(const struct key *key, struct seq_file *m) {
size_t datalen = (size_t)key->payload.data[big_key_len];
seq_puts(m, key->description);
- if (key_is_instantiated(key)) {
+ if (key_is_positive(key)) {
seq_printf(m, ": %zu [%s]", datalen, datalen > BIG_KEY_FILE_THRESHOLD ? "fi... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/big_key.c | big_key_revoke | void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_instantiated(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
} | void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_positive(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
} | void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_instantiated(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
} | void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_positive(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
} | void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_instantiated(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
}
| void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_positive(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
}
| void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_instantiated(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
}
| void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
if (key_is_positive(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
vfs_truncate(path, 0);
}
} | void big_key_revoke(struct key *key) {
struct path *path = (struct path *)&key->payload.data[big_key_path];
key_payload_reserve(key, 0);
- if (key_is_instantiated(key) && (size_t)key->payload.data[big_key_len] > BIG_KEY_FILE_THRESHOLD) {
+ if (key_is_positive(key) && (size_t)key->payload.data[big_key_l... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/encrypted-keys/encrypted.c | encrypted_update | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
struct encrypted_key_payload *epayload = key->payload.data[0];
struct encrypted_key_payload *new_epayload;
char *buf;
char *new_master_desc = NULL;
const char *format = NULL;
size_t datalen = prep->datalen;
in... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
struct encrypted_key_payload *epayload = key->payload.data[0];
struct encrypted_key_payload *new_epayload;
char *buf;
char *new_master_desc = NULL;
const char *format = NULL;
size_t datalen = prep->datalen;
in... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
struct encrypted_key_payload *epayload = key->payload.data[0];
struct encrypted_key_payload *new_epayload;
char *buf;
char *new_master_desc = NULL;
const char *format = NULL;
size_t datalen = prep->datalen;
in... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
struct encrypted_key_payload *epayload = key->payload.data[0];
struct encrypted_key_payload *new_epayload;
char *buf;
char *new_master_desc = NULL;
const char *format = NULL;
size_t datalen = prep->datalen;
in... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
int ret = 0;
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
return -ENOKEY;
}
if (datalen <= 0 || datalen > 32767 || !prep->data) {
return -EVAL;
}
new_epayload = encrypted_key_alloc(key, epayload... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
int ret = 0;
if (key_is_negative(key)) {
return -ENOKEY;
}
if (datalen <= 0 || datalen > 32767 || !prep->data) {
return -EVAL;
}
new_epayload = encrypted_key_alloc(key, epayload->format, new_master... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0;
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
return -ENOKEY;
}
if (datalen <= 0 || datalen > 32767 || !prep->data) {
return -EVAL;
}
... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0;
if (key_is_negative(key)) {
return -ENOKEY;
}
if (datalen <= 0 || datalen > 32767 || !prep->data) {
return -EVAL;
}
/* PLACEHOLDER: DO... | static int encrypted_update(struct key *key, struct key_preparsed_payload *prep) {
int ret = 0;
- if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
+ if (key_is_negative(key)) {
return -ENOKEY;
}
if (datalen <= 0 || datalen > 32767 || !prep->data) {
return -EVAL;
}
new_ep... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/key.c | __key_instantiate_and_link | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
int ret, awaken;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
mutex_lock(&key_construction_mutex);
if (!tes... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
int ret, awaken;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
mutex_lock(&key_construction_mutex);
if (key-... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
int ret, awaken;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
mutex_lock(&key_construction_mutex);
if (!tes... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
int ret, awaken;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
mutex_lock(&key_construction_mutex);
if (key-... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
key_check(key);
mutex_lock(&key_construction_mutex);
if (!test_bit(KEY_FLAG_STANTIATED, &key->flags)) {
ret = key->type->instantiate... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
key_check(key);
mutex_lock(&key_construction_mutex);
if (key->state == KEY_IS_UNSTANTIATED) {
ret = key->type->instantiate(key, prep... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_check(key);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mutex_lock(&key_construction... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_check(key);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mutex_lock(&key_construction... | static int __key_instantiate_and_link(struct key *key, struct key_preparsed_payload *prep, struct key *keyring, struct key *authkey, struct assoc_array_edit **_edit) {
key_check(key);
mutex_lock(&key_construction_mutex);
- if (!test_bit(KEY_FLAG_STANTIATED, &key->flags)) {
+ if (key->state == KEY_IS_UN... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/key.c | __key_update | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
int ret;
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
goto error;
}
ret = -EEXIST;
if (!key->type->update) {
goto error;
... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
int ret;
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
goto error;
}
ret = -EEXIST;
if (!key->type->update) {
goto error;
... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
int ret;
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
goto error;
}
ret = -EEXIST;
if (!key->type->update) {
goto error;
... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
int ret;
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
goto error;
}
ret = -EEXIST;
if (!key->type->update) {
goto error;
... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
if (!key->type->update) {
goto error;
}
ret = key->type->update(key, prep);
if (ret == 0) {
clear_bit(KEY_FLAG_NEGATIVE, &key->flags);
}
up... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
if (!key->type->update) {
goto error;
}
ret = key->type->update(key, prep);
if (ret == 0) {
mark_key_instantiated(key, 0);
}
up_write(&key-... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!key->type->update) {
goto error;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = key->type->up... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!key->type->update) {
goto error;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = key->type->up... | static inline key_ref_t __key_update(key_ref_t key_ref, struct key_preparsed_payload *prep) {
struct key *key = key_ref_to_ptr(key_ref);
if (!key->type->update) {
goto error;
}
ret = key->type->update(key, prep);
if (ret == 0) {
- clear_bit(KEY_FLAG_NEGATIVE, &key->flags);
+ ... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/key.c | key_reject_and_link | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
struct assoc_array_edit *edit;
struct timespec now;
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
if (keyring) {
l... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
struct assoc_array_edit *edit;
struct timespec now;
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
if (keyring) {
l... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
struct assoc_array_edit *edit;
struct timespec now;
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
if (keyring) {
i... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
struct assoc_array_edit *edit;
struct timespec now;
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
awaken = 0;
ret = -EBUSY;
if (keyring) {
i... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
key_check(key);
mutex_lock(&key_construction_mutex);
if (!test_bit(KEY_FLAG_STANTIATED, &key->flags)) {
atomic_inc(&key->user->nikeys);
key->reject_error = -error;
s... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
key_check(key);
mutex_lock(&key_construction_mutex);
if (key->state == KEY_IS_UNSTANTIATED) {
atomic_inc(&key->user->nikeys);
mark_key_instantiated(key, -error);
now... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_check(key);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mutex_lock(&key_construction_mutex);
if (!test_bit(KEY_FLAG_STANTIATED, &... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_check(key);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mutex_lock(&key_construction_mutex);
if (key->state == KEY_IS_UNSTANTIATE... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
key_check(key);
mutex_lock(&key_construction_mutex);
- if (!test_bit(KEY_FLAG_STANTIATED, &key->flags)) {
+ if (key->state == KEY_IS_UNSTANTIATED) {
atomic_inc(&key->user->nik... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/key.c | key_update | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key_preparsed_payload prep;
struct key *key = key_ref_to_ptr(key_ref);
int ret;
key_check(key);
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
return ret;
}
if (!key->type->update) {
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key_preparsed_payload prep;
struct key *key = key_ref_to_ptr(key_ref);
int ret;
key_check(key);
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
return ret;
}
if (!key->type->update) {
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key_preparsed_payload prep;
struct key *key = key_ref_to_ptr(key_ref);
int ret;
key_check(key);
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
return ret;
}
if (!key->type->update) {
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key_preparsed_payload prep;
struct key *key = key_ref_to_ptr(key_ref);
int ret;
key_check(key);
ret = key_permission(key_ref, KEY_NEED_WRITE);
if (ret < 0) {
return ret;
}
if (!key->type->update) {
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key *key = key_ref_to_ptr(key_ref);
key_check(key);
if (!key->type->update) {
return -EOPNOTSUPP;
}
ret = key->type->update(key, &prep);
if (ret == 0) {
clear_bit(KEY_FLAG_NEGATIVE, &key->flags);
}
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key *key = key_ref_to_ptr(key_ref);
key_check(key);
if (!key->type->update) {
return -EOPNOTSUPP;
}
ret = key->type->update(key, &prep);
if (ret == 0) {
mark_key_instantiated(key, 0);
}
up_write(... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct key *key = key_ref_to_ptr(key_ref);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_check(key);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!key->type->update) {
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct key *key = key_ref_to_ptr(key_ref);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_check(key);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!key->type->update) {
... | int key_update(key_ref_t key_ref, const void *payload, size_t plen) {
struct key *key = key_ref_to_ptr(key_ref);
key_check(key);
if (!key->type->update) {
return -EOPNOTSUPP;
}
ret = key->type->update(key, &prep);
if (ret == 0) {
- clear_bit(KEY_FLAG_NEGATIVE, &key->flags)... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/keyctl.c | keyctl_chown_key | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
struct key_user *newowner, *zapowner = NULL;
struct key *key;
key_ref_t key_ref;
long ret;
kuid_t uid;
kgid_t gid;
uid = make_kuid(current_user_ns(), user);
gid = make_kgid(current_user_ns(), group);
ret = -EVAL;
i... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
struct key_user *newowner, *zapowner = NULL;
struct key *key;
key_ref_t key_ref;
long ret;
kuid_t uid;
kgid_t gid;
uid = make_kuid(current_user_ns(), user);
gid = make_kgid(current_user_ns(), group);
ret = -EVAL;
i... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
struct key_user *newowner, *zapowner = NULL;
struct key *key;
key_ref_t key_ref;
long ret;
kuid_t uid;
kgid_t gid;
uid = make_kuid(current_user_ns(), user);
gid = make_kgid(current_user_ns(), group);
ret = -EVAL;
i... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
struct key_user *newowner, *zapowner = NULL;
struct key *key;
key_ref_t key_ref;
long ret;
kuid_t uid;
kgid_t gid;
uid = make_kuid(current_user_ns(), user);
gid = make_kgid(current_user_ns(), group);
ret = -EVAL;
i... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_NEED_SETATTR);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
if (user != (uid_t) -1 && !uid_eq(uid, key->uid)) {
atomic_in... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_NEED_SETATTR);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
if (user != (uid_t) -1 && !uid_eq(uid, key->uid)) {
atomic_in... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_NEED_SETATTR);
if (IS_ERR(key_ref)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto error;
}
key ... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_NEED_SETATTR);
if (IS_ERR(key_ref)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto error;
}
key ... | long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) {
key_ref = lookup_user_key(id, KEY_LOOKUP_CREATE | KEY_LOOKUP_PARTIAL, KEY_NEED_SETATTR);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
if (user != (uid_t) -1 && !uid_eq(uid, key->uid)) {
a... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/keyctl.c | keyctl_read_key | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit(KEY_FLAG_NEGATIVE,... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_read_state(key);
... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit(KEY_FLAG_NEGATIVE,... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
struct key *key;
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
ret = -ENOKEY;
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_read_state(key);
... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
ret = -ENOKEY;
goto error2;
}
ret = key_... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_read_state(key);
if (ret < 0) {
goto error2;
}
ret = key_permission(key_ref, KEY_N... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto error;
}
key = key_ref_to_ptr(key_ref);
if (test_bit... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto error;
}
key = key_ref_to_ptr(key_ref);
ret = key_re... | long keyctl_read_key(key_serial_t keyid, char *buffer, size_t buflen) {
key_ref = lookup_user_key(keyid, 0, 0);
if (IS_ERR(key_ref)) {
goto error;
}
key = key_ref_to_ptr(key_ref);
- if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
- ret = -ENOKEY;
+ ret = key_read_state(key);
+... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/keyring.c | keyring_describe | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
seq_puts(m, keyring->description);
} else {
seq_puts(m, "[anon]");
}
if (key_is_instantiated(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
seq_printf(m,... | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
seq_puts(m, keyring->description);
} else {
seq_puts(m, "[anon]");
}
if (key_is_positive(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
seq_printf(m, ": ... | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
seq_puts(m, keyring->description);
} else {
seq_puts(m, "[anon]");
}
if (key_is_instantiated(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
seq_printf(m,... | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
seq_puts(m, keyring->description);
} else {
seq_puts(m, "[anon]");
}
if (key_is_positive(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
seq_printf(m, ": ... | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
} else {
seq_puts(m, "[anon]");
}
if (key_is_instantiated(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
} else {
}
}
}
| static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
} else {
seq_puts(m, "[anon]");
}
if (key_is_positive(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
} else {
}
}
}
| static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
seq_puts(m, "[anon]");
}
if (key_is_instantiated(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
/* PLACEHOLDER... | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
seq_puts(m, "[anon]");
}
if (key_is_positive(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
/* PLACEHOLDER: DO... | static void keyring_describe(const struct key *keyring, struct seq_file *m) {
if (keyring->description) {
} else {
seq_puts(m, "[anon]");
}
- if (key_is_instantiated(keyring)) {
+ if (key_is_positive(keyring)) {
if (keyring->keys.nr_leaves_on_tree != 0) {
} else {
... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/keyring.c | keyring_search_iterator | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = key->flags;
kenter("{%d}", key->serial);
if (key->type != ctx->index_key.type) {
kleave... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = READ_ONCE(key->flags);
short state = READ_ONCE(key->state);
kenter("{%d}", key->serial);
if... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = key->flags;
kenter("{%d}", key->serial);
if (key->type != ctx->index_key.type) {
kleave... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = READ_ONCE(key->flags);
short state = READ_ONCE(key->state);
kenter("{%d}", key->serial);
if... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = key->flags;
kenter("{%d}", key->serial);
if (ctx->flags & KEYRG_SEARCH_DO_STATE_CHECK) {
... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = READ_ONCE(key->flags);
short state = READ_ONCE(key->state);
kenter("{%d}", key->serial);
if... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = key->flags;
kenter("{%d}", key->serial);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = READ_ONCE(key->flags);
short state = READ_ONCE(key->state);
kenter("{%d}", key->serial);
/*... | static int keyring_search_iterator(const void *object, void *iterator_data) {
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
- unsigned long kflags = key->flags;
+ unsigned long kflags = READ_ONCE(key->flags);
+ short state = READ_ONCE(key->st... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/proc.c | proc_keys_show | static int proc_keys_show(struct seq_file *m, void *v) {
struct rb_node *_p = v;
struct key *key = rb_entry(_p, struct key, serial_node);
struct timespec now;
unsigned long timo;
key_ref_t key_ref, skey_ref;
char xbuf[16];
int rc;
struct keyring_search_context ctx = {
.index_key.... | static int proc_keys_show(struct seq_file *m, void *v) {
struct rb_node *_p = v;
struct key *key = rb_entry(_p, struct key, serial_node);
struct timespec now;
unsigned long timo;
key_ref_t key_ref, skey_ref;
char xbuf[16];
short state;
int rc;
struct keyring_search_context ctx = {
... | static int proc_keys_show(struct seq_file *m, void *v) {
struct rb_node *_p = v;
struct key *key = rb_entry(_p, struct key, serial_node);
struct timespec now;
unsigned long timo;
key_ref_t key_ref, skey_ref;
char xbuf[16];
int rc;
struct keyring_search_context ctx = {
.index_key.... | static int proc_keys_show(struct seq_file *m, void *v) {
struct rb_node *_p = v;
struct key *key = rb_entry(_p, struct key, serial_node);
struct timespec now;
unsigned long timo;
key_ref_t key_ref, skey_ref;
char xbuf[16];
short state;
int rc;
struct keyring_search_context ctx = {
... | static int proc_keys_show(struct seq_file *m, void *v) {
char xbuf[16];
int rc;
key_ref = make_key_ref(key, 0);
if (key->perm & KEY_POS_VIEW) {
if (!IS_ERR(skey_ref)) {
key_ref = make_key_ref(key, 1);
}
}
if (key->expiry == 0) {
memcpy(xbuf, "perm", 5);
} ... | static int proc_keys_show(struct seq_file *m, void *v) {
char xbuf[16];
short state;
int rc;
key_ref = make_key_ref(key, 0);
if (key->perm & KEY_POS_VIEW) {
if (!IS_ERR(skey_ref)) {
key_ref = make_key_ref(key, 1);
}
}
if (key->expiry == 0) {
memcpy(xbuf, "... | static int proc_keys_show(struct seq_file *m, void *v) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char xbuf[16];
int rc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = make_key_ref(key, 0);
if (key->perm & KEY_POS_VIEW) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if... | static int proc_keys_show(struct seq_file *m, void *v) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char xbuf[16];
short state;
int rc;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
key_ref = make_key_ref(key, 0);
if (key->perm & KEY_POS_VIEW) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int proc_keys_show(struct seq_file *m, void *v) {
char xbuf[16];
+ short state;
int rc;
key_ref = make_key_ref(key, 0);
if (key->perm & KEY_POS_VIEW) {
if (!IS_ERR(skey_ref)) {
key_ref = make_key_ref(key, 1);
}
}
if (key->expiry == 0) {
me... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/process_keys.c | lookup_user_key | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
struct keyring_search_context ctx = {
.match_data.cmp = lookup_user_key_possessed, .match_data.lookup_type = KEYRG_SEARCH_LOOKUP_DIRECT, .flags = KEYRG_SEARCH_NO_STATE_CHECK,
};
struct request_key_auth *rka;
stru... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
struct keyring_search_context ctx = {
.match_data.cmp = lookup_user_key_possessed, .match_data.lookup_type = KEYRG_SEARCH_LOOKUP_DIRECT, .flags = KEYRG_SEARCH_NO_STATE_CHECK,
};
struct request_key_auth *rka;
stru... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
struct keyring_search_context ctx = {
.match_data.cmp = lookup_user_key_possessed, .match_data.lookup_type = KEYRG_SEARCH_LOOKUP_DIRECT, .flags = KEYRG_SEARCH_NO_STATE_CHECK,
};
struct request_key_auth *rka;
stru... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
struct keyring_search_context ctx = {
.match_data.cmp = lookup_user_key_possessed, .match_data.lookup_type = KEYRG_SEARCH_LOOKUP_DIRECT, .flags = KEYRG_SEARCH_NO_STATE_CHECK,
};
struct request_key_auth *rka;
stru... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
switch (id) {
case KEY_SPEC_THREAD_KEYRG:
if (!ctx.cred->thread_keyring) {
if (!(lflags & KEY_LOOKUP_CREATE)) {
goto error;
}
if (ret < 0) {
goto error;... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
switch (id) {
case KEY_SPEC_THREAD_KEYRG:
if (!ctx.cred->thread_keyring) {
if (!(lflags & KEY_LOOKUP_CREATE)) {
goto error;
}
if (ret < 0) {
goto error;... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (id) {
case KEY_SPEC_THREAD_KEYRG:
if (!ctx.cred->thread_keyring) {
if (!(lflags & KEY_LOOKUP_CREATE)) {
goto error;
}
... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (id) {
case KEY_SPEC_THREAD_KEYRG:
if (!ctx.cred->thread_keyring) {
if (!(lflags & KEY_LOOKUP_CREATE)) {
goto error;
}
... | key_ref_t lookup_user_key(key_serial_t id, unsigned long lflags, key_perm_t perm) {
switch (id) {
case KEY_SPEC_THREAD_KEYRG:
if (!ctx.cred->thread_keyring) {
if (!(lflags & KEY_LOOKUP_CREATE)) {
goto error;
}
if (ret < 0) {
go... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/request_key.c | wait_for_key_construction | int wait_for_key_construction(struct key *key, bool intr) {
int ret;
ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, intr ? TASK_TERRUPTIBLE : TASK_UNTERRUPTIBLE);
if (ret) {
return -ERESTARTSYS;
}
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
smp_rmb();
return key-... | int wait_for_key_construction(struct key *key, bool intr) {
int ret;
ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, intr ? TASK_TERRUPTIBLE : TASK_UNTERRUPTIBLE);
if (ret) {
return -ERESTARTSYS;
}
ret = key_read_state(key);
if (ret < 0) {
return ret;
}
return key... | int wait_for_key_construction(struct key *key, bool intr) {
int ret;
ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, intr ? TASK_TERRUPTIBLE : TASK_UNTERRUPTIBLE);
if (ret) {
return -ERESTARTSYS;
}
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
smp_rmb();
return key-... | int wait_for_key_construction(struct key *key, bool intr) {
int ret;
ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, intr ? TASK_TERRUPTIBLE : TASK_UNTERRUPTIBLE);
if (ret) {
return -ERESTARTSYS;
}
ret = key_read_state(key);
if (ret < 0) {
return ret;
}
return key... | int wait_for_key_construction(struct key *key, bool intr) {
if (ret) {
return -ERESTARTSYS;
}
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
smp_rmb();
return key->reject_error;
}
return key_validate(key);
}
| int wait_for_key_construction(struct key *key, bool intr) {
if (ret) {
return -ERESTARTSYS;
}
ret = key_read_state(key);
if (ret < 0) {
return ret;
}
return key_validate(key);
}
| int wait_for_key_construction(struct key *key, bool intr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
return -ERESTARTSYS;
}
if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
smp_rmb();
return key->reject_error;
}
return key_validate(key);
}
| int wait_for_key_construction(struct key *key, bool intr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
return -ERESTARTSYS;
}
ret = key_read_state(key);
if (ret < 0) {
return ret;
}
return key_validate(key);
} | int wait_for_key_construction(struct key *key, bool intr) {
if (ret) {
return -ERESTARTSYS;
}
- if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
- smp_rmb();
- return key->reject_error;
+ ret = key_read_state(key);
+ if (ret < 0) {
+ return ret;
}
return key_va... |
CVE-2017-15951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | security/keys/request_key_auth.c | request_key_auth_describe | static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
} | static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
} | static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
} | static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
} | static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
}
| static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
}
| static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_instantiated(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
}
| static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
if (key_is_positive(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->pid, rka->callout_len);
}
} | static void request_key_auth_describe(const struct key *key, struct seq_file *m) {
struct request_key_auth *rka = key->payload.data[0];
seq_puts(m, "key:");
seq_puts(m, key->description);
- if (key_is_instantiated(key)) {
+ if (key_is_positive(key)) {
seq_printf(m, " pid:%d ci:%zu", rka->... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.