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-2016-2847 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pipe.c | alloc_pipe_info | struct pipe_inode_info *alloc_pipe_info(void) {
struct pipe_inode_info *pipe;
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
if (pipe->bufs) {
init_waitqueue_head(&pipe->wait... | struct pipe_inode_info *alloc_pipe_info(void) {
struct pipe_inode_info *pipe;
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
struct user_struct *user = get_current_user();
if (!too_many_pipe_buffers_hard(user)) {
... | struct pipe_inode_info *alloc_pipe_info(void) {
struct pipe_inode_info *pipe;
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
if (pipe->bufs) {
init_waitqueue_head(&pipe->wait... | struct pipe_inode_info *alloc_pipe_info(void) {
struct pipe_inode_info *pipe;
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
struct user_struct *user = get_current_user();
if (!too_many_pipe_buffers_hard(user)) {
... | struct pipe_inode_info *alloc_pipe_info(void) {
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
if (pipe->bufs) {
pipe->r_counter = pipe->w_counter = 1;
pipe->buffers ... | struct pipe_inode_info *alloc_pipe_info(void) {
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
struct user_struct *user = get_current_user();
if (!too_many_pipe_buffers_hard(user)) {
if (too_many_pipe_buffer... | struct pipe_inode_info *alloc_pipe_info(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
if (pipe->bufs) {
/* PLACEHOLDER: DO NOT ... | struct pipe_inode_info *alloc_pipe_info(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
struct user_struct *user = get_current_user();
if (!too_many_pipe_buffers_... | struct pipe_inode_info *alloc_pipe_info(void) {
pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL);
if (pipe) {
- pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * PIPE_DEF_BUFFERS, GFP_KERNEL);
+ unsigned long pipe_bufs = PIPE_DEF_BUFFERS;
+ struct user_struct *user = get_curren... |
CVE-2016-2847 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pipe.c | free_pipe_info | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if (pipe->tmp_page) {
__free_page(pipe->tmp_page);
}
kfree(pipe... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
account_pipe_buffers(pipe, pipe->buffers, 0);
free_uid(pipe->user);
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if ... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if (pipe->tmp_page) {
__free_page(pipe->tmp_page);
}
kfree(pipe... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
account_pipe_buffers(pipe, pipe->buffers, 0);
free_uid(pipe->user);
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if ... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if (pipe->tmp_page) {
__free_page(pipe->tmp_page);
}
kfree(pipe... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
account_pipe_buffers(pipe, pipe->buffers, 0);
free_uid(pipe->user);
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if ... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if (pipe->tmp_page) {
__free_page(pipe->tmp_page);
}
kfree(pipe... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
account_pipe_buffers(pipe, pipe->buffers, 0);
free_uid(pipe->user);
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
}
if ... | void free_pipe_info(struct pipe_inode_info *pipe) {
int i;
+ account_pipe_buffers(pipe, pipe->buffers, 0);
+ free_uid(pipe->user);
for (i = 0; i < pipe->buffers; i++) {
struct pipe_buffer *buf = pipe->bufs + i;
if (buf->ops) {
buf->ops->release(pipe, buf);
}
... |
CVE-2016-2847 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pipe.c | pipe_fcntl | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
struct pipe_inode_info *pipe;
long ret;
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
unsigned int size, nr_pages;
size = r... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
struct pipe_inode_info *pipe;
long ret;
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
unsigned int size, nr_pages;
size = r... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
struct pipe_inode_info *pipe;
long ret;
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
unsigned int size, nr_pages;
size = r... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
struct pipe_inode_info *pipe;
long ret;
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
unsigned int size, nr_pages;
size = r... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
size = round_pipe_size(arg);
nr_pages = size >> PAGE_SHIFT;
if (!capable(CAP_... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
size = round_pipe_size(arg);
nr_pages = size >> PAGE_SHIFT;
if (!capable(CAP_... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) {
pipe = get_pipe_info(file);
if (!pipe) {
return -EBADF;
}
__pipe_lock(pipe);
switch (cmd) {
case F_SETPIPE_SZ: {
size = round_pipe_size(arg);
nr_pages = size >> PAGE_SHIFT;
if (!c... |
CVE-2016-2847 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pipe.c | pipe_set_size | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
struct pipe_buffer *bufs;
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (unlikely(!bufs)) {
return -ENOMEM;
}
if (pipe->n... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
struct pipe_buffer *bufs;
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (unlikely(!bufs)) {
return -ENOMEM;
}
if (pipe->n... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
struct pipe_buffer *bufs;
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (unlikely(!bufs)) {
return -ENOMEM;
}
if (pipe->n... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
struct pipe_buffer *bufs;
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (unlikely(!bufs)) {
return -ENOMEM;
}
if (pipe->n... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (pipe->nrbufs) {
tail = pipe->curbuf + pipe->nrbufs;
if (tail < pipe->buffers) ... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (pipe->nrbufs) {
tail = pipe->curbuf + pipe->nrbufs;
if (tail < pipe->buffers) ... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) {
if (nr_pages < pipe->nrbufs) {
return -EBUSY;
}
bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN);
if (pipe->nrbufs) {
tail = pipe->curbuf + pipe->nrbufs;
if (tail < pipe->b... |
CVE-2016-3070 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/migrate.c | migrate_page_copy | void migrate_page_copy(struct page *newpage, struct page *page) {
int cpupid;
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page))... | void migrate_page_copy(struct page *newpage, struct page *page) {
int cpupid;
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page))... | void migrate_page_copy(struct page *newpage, struct page *page) {
int cpupid;
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page))... | void migrate_page_copy(struct page *newpage, struct page *page) {
int cpupid;
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page))... | void migrate_page_copy(struct page *newpage, struct page *page) {
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page)) {
SetPa... | void migrate_page_copy(struct page *newpage, struct page *page) {
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page)) {
SetPa... | void migrate_page_copy(struct page *newpage, struct page *page) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
... | void migrate_page_copy(struct page *newpage, struct page *page) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
... | void migrate_page_copy(struct page *newpage, struct page *page) {
if (PageHuge(page) || PageTransHuge(page)) {
copy_huge_page(newpage, page);
} else {
copy_highpage(newpage, page);
}
if (PageError(page)) {
SetPageError(newpage);
}
if (PageReferenced(page)) {
... |
CVE-2016-3070 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/migrate.c | migrate_page_move_mapping | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
int expected_count = 1 + extra_count;
void **pslot;
if (!mapping) {
if (page_count(page) != expected_count) {
return ... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
struct zone *oldzone, *newzone;
int dirty;
int expected_count = 1 + extra_count;
void **pslot;
if (!mapping) {
if (page_c... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
int expected_count = 1 + extra_count;
void **pslot;
if (!mapping) {
if (page_count(page) != expected_count) {
return ... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
struct zone *oldzone, *newzone;
int dirty;
int expected_count = 1 + extra_count;
void **pslot;
if (!mapping) {
if (page_c... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
int expected_count = 1 + extra_count;
if (!mapping) {
if (page_count(page) != expected_count) {
return -EAGA;
}
... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
struct zone *oldzone, *newzone;
int dirty;
int expected_count = 1 + extra_count;
if (!mapping) {
if (page_count(page) != expe... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
int expected_count = 1 + extra_count;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!mapping) {
if (page_count(page) != expec... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
struct zone *oldzone, *newzone;
int dirty;
int expected_count = 1 + extra_count;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if... | int migrate_page_move_mapping(struct address_space *mapping, struct page *newpage, struct page *page, struct buffer_head *head, enum migrate_mode mode, int extra_count) {
+ struct zone *oldzone, *newzone;
+ int dirty;
int expected_count = 1 + extra_count;
if (!mapping) {
if (page_count(page) !... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | check_entry_size_and_hooks | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ARP_NUMHOOKS; h++) {
if ((unsigned... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ARP_NUMHOOKS; h++) {
if ((unsigned... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (h = 0;... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (h = 0;... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ARP_NUMHOOKS; h++) {
if ((unsi... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | check_underflow | static bool check_underflow(const struct arpt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(&e->arp)) {
return false;
}
t = arpt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((str... | static bool check_underflow(const struct arpt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = arpt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct xt... | static bool check_underflow(const struct arpt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(&e->arp)) {
return false;
}
t = arpt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((str... | static bool check_underflow(const struct arpt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = arpt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct xt... | static bool check_underflow(const struct arpt_entry *e) {
unsigned int verdict;
if (!unconditional(&e->arp)) {
return false;
}
t = arpt_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == NF_DROP || verdict == NF_ACCEPT;
}
| static bool check_underflow(const struct arpt_entry *e) {
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = arpt_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == NF_DROP || verdict == NF_ACCEPT;
}
| static bool check_underflow(const struct arpt_entry *e) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int verdict;
if (!unconditional(&e->arp)) {
return false;
}
t = arpt_get_target_c(e);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
verdict = ((struct xt_standard_target *... | static bool check_underflow(const struct arpt_entry *e) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = arpt_get_target_c(e);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
verdict = ((struct xt_standard_target *)t)->v... | static bool check_underflow(const struct arpt_entry *e) {
unsigned int verdict;
- if (!unconditional(&e->arp)) {
+ if (!unconditional(e)) {
return false;
}
t = arpt_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict ... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | mark_source_chains | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
if (!... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
if (!... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
if (!... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
if (!... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
for (;;) {
const... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
for (;;) {
const... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(e... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(e... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ARP_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct arpt_entry *e = (struct arpt_entry *)(entry0 + pos);
for (;;) {
... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | unconditional | static inline bool unconditional(const struct arpt_arp *arp) {
static const struct arpt_arp uncond;
return memcmp(arp, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct arpt_entry *e) {
static const struct arpt_arp uncond;
return e->target_offset == sizeof(struct arpt_entry) && memcmp(&e->arp, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct arpt_arp *arp) {
static const struct arpt_arp uncond;
return memcmp(arp, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct arpt_entry *e) {
static const struct arpt_arp uncond;
return e->target_offset == sizeof(struct arpt_entry) && memcmp(&e->arp, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct arpt_arp *arp) {
static const struct arpt_arp uncond;
return memcmp(arp, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct arpt_entry *e) {
static const struct arpt_arp uncond;
return e->target_offset == sizeof(struct arpt_entry) && memcmp(&e->arp, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct arpt_arp *arp) {
static const struct arpt_arp uncond;
return memcmp(arp, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct arpt_entry *e) {
static const struct arpt_arp uncond;
return e->target_offset == sizeof(struct arpt_entry) && memcmp(&e->arp, &uncond, sizeof(uncond)) == 0;
} | -static inline bool unconditional(const struct arpt_arp *arp) {
+static inline bool unconditional(const struct arpt_entry *e) {
static const struct arpt_arp uncond;
- return memcmp(arp, &uncond, sizeof(uncond)) == 0;
+ return e->target_offset == sizeof(struct arpt_entry) && memcmp(&e->arp, &uncond, sizeof(un... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | check_entry_size_and_hooks | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ET_NUMHOOKS; h++) {
... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ET_NUMHOOKS; h++) {
... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ET_NUMHOOKS; h++)... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | check_underflow | static bool check_underflow(const struct ipt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(&e->ip)) {
return false;
}
t = ipt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct... | static bool check_underflow(const struct ipt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ipt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct xt_s... | static bool check_underflow(const struct ipt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(&e->ip)) {
return false;
}
t = ipt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct... | static bool check_underflow(const struct ipt_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ipt_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct xt_s... | static bool check_underflow(const struct ipt_entry *e) {
unsigned int verdict;
if (!unconditional(&e->ip)) {
return false;
}
t = ipt_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == NF_DROP || verdict == NF_ACCEPT;
}
| static bool check_underflow(const struct ipt_entry *e) {
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ipt_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == NF_DROP || verdict == NF_ACCEPT;
}
| static bool check_underflow(const struct ipt_entry *e) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int verdict;
if (!unconditional(&e->ip)) {
return false;
}
t = ipt_get_target_c(e);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
verdict = ((struct xt_standard_target *)t)... | static bool check_underflow(const struct ipt_entry *e) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ipt_get_target_c(e);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
verdict = ((struct xt_standard_target *)t)->ver... | static bool check_underflow(const struct ipt_entry *e) {
unsigned int verdict;
- if (!unconditional(&e->ip)) {
+ if (!unconditional(e)) {
return false;
}
t = ipt_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == ... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | get_chainname_rulenum | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TARGET... | static inline int get_chainname_rulenum(const struct ipt_entry *s, const struct ipt_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ipt_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | mark_source_chains | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
if (!(va... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
if (!(va... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
if (!(va... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
if (!(va... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
for (;;) {
const st... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
for (;;) {
const st... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entr... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entr... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ipt_entry *e = (struct ipt_entry *)(entry0 + pos);
for (;;) {
co... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | unconditional | static inline bool unconditional(const struct ipt_ip *ip) {
static const struct ipt_ip uncond;
return memcmp(ip, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ipt_entry *e) {
static const struct ipt_ip uncond;
return e->target_offset == sizeof(struct ipt_entry) && memcmp(&e->ip, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ipt_ip *ip) {
static const struct ipt_ip uncond;
return memcmp(ip, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ipt_entry *e) {
static const struct ipt_ip uncond;
return e->target_offset == sizeof(struct ipt_entry) && memcmp(&e->ip, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ipt_ip *ip) {
static const struct ipt_ip uncond;
return memcmp(ip, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct ipt_entry *e) {
static const struct ipt_ip uncond;
return e->target_offset == sizeof(struct ipt_entry) && memcmp(&e->ip, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct ipt_ip *ip) {
static const struct ipt_ip uncond;
return memcmp(ip, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct ipt_entry *e) {
static const struct ipt_ip uncond;
return e->target_offset == sizeof(struct ipt_entry) && memcmp(&e->ip, &uncond, sizeof(uncond)) == 0;
} | -static inline bool unconditional(const struct ipt_ip *ip) {
+static inline bool unconditional(const struct ipt_entry *e) {
static const struct ipt_ip uncond;
- return memcmp(ip, &uncond, sizeof(uncond)) == 0;
+ return e->target_offset == sizeof(struct ipt_entry) && memcmp(&e->ip, &uncond, sizeof(uncond)) ==... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | check_entry_size_and_hooks | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ET_NUMHOOKS; h++) {... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ET_NUMHOOKS; h++) {... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
for (h = 0; h < NF_ET_NUMHOOKS; h++... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | check_underflow | static bool check_underflow(const struct ip6t_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(&e->ipv6)) {
return false;
}
t = ip6t_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((st... | static bool check_underflow(const struct ip6t_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ip6t_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct xt... | static bool check_underflow(const struct ip6t_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(&e->ipv6)) {
return false;
}
t = ip6t_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((st... | static bool check_underflow(const struct ip6t_entry *e) {
const struct xt_entry_target *t;
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ip6t_get_target_c(e);
if (strcmp(t->u.user.name, XT_STANDARD_TARGET) != 0) {
return false;
}
verdict = ((struct xt... | static bool check_underflow(const struct ip6t_entry *e) {
unsigned int verdict;
if (!unconditional(&e->ipv6)) {
return false;
}
t = ip6t_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == NF_DROP || verdict == NF_ACCEPT;
}
| static bool check_underflow(const struct ip6t_entry *e) {
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ip6t_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict == NF_DROP || verdict == NF_ACCEPT;
}
| static bool check_underflow(const struct ip6t_entry *e) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int verdict;
if (!unconditional(&e->ipv6)) {
return false;
}
t = ip6t_get_target_c(e);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
verdict = ((struct xt_standard_target ... | static bool check_underflow(const struct ip6t_entry *e) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned int verdict;
if (!unconditional(e)) {
return false;
}
t = ip6t_get_target_c(e);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
verdict = ((struct xt_standard_target *)t)->v... | static bool check_underflow(const struct ip6t_entry *e) {
unsigned int verdict;
- if (!unconditional(&e->ipv6)) {
+ if (!unconditional(e)) {
return false;
}
t = ip6t_get_target_c(e);
verdict = ((struct xt_standard_target *)t)->verdict;
verdict = -verdict - 1;
return verdict... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | get_chainname_rulenum | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_TAR... | static inline int get_chainname_rulenum(const struct ip6t_entry *s, const struct ip6t_entry *e, const char *hookname, const char **chainname, const char **comment, unsigned int *rulenum) {
const struct xt_standard_target *t = (void *)ip6t_get_target_c(s);
if (strcmp(t->target.u.kernel.target->name, XT_ERROR_... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | mark_source_chains | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
if (!(... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
if (!(... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
if (!(... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
unsigned int hook;
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
if (!(... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
for (;;) {
const ... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
for (;;) {
const ... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(en... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(en... | static int mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) {
for (hook = 0; hook < NF_ET_NUMHOOKS; hook++) {
unsigned int pos = newinfo->hook_entry[hook];
struct ip6t_entry *e = (struct ip6t_entry *)(entry0 + pos);
for (;;) {
... |
CVE-2016-3134 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | unconditional | static inline bool unconditional(const struct ip6t_ip6 *ipv6) {
static const struct ip6t_ip6 uncond;
return memcmp(ipv6, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ip6t_entry *e) {
static const struct ip6t_ip6 uncond;
return e->target_offset == sizeof(struct ip6t_entry) && memcmp(&e->ipv6, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ip6t_ip6 *ipv6) {
static const struct ip6t_ip6 uncond;
return memcmp(ipv6, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ip6t_entry *e) {
static const struct ip6t_ip6 uncond;
return e->target_offset == sizeof(struct ip6t_entry) && memcmp(&e->ipv6, &uncond, sizeof(uncond)) == 0;
} | static inline bool unconditional(const struct ip6t_ip6 *ipv6) {
static const struct ip6t_ip6 uncond;
return memcmp(ipv6, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct ip6t_entry *e) {
static const struct ip6t_ip6 uncond;
return e->target_offset == sizeof(struct ip6t_entry) && memcmp(&e->ipv6, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct ip6t_ip6 *ipv6) {
static const struct ip6t_ip6 uncond;
return memcmp(ipv6, &uncond, sizeof(uncond)) == 0;
}
| static inline bool unconditional(const struct ip6t_entry *e) {
static const struct ip6t_ip6 uncond;
return e->target_offset == sizeof(struct ip6t_entry) && memcmp(&e->ipv6, &uncond, sizeof(uncond)) == 0;
} | -static inline bool unconditional(const struct ip6t_ip6 *ipv6) {
+static inline bool unconditional(const struct ip6t_entry *e) {
static const struct ip6t_ip6 uncond;
- return memcmp(ipv6, &uncond, sizeof(uncond)) == 0;
+ return e->target_offset == sizeof(struct ip6t_entry) && memcmp(&e->ipv6, &uncond, sizeof... |
CVE-2016-3136 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/serial/mct_u232.c | mct_u232_port_probe | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct mct_u232_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
}
priv->read_urb = port->serial->port[1]->interrupt_in_urb;
priv->read_urb->context = port;
spin_lock_init(&priv->lock... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct mct_u232_private *priv;
if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
dev_err(&port->dev, "expected endpoint missing\n");
return -ENODEV;
}
priv = kzalloc(s... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct mct_u232_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
}
priv->read_urb = port->serial->port[1]->interrupt_in_urb;
priv->read_urb->context = port;
spin_lock_init(&priv->lock... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct mct_u232_private *priv;
if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
dev_err(&port->dev, "expected endpoint missing\n");
return -ENODEV;
}
priv = kzalloc(s... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct mct_u232_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
}
priv->read_urb = port->serial->port[1]->interrupt_in_urb;
priv->read_urb->context = port;
usb_set_serial_port_data(p... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct mct_u232_private *priv;
if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
dev_err(&port->dev, "expected endpoint missing\n");
return -ENODEV;
}
priv = kzalloc(s... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct mct_u232_private *priv;
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
}
priv->read_urb = port->serial->port[1]->interrupt_in_urb;
priv->read_urb->context = port;
/* PLACEHOLDER: DO NOT DEL... | static int mct_u232_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct mct_u232_private *priv;
if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
dev_err(&port->dev, "expected endpoint missing\n");
return -ENODEV;
}
priv = kzalloc(s... | static int mct_u232_port_probe(struct usb_serial_port *port) {
+ struct usb_serial *serial = port->serial;
struct mct_u232_private *priv;
+ if (!serial->port[1] || !serial->port[1]->interrupt_in_urb) {
+ dev_err(&port->dev, "expected endpoint missing\n");
+ return -ENODEV;
+ }
priv = k... |
CVE-2016-3137 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/serial/cypress_m8.c | cypress_generic_port_probe | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
priv = kzalloc(sizeof(struct cypress_private), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
}
priv->comm_is_ok = !0;
spin_lock_init(&priv->lock);... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
if (!port->interrupt_out_urb || !port->interrupt_in_urb) {
dev_err(&port->dev, "required endpoint is missing\n");
return -ENODEV;
}
priv = kza... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
priv = kzalloc(sizeof(struct cypress_private), GFP_KERNEL);
if (!priv) {
return -ENOMEM;
}
priv->comm_is_ok = !0;
spin_lock_init(&priv->lock);... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
if (!port->interrupt_out_urb || !port->interrupt_in_urb) {
dev_err(&port->dev, "required endpoint is missing\n");
return -ENODEV;
}
priv = kza... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
priv = kzalloc(sizeof(struct cypress_private), GFP_KERNEL);
usb_set_serial_port_data(port, priv);
}
| static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
if (!port->interrupt_out_urb || !port->interrupt_in_urb) {
dev_err(&port->dev, "required endpoint is missing\n");
return -ENODEV;
}
priv = kza... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
priv = kzalloc(sizeof(struct cypress_private), GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
usb_set_serial_port_data(port, priv);
/* PLACEHO... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
if (!port->interrupt_out_urb || !port->interrupt_in_urb) {
dev_err(&port->dev, "required endpoint is missing\n");
return -ENODEV;
}
priv = kza... | static int cypress_generic_port_probe(struct usb_serial_port *port) {
struct usb_serial *serial = port->serial;
struct cypress_private *priv;
+ if (!port->interrupt_out_urb || !port->interrupt_in_urb) {
+ dev_err(&port->dev, "required endpoint is missing\n");
+ return -ENODEV;
+ }
pr... |
CVE-2016-3137 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/serial/cypress_m8.c | cypress_open | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
unsigned long flags;
int result = 0;
if (!priv->comm_is_ok) {
return -EIO;
}
usb_clear_halt(serial-... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
unsigned long flags;
int result = 0;
if (!priv->comm_is_ok) {
return -EIO;
}
usb_clear_halt(serial-... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
unsigned long flags;
int result = 0;
if (!priv->comm_is_ok) {
return -EIO;
}
usb_clear_halt(serial-... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
struct usb_serial *serial = port->serial;
unsigned long flags;
int result = 0;
if (!priv->comm_is_ok) {
return -EIO;
}
usb_clear_halt(serial-... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
cypress_send(port);
if (tty) {
cypress_set_termios(tty, port, &priv->tmp_termios);
}
if (!port->interrupt_in_urb) {
dev_err(&port->dev, "%s -... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
cypress_send(port);
if (tty) {
cypress_set_termios(tty, port, &priv->tmp_termios);
}
usb_fill_int_urb(port->interrupt_in_urb, serial->dev, usb_rcvint... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cypress_send(port);
if (tty) {
cypress_set_termios(tty, port, &priv->tmp_termios);
}
if (!port->int... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
cypress_send(port);
if (tty) {
cypress_set_termios(tty, port, &priv->tmp_termios);
}
usb_fill_int_u... | static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port) {
struct cypress_private *priv = usb_get_serial_port_data(port);
cypress_send(port);
if (tty) {
cypress_set_termios(tty, port, &priv->tmp_termios);
- }
- if (!port->interrupt_in_urb) {
- dev_err(&port->de... |
CVE-2016-3138 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/class/cdc-acm.c | acm_probe | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_cdc_union_desc *union_header = NULL;
struct usb_cdc_country_functional_desc *cfd = NULL;
unsigned char *buffer = intf->altsetting->extra;
int buflen = intf->altsetting->extralen;
struct usb_interface *contr... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_cdc_union_desc *union_header = NULL;
struct usb_cdc_country_functional_desc *cfd = NULL;
unsigned char *buffer = intf->altsetting->extra;
int buflen = intf->altsetting->extralen;
struct usb_interface *contr... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_cdc_union_desc *union_header = NULL;
struct usb_cdc_country_functional_desc *cfd = NULL;
unsigned char *buffer = intf->altsetting->extra;
int buflen = intf->altsetting->extralen;
struct usb_interface *contr... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_cdc_union_desc *union_header = NULL;
struct usb_cdc_country_functional_desc *cfd = NULL;
unsigned char *buffer = intf->altsetting->extra;
int buflen = intf->altsetting->extralen;
struct usb_interface *contr... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_device *usb_dev = interface_to_usbdev(intf);
if (quirks == NO_UNION_NORMAL) {
data_interface = usb_ifnum_to_if(usb_dev, 1);
control_interface = usb_ifnum_to_if(usb_dev, 0);
goto skip_normal_prob... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_device *usb_dev = interface_to_usbdev(intf);
if (quirks == NO_UNION_NORMAL) {
data_interface = usb_ifnum_to_if(usb_dev, 1);
control_interface = usb_ifnum_to_if(usb_dev, 0);
if (!data_interface |... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct usb_device *usb_dev = interface_to_usbdev(intf);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (quirks == NO_UNION_NORMAL) {
data_interface = usb_ifnum_to_if... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct usb_device *usb_dev = interface_to_usbdev(intf);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (quirks == NO_UNION_NORMAL) {
data_interface = usb_ifnum_to_if... | static int acm_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct usb_device *usb_dev = interface_to_usbdev(intf);
if (quirks == NO_UNION_NORMAL) {
data_interface = usb_ifnum_to_if(usb_dev, 1);
control_interface = usb_ifnum_to_if(usb_dev, 0);
+ if (!data_inter... |
CVE-2016-3140 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/serial/digi_acceleport.c | digi_startup | static int digi_startup(struct usb_serial *serial) {
struct digi_serial *serial_priv;
int ret;
serial_priv = kzalloc(sizeof(*serial_priv), GFP_KERNEL);
if (!serial_priv) {
return -ENOMEM;
}
spin_lock_init(&serial_priv->ds_serial_lock);
serial_priv->ds_oob_port_num = serial->type->num... | static int digi_startup(struct usb_serial *serial) {
struct device *dev = &serial->interface->dev;
struct digi_serial *serial_priv;
int ret;
int i;
if (serial->num_port_pointers < serial->type->num_ports + 1) {
dev_err(dev, "OOB endpoints missing\n");
return -ENODEV;
}
for (i... | static int digi_startup(struct usb_serial *serial) {
struct digi_serial *serial_priv;
int ret;
serial_priv = kzalloc(sizeof(*serial_priv), GFP_KERNEL);
if (!serial_priv) {
return -ENOMEM;
}
spin_lock_init(&serial_priv->ds_serial_lock);
serial_priv->ds_oob_port_num = serial->type->num... | static int digi_startup(struct usb_serial *serial) {
struct device *dev = &serial->interface->dev;
struct digi_serial *serial_priv;
int ret;
int i;
if (serial->num_port_pointers < serial->type->num_ports + 1) {
dev_err(dev, "OOB endpoints missing\n");
return -ENODEV;
}
for (i... | static int digi_startup(struct usb_serial *serial) {
struct digi_serial *serial_priv;
int ret;
serial_priv = kzalloc(sizeof(*serial_priv), GFP_KERNEL);
usb_set_serial_data(serial, serial_priv);
}
| static int digi_startup(struct usb_serial *serial) {
struct device *dev = &serial->interface->dev;
struct digi_serial *serial_priv;
int ret;
int i;
if (serial->num_port_pointers < serial->type->num_ports + 1) {
dev_err(dev, "OOB endpoints missing\n");
return -ENODEV;
}
for (i... | static int digi_startup(struct usb_serial *serial) {
struct digi_serial *serial_priv;
int ret;
serial_priv = kzalloc(sizeof(*serial_priv), GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
usb_set_serial_data(serial, serial_priv);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int digi_startup(struct usb_serial *serial) {
struct device *dev = &serial->interface->dev;
struct digi_serial *serial_priv;
int ret;
int i;
if (serial->num_port_pointers < serial->type->num_ports + 1) {
dev_err(dev, "OOB endpoints missing\n");
return -ENODEV;
}
for (i... | static int digi_startup(struct usb_serial *serial) {
+ struct device *dev = &serial->interface->dev;
struct digi_serial *serial_priv;
int ret;
+ int i;
+ if (serial->num_port_pointers < serial->type->num_ports + 1) {
+ dev_err(dev, "OOB endpoints missing\n");
+ return -ENODEV;
+ }
+... |
CVE-2016-3157 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/process_64.c | __switch_to | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigne... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigne... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigne... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
unsigne... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
fpu = s... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
fpu = s... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
/* PLAC... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
/* PLAC... | __visible __notrace_funcgraph struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {
struct thread_struct *prev = &prev_p->thread;
struct thread_struct *next = &next_p->thread;
int cpu = smp_processor_id();
struct tss_struct *tss = &per_cpu(init_tss, cpu);
f... |
CVE-2016-3157 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/xen/enlighten.c | xen_set_iopl_mask | static void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
} | void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
} | static void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
} | void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
} | static void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
}
| void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
}
| static void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
}
| void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
} | -static void xen_set_iopl_mask(unsigned mask) {
+void xen_set_iopl_mask(unsigned mask) {
struct physdev_set_iopl set_iopl;
set_iopl.iopl = (mask == 0) ? 1 : (mask >> 12) & 3;
HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
} |
CVE-2016-3672 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/mm/mmap.c | arch_pick_mmap_layout | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = mmap_rnd();
}
mm->mmap_legacy_base = mmap_legacy_base(random_factor);
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
mm->g... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = mmap_rnd();
}
mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor;
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
mm... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = arch_mmap_rnd();
}
mm->mmap_legacy_base = mmap_legacy_base(random_factor);
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = arch_mmap_rnd();
}
mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor;
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = mmap_rnd();
}
mm->mmap_legacy_base = mmap_legacy_base(random_factor);
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
} else {
... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = mmap_rnd();
}
mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor;
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
} else... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = arch_mmap_rnd();
}
mm->mmap_legacy_base = mmap_legacy_base(random_factor);
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
/* P... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = arch_mmap_rnd();
}
mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor;
if (mmap_is_legacy()) {
mm->mmap_base = mm->mmap_legacy_base;
/... | void arch_pick_mmap_layout(struct mm_struct *mm) {
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE) {
random_factor = mmap_rnd();
}
- mm->mmap_legacy_base = mmap_legacy_base(random_factor);
+ mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor;
if (mmap_is_... |
CVE-2016-3689 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/input/misc/ims-pcu.c | ims_pcu_parse_cdc_data | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
const struct usb_cdc_union_desc *union_desc;
struct usb_host_interface *alt;
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, ... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
const struct usb_cdc_union_desc *union_desc;
struct usb_host_interface *alt;
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, ... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
const struct usb_cdc_union_desc *union_desc;
struct usb_host_interface *alt;
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, ... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
const struct usb_cdc_union_desc *union_desc;
struct usb_host_interface *alt;
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, ... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, union_desc->bMasterInterface0);
alt = pcu->ctrl_intf->cur_altsetting;
pcu->da... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, union_desc->bMasterInterface0);
if (!pcu->ctrl_intf) {
return -EVAL;
... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, union_desc->bMasterInterface0);
... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, union_desc->bMasterInterface0);
... | static int ims_pcu_parse_cdc_data(struct usb_interface *intf, struct ims_pcu *pcu) {
union_desc = ims_pcu_get_cdc_union_desc(intf);
if (!union_desc) {
return -EVAL;
}
pcu->ctrl_intf = usb_ifnum_to_if(pcu->udev, union_desc->bMasterInterface0);
+ if (!pcu->ctrl_intf) {
+ return -EV... |
CVE-2016-3713 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/mtrr.c | msr_mtrr_valid | static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
case 0x200 ... 0x200 + 2 * KVM_NR_VAR_MTRR - 1:
case MSR_MTRRfix64K_00000:
case MSR_MTRRfix16K_80000:
case MSR_MTRRfix16K_A0000:
case MSR_MTRRfix4K_C0000:
case MSR_MTRRfix4K_C8000:
case MSR_MTRRfix4K_D0000:
case MSR_MTRRfix4K_... | static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
case 0x200 ... 0x200 + 2 * KVM_NR_VAR_MTRR - 1:
case MSR_MTRRfix64K_00000:
case MSR_MTRRfix16K_80000:
case MSR_MTRRfix16K_A0000:
case MSR_MTRRfix4K_C0000:
case MSR_MTRRfix4K_C8000:
case MSR_MTRRfix4K_D0000:
case MSR_MTRRfix4K_... | static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
case 0x200 ... 0x200 + 2 * KVM_NR_VAR_MTRR - 1:
case MSR_MTRRfix64K_00000:
case MSR_MTRRfix16K_80000:
case MSR_MTRRfix16K_A0000:
case MSR_MTRRfix4K_C0000:
case MSR_MTRRfix4K_C8000:
case MSR_MTRRfix4K_D0000:
case MSR_MTRRfix4K_... | static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
case 0x200 ... 0x200 + 2 * KVM_NR_VAR_MTRR - 1:
case MSR_MTRRfix64K_00000:
case MSR_MTRRfix16K_80000:
case MSR_MTRRfix16K_A0000:
case MSR_MTRRfix4K_C0000:
case MSR_MTRRfix4K_C8000:
case MSR_MTRRfix4K_D0000:
case MSR_MTRRfix4K_... | static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
case 0x2f8:
return true;
}
}
| static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
}
}
| static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
case 0x2f8:
return true;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static bool msr_mtrr_valid(unsigned msr) {
switch (msr) {
- case 0x2f8:
- return true;
}
} |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/dccp/ipv6.c | dccp_v6_connect | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dccp_sk(s... | static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *)uaddr;
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct dccp_sock *dp = dcc... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/dccp/ipv6.c | dccp_v6_request_recv_sock | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct inet_sock *newinet;
struct dccp6_sock *newdp6;
struct sock *news... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
struct dccp6_soc... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct inet_sock *newinet;
struct dccp6_sock *newdp6;
struct sock *n... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
struct dccp6_... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct inet_sock *newinet;
if (sk_acceptq_is_full(sk)) {
goto out_o... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
if (sk_acceptq_i... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct inet_sock *newinet;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
/* PLACEHOLDE... | static struct sock *dccp_v6_request_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
+ struct ipv6_txoptions *opt;
struct inet_sock *newinet;
if (sk_acc... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/dccp/ipv6.c | dccp_v6_send_response | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct in6_addr *final_p, final;
struct flowi6 fl6;
int err = -1;
struct dst_entry *dst;
memset(&fl6, 0... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct in6_addr *final_p, final;
struct flowi6 fl6;
int err = -1;
struct dst_entry *dst;
memset(&fl6, 0... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct in6_addr *final_p, final;
struct flowi6 fl6;
int err = -1;
struct dst_entry *dst;
memset(&fl6... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct in6_addr *final_p, final;
struct flowi6 fl6;
int err = -1;
struct dst_entry *dst;
memset(&fl6... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
security_req_classify_flow(req, flowi6_to_flowi(&fl6));
final_p = fl6_update_dst(&fl6, np->opt, &final);
dst = ip6_dst_lookup_flow(sk, &... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
security_req_classify_flow(req, flowi6_to_flowi(&fl6));
rcu_read_lock();
final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
security_req_classify_flow(req, flowi6_to_flowi(&fl6));
final_p = fl6_update_dst(&fl6, ... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet6_request_sock *ireq6 = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
security_req_classify_flow(req, flowi6_to_flowi(&fl6));
rcu_read_lock();
final_p = ... | static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
security_req_classify_flow(req, flowi6_to_flowi(&fl6));
- final_p = fl6_update_dst(&fl6, np->opt, &final);
+ rcu_read_lock();
+ fin... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/af_inet6.c | inet6_destroy_sock | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct ipv6_txoptions *opt;
skb = xchg(&np->pktoptions, NULL);
if (skb != NULL) {
kfree_skb(skb);
}
skb = xchg(&np->rxpmtu, NULL);
if (skb != NULL) {
kfree_skb(skb);
... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct ipv6_txoptions *opt;
skb = xchg(&np->pktoptions, NULL);
if (skb != NULL) {
kfree_skb(skb);
}
skb = xchg(&np->rxpmtu, NULL);
if (skb != NULL) {
kfree_skb(skb);
... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct ipv6_txoptions *opt;
skb = xchg(&np->pktoptions, NULL);
if (skb != NULL) {
kfree_skb(skb);
}
skb = xchg(&np->rxpmtu, NULL);
if (skb != NULL) {
kfree_skb(skb);
... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff *skb;
struct ipv6_txoptions *opt;
skb = xchg(&np->pktoptions, NULL);
if (skb != NULL) {
kfree_skb(skb);
}
skb = xchg(&np->rxpmtu, NULL);
if (skb != NULL) {
kfree_skb(skb);
... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
skb = xchg(&np->pktoptions, NULL);
skb = xchg(&np->rxpmtu, NULL);
fl6_free_socklist(sk);
opt = xchg(&np->opt, NULL);
if (opt != NULL) {
sock_kfree_s(sk, opt, opt->tot_len);
}
}
| void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
skb = xchg(&np->pktoptions, NULL);
skb = xchg(&np->rxpmtu, NULL);
fl6_free_socklist(sk);
opt = xchg((__force struct ipv6_txoptions **)&np->opt, NULL);
if (opt) {
atomic_sub(opt->tot_len, &sk->sk_omem_alloc);... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb = xchg(&np->pktoptions, NULL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb = xchg(&np->rxpmtu, NULL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fl6_fre... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb = xchg(&np->pktoptions, NULL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
skb = xchg(&np->rxpmtu, NULL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fl6_fre... | void inet6_destroy_sock(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
skb = xchg(&np->pktoptions, NULL);
skb = xchg(&np->rxpmtu, NULL);
fl6_free_socklist(sk);
- opt = xchg(&np->opt, NULL);
- if (opt != NULL) {
- sock_kfree_s(sk, opt, opt->tot_len);
+ opt = xchg((__force s... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/af_inet6.c | inet6_sk_rebuild_header | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct dst_entry *dst;
dst = __sk_dst_check(sk, np->dst_cookie);
if (dst == NULL) {
struct inet_sock *inet = inet_sk(sk);
struct in6_addr *final_p, final;
struct flowi6 fl6;
memset(&fl6, ... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct dst_entry *dst;
dst = __sk_dst_check(sk, np->dst_cookie);
if (dst == NULL) {
struct inet_sock *inet = inet_sk(sk);
struct in6_addr *final_p, final;
struct flowi6 fl6;
memset(&fl6, ... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct dst_entry *dst;
dst = __sk_dst_check(sk, np->dst_cookie);
if (dst == NULL) {
struct inet_sock *inet = inet_sk(sk);
struct in6_addr *final_p, final;
struct flowi6 fl6;
memset(&fl6, ... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct dst_entry *dst;
dst = __sk_dst_check(sk, np->dst_cookie);
if (dst == NULL) {
struct inet_sock *inet = inet_sk(sk);
struct in6_addr *final_p, final;
struct flowi6 fl6;
memset(&fl6, ... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
if (dst == NULL) {
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
final_p = fl6_update_dst(&fl6, np->opt, &final);
dst = ip6_dst_lookup_flow(sk, &fl6, final_p);
if (IS_ERR(dst)) {
... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
if (dst == NULL) {
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
rcu_read_lock();
final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final);
rcu_read_unlock();
dst = ip6_ds... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dst == NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
final_p = fl6_update_dst(&fl6, np->opt... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (dst == NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
rcu_read_lock();
final_p = fl6... | int inet6_sk_rebuild_header(struct sock *sk) {
struct ipv6_pinfo *np = inet6_sk(sk);
if (dst == NULL) {
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
- final_p = fl6_update_dst(&fl6, np->opt, &final);
+ rcu_read_lock();
+ final_p = fl6_update_dst(&fl6, rcu_dereference(np... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/datagram.c | __ip6_datagram_connect | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *daddr, *final_p, final;
struct dst_entry *dst;
struct... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *daddr, *final_p, final;
struct dst_entry *dst;
struct... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *daddr, *final_p, final;
struct dst_entry *dst;
struct... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *daddr, *final_p, final;
struct dst_entry *dst;
struct... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct ip6_flowlabel *flowlabel = NULL;
if (np->sndflow) {
fl6.flo... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct ip6_flowlabel *flowlabel = NULL;
if (np->sndflow) {
fl6.flo... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ip6_flowlabel *flowla... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ip6_flowlabel *flowla... | static int __ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct ip6_flowlabel *flowlabel = NULL;
if (np->sndflow) {
... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/exthdrs.c | ipv6_dup_options | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
struct ipv6_txoptions *opt2;
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
long dif = (char *)opt2 - (char *)opt;
memcpy(opt2, opt, opt->tot_len);
if (opt2->hopopt) {
... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
struct ipv6_txoptions *opt2;
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
long dif = (char *)opt2 - (char *)opt;
memcpy(opt2, opt, opt->tot_len);
if (opt2->hopopt) {
... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
struct ipv6_txoptions *opt2;
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
long dif = (char *)opt2 - (char *)opt;
memcpy(opt2, opt, opt->tot_len);
if (opt2->hopopt) {
... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
struct ipv6_txoptions *opt2;
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
long dif = (char *)opt2 - (char *)opt;
memcpy(opt2, opt, opt->tot_len);
if (opt2->hopopt) {
... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
memcpy(opt2, opt, opt->tot_len);
if (opt2->srcrt) {
*((char **)&opt2->srcrt) += dif;
}
}
return opt2;
}
| struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
memcpy(opt2, opt, opt->tot_len);
if (opt2->srcrt) {
*((char **)&opt2->srcrt) += dif;
}
atomic_set(&opt2->refcnt, 1);
... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memcpy(opt2, opt, opt->tot_len);
/* PLACEHOLDER: ... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memcpy(opt2, opt, opt->tot_len);
/* PLACEHOLDER: ... | struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt) {
opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
if (opt2) {
memcpy(opt2, opt, opt->tot_len);
if (opt2->srcrt) {
*((char **)&opt2->srcrt) += dif;
}
+ atomic_set(&opt2->refc... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/exthdrs.c | ipv6_renew_options | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
char *p;
struct ipv6_txoptions *opt2;
int err;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += C... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
char *p;
struct ipv6_txoptions *opt2;
int err;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += C... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
char *p;
struct ipv6_txoptions *opt2;
int err;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += C... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
char *p;
struct ipv6_txoptions *opt2;
int err;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += C... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt));
}
if (... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt));
}
if (... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += CMSG_ALIGN... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += CMSG_ALIGN... | struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, int newtype, struct ipv6_opt_hdr *newopt, int newoptlen) {
int tot_len = 0;
if (opt) {
if (newtype != IPV6_HOPOPTS && opt->hopopt) {
tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt));
}
... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/inet6_connection_sock.c | inet6_csk_route_req | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_pro... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_pro... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_p... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_p... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct ipv6_pinfo *np = inet6_sk(sk);
memset(fl6, 0, sizeof(*fl6));
fl6->daddr = ireq->ir_v6_rmt_addr;
final_p = fl6_update_dst(fl6, np->opt, &final);
fl6->saddr = ireq->ir_v6_loc_addr;
s... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct ipv6_pinfo *np = inet6_sk(sk);
memset(fl6, 0, sizeof(*fl6));
fl6->daddr = ireq->ir_v6_rmt_addr;
rcu_read_lock();
final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final);
rc... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memset(fl6, 0, sizeof(*fl6));
/* PLACEHOLDER: DO NOT DELETE T... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memset(fl6, 0, sizeof(*fl6));
/* PLACEHOLDER: DO NOT DELETE T... | struct dst_entry *inet6_csk_route_req(struct sock *sk, struct flowi6 *fl6, const struct request_sock *req) {
struct ipv6_pinfo *np = inet6_sk(sk);
memset(fl6, 0, sizeof(*fl6));
fl6->daddr = ireq->ir_v6_rmt_addr;
- final_p = fl6_update_dst(fl6, np->opt, &final);
+ rcu_read_lock();
+ final_p = fl... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/inet6_connection_sock.c | inet6_csk_route_socket | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_proto = sk->sk_protocol;
fl6->d... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_proto = sk->sk_protocol;
fl6->d... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_proto = sk->sk_protocol;
fl6->d... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6, 0, sizeof(*fl6));
fl6->flowi6_proto = sk->sk_protocol;
fl6->d... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
memset(fl6, 0, sizeof(*fl6));
fl6->flowlabel = np->flow_label;
IP6_ECN_flow_xmit(sk, fl6->flowlabel);
security_sk_classify_flow(sk, f... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
memset(fl6, 0, sizeof(*fl6));
fl6->flowlabel = np->flow_label;
IP6_ECN_flow_xmit(sk, fl6->flowlabel);
security_sk_classify_flow(sk, f... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memset(fl6, 0, sizeof(*fl6));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fl6->flowla... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memset(fl6, 0, sizeof(*fl6));
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fl6->flowla... | static struct dst_entry *inet6_csk_route_socket(struct sock *sk, struct flowi6 *fl6) {
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
memset(fl6, 0, sizeof(*fl6));
fl6->flowlabel = np->flow_label;
IP6_ECN_flow_xmit(sk, fl6->flowlabel);
security_sk_classify_flo... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/inet6_connection_sock.c | inet6_csk_xmit | int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 fl6;
struct dst_entry *dst;
int res;
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
sk->sk_err_soft = -PTR_ERR(dst);
sk->sk_route_ca... | int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 fl6;
struct dst_entry *dst;
int res;
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
sk->sk_err_soft = -PTR_ERR(dst);
sk->sk_route_ca... | int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) {
struct sock *sk = skb->sk;
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 fl6;
struct dst_entry *dst;
int res;
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
sk->sk_err_soft = -PTR_ERR(dst);
s... | int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) {
struct sock *sk = skb->sk;
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 fl6;
struct dst_entry *dst;
int res;
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
sk->sk_err_soft = -PTR_ERR(dst);
s... | int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused) {
struct ipv6_pinfo *np = inet6_sk(sk);
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
return PTR_ERR(dst);
}
skb_dst_set_noref(skb, dst);
fl6.daddr = sk->sk_v6_daddr;
res = ip6_xmit(sk, skb... | int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused) {
struct ipv6_pinfo *np = inet6_sk(sk);
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
return PTR_ERR(dst);
}
skb_dst_set_noref(skb, dst);
fl6.daddr = sk->sk_v6_daddr;
res = ip6_xmit(sk, skb... | int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) {
struct sock *sk = skb->sk;
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retur... | int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) {
struct sock *sk = skb->sk;
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retur... | int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused) {
struct ipv6_pinfo *np = inet6_sk(sk);
dst = inet6_csk_route_socket(sk, &fl6);
if (IS_ERR(dst)) {
return PTR_ERR(dst);
}
skb_dst_set_noref(skb, dst);
fl6.daddr = sk->sk_v6_daddr;
- res = ip6_xmi... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/ipv6_sockglue.c | do_ipv6_getsockopt | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
int len;
int val;
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, op... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
int len;
int val;
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, op... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
int len;
int val;
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, op... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
int len;
int val;
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, op... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, optlen)) {
return -E... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, optlen)) {
return -E... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
... | static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen, unsigned int flags) {
struct ipv6_pinfo *np = inet6_sk(sk);
if (ip6_mroute_opt(optname)) {
return ip6_mroute_getsockopt(sk, optname, optval, optlen);
}
if (get_user(len, optlen)) {
re... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/ipv6_sockglue.c | do_ipv6_setsockopt | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
if (optval == NULL) {
val = 0;
} else {
if (optlen >= sizeo... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
if (optval == NULL) {
val = 0;
} else {
if (optlen >= sizeo... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
if (optval == NULL) {
val=0;
} else {
if (optlen >= sizeof(... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
int val, valbool;
int retv = -ENOPROTOOPT;
if (optval == NULL) {
val=0;
} else {
if (optlen >= sizeof(... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
if (optval == NULL) {
} else {
if (optlen >= sizeof(int)) {
} else {
}
}
if (ip6_mroute_opt(op... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
if (optval == NULL) {
} else {
if (optlen >= sizeof(int)) {
} else {
}
}
if (ip6_mroute_opt(op... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (optval == NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} el... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (optval == NULL) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} el... | static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval, unsigned int optlen) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct net *net = sock_net(sk);
if (optval == NULL) {
} else {
if (optlen >= sizeof(int)) {
} else {
}
}
if (ip6_mro... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/ipv6_sockglue.c | ipv6_update_options | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
/* PLA... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
/* PLA... | static struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) {
if (inet_sk(sk)->is_icsk) {
if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) {
struct inet_connection_sock *icsk = inet_csk(sk);
... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/raw.c | rawv6_sendmsg | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions opt_space;
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct inet_sock *inet = ... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct sockaddr_in6 * sin6 = (struct sockaddr_in6 *) msg->msg_name;
struct in6_addr *daddr, *final_p, final;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = ... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions opt_space;
struct sockaddr_in6 * sin6 = (struct sockaddr_in6 *) msg->msg_name;
struct in6_addr *daddr, *final_p, final;
struct inet_sock *i... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct raw6_sock *rp = raw6_sk(sk);
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions opt_space;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct raw6_sock *rp = raw6_sk(sk);
struct ipv6_... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct raw6_sock *rp = raw6_sk(sk);
struct ip... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions opt_space;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
st... | static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
+ struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions opt_space;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct raw6_sock *rp = raw6_sk(sk);
struc... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/syncookies.c | cookie_v6_check | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct tcp_options_received tcp_opt;
struct inet_request_sock *ireq;
struct tcp_request_sock *treq;
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
const struct tcphdr *th = tcp_hdr(skb);
__u32 cooki... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct tcp_options_received tcp_opt;
struct inet_request_sock *ireq;
struct tcp_request_sock *treq;
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
const struct tcphdr *th = tcp_hdr(skb);
__u32 cooki... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct tcp_options_received tcp_opt;
struct inet_request_sock *ireq;
struct inet6_request_sock *ireq6;
struct tcp_request_sock *treq;
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
const struct tcph... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct tcp_options_received tcp_opt;
struct inet_request_sock *ireq;
struct inet6_request_sock *ireq6;
struct tcp_request_sock *treq;
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
const struct tcph... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = inet6_sk(sk);
{
fl6.daddr = ireq->ir_v6_rmt_addr;
final_p = fl6_update_dst(&fl6, np->opt, &final);
fl6.saddr = ireq->ir_v6_loc_addr;
dst = ip6_dst_lookup_flow(sk, &fl6, final_p);
... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = inet6_sk(sk);
{
fl6.daddr = ireq->ir_v6_rmt_addr;
final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final);
fl6.saddr = ireq->ir_v6_loc_addr;
dst = ip6_dst_lookup_flow(sk, &fl6, f... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
{
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fl6.daddr = ireq6->rmt_addr;
final_p ... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
{
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fl6.daddr = ireq6->rmt_addr;
final_p ... | struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) {
struct ipv6_pinfo *np = inet6_sk(sk);
{
fl6.daddr = ireq->ir_v6_rmt_addr;
- final_p = fl6_update_dst(&fl6, np->opt, &final);
+ final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final);
fl6.saddr = ire... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/tcp_ipv6.c | tcp_v6_connect | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk)... | static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) {
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/tcp_ipv6.c | tcp_v6_send_synack | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 *fl6 = &fl->u.ip6;
struct sk_buff *s... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 *fl6 = &fl->u.ip6;
struct sk_buff *s... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi6 *fl6, struct request_sock *req, u16 queue_mapping) {
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff * skb;
int err = -ENOMEM;
if (!dst && (dst = inet6_csk_route... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi6 *fl6, struct request_sock *req, u16 queue_mapping) {
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sk_buff * skb;
int err = -ENOMEM;
if (!dst && (dst = inet6_csk_route... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 *fl6 = &fl->u.ip6;
if (!dst && (dst ... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 *fl6 = &fl->u.ip6;
if (!dst && (dst ... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi6 *fl6, struct request_sock *req, u16 queue_mapping) {
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dst && (dst = inet6_csk_rout... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi6 *fl6, struct request_sock *req, u16 queue_mapping) {
struct inet6_request_sock *treq = inet6_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dst && (dst = inet6_csk_rout... | static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst, struct flowi *fl, struct request_sock *req, u16 queue_mapping, struct tcp_fastopen_cookie *foc) {
struct inet_request_sock *ireq = inet_rsk(req);
struct ipv6_pinfo *np = inet6_sk(sk);
struct flowi6 *fl6 = &fl->u.ip6;
if (!dst && ... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/tcp_ipv6.c | tcp_v6_syn_recv_sock | static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq;
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct inet_sock *newinet;
struct tcp_sock *newtp;
struct s... | static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet_request_sock *ireq;
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
stru... | static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet6_request_sock *treq;
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct inet_sock *newinet;
struct tcp_sock *newtp;
struct... | static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct inet6_request_sock *treq;
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
st... | static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct inet_sock *newinet;
ireq = inet_rsk(req);
if (sk_acceptq_is_full(sk)) {
goto out... | static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct ipv6_txoptions *opt;
struct inet_sock *newinet;
ireq = inet_rsk(req);
if (sk_acceptq... | static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct inet_sock *newinet;
/* PLACEHOLDER: DO NO... | static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
struct ipv6_txoptions *opt;
struct inet_sock *ne... | static struct sock *tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, struct request_sock *req, struct dst_entry *dst) {
struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
struct tcp6_sock *newtcp6sk;
+ struct ipv6_txoptions *opt;
struct inet_sock *newinet;
ireq = inet_rsk(req);
if (sk_... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/udp.c | udpv6_sendmsg | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
st... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
st... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name;
... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) msg->msg_name;
... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel *flowlabel = NULL;
int hlimit = -1;
i... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt = NULL;
struct ipv6_txoptions *opt_to_free = NULL;
struct ip6_flowlabe... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struc... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struc... | int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct udp_sock *up = udp_sk(sk);
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt = NULL;
+ struct ipv6_txoptions *opt_to_free = NULL;
struct ip6_f... |
CVE-2016-3841 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/l2tp/l2tp_ip6.c | l2tp_ip6_sendmsg | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *o... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *o... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct sockaddr_l2tpip6 *lsa = (struct sockaddr_l2tpip6 *) msg->msg_name;
struct in6_addr *daddr, *final_p, final;
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txo... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_txoptions opt_space;
struct sockaddr_l2tpip6 *lsa = (struct sockaddr_l2tpip6 *) msg->msg_name;
struct in6_addr *daddr, *final_p, final;
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txo... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel *flowlabel = NULL;
int hlimit = -1;
int tclass = -1;
int dontfrag = -1;
if (lsa) {
if (np->... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel *flowlabel = NULL;
int hlimit = -1;
int tclass = -1;
int... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel *flowlabel = NULL;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel *flowlabel = NULL;... | static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) {
struct ipv6_pinfo *np = inet6_sk(sk);
+ struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions *opt = NULL;
struct ip6_flowlabel *flowlabel = NULL;
int hlimit = -1;
int tclass = -1;
... |
CVE-2016-3857 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/arm/kernel/sys_oabi-compat.c | sys_oabi_epoll_wait | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
struct epoll_event *kbuf;
mm_segment_t fs;
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(struct epoll_event))) {
return -EVAL;
}
kbuf = kmalloc(sizeof(*kbuf) *... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
struct epoll_event *kbuf;
mm_segment_t fs;
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(*kbuf)) || maxevents > (T_MAX/sizeof(*events))) {
return -EVAL;
}
if (... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
struct epoll_event *kbuf;
mm_segment_t fs;
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(struct epoll_event))) {
return -EVAL;
}
kbuf = kmalloc(sizeof(*kbuf) *... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
struct epoll_event *kbuf;
mm_segment_t fs;
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(*kbuf)) || maxevents > (T_MAX/sizeof(*events))) {
return -EVAL;
}
if (... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(struct epoll_event))) {
return -EVAL;
}
kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL);
if (!kbuf) {
r... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(*kbuf)) || maxevents > (T_MAX/sizeof(*events))) {
return -EVAL;
}
if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * ... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(struct epoll_event))) {
return -EVAL;
}
kbuf = kmalloc(sizeof(*kbuf) * ... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
long ret, err, i;
if (maxevents <= 0 || maxevents > (T_MAX/sizeof(*kbuf)) || maxevents > (T_MAX/sizeof(*events))) {
return -EVAL;
}
if (!... | asmlinkage long sys_oabi_epoll_wait(int epfd, struct oabi_epoll_event *events, int maxevents, int timeout) {
long ret, err, i;
- if (maxevents <= 0 || maxevents > (T_MAX/sizeof(struct epoll_event))) {
+ if (maxevents <= 0 || maxevents > (T_MAX/sizeof(*kbuf)) || maxevents > (T_MAX/sizeof(*events))) {
... |
CVE-2016-3857 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/arm/kernel/sys_oabi-compat.c | sys_oabi_semtimedop | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
struct sembuf *sops;
struct timespec local_timeout;
long err;
int i;
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
sops = kmalloc(sizeof(*sops) * nsops, GF... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
struct sembuf *sops;
struct timespec local_timeout;
long err;
int i;
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
if (!access_ok(VERIFY_READ, tsops, sizeo... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
struct sembuf *sops;
struct timespec local_timeout;
long err;
int i;
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
sops = kmalloc(sizeof(*sops) * nsops, GF... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
struct sembuf *sops;
struct timespec local_timeout;
long err;
int i;
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
if (!access_ok(VERIFY_READ, tsops, sizeo... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
if (!sops) {
return -ENOMEM;
}
for (i = 0; i < nsops; ... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops)) {
return -EFAULT;
}
sops = kmalloc(sizeof(*sops) ... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
sops = kmalloc(sizeof(*sops) * nsops, GFP_KERNEL);
if (!sops) {
... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
}
if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops)) {
retur... | asmlinkage long sys_oabi_semtimedop(int semid, struct oabi_sembuf *tsops, unsigned nsops, const struct timespec *timeout) {
if (nsops < 1 || nsops > SEMOPM) {
return -EVAL;
+ }
+ if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops)) {
+ return -EFAULT;
}
sops = kmalloc(sizeof... |
CVE-2016-3951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/usb/cdc_ncm.c | cdc_ncm_bind | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
int ret;
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM, 0);
usbnet_link_change(dev, 0, 0);
return ret;
} | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
return cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM, 0);
} | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
int ret;
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM);
usbnet_link_change(dev, 0, 0);
return ret;
} | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
return cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM);
} | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
int ret;
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM, 0);
usbnet_link_change(dev, 0, 0);
return ret;
}
| static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
return cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM, 0);
}
| static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
int ret;
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM);
usbnet_link_change(dev, 0, 0);
return ret;
}
| static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
return cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM);
} | static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf) {
- int ret;
if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTG_NCM) {
return -ENODEV;
}
- ret = cdc_ncm_bind_common(dev, intf, CDC_NCM_DATA_ALTSETTG_NCM, 0);
- usbnet_link_change(dev, 0, 0);
- return ret;
... |
CVE-2016-3955 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/usbip/usbip_common.c | usbip_recv_xbuff | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
int ret;
int size;
if (ud->side == USBIP_STUB) {
if (usb_pipein(urb->pipe)) {
return 0;
}
size = urb->transfer_buffer_length;
} else {
if (usb_pipeout(urb->pipe)) {
return 0;
... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
int ret;
int size;
if (ud->side == USBIP_STUB) {
if (usb_pipein(urb->pipe)) {
return 0;
}
size = urb->transfer_buffer_length;
} else {
if (usb_pipeout(urb->pipe)) {
return 0;
... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
int ret;
int size;
if (ud->side == USBIP_STUB) {
if (usb_pipein(urb->pipe)) {
return 0;
}
size = urb->transfer_buffer_length;
} else {
if (usb_pipeout(urb->pipe)) {
return 0;
... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
int ret;
int size;
if (ud->side == USBIP_STUB) {
if (usb_pipein(urb->pipe)) {
return 0;
}
size = urb->transfer_buffer_length;
} else {
if (usb_pipeout(urb->pipe)) {
return 0;
... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
if (ud->side == USBIP_STUB) {
size = urb->transfer_buffer_length;
} else {
size = urb->actual_length;
}
if (!(size > 0)) {
return 0;
}
ret = usbip_recv(ud->tcp_socket, urb->transfer_buffer, size);
if (re... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
if (ud->side == USBIP_STUB) {
size = urb->transfer_buffer_length;
} else {
size = urb->actual_length;
}
if (!(size > 0)) {
return 0;
}
if (size > urb->transfer_buffer_length) {
if (ud->side == USBIP_... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ud->side == USBIP_STUB) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size = urb->transfer_buffer_length;
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size =... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ud->side == USBIP_STUB) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size = urb->transfer_buffer_length;
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size =... | int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb) {
if (ud->side == USBIP_STUB) {
size = urb->transfer_buffer_length;
} else {
size = urb->actual_length;
}
if (!(size > 0)) {
return 0;
+ }
+ if (size > urb->transfer_buffer_length) {
+ if (ud->sid... |
CVE-2016-4470 | 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) {
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) {
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
if (keyring) {
link_ret = __key_link_begin(keyring, &key->index_key, &edit);
}
mutex_unlock(&key_const... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
if (keyring) {
link_ret = __key_link_begin(keyring, &key->index_key, &edit);
}
mutex_unlock(&key_const... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (keyring) {
... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (keyring) {
... | int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey) {
int ret, awaken, link_ret = 0;
key_check(key);
key_check(keyring);
if (keyring) {
link_ret = __key_link_begin(keyring, &key->index_key, &edit);
}
mutex_unlock(&k... |
CVE-2016-4482 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/core/devio.c | proc_connectinfo | static int proc_connectinfo(struct dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci = {
.devnum = ps->dev->devnum, .slow = ps->dev->speed == USB_SPEED_LOW
};
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
} | static int proc_connectinfo(struct dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci;
memset(&ci, 0, sizeof(ci));
ci.devnum = ps->dev->devnum;
ci.slow = ps->dev->speed == USB_SPEED_LOW;
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
} | static int proc_connectinfo(struct usb_dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci = {
.devnum = ps->dev->devnum, .slow = ps->dev->speed == USB_SPEED_LOW
};
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
} | static int proc_connectinfo(struct usb_dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci;
memset(&ci, 0, sizeof(ci));
ci.devnum = ps->dev->devnum;
ci.slow = ps->dev->speed == USB_SPEED_LOW;
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
} | static int proc_connectinfo(struct dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci = {
.devnum = ps->dev->devnum, .slow = ps->dev->speed == USB_SPEED_LOW
};
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
}
| static int proc_connectinfo(struct dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci;
memset(&ci, 0, sizeof(ci));
ci.devnum = ps->dev->devnum;
ci.slow = ps->dev->speed == USB_SPEED_LOW;
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
}
| static int proc_connectinfo(struct usb_dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci = {
.devnum = ps->dev->devnum, .slow = ps->dev->speed == USB_SPEED_LOW
};
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
}
| static int proc_connectinfo(struct usb_dev_state *ps, void *arg) {
struct usbdevfs_connectinfo ci;
memset(&ci, 0, sizeof(ci));
ci.devnum = ps->dev->devnum;
ci.slow = ps->dev->speed == USB_SPEED_LOW;
if (copy_to_user(arg, &ci, sizeof(ci))) {
return -EFAULT;
}
return 0;
} | static int proc_connectinfo(struct dev_state *ps, void *arg) {
- struct usbdevfs_connectinfo ci = {
- .devnum = ps->dev->devnum, .slow = ps->dev->speed == USB_SPEED_LOW
- };
+ struct usbdevfs_connectinfo ci;
+ memset(&ci, 0, sizeof(ci));
+ ci.devnum = ps->dev->devnum;
+ ci.slow = ps->dev->spee... |
CVE-2016-4485 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/llc/af_llc.c | llc_cmsg_rcv | static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
struct llc_sock *llc = llc_sk(skb->sk);
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
llc_pdu_decode_dsap(skb, &info.lpi_sap);
llc_pdu_decode_d... | static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
struct llc_sock *llc = llc_sk(skb->sk);
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
memset(&info, 0, sizeof(info));
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
llc_pdu_decode_dsap(skb, ... | static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
struct llc_sock *llc = llc_sk(skb->sk);
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
llc_pdu_decode_dsap(skb, &info.lpi_sap);
llc_pdu_decode_d... | static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
struct llc_sock *llc = llc_sk(skb->sk);
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
memset(&info, 0, sizeof(info));
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
llc_pdu_decode_dsap(skb, ... | static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
}
}
| static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
memset(&info, 0, sizeof(info));
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
}
}
| static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
}
| static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
memset(&info, 0, sizeof(info));
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
/* PLACEHOLDER: DO NOT ... | static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) {
if (llc->cmsg_flags & LLC_CMSG_PKTFO) {
struct llc_pktinfo info;
+ memset(&info, 0, sizeof(info));
info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex;
}
} |
CVE-2016-4557 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/verifier.c | replace_map_fd_with_map_ptr | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
return -EVA... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
return -EVA... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
retur... |
CVE-2016-4558 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/inode.c | bpf_any_get | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt);
break;
case BPF_TYPE_MAP:
bpf_map_inc(raw, true);
break;
default:
WARN_ON_ONCE(1);
break;
}
return raw... | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
raw = bpf_prog_inc(raw);
break;
case BPF_TYPE_MAP:
raw = bpf_map_inc(raw, true);
break;
default:
WARN_ON_ONCE(1);
break;
}
return raw;
} | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt);
break;
case BPF_TYPE_MAP:
bpf_map_inc(raw, true);
break;
default:
WARN_ON_ONCE(1);
break;
}
return raw... | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
raw = bpf_prog_inc(raw);
break;
case BPF_TYPE_MAP:
raw = bpf_map_inc(raw, true);
break;
default:
WARN_ON_ONCE(1);
break;
}
return raw;
} | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt);
break;
case BPF_TYPE_MAP:
bpf_map_inc(raw, true);
break;
}
return raw;
}
| static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
raw = bpf_prog_inc(raw);
break;
case BPF_TYPE_MAP:
raw = bpf_map_inc(raw, true);
break;
}
return raw;
}
| static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt);
break;
case BPF_TYPE_MAP:
bpf_map_inc(raw, true);
break;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
return raw;
}... | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
raw = bpf_prog_inc(raw);
break;
case BPF_TYPE_MAP:
raw = bpf_map_inc(raw, true);
break;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
return raw;
} | static void *bpf_any_get(void *raw, enum bpf_type type) {
switch (type) {
case BPF_TYPE_PROG:
- atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt);
+ raw = bpf_prog_inc(raw);
break;
case BPF_TYPE_MAP:
- bpf_map_inc(raw, true);
+ raw = bpf_map_inc(raw, true);
... |
CVE-2016-4558 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/inode.c | bpf_obj_do_get | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
struct inode *inode;
struct path path;
void *raw;
int ret;
ret = kern_path(pathname->name, LOOKUP_FOLLOW, &path);
if (ret) {
return ERR_PTR(ret);
}
inode = d_backing_inode(path.dentry);
ret = ... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
struct inode *inode;
struct path path;
void *raw;
int ret;
ret = kern_path(pathname->name, LOOKUP_FOLLOW, &path);
if (ret) {
return ERR_PTR(ret);
}
inode = d_backing_inode(path.dentry);
ret = ... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
struct inode *inode;
struct path path;
void *raw;
int ret;
ret = kern_path(pathname->name, LOOKUP_FOLLOW, &path);
if (ret) {
return ERR_PTR(ret);
}
inode = d_backing_inode(path.dentry);
ret = ... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
struct inode *inode;
struct path path;
void *raw;
int ret;
ret = kern_path(pathname->name, LOOKUP_FOLLOW, &path);
if (ret) {
return ERR_PTR(ret);
}
inode = d_backing_inode(path.dentry);
ret = ... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
inode = d_backing_inode(path.dentry);
ret = inode_permission(inode, MAY_WRITE);
ret = bpf_inode_type(inode, type);
raw = bpf_any_get(inode->i_private, *type);
touch_atime(&path);
path_put(&path);
return raw;
... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
inode = d_backing_inode(path.dentry);
ret = inode_permission(inode, MAY_WRITE);
ret = bpf_inode_type(inode, type);
raw = bpf_any_get(inode->i_private, *type);
if (!IS_ERR(raw)) {
touch_atime(&path);
}
... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode = d_backing_inode(path.dentry);
ret = inode_permission(inode, MAY_WRITE);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = bpf_inode_type(inode, type);
/* PL... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inode = d_backing_inode(path.dentry);
ret = inode_permission(inode, MAY_WRITE);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = bpf_inode_type(inode, type);
/* PL... | static void *bpf_obj_do_get(const struct filename *pathname, enum bpf_type *type) {
inode = d_backing_inode(path.dentry);
ret = inode_permission(inode, MAY_WRITE);
ret = bpf_inode_type(inode, type);
raw = bpf_any_get(inode->i_private, *type);
- touch_atime(&path);
+ if (!IS_ERR(raw)) {
+ ... |
CVE-2016-4558 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/syscall.c | bpf_map_get_with_uref | struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_map *map;
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
bpf_map_inc(map, true);
fdput(f);
return map;
} | struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_map *map;
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
map = bpf_map_inc(map, true);
fdput(f);
return map;
} | struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_map *map;
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
bpf_map_inc(map, true);
fdput(f);
return map;
} | struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_map *map;
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
map = bpf_map_inc(map, true);
fdput(f);
return map;
} | struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
bpf_map_inc(map, true);
fdput(f);
return map;
}
| struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
map = bpf_map_inc(map, true);
fdput(f);
return map;
}
| struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
bpf_map_inc(map, true);
fdput(f);
return map;
}
| struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
map = bpf_map_inc(map, true);
fdput(f);
return map;
} | struct bpf_map *bpf_map_get_with_uref(u32 ufd) {
struct fd f = fdget(ufd);
map = __bpf_map_get(f);
if (IS_ERR(map)) {
return map;
}
- bpf_map_inc(map, true);
+ map = bpf_map_inc(map, true);
fdput(f);
return map;
} |
CVE-2016-4558 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/syscall.c | bpf_map_inc | void bpf_map_inc(struct bpf_map *map, bool uref) {
atomic_inc(&map->refcnt);
if (uref) {
atomic_inc(&map->usercnt);
}
} | struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref) {
if (atomic_inc_return(&map->refcnt) > BPF_MAX_REFCNT) {
atomic_dec(&map->refcnt);
return ERR_PTR(-EBUSY);
}
if (uref) {
atomic_inc(&map->usercnt);
}
return map;
} | void bpf_map_inc(struct bpf_map *map, bool uref) {
atomic_inc(&map->refcnt);
if (uref) {
atomic_inc(&map->usercnt);
}
} | struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref) {
if (atomic_inc_return(&map->refcnt) > BPF_MAX_REFCNT) {
atomic_dec(&map->refcnt);
return ERR_PTR(-EBUSY);
}
if (uref) {
atomic_inc(&map->usercnt);
}
return map;
} | void bpf_map_inc(struct bpf_map *map, bool uref) {
atomic_inc(&map->refcnt);
if (uref) {
atomic_inc(&map->usercnt);
}
}
| struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref) {
if (atomic_inc_return(&map->refcnt) > BPF_MAX_REFCNT) {
atomic_dec(&map->refcnt);
return ERR_PTR(-EBUSY);
}
if (uref) {
atomic_inc(&map->usercnt);
}
return map;
}
| void bpf_map_inc(struct bpf_map *map, bool uref) {
atomic_inc(&map->refcnt);
if (uref) {
atomic_inc(&map->usercnt);
}
}
| struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref) {
if (atomic_inc_return(&map->refcnt) > BPF_MAX_REFCNT) {
atomic_dec(&map->refcnt);
return ERR_PTR(-EBUSY);
}
if (uref) {
atomic_inc(&map->usercnt);
}
return map;
} | -void bpf_map_inc(struct bpf_map *map, bool uref) {
- atomic_inc(&map->refcnt);
+struct bpf_map *bpf_map_inc(struct bpf_map *map, bool uref) {
+ if (atomic_inc_return(&map->refcnt) > BPF_MAX_REFCNT) {
+ atomic_dec(&map->refcnt);
+ return ERR_PTR(-EBUSY);
+ }
if (uref) {
atomic_inc(&... |
CVE-2016-4558 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/syscall.c | bpf_prog_get | struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_prog *prog;
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
atomic_inc(&prog->aux->refcnt);
fdput(f);
return prog;
} | struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_prog *prog;
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
prog = bpf_prog_inc(prog);
fdput(f);
return prog;
} | struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_prog *prog;
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
atomic_inc(&prog->aux->refcnt);
fdput(f);
return prog;
} | struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
struct bpf_prog *prog;
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
prog = bpf_prog_inc(prog);
fdput(f);
return prog;
} | struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
atomic_inc(&prog->aux->refcnt);
fdput(f);
return prog;
}
| struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
prog = bpf_prog_inc(prog);
fdput(f);
return prog;
}
| struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
atomic_inc(&prog->aux->refcnt);
fdput(f);
return prog;
}
| struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
prog = bpf_prog_inc(prog);
fdput(f);
return prog;
} | struct bpf_prog *bpf_prog_get(u32 ufd) {
struct fd f = fdget(ufd);
prog = __bpf_prog_get(f);
if (IS_ERR(prog)) {
return prog;
}
- atomic_inc(&prog->aux->refcnt);
+ prog = bpf_prog_inc(prog);
fdput(f);
return prog;
} |
CVE-2016-4558 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/bpf/verifier.c | replace_map_fd_with_map_ptr | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
int i, j;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
return -EVA... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
return -EVA... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF... | static int replace_map_fd_with_map_ptr(struct verifier_env *env) {
struct bpf_insn *insn = env->prog->insnsi;
int insn_cnt = env->prog->len;
for (i = 0; i < insn_cnt; i++, insn++) {
if (BPF_CLASS(insn->code) == BPF_LDX && (BPF_MODE(insn->code) != BPF_MEM || insn->imm != 0)) {
retur... |
CVE-2016-4569 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/timer.c | snd_timer_user_params | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
struct snd_timer_user *tu;
struct snd_timer_params params;
struct snd_timer *t;
struct snd_timer_read *tr;
struct snd_timer_tread *ttr;
int err;
tu = file->private_data;
if (!tu->timeri) {
ret... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
struct snd_timer_user *tu;
struct snd_timer_params params;
struct snd_timer *t;
struct snd_timer_read *tr;
struct snd_timer_tread *ttr;
int err;
tu = file->private_data;
if (!tu->timeri) {
ret... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
struct snd_timer_user *tu;
struct snd_timer_params params;
struct snd_timer *t;
struct snd_timer_read *tr;
struct snd_timer_tread *ttr;
int err;
tu = file->private_data;
if (!tu->timeri) {
ret... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
struct snd_timer_user *tu;
struct snd_timer_params params;
struct snd_timer *t;
struct snd_timer_read *tr;
struct snd_timer_tread *ttr;
int err;
tu = file->private_data;
if (!tu->timeri) {
ret... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
tread.event = SNDRV_TIMER_EVENT_EARLY;
} else {
}
}
}
| static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
memset(&tread, 0, sizeof(tread));
tread.event = SNDRV_TIMER_EVENT_EARLY;
... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
tread.event = SNDRV_TIMER_EVENT_EARLY;
... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
memset(&tread, 0, sizeof(tread));
... | static int snd_timer_user_params(struct file *file, struct snd_timer_params *_params) {
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
+ memset(&tread, 0, sizeof(tread));
tread.event = SNDRV_TIMER_EVENT_EARLY;
... |
CVE-2016-4578 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/timer.c | snd_timer_user_ccallback | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
struct snd_timer_user *tu = timeri->callback_data;
struct snd_timer_tread r1;
unsigned long flags;
if (event >= SNDRV_TIMER_EVENT_START && event <= SNDRV_TIMER_EVENT_PA... | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
struct snd_timer_user *tu = timeri->callback_data;
struct snd_timer_tread r1;
unsigned long flags;
if (event >= SNDRV_TIMER_EVENT_START && event <= SNDRV_TIMER_EVENT_PA... | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
struct snd_timer_user *tu = timeri->callback_data;
struct snd_timer_tread r1;
unsigned long flags;
if (event >= SNDRV_TIMER_EVENT_START && event <= SNDRV_TIMER_EVENT_PA... | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
struct snd_timer_user *tu = timeri->callback_data;
struct snd_timer_tread r1;
unsigned long flags;
if (event >= SNDRV_TIMER_EVENT_START && event <= SNDRV_TIMER_EVENT_PA... | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
if ((tu->filter & (1 << event)) == 0 || !tu->tread) {
return;
}
r1.event = event;
}
| static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
if ((tu->filter & (1 << event)) == 0 || !tu->tread) {
return;
}
memset(&r1, 0, sizeof(r1));
r1.event = event;
}
| static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((tu->filter & (1 << event)) == 0 || !tu->tread) {
return;
}
r1.event = event;
/* PLACEHOLDER: DO NOT DELET... | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((tu->filter & (1 << event)) == 0 || !tu->tread) {
return;
}
memset(&r1, 0, sizeof(r1));
r1.event = event;
... | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri, int event, struct timespec *tstamp, unsigned long resolution) {
if ((tu->filter & (1 << event)) == 0 || !tu->tread) {
return;
}
+ memset(&r1, 0, sizeof(r1));
r1.event = event;
} |
CVE-2016-4580 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/x25/x25_facilities.c | x25_negotiate_facilities | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
struct x25_sock *x25 = x25_sk(sk);
struct x25_facilities *ours = &x25->facilities;
struct x25_facilities theirs;
int len;
memset(&theirs, 0, sizeof(theirs));
memcpy(ne... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
struct x25_sock *x25 = x25_sk(sk);
struct x25_facilities *ours = &x25->facilities;
struct x25_facilities theirs;
int len;
memset(&theirs, 0, sizeof(theirs));
memcpy(ne... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
struct x25_sock *x25 = x25_sk(sk);
struct x25_facilities *ours = &x25->facilities;
struct x25_facilities theirs;
int len;
memset(&theirs, 0, sizeof(theirs));
memcpy(ne... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
struct x25_sock *x25 = x25_sk(sk);
struct x25_facilities *ours = &x25->facilities;
struct x25_facilities theirs;
int len;
memset(&theirs, 0, sizeof(theirs));
memcpy(ne... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
memcpy(new, ours, sizeof(*new));
len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask);
if (len < 0) {
return len;
}
return len;
}
| int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
memcpy(new, ours, sizeof(*new));
memset(dte, 0, sizeof(*dte));
len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask);
if (len < 0) {
return len;
}
... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memcpy(new, ours, sizeof(*new));
len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask);
if (len < 0) {
retur... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
memcpy(new, ours, sizeof(*new));
memset(dte, 0, sizeof(*dte));
len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask)... | int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) {
memcpy(new, ours, sizeof(*new));
+ memset(dte, 0, sizeof(*dte));
len = x25_parse_facilities(skb, &theirs, dte, &x25->vc_facil_mask);
if (len < 0) {
return len;
... |
CVE-2016-4581 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pnode.c | propagate_mnt | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
struct mount *m, *n;
int ret = 0;
user_ns = current->nsproxy->mnt_ns->user_ns;
last_dest = dest_mnt;
last_source = source_mnt;
mp = dest_mp;
list = tree_list;
d... | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
struct mount *m, *n;
int ret = 0;
user_ns = current->nsproxy->mnt_ns->user_ns;
last_dest = dest_mnt;
first_source = source_mnt;
last_source = source_mnt;
mp = dest_... | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
struct mount *m, *n;
int ret = 0;
user_ns = current->nsproxy->mnt_ns->user_ns;
last_dest = dest_mnt;
last_source = source_mnt;
mp = dest_mp;
list = tree_list;
d... | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
struct mount *m, *n;
int ret = 0;
user_ns = current->nsproxy->mnt_ns->user_ns;
last_dest = dest_mnt;
first_source = source_mnt;
last_source = source_mnt;
mp = dest_... | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
last_dest = dest_mnt;
last_source = source_mnt;
}
| int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
last_dest = dest_mnt;
first_source = source_mnt;
last_source = source_mnt;
}
| int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
last_dest = dest_mnt;
last_source = source_mnt;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
last_dest = dest_mnt;
first_source = source_mnt;
last_source = source_mnt;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp, struct mount *source_mnt, struct hlist_head *tree_list) {
last_dest = dest_mnt;
+ first_source = source_mnt;
last_source = source_mnt;
} |
CVE-2016-4581 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/pnode.c | propagate_one | static int propagate_one(struct mount *m) {
struct mount *child;
int type;
if (IS_MNT_NEW(m)) {
return 0;
}
if (!is_subdir(mp->m_dentry, m->mnt.mnt_root)) {
return 0;
}
if (peers(m, last_dest)) {
type = CL_MAKE_SHARED;
} else {
struct mount *n, *p;
... | static int propagate_one(struct mount *m) {
struct mount *child;
int type;
if (IS_MNT_NEW(m)) {
return 0;
}
if (!is_subdir(mp->m_dentry, m->mnt.mnt_root)) {
return 0;
}
if (peers(m, last_dest)) {
type = CL_MAKE_SHARED;
} else {
struct mount *n, *p;
... | static int propagate_one(struct mount *m) {
struct mount *child;
int type;
if (IS_MNT_NEW(m)) {
return 0;
}
if (!is_subdir(mp->m_dentry, m->mnt.mnt_root)) {
return 0;
}
if (peers(m, last_dest)) {
type = CL_MAKE_SHARED;
} else {
struct mount *n, *p;
... | static int propagate_one(struct mount *m) {
struct mount *child;
int type;
if (IS_MNT_NEW(m)) {
return 0;
}
if (!is_subdir(mp->m_dentry, m->mnt.mnt_root)) {
return 0;
}
if (peers(m, last_dest)) {
type = CL_MAKE_SHARED;
} else {
struct mount *n, *p;
... | static int propagate_one(struct mount *m) {
if (IS_MNT_NEW(m)) {
return 0;
}
if (peers(m, last_dest)) {
} else {
struct mount *n, *p;
for (n = m; ; n = p) {
p = n->mnt_master;
if (p == dest_master || IS_MNT_MARKED(p)) {
while (last_dest->mn... | static int propagate_one(struct mount *m) {
if (IS_MNT_NEW(m)) {
return 0;
}
if (peers(m, last_dest)) {
} else {
struct mount *n, *p;
bool done;
for (n = m; ; n = p) {
p = n->mnt_master;
if (p == dest_master || IS_MNT_MARKED(p)) {
b... | static int propagate_one(struct mount *m) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_MNT_NEW(m)) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (peers(m, last_dest)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
struct mount *n, *p;
... | static int propagate_one(struct mount *m) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (IS_MNT_NEW(m)) {
return 0;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (peers(m, last_dest)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
struct mount *n, *p;
... | static int propagate_one(struct mount *m) {
if (IS_MNT_NEW(m)) {
return 0;
}
if (peers(m, last_dest)) {
} else {
struct mount *n, *p;
+ bool done;
for (n = m; ; n = p) {
p = n->mnt_master;
if (p == dest_master || IS_MNT_MARKED(p)) {
- ... |
CVE-2016-4794 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/percpu.c | pcpu_alloc_chunk | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
struct pcpu_chunk *chunk;
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC * sizeof(chunk->map[0]));
if (!chunk->map) {
pcpu_mem_free(chunk, pcpu_chunk_... | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
struct pcpu_chunk *chunk;
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC * sizeof(chunk->map[0]));
if (!chunk->map) {
pcpu_mem_free(chunk, pcpu_chunk_... | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
struct pcpu_chunk *chunk;
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC * sizeof(chunk->map[0]));
if (!chunk->map) {
pcpu_mem_free(chunk, pcpu_chunk_... | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
struct pcpu_chunk *chunk;
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC * sizeof(chunk->map[0]));
if (!chunk->map) {
pcpu_mem_free(chunk, pcpu_chunk_... | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
IT_LIST_HEAD(&chunk->list);
IT_WORK(&chunk->map_extend_work, pcpu_map_extend_workfn);
chunk->free_size = pcpu_unit_size;
}
| static struct pcpu_chunk *pcpu_alloc_chunk(void) {
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
IT_LIST_HEAD(&chunk->list);
IT_LIST_HEAD(&chunk->map_extend_list);
chunk->free_size = pcpu_unit_size;
}
| static struct pcpu_chunk *pcpu_alloc_chunk(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
IT_LIST_HEAD(&chunk->list);
IT_WORK(&chunk->map_extend_work, pc... | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
IT_LIST_HEAD(&chunk->list);
IT_LIST_HEAD(&chunk->map_extend_lis... | static struct pcpu_chunk *pcpu_alloc_chunk(void) {
chunk = pcpu_mem_zalloc(pcpu_chunk_struct_size);
if (!chunk) {
return NULL;
}
IT_LIST_HEAD(&chunk->list);
- IT_WORK(&chunk->map_extend_work, pcpu_map_extend_workfn);
+ IT_LIST_HEAD(&chunk->map_extend_list);
chunk->free_size = pc... |
CVE-2016-4794 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/percpu.c | pcpu_balance_workfn | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
struct pcpu_chunk *chunk, *next;
int slot, nr_to_pop, ret;
mutex_lock(&pcpu_alloc_mutex);
spin_lock_irq(&pcpu_lock);
list_for_each_entry_safe(chunk, ne... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
struct pcpu_chunk *chunk, *next;
int slot, nr_to_pop, ret;
mutex_lock(&pcpu_alloc_mutex);
spin_lock_irq(&pcpu_lock);
list_for_each_entry_safe(chunk, ne... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
struct pcpu_chunk *chunk, *next;
int slot, nr_to_pop, ret;
mutex_lock(&pcpu_alloc_mutex);
spin_lock_irq(&pcpu_lock);
list_for_each_entry_safe(chunk, ne... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
struct pcpu_chunk *chunk, *next;
int slot, nr_to_pop, ret;
mutex_lock(&pcpu_alloc_mutex);
spin_lock_irq(&pcpu_lock);
list_for_each_entry_safe(chunk, ne... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
list_for_each_entry_safe(chunk, next, free_head, list) {
WARN_ON(chunk->immutable);
if (chunk == list_first_entry(free_head, struct pcpu_chunk, list)) ... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
list_for_each_entry_safe(chunk, next, free_head, list) {
WARN_ON(chunk->immutable);
if (chunk == list_first_entry(free_head, struct pcpu_chunk, list)) ... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe(chunk, next, free_head, list) {
WARN_ON(chunk->immutable);
if (chunk == list... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry_safe(chunk, next, free_head, list) {
WARN_ON(chunk->immutable);
if (chunk == list... | static void pcpu_balance_workfn(struct work_struct *work) {
LIST_HEAD(to_free);
struct list_head *free_head = &pcpu_slot[pcpu_nr_slots - 1];
list_for_each_entry_safe(chunk, next, free_head, list) {
WARN_ON(chunk->immutable);
if (chunk == list_first_entry(free_head, struct pcpu_chunk, l... |
CVE-2016-4794 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/percpu.c | pcpu_need_to_extend | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW && pcpu_async_enabled) {
schedule_work(&chunk->map_extend_work);
}
} else {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
lockdep_assert_held(&pcpu_lock);
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW) {
if (list_empty(&chunk->map_extend_list)) {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW && pcpu_async_enabled) {
schedule_work(&chunk->map_extend_work);
}
} else {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
lockdep_assert_held(&pcpu_lock);
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW) {
if (list_empty(&chunk->map_extend_list)) {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW && pcpu_async_enabled) {
schedule_work(&chunk->map_extend_work);
}
} else {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
lockdep_assert_held(&pcpu_lock);
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW) {
if (list_empty(&chunk->map_extend_list)) {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW && pcpu_async_enabled) {
schedule_work(&chunk->map_extend_work);
}
} else {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
lockdep_assert_held(&pcpu_lock);
if (is_atomic) {
margin = 3;
if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW) {
if (list_empty(&chunk->map_extend_list)) {
... | static int pcpu_need_to_extend(struct pcpu_chunk *chunk, bool is_atomic) {
int margin, new_alloc;
+ lockdep_assert_held(&pcpu_lock);
if (is_atomic) {
margin = 3;
- if (chunk->map_alloc < chunk->map_used + PCPU_ATOMIC_MAP_MARG_LOW && pcpu_async_enabled) {
- schedule_work(&chunk->... |
CVE-2016-4794 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/percpu.c | pcpu_setup_first_chunk | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
static int smap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
static int dmap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
struct pcpu_chunk *sch... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
static int smap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
static int dmap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
struct pcpu_chunk *sch... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
static int smap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
static int dmap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
struct pcpu_chunk *sch... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
static int smap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
static int dmap[PERCPU_DYNAMIC_EARLY_SLOTS] data;
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
struct pcpu_chunk *sch... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
PCPU_SETUP_BUG_ON((unsigned long)__per_cpu_start & ~PAGE_MASK);
PCPU_SETUP_BUG_ON(!base_addr);
PCPU_SETUP_BUG_ON((unsigned... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
PCPU_SETUP_BUG_ON((unsigned long)__per_cpu_start & ~PAGE_MASK);
PCPU_SETUP_BUG_ON(!base_addr);
PCPU_SETUP_BUG_ON((unsigned... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
PCPU_SETUP_BUG_ON(offset_in_pa... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
PCPU_SETUP_BUG_ON(offset_in_pa... | int pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, void *base_addr) {
size_t dyn_size = ai->dyn_size;
size_t size_sum = ai->static_size + ai->reserved_size + dyn_size;
PCPU_SETUP_BUG_ON((unsigned long)__per_cpu_start & ~PAGE_MASK);
PCPU_SETUP_BUG_ON(!base_addr);
PCPU_SETUP_BUG_ON((un... |
CVE-2016-4805 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ppp/ppp_generic.c | ppp_register_net_channel | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
struct channel *pch;
struct ppp_net *pn;
pch = kzalloc(sizeof(struct channel), GFP_KERNEL);
if (!pch) {
return -ENOMEM;
}
pn = ppp_pernet(net);
pch->ppp = NULL;
pch->chan = chan;
pch->chan_net = net;
... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
struct channel *pch;
struct ppp_net *pn;
pch = kzalloc(sizeof(struct channel), GFP_KERNEL);
if (!pch) {
return -ENOMEM;
}
pn = ppp_pernet(net);
pch->ppp = NULL;
pch->chan = chan;
pch->chan_net = get_net... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
struct channel *pch;
struct ppp_net *pn;
pch = kzalloc(sizeof(struct channel), GFP_KERNEL);
if (!pch) {
return -ENOMEM;
}
pn = ppp_pernet(net);
pch->ppp = NULL;
pch->chan = chan;
pch->chan_net = net;
... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
struct channel *pch;
struct ppp_net *pn;
pch = kzalloc(sizeof(struct channel), GFP_KERNEL);
if (!pch) {
return -ENOMEM;
}
pn = ppp_pernet(net);
pch->ppp = NULL;
pch->chan = chan;
pch->chan_net = get_net... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
pn = ppp_pernet(net);
pch->chan = chan;
pch->chan_net = net;
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
init_rwsem(&pch->chan_sem);
spin_lock_init(&pch->downl);
rwlock_init(&pch->upl);
list_add(&pch->... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
pn = ppp_pernet(net);
pch->chan = chan;
pch->chan_net = get_net(net);
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
init_rwsem(&pch->chan_sem);
spin_lock_init(&pch->downl);
rwlock_init(&pch->upl);
list_a... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pn = ppp_pernet(net);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pch->chan = chan;
pch->chan_net = net;
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
/* PLACE... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pn = ppp_pernet(net);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pch->chan = chan;
pch->chan_net = get_net(net);
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
... | int ppp_register_net_channel(struct net *net, struct ppp_channel *chan) {
pn = ppp_pernet(net);
pch->chan = chan;
- pch->chan_net = net;
+ pch->chan_net = get_net(net);
chan->ppp = pch;
init_ppp_file(&pch->file, CHANNEL);
init_rwsem(&pch->chan_sem);
spin_lock_init(&pch->downl);
... |
CVE-2016-4805 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ppp/ppp_generic.c | ppp_unregister_channel | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
struct ppp_net *pn;
if (!pch) {
return;
}
chan->ppp = NULL;
down_write(&pch->chan_sem);
spin_lock_bh(&pch->downl);
pch->chan = NULL;
spin_unlock_bh(&pch->downl);
up_write(&pch->chan_s... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
struct ppp_net *pn;
if (!pch) {
return;
}
chan->ppp = NULL;
down_write(&pch->chan_sem);
spin_lock_bh(&pch->downl);
pch->chan = NULL;
spin_unlock_bh(&pch->downl);
up_write(&pch->chan_s... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
struct ppp_net *pn;
if (!pch) {
return;
}
chan->ppp = NULL;
down_write(&pch->chan_sem);
spin_lock_bh(&pch->downl);
pch->chan = NULL;
spin_unlock_bh(&pch->downl);
up_write(&pch->chan_s... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
struct ppp_net *pn;
if (!pch) {
return;
}
chan->ppp = NULL;
down_write(&pch->chan_sem);
spin_lock_bh(&pch->downl);
pch->chan = NULL;
spin_unlock_bh(&pch->downl);
up_write(&pch->chan_s... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
if (!pch) {
return;
}
ppp_disconnect_channel(pch);
pn = ppp_pernet(pch->chan_net);
spin_unlock_bh(&pn->all_channels_lock);
pch->file.dead = 1;
if (atomic_dec_and_test(&pch->file.refcnt)) {
... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
if (!pch) {
return;
}
ppp_disconnect_channel(pch);
pn = ppp_pernet(pch->chan_net);
spin_unlock_bh(&pn->all_channels_lock);
put_net(pch->chan_net);
pch->chan_net = NULL;
pch->file.dead = 1... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pch) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ppp_disconnect_channel(pch);
pn = ppp_pernet(pch->chan_net);
/* PLACEHOLDER: ... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!pch) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ppp_disconnect_channel(pch);
pn = ppp_pernet(pch->chan_net);
/* PLACEHOLDER: ... | void ppp_unregister_channel(struct ppp_channel *chan) {
struct channel *pch = chan->ppp;
if (!pch) {
return;
}
ppp_disconnect_channel(pch);
pn = ppp_pernet(pch->chan_net);
spin_unlock_bh(&pn->all_channels_lock);
+ put_net(pch->chan_net);
+ pch->chan_net = NULL;
pch->fi... |
CVE-2016-4913 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/isofs/rock.c | get_rock_ridge_filename | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
struct rock_state rs;
struct rock_ridge *rr;
int sig;
int retnamlen = 0;
int truncate = 0;
int ret = 0;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
*retname = 0;
init_... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
struct rock_state rs;
struct rock_ridge *rr;
int sig;
int retnamlen = 0;
int truncate = 0;
int ret = 0;
char *p;
int len;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
struct rock_state rs;
struct rock_ridge *rr;
int sig;
int retnamlen = 0;
int truncate = 0;
int ret = 0;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
*retname = 0;
init_... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
struct rock_state rs;
struct rock_ridge *rr;
int sig;
int retnamlen = 0;
int truncate = 0;
int ret = 0;
char *p;
int len;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
int retnamlen = 0;
int ret = 0;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
repeat:
while (rs.len > 2) {
rr = (struct rock_ridge *)rs.chr;
if (rr->len < 3) {
g... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
int retnamlen = 0;
int ret = 0;
char *p;
int len;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
repeat:
while (rs.len > 2) {
rr = (struct rock_ridge *)rs.chr;
if (rr... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retnamlen = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
/* PLACEHOL... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int retnamlen = 0;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int ret = 0;
char *p;
int len;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
retur... | int get_rock_ridge_filename(struct iso_directory_record *de, char *retname, struct inode *inode) {
int retnamlen = 0;
int ret = 0;
+ char *p;
+ int len;
if (!ISOFS_SB(inode->i_sb)->s_rock) {
return 0;
}
repeat:
while (rs.len > 2) {
rr = (struct rock_ridge *)rs.chr;
... |
CVE-2016-4951 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/tipc/socket.c | tipc_nl_publ_dump | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
int err;
u32 tsk_portid = cb->args[0];
u32 last_publ = cb->args[1];
u32 done = cb->args[2];
struct net *net = sock_net(skb->sk);
struct tipc_sock *tsk;
if (!tsk_portid) {
struct nlattr **attrs;
struct n... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
int err;
u32 tsk_portid = cb->args[0];
u32 last_publ = cb->args[1];
u32 done = cb->args[2];
struct net *net = sock_net(skb->sk);
struct tipc_sock *tsk;
if (!tsk_portid) {
struct nlattr **attrs;
struct n... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
int err;
u32 tsk_portid = cb->args[0];
u32 last_publ = cb->args[1];
u32 done = cb->args[2];
struct net *net = sock_net(skb->sk);
struct tipc_sock *tsk;
if (!tsk_portid) {
struct nlattr **attrs;
struct n... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
int err;
u32 tsk_portid = cb->args[0];
u32 last_publ = cb->args[1];
u32 done = cb->args[2];
struct net *net = sock_net(skb->sk);
struct tipc_sock *tsk;
if (!tsk_portid) {
struct nlattr **attrs;
struct n... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
if (!tsk_portid) {
if (err) {
return err;
}
err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA_SOCK], tipc_nl_sock_policy);
if (err) {
return err;
}
if (!sock... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
if (!tsk_portid) {
if (err) {
return err;
}
if (!attrs[TIPC_NLA_SOCK]) {
return -EVAL;
}
err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA_SOCK], tipc_nl_sock_policy... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!tsk_portid) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return err;
}
err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!tsk_portid) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return err;
}
if (!attrs[TIPC_NLA_SOCK]) {
return -EVAL;
... | int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) {
if (!tsk_portid) {
if (err) {
return err;
+ }
+ if (!attrs[TIPC_NLA_SOCK]) {
+ return -EVAL;
}
err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA_SOCK], tipc_nl_so... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | check_compat_entry_size_and_hooks | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_a... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_a... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_siz... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | check_entry_size_and_hooks | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct arpt_entry) + sizeof(struc... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct arpt_entry) + sizeof(struc... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (e->next... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (e->next... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct arpt_entry) + sizeof(st... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | check_compat_entry_size_and_hooks | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hooks... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hooks... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_ho... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | check_entry_size_and_hooks | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ipt_... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ipt_... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct i... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | check_compat_entry_size_and_hooks | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hook... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hook... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_h... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | check_entry_size_and_hooks | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ip6... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ip6... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/x_tables.c | xt_check_entry_offsets | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size < sizeof(*t)) ... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size < sizeof(*t)) ... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (target_offset + t->u.target_siz... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
/* PLACEHOLDER: DO NOT DELETE THIS ... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | -int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
+int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
+ long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;... |
CVE-2016-4997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/x_tables.c | xt_compat_check_entry_offsets | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size ... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size ... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (target_offset + t... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
/* PLACEHOLDER: DO NO... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | -int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
+int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
+ long size_of_base_struct = elems - (const char *)base;
const struct compa... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | check_compat_entry_size_and_hooks | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_target *t;
stru... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_a... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_a... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS ... | static inline int check_compat_entry_size_and_hooks(struct compat_arpt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_siz... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/arp_tables.c | check_entry_size_and_hooks | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((unsigned long)e % __ali... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct arpt_entry) + sizeof(struc... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct arpt_entry) + sizeof(struc... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (e->next... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (e->next... | static inline int check_entry_size_and_hooks(struct arpt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct arpt_entry) + sizeof(st... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | check_compat_entry_size_and_hooks | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct x... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hooks... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hooks... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT ... | static int check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_ho... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/netfilter/ip_tables.c | check_entry_size_and_hooks | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((u... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ipt_... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ipt_... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COMM... | static int check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct i... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | check_compat_entry_size_and_hooks | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
struct xt_entry_match *ematch;
struct ... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hook... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_hook... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT... | static int check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit,
const unsigned int *hook_entries, const unsigned int *underflows, const char *name) {
duprintf("check_compat_entry_size_and_h... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/netfilter/ip6_tables.c | check_entry_size_and_hooks | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
unsigned int h;
int err;
if ((... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ip6... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ip6... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
/* PLACEHOLDER: DO NOT DELETE THIS COM... | static int check_entry_size_and_hooks(struct ip6t_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries,
const unsigned int *underflows, unsigned int valid_hooks) {
if (e->next_offset < sizeof(struct ... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/x_tables.c | xt_check_entry_offsets | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size < sizeof(*t)) ... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size < sizeof(*t)) ... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (target_offset + t->u.target_siz... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
/* PLACEHOLDER: DO NOT DELETE THIS ... | int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -EVAL;
}
... | -int xt_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
+int xt_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
+ long size_of_base_struct = elems - (const char *)base;
const struct xt_entry_target *t;... |
CVE-2016-4998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/x_tables.c | xt_compat_check_entry_offsets | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size ... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (t->u.target_size ... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
if (target_offset + t... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset + sizeof(*t) > next_offset) {
return -EVAL;
}
t = (void *)(e + target_offset);
/* PLACEHOLDER: DO NO... | int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
long size_of_base_struct = elems - (const char *)base;
const struct compat_xt_entry_target *t;
const char *e = base;
if (target_offset < size_of_base_struct) {
return -E... | -int xt_compat_check_entry_offsets(const void *base, unsigned int target_offset, unsigned int next_offset) {
+int xt_compat_check_entry_offsets(const void *base, const char *elems, unsigned int target_offset, unsigned int next_offset) {
+ long size_of_base_struct = elems - (const char *)base;
const struct compa... |
CVE-2016-5195 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/gup.c | faultin_page | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
struct mm_struct *mm = vma->vm_mm;
unsigned int fault_flags = 0;
int ret;
if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) {
return -ENOENT;
... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
struct mm_struct *mm = vma->vm_mm;
unsigned int fault_flags = 0;
int ret;
if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) {
return -ENOENT;
... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
struct mm_struct *mm = vma->vm_mm;
unsigned int fault_flags = 0;
int ret;
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || stack_guard_page... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
struct mm_struct *mm = vma->vm_mm;
unsigned int fault_flags = 0;
int ret;
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || stack_guard_page... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) {
return -ENOENT;
}
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || stack_g... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) {
return -ENOENT;
}
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || stack_g... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || stack_guard_page_end(vma, address + PAGE_SIZE))) {
... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || stack_guard_page_end(vma, address + PAGE_SIZE))) {
... | static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, unsigned long address, unsigned int *flags, int *nonblocking) {
if ((*flags & (FOLL_POPULATE | FOLL_MLOCK)) == FOLL_MLOCK) {
return -ENOENT;
}
if ((*flags & FOLL_POPULATE) && (stack_guard_page_start(vma, address) || st... |
CVE-2016-5195 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | mm/gup.c | follow_page_pte | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
struct mm_struct *mm = vma->vm_mm;
struct page *page;
spinlock_t *ptl;
pte_t *ptep, pte;
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
pte = *ptep;
if (!pte_present(pte)) {
if (likely(!(flags & FOLL_MIGRATION))) {
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
pte = *ptep;
if (!pte_present(pte)) {
if (likely(!(flags & FOLL_MIGRATION))) {
... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
p... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
p... | static struct page *follow_page_pte(struct vm_area_struct *vma, unsigned long address, pmd_t *pmd, unsigned int flags) {
retry:
if (unlikely(pmd_bad(*pmd))) {
return no_page_table(vma, flags);
}
pte = *ptep;
if (!pte_present(pte)) {
if (likely(!(flags & FOLL_MIGRATION))) {
... |
CVE-2016-5244 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rds/recv.c | rds_inc_info_copy | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
struct rds_info_message minfo;
minfo.seq = be64_to_cpu(inc->i_hdr.h_sequence);
minfo.len = be32_to_cpu(inc->i_hdr.h_len);
if (flip) {
minfo.laddr = daddr;
minfo.faddr ... | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
struct rds_info_message minfo;
minfo.seq = be64_to_cpu(inc->i_hdr.h_sequence);
minfo.len = be32_to_cpu(inc->i_hdr.h_len);
if (flip) {
minfo.laddr = daddr;
minfo.faddr ... | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
struct rds_info_message minfo;
minfo.seq = be64_to_cpu(inc->i_hdr.h_sequence);
minfo.len = be32_to_cpu(inc->i_hdr.h_len);
if (flip) {
minfo.laddr = daddr;
minfo.faddr ... | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
struct rds_info_message minfo;
minfo.seq = be64_to_cpu(inc->i_hdr.h_sequence);
minfo.len = be32_to_cpu(inc->i_hdr.h_len);
if (flip) {
minfo.laddr = daddr;
minfo.faddr ... | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
if (flip) {
minfo.fport = inc->i_hdr.h_sport;
} else {
minfo.fport = inc->i_hdr.h_dport;
}
rds_info_copy(iter, &minfo, sizeof(minfo));
}
| void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
if (flip) {
minfo.fport = inc->i_hdr.h_sport;
} else {
minfo.fport = inc->i_hdr.h_dport;
}
minfo.flags = 0;
rds_info_copy(iter, &minfo, sizeof(minfo));
}
| void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (flip) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
minfo.fport = inc->i_hdr.h_sport;
} else {
/* PLACEHOLDER: DO NOT D... | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (flip) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
minfo.fport = inc->i_hdr.h_sport;
} else {
/* PLACEHOLDER: DO NOT D... | void rds_inc_info_copy(struct rds_incoming *inc, struct rds_info_iterator *iter, __be32 saddr, __be32 daddr, int flip) {
if (flip) {
minfo.fport = inc->i_hdr.h_sport;
} else {
minfo.fport = inc->i_hdr.h_dport;
}
+ minfo.flags = 0;
rds_info_copy(iter, &minfo, sizeof(minfo));
} |
CVE-2016-5400 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/usb/airspy/airspy.c | airspy_probe | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct airspy *s;
int ret;
u8 u8tmp, buf[BUF_SIZE];
s = kzalloc(sizeof(struct airspy), GFP_KERNEL);
if (s == NULL) {
dev_err(&intf->dev, "Could not allocate memory for state\n");
return -ENOMEM;
... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct airspy *s;
int ret;
u8 u8tmp, buf[BUF_SIZE];
s = kzalloc(sizeof(struct airspy), GFP_KERNEL);
if (s == NULL) {
dev_err(&intf->dev, "Could not allocate memory for state\n");
return -ENOMEM;
... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct airspy *s;
int ret;
u8 u8tmp, buf[BUF_SIZE];
s = kzalloc(sizeof(struct airspy), GFP_KERNEL);
if (s == NULL) {
dev_err(&intf->dev, "Could not allocate memory for state\n");
return -ENOMEM;
... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
struct airspy *s;
int ret;
u8 u8tmp, buf[BUF_SIZE];
s = kzalloc(sizeof(struct airspy), GFP_KERNEL);
if (s == NULL) {
dev_err(&intf->dev, "Could not allocate memory for state\n");
return -ENOMEM;
... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n", ret);
goto err_unregister_v4l2_dev;
}
err_free_controls:
v4l2_ctrl_handler_free(&s->hdl);
err_unregister_v4l2_dev:
v4l2_device_unr... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n", ret);
goto err_free_controls;
}
err_free_controls:
v4l2_ctrl_handler_free(&s->hdl);
v4l2_device_unregister(&s->v4l2_dev);
}
| static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n", ret);
goto err_unregister_v4l2_dev;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n", ret);
goto err_free_controls;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
err_fr... | static int airspy_probe(struct usb_interface *intf, const struct usb_device_id *id) {
if (ret) {
dev_err(s->dev, "Failed to register as video device (%d)\n", ret);
- goto err_unregister_v4l2_dev;
+ goto err_free_controls;
}
err_free_controls:
v4l2_ctrl_handler_free(&s->hdl);
-err... |
CVE-2016-5696 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/tcp_input.c | tcp_send_challenge_ack | static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb) {
static u32 challenge_timestamp;
static unsigned int challenge_count;
struct tcp_sock *tp = tcp_sk(sk);
u32 now;
if (tcp_oow_rate_limited(sock_net(sk), skb, LUX_MIB_TCPACKSKIPPEDCHALLENGE, &tp->last_oow_ack_time)) {
... | static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb) {
static u32 challenge_timestamp;
static unsigned int challenge_count;
struct tcp_sock *tp = tcp_sk(sk);
u32 count, now;
if (tcp_oow_rate_limited(sock_net(sk), skb, LUX_MIB_TCPACKSKIPPEDCHALLENGE, &tp->last_oow_ack_time))... | static void tcp_send_challenge_ack(struct sock *sk) {
static u32 challenge_timestamp;
static unsigned int challenge_count;
u32 now = jiffies / HZ;
if (now != challenge_timestamp) {
challenge_timestamp = now;
challenge_count = 0;
}
if (++challenge_count <= sysctl_tcp_challenge_ack... | static void tcp_send_challenge_ack(struct sock *sk) {
static u32 challenge_timestamp;
static unsigned int challenge_count;
u32 count, now = jiffies / HZ;
if (now != challenge_timestamp) {
u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1;
challenge_timestamp = now;
WRITE_ONCE(... | static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb) {
struct tcp_sock *tp = tcp_sk(sk);
u32 now;
if (tcp_oow_rate_limited(sock_net(sk), skb, LUX_MIB_TCPACKSKIPPEDCHALLENGE, &tp->last_oow_ack_time)) {
return;
}
if (now != challenge_timestamp) {
challenge_tim... | static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb) {
struct tcp_sock *tp = tcp_sk(sk);
u32 count, now;
if (tcp_oow_rate_limited(sock_net(sk), skb, LUX_MIB_TCPACKSKIPPEDCHALLENGE, &tp->last_oow_ack_time)) {
return;
}
if (now != challenge_timestamp) {
u32 ha... | static void tcp_send_challenge_ack(struct sock *sk) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 now = jiffies / HZ;
if (now != challenge_timestamp) {
challenge_timestamp = now;
challenge_count = 0;
}
if (++challenge_count <= sysctl_tcp_challenge_ack_limit) {
NET_C_STA... | static void tcp_send_challenge_ack(struct sock *sk) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 count, now = jiffies / HZ;
if (now != challenge_timestamp) {
u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1;
challenge_timestamp = now;
WRITE_ONCE(challenge_count, half + pra... | static void tcp_send_challenge_ack(struct sock *sk, const struct sk_buff *skb) {
struct tcp_sock *tp = tcp_sk(sk);
- u32 now;
+ u32 count, now;
if (tcp_oow_rate_limited(sock_net(sk), skb, LUX_MIB_TCPACKSKIPPEDCHALLENGE, &tp->last_oow_ack_time)) {
return;
}
if (now != challenge_timest... |
CVE-2016-5828 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/powerpc/kernel/process.c | start_thread | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
unsigned long load_addr = regs->gpr[2];
if (!current->thread.regs) {
struct pt_regs *regs = task_stack_page(current) + THREAD_SIZE;
current->thread.regs = regs - 1;
}
memset(regs->gpr, 0, sizeof(regs->gpr));... | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
unsigned long load_addr = regs->gpr[2];
if (!current->thread.regs) {
struct pt_regs *regs = task_stack_page(current) + THREAD_SIZE;
current->thread.regs = regs - 1;
}
if (MSR_TM_SUSPENDED(mfmsr())) {
... | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
unsigned long load_addr = regs->gpr[2];
if (!current->thread.regs) {
struct pt_regs *regs = task_stack_page(current) + THREAD_SIZE;
current->thread.regs = regs - 1;
}
memset(regs->gpr, 0, sizeof(regs->gpr));... | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
unsigned long load_addr = regs->gpr[2];
if (!current->thread.regs) {
struct pt_regs *regs = task_stack_page(current) + THREAD_SIZE;
current->thread.regs = regs - 1;
}
if (MSR_TM_SUSPENDED(mfmsr())) {
... | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
if (!current->thread.regs) {
current->thread.regs = regs - 1;
}
memset(regs->gpr, 0, sizeof(regs->gpr));
}
| void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
if (!current->thread.regs) {
current->thread.regs = regs - 1;
}
if (MSR_TM_SUSPENDED(mfmsr())) {
tm_reclaim_current(0);
}
memset(regs->gpr, 0, sizeof(regs->gpr));
}
| void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!current->thread.regs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
current->thread.regs = regs - 1;
}
memset(regs->gpr, 0, sizeof(regs->gpr));
/* PLACEHO... | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!current->thread.regs) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
current->thread.regs = regs - 1;
}
if (MSR_TM_SUSPENDED(mfmsr())) {
tm_reclaim_cur... | void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) {
if (!current->thread.regs) {
current->thread.regs = regs - 1;
}
+ if (MSR_TM_SUSPENDED(mfmsr())) {
+ tm_reclaim_current(0);
+ }
memset(regs->gpr, 0, sizeof(regs->gpr));
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.