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-2023-0266 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/control_compat.c | ctl_elem_read_user | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type,... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type,... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type,... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type,... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
err = snd_power_wait(card, SNDRV_CTL_POWER_D0);
... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
err = snd_power_wait(card, SNDRV_CTL_POWER_D0);
... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
... | static int ctl_elem_read_user(struct snd_card *card, void *userdata, void *valuep) {
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
err = snd_power_wait(card, SNDRV_CTL_POWER... |
CVE-2023-0266 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | sound/core/control_compat.c | ctl_elem_write_user | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
struct snd_card *card = file->card;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_f... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
struct snd_card *card = file->card;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_f... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
struct snd_card *card = file->card;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_f... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_ctl_elem_value *data;
struct snd_card *card = file->card;
int err, type, count;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_f... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_card *card = file->card;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
err ... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_card *card = file->card;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
err ... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct snd_card *card = file->card;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENO... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct snd_card *card = file->card;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENO... | static int ctl_elem_write_user(struct snd_ctl_file *file, void *userdata, void *valuep) {
struct snd_card *card = file->card;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL) {
return -ENOMEM;
}
err = copy_ctl_value_from_user(card, data, userdata, valuep, &type, &count);
... |
CVE-2023-0386 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/overlayfs/copy_up.c | ovl_copy_up_one | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
int err;
DEFE_DELAYED_CALL(done);
struct path parentpath;
struct ovl_copy_up_ctx ctx = {
.parent = parent, .dentry = dentry, .workdir = ovl_workdir(dentry),
};
if (WARN_ON(!ctx.workdir)) {
retur... | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
int err;
DEFE_DELAYED_CALL(done);
struct path parentpath;
struct ovl_copy_up_ctx ctx = {
.parent = parent, .dentry = dentry, .workdir = ovl_workdir(dentry),
};
if (WARN_ON(!ctx.workdir)) {
retur... | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
int err;
DEFE_DELAYED_CALL(done);
struct path parentpath;
struct ovl_copy_up_ctx ctx = {
.parent = parent, .dentry = dentry, .workdir = ovl_workdir(dentry),
};
if (WARN_ON(!ctx.workdir)) {
retur... | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
int err;
DEFE_DELAYED_CALL(done);
struct path parentpath;
struct ovl_copy_up_ctx ctx = {
.parent = parent, .dentry = dentry, .workdir = ovl_workdir(dentry),
};
if (WARN_ON(!ctx.workdir)) {
retur... | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
if (err) {
return err;
}
ctx.metacopy = ovl_need_meta_copy_up(dentry, ctx.stat.mode, flags);
}
| static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
if (err) {
return err;
}
if (!kuid_has_mapping(current_user_ns(), ctx.stat.uid) || !kgid_has_mapping(current_user_ns(), ctx.stat.gid)) {
return -EOVERFLOW;
}
ctx.metacopy = ovl_need_meta_copy_up(den... | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return err;
}
ctx.metacopy = ovl_need_meta_copy_up(dentry, ctx.stat.mode, flags);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (err) {
return err;
}
if (!kuid_has_mapping(current_user_ns(), ctx.stat.uid) || !kgid_has_mapping(current_user_ns(), ctx.stat.gid)) {
return -EOVERFLOW;
... | static int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, int flags) {
if (err) {
return err;
}
+ if (!kuid_has_mapping(current_user_ns(), ctx.stat.uid) || !kgid_has_mapping(current_user_ns(), ctx.stat.gid)) {
+ return -EOVERFLOW;
+ }
ctx.metacopy = ovl_need_meta_cop... |
CVE-2023-0394 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/raw.c | rawv6_push_pending_frames | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct sk_buff *skb;
int err = 0;
int offset;
int len;
int total_len;
__wsum tmp_csum;
__sum16 csum;
if (!rp->checksum) {
goto send;
}
skb = skb_peek(&sk->sk_write_queue);
... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct ipv6_txoptions *opt;
struct sk_buff *skb;
int err = 0;
int offset;
int len;
int total_len;
__wsum tmp_csum;
__sum16 csum;
if (!rp->checksum) {
goto send;
}
skb = s... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct sk_buff *skb;
int err = 0;
int offset;
int len;
int total_len;
__wsum tmp_csum;
__sum16 csum;
if (!rp->checksum) {
goto send;
}
skb = skb_peek(&sk->sk_write_queue);
... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct ipv6_txoptions *opt;
struct sk_buff *skb;
int err = 0;
int offset;
int len;
int total_len;
__wsum tmp_csum;
__sum16 csum;
if (!rp->checksum) {
goto send;
}
skb = s... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct sk_buff *skb;
total_len = inet_sk(sk)->cork.base.length;
if (offset >= total_len - 1) {
ip6_flush_pending_frames(sk);
goto out;
}
if (skb_queue_len(&sk->sk_write_queue) == 1) {
... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct ipv6_txoptions *opt;
struct sk_buff *skb;
total_len = inet_sk(sk)->cork.base.length;
opt = inet6_sk(sk)->cork.opt;
total_len -= opt ? opt->opt_flen : 0;
if (offset >= total_len - 1) {
... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct sk_buff *skb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
total_len = inet_sk(sk)->cork.base.length;
if (offset >= total_len - 1) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ip6_flu... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
struct ipv6_txoptions *opt;
struct sk_buff *skb;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
total_len = inet_sk(sk)->cork.base.length;
opt = inet6_sk(sk)->cork.opt;
total_len -= opt ? opt->opt_fl... | static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, struct raw6_sock *rp) {
+ struct ipv6_txoptions *opt;
struct sk_buff *skb;
total_len = inet_sk(sk)->cork.base.length;
+ opt = inet6_sk(sk)->cork.opt;
+ total_len -= opt ? opt->opt_flen : 0;
if (offset >= total_len - 1) {
... |
CVE-2023-0458 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sys.c | do_prlimit | int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
struct rlimit *rlim;
int retval = 0;
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
if (new_rlim) {
if (new_rlim->rlim_cur > new_rlim->rlim_max) {
return -E... | int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
struct rlimit *rlim;
int retval = 0;
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
resource = array_index_nospec(resource, RLIM_NLIMITS);
if (new_rlim) {
if (new_r... | static int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
struct rlimit *rlim;
int retval = 0;
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
if (new_rlim) {
if (new_rlim->rlim_cur > new_rlim->rlim_max) {
re... | static int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
struct rlimit *rlim;
int retval = 0;
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
resource = array_index_nospec(resource, RLIM_NLIMITS);
if (new_rlim) {
if... | int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
if (new_rlim) {
if (resource == RLIMIT_NOFILE && new_rlim->rlim_max > sysctl_nr_open) {
return -EPERM;
}
... | int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
resource = array_index_nospec(resource, RLIM_NLIMITS);
if (new_rlim) {
if (resource == RLIMIT_NOFILE && new_rlim->rlim_max > ... | static int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
if (new_rlim) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (re... | static int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
resource = array_index_nospec(resource, RLIM_NLIMITS);
if (new_rlim) {
/... | int do_prlimit(struct task_struct *tsk, unsigned int resource, struct rlimit *new_rlim, struct rlimit *old_rlim) {
if (resource >= RLIM_NLIMITS) {
return -EVAL;
}
+ resource = array_index_nospec(resource, RLIM_NLIMITS);
if (new_rlim) {
if (resource == RLIMIT_NOFILE && new_rlim->rlim... |
CVE-2023-0459 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | lib/usercopy.c | _copy_from_user | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
unsigned long res = n;
might_fault();
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
instrument_copy_from_user_before(to, from, n);
res = raw_copy_from_user(to, from, n);
instrument_copy_from_u... | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
unsigned long res = n;
might_fault();
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
barrier_nospec();
instrument_copy_from_user_before(to, from, n);
res = raw_copy_from_user(to, from, n);
... | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
unsigned long res = n;
might_fault();
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
instrument_copy_from_user(to, from, n);
res = raw_copy_from_user(to, from, n);
}
if (unlikely(res)) {
... | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
unsigned long res = n;
might_fault();
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
barrier_nospec();
instrument_copy_from_user(to, from, n);
res = raw_copy_from_user(to, from, n);
}
i... | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
instrument_copy_from_user_before(to, from, n);
}
}
| unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
barrier_nospec();
instrument_copy_from_user_before(to, from, n);
}
}
| unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
instrument_copy_from_user(to, from, n);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO N... | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
barrier_nospec();
instrument_copy_from_user(to, from, n);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | unsigned long _copy_from_user(void *to, const void *from, unsigned long n) {
if (!should_fail_usercopy() && likely(access_ok(from, n))) {
+ barrier_nospec();
instrument_copy_from_user_before(to, from, n);
}
} |
CVE-2023-0461 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv4/inet_connection_sock.c | inet_csk_listen_start | int inet_csk_listen_start(struct sock *sk) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
reqsk_queue_alloc(&icsk->icsk_accept_queue);
sk->sk_ack_backlog = 0;
inet_csk_delack_init(sk);
if (sk->sk_txrehash == SOCK_TXREHASH_DEFAULT) {
... | int inet_csk_listen_start(struct sock *sk) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
err = inet_ulp_can_listen(sk);
if (unlikely(err)) {
return err;
}
reqsk_queue_alloc(&icsk->icsk_accept_queue);
sk->sk_ack_backlog = 0;
... | int inet_csk_listen_start(struct sock *sk, int backlog) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err = -EADDRUSE;
reqsk_queue_alloc(&icsk->icsk_accept_queue);
sk->sk_ack_backlog = 0;
inet_csk_delack_init(sk);
inet_sk_state_store(sk, TCP_LI... | int inet_csk_listen_start(struct sock *sk, int backlog) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
err = inet_ulp_can_listen(sk);
if (unlikely(err)) {
return err;
}
reqsk_queue_alloc(&icsk->icsk_accept_queue);
sk->sk_ack_bac... | int inet_csk_listen_start(struct sock *sk) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
reqsk_queue_alloc(&icsk->icsk_accept_queue);
inet_csk_delack_init(sk);
if (sk->sk_txrehash == SOCK_TXREHASH_DEFAULT) {
sk->sk_txrehash = READ_ONCE... | int inet_csk_listen_start(struct sock *sk) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
err = inet_ulp_can_listen(sk);
if (unlikely(err)) {
return err;
}
reqsk_queue_alloc(&icsk->icsk_accept_queue);
inet_csk_delack_init(sk);
... | int inet_csk_listen_start(struct sock *sk, int backlog) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err = -EADDRUSE;
reqsk_queue_alloc(&icsk->icsk_accept_queue);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
inet_csk_delack_init(sk);
inet_sk_... | int inet_csk_listen_start(struct sock *sk, int backlog) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
err = inet_ulp_can_listen(sk);
if (unlikely(err)) {
return err;
}
reqsk_queue_alloc(&icsk->icsk_accept_queue);
/* PLACEHOLDER... | int inet_csk_listen_start(struct sock *sk) {
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err;
+ err = inet_ulp_can_listen(sk);
+ if (unlikely(err)) {
+ return err;
+ }
reqsk_queue_alloc(&icsk->icsk_accept_queue);
inet_csk_delack_i... |
CVE-2023-0590 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_api.c | qdisc_graft | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
unsigned int i, num_q, ingre... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
unsigned int i, num_q, ingre... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
int err = 0;
if (parent == NULL) {
unsigned in... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
int err = 0;
if (parent == NULL) {
unsigned in... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
ingress = 0;
num_q =... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
ingress = 0;
num_q =... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (pare... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (pare... | static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
struct Qdisc *q = old;
struct net *net = dev_net(dev);
if (parent == NULL) {
ingress = 0;
n... |
CVE-2023-0615 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/test-drivers/vivid/vivid-vid-cap.c | vivid_update_format_cap | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
struct v4l2_bt_timings *bt = &dev->dv_timings_cap.bt;
unsigned size;
u64 pixelclock;
switch (dev->input_type[dev->input]) {
case WEBCAM:
default:
dev->src_rect.width = webcam_sizes[dev->webcam_size_idx].width;
... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
struct v4l2_bt_timings *bt = &dev->dv_timings_cap.bt;
unsigned size;
u64 pixelclock;
switch (dev->input_type[dev->input]) {
case WEBCAM:
default:
dev->src_rect.width = webcam_sizes[dev->webcam_size_idx].width;
... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
struct v4l2_bt_timings *bt = &dev->dv_timings_cap[dev->input].bt;
unsigned size;
u64 pixelclock;
switch (dev->input_type[dev->input]) {
case WEBCAM:
default:
dev->src_rect.width = webcam_sizes[dev->webcam_size_idx]... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
struct v4l2_bt_timings *bt = &dev->dv_timings_cap[dev->input].bt;
unsigned size;
u64 pixelclock;
switch (dev->input_type[dev->input]) {
case WEBCAM:
default:
dev->src_rect.width = webcam_sizes[dev->webcam_size_idx]... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
dev->bitmap_cap = NULL;
vivid_update_quality(dev);
dev->crop_bounds_cap = dev->src_rect;
dev->compose_cap = dev->crop_cap;
if (V4L2_FIELD_HAS_T_OR_B(dev->field_cap)) {
dev->compose_cap.height /= 2;
}
dev->fmt_c... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
dev->bitmap_cap = NULL;
vivid_update_quality(dev);
dev->crop_bounds_cap = dev->src_rect;
if (dev->bitmap_cap && (dev->compose_cap.width != dev->crop_cap.width || dev->compose_cap.height != dev->crop_cap.height)) {
vfree(de... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev->bitmap_cap = NULL;
vivid_update_quality(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev->crop_bounds_cap = dev->src_rect;
dev->compose_cap = dev->crop_cap;
if ... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev->bitmap_cap = NULL;
vivid_update_quality(dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dev->crop_bounds_cap = dev->src_rect;
if (dev->bitmap_cap && (dev->compose_cap.... | void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls) {
dev->bitmap_cap = NULL;
vivid_update_quality(dev);
dev->crop_bounds_cap = dev->src_rect;
+ if (dev->bitmap_cap && (dev->compose_cap.width != dev->crop_cap.width || dev->compose_cap.height != dev->crop_cap.height)) {
+ vf... |
CVE-2023-0615 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/test-drivers/vivid/vivid-vid-cap.c | vivid_vid_cap_s_selection | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *crop = &dev->crop_cap;
struct v4l2_rect *compose = &dev->compose_cap;
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
int ret;
if... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *crop = &dev->crop_cap;
struct v4l2_rect *compose = &dev->compose_cap;
unsigned orig_compose_w = compose->width;
unsigned orig_compose_h = compose->hei... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *crop = &dev->crop_cap;
struct v4l2_rect *compose = &dev->compose_cap;
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
int ret;
if... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *crop = &dev->crop_cap;
struct v4l2_rect *compose = &dev->compose_cap;
unsigned orig_compose_w = compose->width;
unsigned orig_compose_h = compose->hei... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *compose = &dev->compose_cap;
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
if (vivid_is_webcam(dev)) {
return -ENODATA;
}
... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *compose = &dev->compose_cap;
unsigned orig_compose_w = compose->width;
unsigned orig_compose_h = compose->height;
unsigned factor = V4L2_FIELD_HAS_T_O... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct v4l2_rect *compose = &dev->compose_cap;
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
/* PLACEHO... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct v4l2_rect *compose = &dev->compose_cap;
unsigned orig_compose_w = compose->width;
unsigned orig_compose_h = compose... | int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection *s) {
struct vivid_dev *dev = video_drvdata(file);
struct v4l2_rect *compose = &dev->compose_cap;
+ unsigned orig_compose_w = compose->width;
+ unsigned orig_compose_h = compose->height;
unsigned factor = V4L2_FIELD_H... |
CVE-2023-1073 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-core.c | hid_validate_values | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
struct hid_report *report;
if (type > HID_FEATURE_REPORT) {
hid_err(hid, "invalid HID report type %u\n", type);
return NULL;
}
if (id... | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
struct hid_report *report;
if (type > HID_FEATURE_REPORT) {
hid_err(hid, "invalid HID report type %u\n", type);
return NULL;
}
if (id... | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
struct hid_report *report;
if (type > HID_FEATURE_REPORT) {
hid_err(hid, "invalid HID report type %u\n", type);
return NULL;
}
if (id... | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
struct hid_report *report;
if (type > HID_FEATURE_REPORT) {
hid_err(hid, "invalid HID report type %u\n", type);
return NULL;
}
if (id... | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
if (id == 0) {
report = list_entry( hid->report_enum[type].report_list.next, struct hid_report, list);
} else {
}
}
| struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
if (id == 0) {
report = list_first_entry_or_null( &hid->report_enum[type].report_list, struct hid_report, list);
} else {
}
}
| struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (id == 0) {
report = list_entry( hid->report_enum[type].report_list.next, struct hid_report, list);
... | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (id == 0) {
report = list_first_entry_or_null( &hid->report_enum[type].report_list, struct hid_repor... | struct hid_report *hid_validate_values(struct hid_device *hid, unsigned int type, unsigned int id, unsigned int field_index, unsigned int report_counts) {
if (id == 0) {
- report = list_entry( hid->report_enum[type].report_list.next, struct hid_report, list);
+ report = list_first_entry_or_null( &hi... |
CVE-2023-1074 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sctp/bind_addr.c | sctp_bind_addr_copy | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
struct sctp_sockaddr_entry *addr;
int error = 0;
dest->port = src->port;
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
struct sctp_sockaddr_entry *addr;
int error = 0;
dest->port = src->port;
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
struct sctp_sockaddr_entry *addr;
int error = 0;
dest->port = src->port;
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
struct sctp_sockaddr_entry *addr;
int error = 0;
dest->port = src->port;
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_one_addr(net, dest, &addr->a, scope, gfp, flags);
}
if (list_empty(&dest->add... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_one_addr(net, dest, &addr->a, scope, gfp, flags);
}
if (list_empty(&dest->add... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_one_addr(net, dest, &addr->a, scope... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_one_addr(net, dest, &addr->a, scope... | int sctp_bind_addr_copy(struct net *net, struct sctp_bind_addr *dest, const struct sctp_bind_addr *src, enum sctp_scope scope, gfp_t gfp, int flags) {
list_for_each_entry(addr, &src->address_list, list) {
error = sctp_copy_one_addr(net, dest, &addr->a, scope, gfp, flags);
}
if (list_empty(&dest... |
CVE-2023-1076 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/tun.c | tun_chr_open | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
struct tun_file *tfile;
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
if (ptr_ring_init(&tfile->tx_ring, 0, GFP... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
struct tun_file *tfile;
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
if (ptr_ring_init(&tfile->tx_ring, 0, GFP... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
struct tun_file *tfile;
DBG1(KERN_FO, "tunX: tun_chr_open\n");
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
struct tun_file *tfile;
DBG1(KERN_FO, "tunX: tun_chr_open\n");
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
tfile->socket.ops = &tun_socket_ops;
sock_init_data(&tfile->socke... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
tfile->socket.ops = &tun_socket_ops;
sock_init_data_uid(&tfile->s... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
/* PLACEHOLDER: DO ... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
/* PLACEHOLDER: DO ... | static int tun_chr_open(struct inode *inode, struct file * file) {
struct net *net = current->nsproxy->net_ns;
tfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL, &tun_proto, 0);
if (!tfile) {
return -ENOMEM;
}
tfile->socket.ops = &tun_socket_ops;
- sock_init_data(&tfil... |
CVE-2023-1077 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sched/rt.c | _pick_next_task_rt | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct sched_rt_entity *rt_se;
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rt_rq);
BUG_ON(!rt_se);
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
return rt_task_of(rt_se);
} | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct sched_rt_entity *rt_se;
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rt_rq);
if (unlikely(!rt_se)) {
return NULL;
}
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
return... | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct sched_rt_entity *rt_se;
struct task_struct *p;
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rq, rt_rq);
BUG_ON(!rt_se);
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
p = rt_task_of(rt_... | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct sched_rt_entity *rt_se;
struct task_struct *p;
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rq, rt_rq);
if (unlikely(!rt_se)) {
return NULL;
}
rt_rq = group_rt_rq(rt_se);
... | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rt_rq);
BUG_ON(!rt_se);
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
return rt_task_of(rt_se);
}
| static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rt_rq);
if (unlikely(!rt_se)) {
return NULL;
}
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
return rt_task_of(rt_se);
}
| static struct task_struct *_pick_next_task_rt(struct rq *rq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rq, rt_rq);
BUG_ON(!rt_se);
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
p = rt_task_of(rt_se);
p->... | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rq, rt_rq);
if (unlikely(!rt_se)) {
return NULL;
}
rt_rq = group_rt_rq(rt_se);
} while ... | static struct task_struct *_pick_next_task_rt(struct rq *rq) {
struct rt_rq *rt_rq = &rq->rt;
do {
rt_se = pick_next_rt_entity(rt_rq);
- BUG_ON(!rt_se);
+ if (unlikely(!rt_se)) {
+ return NULL;
+ }
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
return... |
CVE-2023-1077 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/sched/rt.c | pick_next_rt_entity | static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
struct sched_rt_entity *next = NULL;
struct list_head *queue;
int idx;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
... | static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
struct sched_rt_entity *next = NULL;
struct list_head *queue;
int idx;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
... | static struct sched_rt_entity *pick_next_rt_entity(struct rq *rq, struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
struct sched_rt_entity *next = NULL;
struct list_head *queue;
int idx;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->... | static struct sched_rt_entity *pick_next_rt_entity(struct rq *rq, struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
struct sched_rt_entity *next = NULL;
struct list_head *queue;
int idx;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->... | static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
return next;
}
| static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
if (SCHED_WARN_ON(list_empty(queue))) {
return NULL;
}
return nex... | static struct sched_rt_entity *pick_next_rt_entity(struct rq *rq, struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
/* PLACEHOLDER: ... | static struct sched_rt_entity *pick_next_rt_entity(struct rq *rq, struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
if (SCHED_WARN_O... | static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq) {
struct rt_prio_array *array = &rt_rq->active;
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
+ if (SCHED_WARN_ON(list_empty(queue))) {
+ return NULL;
+ }
r... |
CVE-2023-1078 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rds/message.c | rds_rm_zerocopy_callback | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
struct rds_msg_zcopy_info *info;
struct rds_msg_zcopy_queue *q;
u32 cookie = znotif->z_cookie;
struct rds_zcopy_cookies *ck;
struct list_head *head;
unsigned long flags;
mm_unaccount_pinned_pages(&znoti... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
struct rds_msg_zcopy_info *info;
struct rds_msg_zcopy_queue *q;
u32 cookie = znotif->z_cookie;
struct rds_zcopy_cookies *ck;
struct list_head *head;
unsigned long flags;
mm_unaccount_pinned_pages(&znoti... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
struct rds_msg_zcopy_info *info;
struct rds_msg_zcopy_queue *q;
u32 cookie = znotif->z_cookie;
struct rds_zcopy_cookies *ck;
struct list_head *head;
unsigned long flags;
mm_unaccount_pinned_pages(&znoti... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
struct rds_msg_zcopy_info *info;
struct rds_msg_zcopy_queue *q;
u32 cookie = znotif->z_cookie;
struct rds_zcopy_cookies *ck;
struct list_head *head;
unsigned long flags;
mm_unaccount_pinned_pages(&znoti... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
u32 cookie = znotif->z_cookie;
if (!list_empty(head)) {
info = list_entry(head, struct rds_msg_zcopy_info, rs_zcookie_next);
if (info && rds_zcookie_add(info, cookie)) {
spin_unlock_irqrestore(&... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
u32 cookie = znotif->z_cookie;
if (!list_empty(head)) {
info = list_first_entry(head, struct rds_msg_zcopy_info, rs_zcookie_next);
if (rds_zcookie_add(info, cookie)) {
spin_unlock_irqrestore(&q-... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 cookie = znotif->z_cookie;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!list_empty(head)) {
info = list_entry(head, struct rds_msg_zcopy_info, rs_zcoo... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 cookie = znotif->z_cookie;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!list_empty(head)) {
info = list_first_entry(head, struct rds_msg_zcopy_info, r... | static void rds_rm_zerocopy_callback(struct rds_sock *rs, struct rds_znotifier *znotif) {
u32 cookie = znotif->z_cookie;
if (!list_empty(head)) {
- info = list_entry(head, struct rds_msg_zcopy_info, rs_zcookie_next);
- if (info && rds_zcookie_add(info, cookie)) {
+ info = list_first_entr... |
CVE-2023-1079 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-asus.c | asus_kbd_backlight_set | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&led->lo... | static void asus_kbd_backlight_set(struct led_classdev *led_cdev, enum led_brightness brightness) {
struct asus_kbd_leds *led = container_of(led_cdev, struct asus_kbd_leds, cdev);
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
led->brightness = brightness;
spin_unlock_irqrestore(&l... |
CVE-2023-1079 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-asus.c | asus_kbd_backlight_work | static void asus_kbd_backlight_work(struct work_struct *work) {
struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
int ret;
unsigned long flags;
if (led->removed) {
return;
}
spin_lock_irqsave(&led... | static void asus_kbd_backlight_work(struct work_struct *work) {
struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
int ret;
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
buf[4] = led->brightness;
... | static void asus_kbd_backlight_work(struct work_struct *work) {
struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
int ret;
unsigned long flags;
if (led->removed) {
return;
}
spin_lock_irqsave(&led... | static void asus_kbd_backlight_work(struct work_struct *work) {
struct asus_kbd_leds *led = container_of(work, struct asus_kbd_leds, work);
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
int ret;
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
buf[4] = led->brightness;
... | static void asus_kbd_backlight_work(struct work_struct *work) {
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
unsigned long flags;
if (led->removed) {
return;
}
spin_lock_irqsave(&led->lock, flags);
}
| static void asus_kbd_backlight_work(struct work_struct *work) {
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
}
| static void asus_kbd_backlight_work(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long flags;
if (led->removed) {
return;
}
spin_lock_irqsa... | static void asus_kbd_backlight_work(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long flags;
spin_lock_irqsave(&led->lock, flags);
/* PLACEHOLDER: DO ... | static void asus_kbd_backlight_work(struct work_struct *work) {
u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, 0x00 };
unsigned long flags;
- if (led->removed) {
- return;
- }
spin_lock_irqsave(&led->lock, flags);
} |
CVE-2023-1095 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/netfilter/nf_tables_api.c | nft_trans_alloc_gfp | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
struct nft_trans *trans;
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
trans->msg_type = msg_type;
trans->ctx = *ctx;
return trans... | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
struct nft_trans *trans;
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
IT_LIST_HEAD(&trans->list);
trans->msg_type = msg_type;
tra... | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
struct nft_trans *trans;
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
trans->msg_type = msg_type;
trans->ctx = *ctx;
return trans... | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
struct nft_trans *trans;
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
IT_LIST_HEAD(&trans->list);
trans->msg_type = msg_type;
tra... | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
trans->msg_type = msg_type;
}
| static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
IT_LIST_HEAD(&trans->list);
trans->msg_type = msg_type;
}
| static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
trans->msg_type = msg_type;
/* PLACEHOLDER... | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
IT_LIST_HEAD(&trans->list);
trans->msg_typ... | static struct nft_trans *nft_trans_alloc_gfp(const struct nft_ctx *ctx, int msg_type, u32 size, gfp_t gfp) {
trans = kzalloc(sizeof(struct nft_trans) + size, gfp);
if (trans == NULL) {
return NULL;
}
+ IT_LIST_HEAD(&trans->list);
trans->msg_type = msg_type;
} |
CVE-2023-1118 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/media/rc/ene_ir.c | ene_remove | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin_unlock_irqrestore(&dev->hw_lock, flags);
free_irq(dev->irq, dev);
re... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
rc_unregister_device(dev->rdev);
del_timer_sync(&dev->tx_sim_timer);
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin_unlock_irqrestore(&dev->hw_lock, flags);
free_irq(dev->irq, dev);
re... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
rc_unregister_device(dev->rdev);
del_timer_sync(&dev->tx_sim_timer);
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin_unlock_irqrestore(&dev->hw_lock, flags);
free_irq(dev->irq, dev);
re... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
rc_unregister_device(dev->rdev);
del_timer_sync(&dev->tx_sim_timer);
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin_unlock_irqrestore(&dev->hw_lock, flags);
free_irq(dev->irq, dev);
re... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
rc_unregister_device(dev->rdev);
del_timer_sync(&dev->tx_sim_timer);
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
spin... | static void ene_remove(struct pnp_dev *pnp_dev) {
struct ene_device *dev = pnp_get_drvdata(pnp_dev);
unsigned long flags;
+ rc_unregister_device(dev->rdev);
+ del_timer_sync(&dev->tx_sim_timer);
spin_lock_irqsave(&dev->hw_lock, flags);
ene_rx_disable(dev);
ene_rx_restore_hw_buffer(dev);
... |
CVE-2023-1206 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | include/net/ipv6.h | __ipv6_addr_jhash | static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
u32 v = (__force u32)a->s6_addr32[0] ^ (__force u32)a->s6_addr32[1];
return jhash_3words(v, (__force u32)a->s6_addr32[2], (__force u32)a->s6_addr32[3], initval);
} | static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
return jhash2((__force const u32 *)a->s6_addr32, ARRAY_SIZE(a->s6_addr32), initval);
} | static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
u32 v = (__force u32)a->s6_addr32[0] ^ (__force u32)a->s6_addr32[1];
return jhash_3words(v, (__force u32)a->s6_addr32[2], (__force u32)a->s6_addr32[3], initval);
} | static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
return jhash2((__force const u32 *)a->s6_addr32, ARRAY_SIZE(a->s6_addr32), initval);
} | static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
u32 v = (__force u32)a->s6_addr32[0] ^ (__force u32)a->s6_addr32[1];
return jhash_3words(v, (__force u32)a->s6_addr32[2], (__force u32)a->s6_addr32[3], initval);
}
| static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
return jhash2((__force const u32 *)a->s6_addr32, ARRAY_SIZE(a->s6_addr32), initval);
}
| static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
u32 v = (__force u32)a->s6_addr32[0] ^ (__force u32)a->s6_addr32[1];
return jhash_3words(v, (__force u32)a->s6_addr32[2], (__force u32)a->s6_addr32[3], initval);
}
| static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
return jhash2((__force const u32 *)a->s6_addr32, ARRAY_SIZE(a->s6_addr32), initval);
} | static inline u32 __ipv6_addr_jhash(const struct in6_addr *a, const u32 initval) {
- u32 v = (__force u32)a->s6_addr32[0] ^ (__force u32)a->s6_addr32[1];
- return jhash_3words(v, (__force u32)a->s6_addr32[2], (__force u32)a->s6_addr32[3], initval);
+ return jhash2((__force const u32 *)a->s6_addr32, ARRAY_SIZE... |
CVE-2023-1249 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | fill_files_note | static int fill_files_note(struct memelfnote *note) {
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned count, size, names_ofs, remaining, n;
user_long_t *data;
user_long_t *start_end_ofs;
char *name_base, *name_curpos;
count = mm->map_count;
if (count > UT_MAX / 6... | static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm) {
unsigned count, size, names_ofs, remaining, n;
user_long_t *data;
user_long_t *start_end_ofs;
char *name_base, *name_curpos;
int i;
count = cprm->vma_count;
if (count > UT_MAX / 64) {
return -EVAL;
... | static int fill_files_note(struct memelfnote *note) {
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned count, size, names_ofs, remaining, n;
user_long_t *data;
user_long_t *start_end_ofs;
char *name_base, *name_curpos;
count = mm->map_count;
if (count > UT_MAX / 6... | static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm) {
unsigned count, size, names_ofs, remaining, n;
user_long_t *data;
user_long_t *start_end_ofs;
char *name_base, *name_curpos;
int i;
count = cprm->vma_count;
if (count > UT_MAX / 64) {
return -EVAL;
... | static int fill_files_note(struct memelfnote *note) {
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned count, size, names_ofs, remaining, n;
char *name_base, *name_curpos;
count = mm->map_count;
if (count > UT_MAX / 64) {
return -EVAL;
}
size = count * 64;... | static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm) {
unsigned count, size, names_ofs, remaining, n;
char *name_base, *name_curpos;
int i;
count = cprm->vma_count;
if (count > UT_MAX / 64) {
return -EVAL;
}
size = count * 64;
names_ofs = (2 + 3 * cou... | static int fill_files_note(struct memelfnote *note) {
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned count, size, names_ofs, remaining, n;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *name_base, *name_curpos;
count = mm->map_count;
if (count > UT_MAX / 64) {
... | static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm) {
unsigned count, size, names_ofs, remaining, n;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
char *name_base, *name_curpos;
int i;
count = cprm->vma_count;
if (count > UT_MAX / 64) {
return -EVAL;
}
... | -static int fill_files_note(struct memelfnote *note) {
- struct mm_struct *mm = current->mm;
- struct vm_area_struct *vma;
+static int fill_files_note(struct memelfnote *note, struct coredump_params *cprm) {
unsigned count, size, names_ofs, remaining, n;
char *name_base, *name_curpos;
- count = mm->m... |
CVE-2023-1249 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/binfmt_elf.c | fill_note_info | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
struct task_struct *dump_task = current;
const struct user_regset_view *view = task_user_regset_view(dump_task);
struct elf_thread_core_info *t;
struct elf_prpsinfo *psinfo;
struct co... | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
struct task_struct *dump_task = current;
const struct user_regset_view *view = task_user_regset_view(dump_task);
struct elf_thread_core_info *t;
struct elf_prpsinfo *psinfo;
struct co... | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
struct core_thread *ct;
struct elf_thread_status *ets;
if (!elf_note_info_init(info)) {
return 0;
}
for (ct = current->mm->core_state->dumper.next;
ct; ct = ct->ne... | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
struct core_thread *ct;
struct elf_thread_status *ets;
if (!elf_note_info_init(info)) {
return 0;
}
for (ct = current->mm->core_state->dumper.next;
ct; ct = ct->ne... | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
info->size += notesize(&info->auxv);
if (fill_files_note(&info->files) == 0) {
info->size += notesize(&info->files);
}
return 1;
}
| static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
info->size += notesize(&info->auxv);
if (fill_files_note(&info->files, cprm) == 0) {
info->size += notesize(&info->files);
}
return 1;
}
| static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
info->size += notesize(&info->auxv);
if (fill_files_note(&info->files) == 0) {
info->size += notesize(&info->files);
}
return 1;
... | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
info->size += notesize(&info->auxv);
if (fill_files_note(&info->files, cprm) == 0) {
info->size += notesize(&info->files);
}
retu... | static int fill_note_info(struct elfhdr *elf, int phdrs, struct elf_note_info *info, struct coredump_params *cprm) {
info->size += notesize(&info->auxv);
- if (fill_files_note(&info->files) == 0) {
+ if (fill_files_note(&info->files, cprm) == 0) {
info->size += notesize(&info->files);
}
r... |
CVE-2023-1249 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/coredump.c | do_coredump | void do_coredump(const kernel_siginfo_t *siginfo) {
struct core_state core_state;
struct core_name cn;
struct mm_struct *mm = current->mm;
struct linux_binfmt * binfmt;
const struct cred *old_cred;
struct cred *cred;
int retval = 0;
int ispipe;
size_t *argv = NULL;
int argc = 0;
... | void do_coredump(const kernel_siginfo_t *siginfo) {
struct core_state core_state;
struct core_name cn;
struct mm_struct *mm = current->mm;
struct linux_binfmt * binfmt;
const struct cred *old_cred;
struct cred *cred;
int retval = 0;
int ispipe;
size_t *argv = NULL;
int argc = 0;
... | void do_coredump(const kernel_siginfo_t *siginfo) {
struct core_state core_state;
struct core_name cn;
struct mm_struct *mm = current->mm;
struct linux_binfmt * binfmt;
const struct cred *old_cred;
struct cred *cred;
int retval = 0;
int ispipe;
size_t *argv = NULL;
int argc = 0;
... | void do_coredump(const kernel_siginfo_t *siginfo) {
struct core_state core_state;
struct core_name cn;
struct mm_struct *mm = current->mm;
struct linux_binfmt * binfmt;
const struct cred *old_cred;
struct cred *cred;
int retval = 0;
int ispipe;
size_t *argv = NULL;
int argc = 0;
... | void do_coredump(const kernel_siginfo_t *siginfo) {
struct coredump_params cprm = {
.siginfo = siginfo, .regs = signal_pt_regs(), .limit = rlimit(RLIMIT_CORE), .mm_flags = mm->flags, .vma_meta = NULL,
};
if (!dump_interrupted()) {
file_end_write(cprm.file);
kvfree(cprm.vma_meta);
... | void do_coredump(const kernel_siginfo_t *siginfo) {
struct coredump_params cprm = {
.siginfo = siginfo, .regs = signal_pt_regs(), .limit = rlimit(RLIMIT_CORE), .mm_flags = mm->flags, .vma_meta = NULL,
};
if (!dump_interrupted()) {
file_end_write(cprm.file);
free_vma_snapshot(&cprm);
... | void do_coredump(const kernel_siginfo_t *siginfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct coredump_params cprm = {
.siginfo = siginfo, .regs = signal_pt_regs(), .limit = rlimit(RLIMIT_CORE), .mm_flags = mm->flags, .vma_meta = NULL,
};
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | void do_coredump(const kernel_siginfo_t *siginfo) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct coredump_params cprm = {
.siginfo = siginfo, .regs = signal_pt_regs(), .limit = rlimit(RLIMIT_CORE), .mm_flags = mm->flags, .vma_meta = NULL,
};
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | void do_coredump(const kernel_siginfo_t *siginfo) {
struct coredump_params cprm = {
.siginfo = siginfo, .regs = signal_pt_regs(), .limit = rlimit(RLIMIT_CORE), .mm_flags = mm->flags, .vma_meta = NULL,
};
if (!dump_interrupted()) {
file_end_write(cprm.file);
- kvfree(cprm.vma_met... |
CVE-2023-1249 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/coredump.c | dump_vma_snapshot | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct vm_area_struct *vma, *gate_vma;
struct mm_struct *mm = current->mm;
int i;
if (mmap_write_lock_killable(mm)) {
return false;
}
cprm->vma_data_size = 0;
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_coun... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct vm_area_struct *vma, *gate_vma;
struct mm_struct *mm = current->mm;
int i;
if (mmap_write_lock_killable(mm)) {
return false;
}
cprm->vma_data_size = 0;
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_coun... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct vm_area_struct *vma, *gate_vma;
struct mm_struct *mm = current->mm;
int i;
if (mmap_write_lock_killable(mm)) {
return false;
}
cprm->vma_data_size = 0;
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_coun... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct vm_area_struct *vma, *gate_vma;
struct mm_struct *mm = current->mm;
int i;
if (mmap_write_lock_killable(mm)) {
return false;
}
cprm->vma_data_size = 0;
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_coun... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct mm_struct *mm = current->mm;
if (mmap_write_lock_killable(mm)) {
return false;
}
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_count + (gate_vma ? 1 : 0);
cprm->vma_meta = kvmalloc_array(cprm->vma_count, sizeof... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct mm_struct *mm = current->mm;
if (mmap_write_lock_killable(mm)) {
return false;
}
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_count + (gate_vma ? 1 : 0);
cprm->vma_meta = kvmalloc_array(cprm->vma_count, sizeof... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mm_struct *mm = current->mm;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (mmap_write_lock_killable(mm)) {
return false;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mm_struct *mm = current->mm;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (mmap_write_lock_killable(mm)) {
return false;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static bool dump_vma_snapshot(struct coredump_params *cprm) {
struct mm_struct *mm = current->mm;
if (mmap_write_lock_killable(mm)) {
return false;
}
gate_vma = get_gate_vma(mm);
cprm->vma_count = mm->map_count + (gate_vma ? 1 : 0);
cprm->vma_meta = kvmalloc_array(cprm->vma_count... |
CVE-2023-1252 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/overlayfs/file.c | ovl_aio_cleanup_handler | static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
struct kiocb *iocb = &aio_req->iocb;
struct kiocb *orig_iocb = aio_req->orig_iocb;
if (iocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(orig_iocb->ki_filp);
__sb_writers_acquired(file_inode(iocb->ki_filp)->i_sb... | static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
struct kiocb *iocb = &aio_req->iocb;
struct kiocb *orig_iocb = aio_req->orig_iocb;
if (iocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(orig_iocb->ki_filp);
__sb_writers_acquired(file_inode(iocb->ki_filp)->i_sb... | static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
struct kiocb *iocb = &aio_req->iocb;
struct kiocb *orig_iocb = aio_req->orig_iocb;
if (iocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(orig_iocb->ki_filp);
__sb_writers_acquired(file_inode(iocb->ki_filp)->i_sb... | static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
struct kiocb *iocb = &aio_req->iocb;
struct kiocb *orig_iocb = aio_req->orig_iocb;
if (iocb->ki_flags & IOCB_WRITE) {
struct inode *inode = file_inode(orig_iocb->ki_filp);
__sb_writers_acquired(file_inode(iocb->ki_filp)->i_sb... | static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
orig_iocb->ki_pos = iocb->ki_pos;
fdput(aio_req->fd);
kmem_cache_free(ovl_aio_request_cachep, aio_req);
}
| static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
orig_iocb->ki_pos = iocb->ki_pos;
ovl_aio_put(aio_req);
}
| static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
orig_iocb->ki_pos = iocb->ki_pos;
fdput(aio_req->fd);
kmem_cache_free(ovl_aio_request_cachep, aio_req);
}
| static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
orig_iocb->ki_pos = iocb->ki_pos;
ovl_aio_put(aio_req);
} | static void ovl_aio_cleanup_handler(struct ovl_aio_req *aio_req) {
orig_iocb->ki_pos = iocb->ki_pos;
- fdput(aio_req->fd);
- kmem_cache_free(ovl_aio_request_cachep, aio_req);
+ ovl_aio_put(aio_req);
} |
CVE-2023-1252 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/overlayfs/file.c | ovl_read_iter | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct fd real;
const struct cred *old_cred;
ssize_t ret;
if (!iov_iter_count(iter)) {
return 0;
}
ret = ovl_real_fdget(file, &real);
if (ret) {
return ret;
}
... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct fd real;
const struct cred *old_cred;
ssize_t ret;
if (!iov_iter_count(iter)) {
return 0;
}
ret = ovl_real_fdget(file, &real);
if (ret) {
return ret;
}
... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct fd real;
const struct cred *old_cred;
ssize_t ret;
if (!iov_iter_count(iter)) {
return 0;
}
ret = ovl_real_fdget(file, &real);
if (ret) {
return ret;
}
... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct fd real;
const struct cred *old_cred;
ssize_t ret;
if (!iov_iter_count(iter)) {
return 0;
}
ret = ovl_real_fdget(file, &real);
if (ret) {
return ret;
}
... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
if (is_sync_kiocb(iocb)) {
} else {
aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
if (!aio_req) {
goto out;
}
aio_req->iocb.ki_complete = ovl_aio_rw_complete;
ret = vf... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
if (is_sync_kiocb(iocb)) {
} else {
aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
if (!aio_req) {
goto out;
}
aio_req->iocb.ki_complete = ovl_aio_rw_complete;
refcount... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (is_sync_kiocb(iocb)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
aio_req = kmem_cache_zalloc(ovl_aio_request_... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (is_sync_kiocb(iocb)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
aio_req = kmem_cache_zalloc(ovl_aio_request_... | static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter) {
if (is_sync_kiocb(iocb)) {
} else {
aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
if (!aio_req) {
goto out;
}
aio_req->iocb.ki_complete = ovl_aio_rw_complete;
+ ... |
CVE-2023-1252 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/overlayfs/file.c | ovl_write_iter | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
struct fd real;
const struct cred *old_cred;
ssize_t ret;
int ifl = iocb->ki_flags;
if (!iov_iter_count(iter)) {
return 0;
}
i... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
struct fd real;
const struct cred *old_cred;
ssize_t ret;
int ifl = iocb->ki_flags;
if (!iov_iter_count(iter)) {
return 0;
}
i... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
struct fd real;
const struct cred *old_cred;
ssize_t ret;
int ifl = iocb->ki_flags;
if (!iov_iter_count(iter)) {
return 0;
}
i... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
struct file *file = iocb->ki_filp;
struct inode *inode = file_inode(file);
struct fd real;
const struct cred *old_cred;
ssize_t ret;
int ifl = iocb->ki_flags;
if (!iov_iter_count(iter)) {
return 0;
}
i... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
if (is_sync_kiocb(iocb)) {
} else {
aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
if (!aio_req) {
goto out;
}
aio_req->iocb.ki_complete = ovl_aio_rw_complete;
ret = v... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
if (is_sync_kiocb(iocb)) {
} else {
aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
if (!aio_req) {
goto out;
}
aio_req->iocb.ki_complete = ovl_aio_rw_complete;
refcoun... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (is_sync_kiocb(iocb)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
aio_req = kmem_cache_zalloc(ovl_aio_request... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (is_sync_kiocb(iocb)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} else {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
aio_req = kmem_cache_zalloc(ovl_aio_request... | static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter) {
if (is_sync_kiocb(iocb)) {
} else {
aio_req = kmem_cache_zalloc(ovl_aio_request_cachep, GFP_KERNEL);
if (!aio_req) {
goto out;
}
aio_req->iocb.ki_complete = ovl_aio_rw_complete;
+ ... |
CVE-2023-1281 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/cls_tcindex.c | tcindex_set_parms | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter_result new_filter_resul... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter_result new_filter_resul... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter_result new_filter_resul... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter_result new_filter_resul... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter *f = NULL;
struct t... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter *f = NULL;
struct t... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */... | static int tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, u32 handle, struct tcindex_data *p, struct tcindex_filter_result *r, struct nlattr **tb, struct nlattr *est,
u32 flags, struct netlink_ext_ack *extack) {
struct tcindex_filter *f = NULL;
stru... |
CVE-2023-1380 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | brcmf_get_assoc_ies | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
struct brcmf_cfg80211_edcf_acparam edcf_acparam_info[EDCF_AC_COUN... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
struct brcmf_cfg80211_edcf_acparam edcf_acparam_info[EDCF_AC_COUN... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
struct brcmf_cfg80211_edcf_acparam edcf_acparam_info[EDCF_AC_COUN... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
struct brcmf_cfg80211_edcf_acparam edcf_acparam_info[EDCF_AC_COUN... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
brcmf_clear_assoc_ies(cfg);
err = brcmf_fil_iovar_data_get(ifp, "assoc_info", cfg->extra_buf, WL_ASSOC_FO_MAX);
... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
brcmf_clear_assoc_ies(cfg);
err = brcmf_fil_iovar_data_get(ifp, "assoc_info", cfg->extra_buf, WL_ASSOC_FO_MAX);
... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
brcmf_clear_assoc_i... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
brcmf_clear_assoc_i... | static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) {
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
brcmf_clear_assoc_ies(cfg);
err = brcmf_fil_iovar_data_get(ifp, "assoc_info", cfg->extra_buf, WL_ASSOC_FO_MAX)... |
CVE-2023-1382 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/tipc/topsrv.c | tipc_conn_alloc | static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s) {
struct tipc_conn *con;
int ret;
con = kzalloc(sizeof(*con), GFP_ATOMIC);
if (!con) {
return ERR_PTR(-ENOMEM);
}
kref_init(&con->kref);
IT_LIST_HEAD(&con->outqueue);
IT_LIST_HEAD(&con->sub_list);
spin_lock_init(... | static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s, struct socket *sock) {
struct tipc_conn *con;
int ret;
con = kzalloc(sizeof(*con), GFP_ATOMIC);
if (!con) {
return ERR_PTR(-ENOMEM);
}
kref_init(&con->kref);
IT_LIST_HEAD(&con->outqueue);
IT_LIST_HEAD(&con->sub_list)... | static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s) {
struct tipc_conn *con;
int ret;
con = kzalloc(sizeof(*con), GFP_ATOMIC);
if (!con) {
return ERR_PTR(-ENOMEM);
}
kref_init(&con->kref);
IT_LIST_HEAD(&con->outqueue);
IT_LIST_HEAD(&con->sub_list);
spin_lock_init(... | static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s, struct socket *sock) {
struct tipc_conn *con;
int ret;
con = kzalloc(sizeof(*con), GFP_ATOMIC);
if (!con) {
return ERR_PTR(-ENOMEM);
}
kref_init(&con->kref);
IT_LIST_HEAD(&con->outqueue);
IT_LIST_HEAD(&con->sub_list)... | static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s) {
s->idr_in_use++;
spin_unlock_bh(&s->idr_lock);
set_bit(CF_CONNECTED, &con->flags);
con->server = s;
return con;
}
| static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s, struct socket *sock) {
s->idr_in_use++;
set_bit(CF_CONNECTED, &con->flags);
con->server = s;
con->sock = sock;
spin_unlock_bh(&s->idr_lock);
return con;
}
| static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->idr_in_use++;
spin_unlock_bh(&s->idr_lock);
set_bit(CF_CONNECTED, &con->flags);
con->server = s;
return con;
}
| static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s, struct socket *sock) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
s->idr_in_use++;
set_bit(CF_CONNECTED, &con->flags);
con->server = s;
con->sock = sock;
spin_unlock_bh(&s->idr_lock);
return con;
} | -static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s) {
+static struct tipc_conn *tipc_conn_alloc(struct tipc_topsrv *s, struct socket *sock) {
s->idr_in_use++;
- spin_unlock_bh(&s->idr_lock);
set_bit(CF_CONNECTED, &con->flags);
con->server = s;
+ con->sock = sock;
+ spin_unlock_bh(&s... |
CVE-2023-1382 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/tipc/topsrv.c | tipc_topsrv_accept | static void tipc_topsrv_accept(struct work_struct *work) {
struct tipc_topsrv *srv = container_of(work, struct tipc_topsrv, awork);
struct socket *newsock, *lsock;
struct tipc_conn *con;
struct sock *newsk;
int ret;
spin_lock_bh(&srv->idr_lock);
if (!srv->listener) {
spin_unlock_bh(&... | static void tipc_topsrv_accept(struct work_struct *work) {
struct tipc_topsrv *srv = container_of(work, struct tipc_topsrv, awork);
struct socket *newsock, *lsock;
struct tipc_conn *con;
struct sock *newsk;
int ret;
spin_lock_bh(&srv->idr_lock);
if (!srv->listener) {
spin_unlock_bh(&... | static void tipc_topsrv_accept(struct work_struct *work) {
struct tipc_topsrv *srv = container_of(work, struct tipc_topsrv, awork);
struct socket *newsock, *lsock;
struct tipc_conn *con;
struct sock *newsk;
int ret;
spin_lock_bh(&srv->idr_lock);
if (!srv->listener) {
spin_unlock_bh(&... | static void tipc_topsrv_accept(struct work_struct *work) {
struct tipc_topsrv *srv = container_of(work, struct tipc_topsrv, awork);
struct socket *newsock, *lsock;
struct tipc_conn *con;
struct sock *newsk;
int ret;
spin_lock_bh(&srv->idr_lock);
if (!srv->listener) {
spin_unlock_bh(&... | static void tipc_topsrv_accept(struct work_struct *work) {
while (1) {
ret = kernel_accept(lsock, &newsock, O_NONBLOCK);
if (ret < 0) {
return;
}
con = tipc_conn_alloc(srv);
if (IS_ERR(con)) {
ret = PTR_ERR(con);
sock_release(newsock);
... | static void tipc_topsrv_accept(struct work_struct *work) {
while (1) {
ret = kernel_accept(lsock, &newsock, O_NONBLOCK);
if (ret < 0) {
return;
}
con = tipc_conn_alloc(srv, newsock);
if (IS_ERR(con)) {
ret = PTR_ERR(con);
sock_release(newso... | static void tipc_topsrv_accept(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (1) {
ret = kernel_accept(lsock, &newsock, O_NONBLOCK);
if (ret < 0) {
return;
}
con = tipc_conn_alloc(srv);
if (IS_ERR(con)) {
ret = PTR... | static void tipc_topsrv_accept(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
while (1) {
ret = kernel_accept(lsock, &newsock, O_NONBLOCK);
if (ret < 0) {
return;
}
con = tipc_conn_alloc(srv, newsock);
if (IS_ERR(con)) {
... | static void tipc_topsrv_accept(struct work_struct *work) {
while (1) {
ret = kernel_accept(lsock, &newsock, O_NONBLOCK);
if (ret < 0) {
return;
}
- con = tipc_conn_alloc(srv);
+ con = tipc_conn_alloc(srv, newsock);
if (IS_ERR(con)) {
ret ... |
CVE-2023-1382 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/tipc/topsrv.c | tipc_topsrv_kern_subscr | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
struct tipc_subscr sub;
struct tipc_conn *con;
int rc;
sub.seq.type = type;
sub.seq.lower = lower;
sub.seq.upper = upper;
sub.timeout = TIPC_WAIT_FOREVER;
sub.filter = filter... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
struct tipc_subscr sub;
struct tipc_conn *con;
int rc;
sub.seq.type = type;
sub.seq.lower = lower;
sub.seq.upper = upper;
sub.timeout = TIPC_WAIT_FOREVER;
sub.filter = filter... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
struct tipc_subscr sub;
struct tipc_conn *con;
int rc;
sub.seq.type = type;
sub.seq.lower = lower;
sub.seq.upper = upper;
sub.timeout = TIPC_WAIT_FOREVER;
sub.filter = filter... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
struct tipc_subscr sub;
struct tipc_conn *con;
int rc;
sub.seq.type = type;
sub.seq.lower = lower;
sub.seq.upper = upper;
sub.timeout = TIPC_WAIT_FOREVER;
sub.filter = filter... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
*(u64 *)&sub.usr_handle = (u64)port;
con = tipc_conn_alloc(tipc_topsrv(net));
if (IS_ERR(con)) {
return false;
}
*conid = con->conid;
con->sock = NULL;
rc = tipc_conn_rcv... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
*(u64 *)&sub.usr_handle = (u64)port;
con = tipc_conn_alloc(tipc_topsrv(net), NULL);
if (IS_ERR(con)) {
return false;
}
*conid = con->conid;
rc = tipc_conn_rcv_sub(tipc_topsrv... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*(u64 *)&sub.usr_handle = (u64)port;
con = tipc_conn_alloc(tipc_topsrv(net));
if (IS_ERR(con)) {
return false;
}
*conid = con->c... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
*(u64 *)&sub.usr_handle = (u64)port;
con = tipc_conn_alloc(tipc_topsrv(net), NULL);
if (IS_ERR(con)) {
/* PLACEHOLDER: DO NOT DELETE THI... | bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower, u32 upper, u32 filter, int *conid) {
*(u64 *)&sub.usr_handle = (u64)port;
- con = tipc_conn_alloc(tipc_topsrv(net));
+ con = tipc_conn_alloc(tipc_topsrv(net), NULL);
if (IS_ERR(con)) {
return false;
}
*conid... |
CVE-2023-1390 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/tipc/link.c | tipc_link_xmit | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
struct tipc_msg *hdr = buf_msg(skb_peek(list));
unsigned int maxwin = l->window;
unsigned int i, imp = msg_importance(hdr);
unsigned int mtu = l->mtu;
u16 ack = l->rcv_nxt - 1;
u16 seqno = l->snd_nxt... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
unsigned int maxwin = l->window;
unsigned int i;
unsigned int mtu = l->mtu;
u16 ack = l->rcv_nxt - 1;
u16 seqno = l->snd_nxt;
u16 bc_ack = l->bc_rcvlink->rcv_nxt - 1;
struct sk_buff_head *transmq... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
struct tipc_msg *hdr = buf_msg(skb_peek(list));
struct sk_buff_head *backlogq = &l->backlogq;
struct sk_buff_head *transmq = &l->transmq;
struct sk_buff *skb, *_skb;
u16 bc_ack = l->bc_rcvlink->rcv_nxt -... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
struct sk_buff_head *backlogq = &l->backlogq;
struct sk_buff_head *transmq = &l->transmq;
struct sk_buff *skb, *_skb;
u16 bc_ack = l->bc_rcvlink->rcv_nxt - 1;
u16 ack = l->rcv_nxt - 1;
u16 seqno = l-... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
struct tipc_msg *hdr = buf_msg(skb_peek(list));
unsigned int maxwin = l->window;
unsigned int i, imp = msg_importance(hdr);
unsigned int mtu = l->mtu;
int pkt_cnt = skb_queue_len(list);
if (!skb_queu... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
unsigned int maxwin = l->window;
unsigned int i;
unsigned int mtu = l->mtu;
int pkt_cnt = skb_queue_len(list);
struct tipc_msg *hdr;
int imp;
if (pkt_cnt <= 0) {
return 0;
}
imp =... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
struct tipc_msg *hdr = buf_msg(skb_peek(list));
struct sk_buff_head *backlogq = &l->backlogq;
struct sk_buff_head *transmq = &l->transmq;
struct sk_buff *skb, *_skb;
u16 bc_ack = l->bc_rcvlink->rcv_nxt -... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
struct sk_buff_head *backlogq = &l->backlogq;
struct sk_buff_head *transmq = &l->transmq;
struct sk_buff *skb, *_skb;
u16 bc_ack = l->bc_rcvlink->rcv_nxt - 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT *... | int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list, struct sk_buff_head *xmitq) {
- struct tipc_msg *hdr = buf_msg(skb_peek(list));
unsigned int maxwin = l->window;
- unsigned int i, imp = msg_importance(hdr);
+ unsigned int i;
unsigned int mtu = l->mtu;
int pkt_cnt = skb_queue_l... |
CVE-2023-1513 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kvm/x86.c | kvm_vcpu_ioctl_x86_get_debugregs | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
dbgregs->flags = 0;
memset(&dbgregs... | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memset(dbgregs, 0, sizeof(*dbgregs));
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
} | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
dbgregs->flags = 0;
memset(&dbgregs... | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memset(dbgregs, 0, sizeof(*dbgregs));
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
} | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
dbgregs->flags = 0;
memset(&dbgregs... | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memset(dbgregs, 0, sizeof(*dbgregs));
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
}... | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
dbgregs->flags = 0;
memset(&dbgregs... | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
memset(dbgregs, 0, sizeof(*dbgregs));
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch.dr7;
} | static void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) {
unsigned long val;
+ memset(dbgregs, 0, sizeof(*dbgregs));
memcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));
kvm_get_dr(vcpu, 6, &val);
dbgregs->dr6 = val;
dbgregs->dr7 = vcpu->arch... |
CVE-2023-1582 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/proc/task_mmu.c | pagemap_pmd_range | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
struct vm_area_struct *vma = walk->vma;
struct pagemapread *pm = walk->private;
spinlock_t *ptl;
pte_t *pte, *orig_pte;
int err = 0;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
struct vm_area_struct *vma = walk->vma;
struct pagemapread *pm = walk->private;
spinlock_t *ptl;
pte_t *pte, *orig_pte;
int err = 0;
bool migration = false;
ptl = pmd_trans_huge_lock(pmdp... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
struct vm_area_struct *vma = walk->vma;
struct pagemapread *pm = walk->private;
spinlock_t *ptl;
pte_t *pte, *orig_pte;
int err = 0;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
struct vm_area_struct *vma = walk->vma;
struct pagemapread *pm = walk->private;
spinlock_t *ptl;
pte_t *pte, *orig_pte;
int err = 0;
bool migration = false;
ptl = pmd_trans_huge_lock(pmdp... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
int err = 0;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
pmd_t pmd = *pmdp;
struct page *page = NULL;
if (pmd_present(pmd)) {
page = pmd_page(pmd);
if... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
int err = 0;
bool migration = false;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
pmd_t pmd = *pmdp;
struct page *page = NULL;
if (pmd_present(pmd)) {
page = p... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pmd_t pmd = *pmdp;
struct... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int err = 0;
bool migration = false;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pmd_t... | static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, struct mm_walk *walk) {
int err = 0;
+ bool migration = false;
ptl = pmd_trans_huge_lock(pmdp, vma);
if (ptl) {
pmd_t pmd = *pmdp;
struct page *page = NULL;
if (pmd_present(pmd)) {
... |
CVE-2023-1582 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/proc/task_mmu.c | pte_to_pagemap_entry | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
u64 frame = 0, flags = 0;
struct page *page = NULL;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
flags |= PM_PRESENT;
... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
u64 frame = 0, flags = 0;
struct page *page = NULL;
bool migration = false;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
u64 frame = 0, flags = 0;
struct page *page = NULL;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
flags |= PM_PRESENT;
... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
u64 frame = 0, flags = 0;
struct page *page = NULL;
bool migration = false;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
struct page *page = NULL;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
page = vm_normal_page(vma, addr, pte);
} else if ... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
struct page *page = NULL;
bool migration = false;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
page = vm_normal_page(vma... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct page *page = NULL;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
/* PLAC... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct page *page = NULL;
bool migration = false;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn... | static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm, struct vm_area_struct *vma, unsigned long addr, pte_t pte) {
struct page *page = NULL;
+ bool migration = false;
if (pte_present(pte)) {
if (pm->show_pfn) {
frame = pte_pfn(pte);
}
page = vm_normal_... |
CVE-2023-1582 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/proc/task_mmu.c | smaps_account | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked) {
int i, nr = compound ? compound_nr(page) : 1;
unsigned long size = nr * PAGE_SIZE;
if (PageAnon(page)) {
mss->anonymous += size;
if (!PageSwapBacked(page) && !dirty ... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked, bool migration) {
int i, nr = compound ? compound_nr(page) : 1;
unsigned long size = nr * PAGE_SIZE;
if (PageAnon(page)) {
mss->anonymous += size;
if (!PageSwapBacked(... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked) {
int i, nr = compound ? compound_nr(page) : 1;
unsigned long size = nr * PAGE_SIZE;
if (PageAnon(page)) {
mss->anonymous += size;
if (!PageSwapBacked(page) && !dirty ... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked, bool migration) {
int i, nr = compound ? compound_nr(page) : 1;
unsigned long size = nr * PAGE_SIZE;
if (PageAnon(page)) {
mss->anonymous += size;
if (!PageSwapBacked(... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked) {
int i, nr = compound ? compound_nr(page) : 1;
if (PageAnon(page)) {
}
if (young || page_is_young(page) || PageReferenced(page)) {
mss->referenced += size;
}
if (... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked, bool migration) {
int i, nr = compound ? compound_nr(page) : 1;
if (PageAnon(page)) {
}
if (young || page_is_young(page) || PageReferenced(page)) {
mss->referenced += size... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked) {
int i, nr = compound ? compound_nr(page) : 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (PageAnon(page)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLAC... | static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked, bool migration) {
int i, nr = compound ? compound_nr(page) : 1;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (PageAnon(page)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | -static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked) {
+static void smaps_account(struct mem_size_stats *mss, struct page *page, bool compound, bool young, bool dirty, bool locked, bool migration) {
int i, nr = compound ? compound_nr(page) : ... |
CVE-2023-1582 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/proc/task_mmu.c | smaps_pmd_entry | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pmd_present(*pmd)) {
page = follow_trans_huge_pmd... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pmd_present(*pmd)) {
... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pmd_present(*pmd)) {
page = follow_trans_huge_pmd... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pmd_present(*pmd)) {
... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pmd_present(*pmd)) {
page = follow_trans_huge_pmd... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pmd_present(*pmd)) {
... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pmd_present(*pmd)) {
page = follow_trans_huge_pmd... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pmd_present(*pmd)) {
... | static void smaps_pmd_entry(pmd_t *pmd, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
+ bool migration = false;
if (pmd_present(*pmd)) {
... |
CVE-2023-1582 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/proc/task_mmu.c | smaps_pte_entry | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pte_present(*pte)) {
page = vm_normal_page(vma, a... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pte_present(*pte)) {
... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pte_present(*pte)) {
page = vm_normal_page(vma, a... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pte_present(*pte)) {
... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pte_present(*pte)) {
page = vm_normal_page(vma, a... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pte_present(*pte)) {
... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
if (pte_present(*pte)) {
page = vm_normal_page(vma, a... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
bool migration = false;
if (pte_present(*pte)) {
... | static void smaps_pte_entry(pte_t *pte, unsigned long addr, struct mm_walk *walk) {
struct mem_size_stats *mss = walk->private;
struct vm_area_struct *vma = walk->vma;
bool locked = !!(vma->vm_flags & VM_LOCKED);
struct page *page = NULL;
+ bool migration = false;
if (pte_present(*pte)) {
... |
CVE-2023-1583 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | io_uring/filetable.c | io_file_bitmap_get | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret != nr) {
return ret;
}
if (ta... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
if (!table->bitmap) {
return -ENFILE;
}
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret !... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret != nr) {
return ret;
}
if (ta... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
if (!table->bitmap) {
return -ENFILE;
}
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret !... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret != nr) {
return ret;
}
if (ta... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
if (!table->bitmap) {
return -ENFILE;
}
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret !... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret != nr) {
return ret;
}
if (ta... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
if (!table->bitmap) {
return -ENFILE;
}
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
if (ret !... | static int io_file_bitmap_get(struct io_ring_ctx *ctx) {
struct io_file_table *table = &ctx->file_table;
unsigned long nr = ctx->file_alloc_end;
int ret;
+ if (!table->bitmap) {
+ return -ENFILE;
+ }
do {
ret = find_next_zero_bit(table->bitmap, nr, table->alloc_hint);
... |
CVE-2023-1583 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | io_uring/rsrc.c | __io_sqe_files_unregister | void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
int i;
for (i = 0; i < ctx->nr_user_files; i++) {
struct file *file = io_file_from_index(&ctx->file_table, i);
if (!file || io_file_need_scm(file)) {
continue;
}
io_file_bitmap_clear(&ctx->file_table, i);
... | void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
int i;
for (i = 0; i < ctx->nr_user_files; i++) {
struct file *file = io_file_from_index(&ctx->file_table, i);
if (!file || io_file_need_scm(file)) {
continue;
}
io_file_bitmap_clear(&ctx->file_table, i);
... | void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
int i;
for (i = 0; i < ctx->nr_user_files; i++) {
struct file *file = io_file_from_index(&ctx->file_table, i);
if (!file || io_file_need_scm(file)) {
continue;
}
io_file_bitmap_clear(&ctx->file_table, i);
... | void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
int i;
for (i = 0; i < ctx->nr_user_files; i++) {
struct file *file = io_file_from_index(&ctx->file_table, i);
if (!file || io_file_need_scm(file)) {
continue;
}
io_file_bitmap_clear(&ctx->file_table, i);
... | void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
io_free_file_tables(&ctx->file_table);
io_rsrc_data_free(ctx->file_data);
}
| void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
io_free_file_tables(&ctx->file_table);
io_file_table_set_alloc_range(ctx, 0, 0);
io_rsrc_data_free(ctx->file_data);
}
| void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
io_free_file_tables(&ctx->file_table);
io_rsrc_data_free(ctx->file_data);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
io_free_file_tables(&ctx->file_table);
io_file_table_set_alloc_range(ctx, 0, 0);
io_rsrc_data_free(ctx->file_data);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void __io_sqe_files_unregister(struct io_ring_ctx *ctx) {
io_free_file_tables(&ctx->file_table);
+ io_file_table_set_alloc_range(ctx, 0, 0);
io_rsrc_data_free(ctx->file_data);
} |
CVE-2023-1611 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/btrfs/ioctl.c | btrfs_ioctl_qgroup_assign | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ioctl_qgroup_assign_args *sa;
struct btrfs_trans_handle *trans;
int re... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ioctl_qgroup_assign_args *sa;
struct btrfs_trans_handle *trans;
int re... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ioctl_qgroup_assign_args *sa;
struct btrfs_trans_handle *trans;
int re... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_ioctl_qgroup_assign_args *sa;
struct btrfs_trans_handle *trans;
int re... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
if (sa->assign) {
ret = btrfs_add_qgroup_relation(trans, sa->src, sa->dst);
} else {
ret = btrfs_del_qgroup_relation(trans,... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
if (sa->assign) {
ret = btrfs_add_qgroup_relation(trans, sa->src, sa->dst);
} else {
ret = btrfs_del_qgroup_relation(trans,... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sa->assign) {
ret = btrfs_add_qgroup_relation(trans, sa->src, sa->dst);
} els... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sa->assign) {
ret = btrfs_add_qgroup_relation(trans, sa->src, sa->dst);
} els... | static long btrfs_ioctl_qgroup_assign(struct file *file, void *arg) {
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
if (sa->assign) {
ret = btrfs_add_qgroup_relation(trans, sa->src, sa->dst);
} else {
ret = btrfs_del_qgroup_relation... |
CVE-2023-1611 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/btrfs/qgroup.c | btrfs_run_qgroups | int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (!fs_info->quota_root) {
return ret;
}
spin_lock(&fs_info->qgroup_lock);
while (!list_empty(&fs_info->dirty_qgroups)) {
struct btrfs_qgroup *qgroup;
q... | int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (trans->transaction->state != TRANS_STATE_COMMIT_DOG) {
lockdep_assert_held(&fs_info->qgroup_ioctl_lock);
}
if (!fs_info->quota_root) {
return ret;
}
spin... | int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (!fs_info->quota_root) {
return ret;
}
spin_lock(&fs_info->qgroup_lock);
while (!list_empty(&fs_info->dirty_qgroups)) {
struct btrfs_qgroup *qgroup;
q... | int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (trans->transaction->state != TRANS_STATE_COMMIT_DOG) {
lockdep_assert_held(&fs_info->qgroup_ioctl_lock);
}
if (!fs_info->quota_root) {
return ret;
}
spin... | int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (!fs_info->quota_root) {
return ret;
}
}
| int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (trans->transaction->state != TRANS_STATE_COMMIT_DOG) {
lockdep_assert_held(&fs_info->qgroup_ioctl_lock);
}
if (!fs_info->quota_root) {
return ret;
}
}
| int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (!fs_info->quota_root) {
return ret;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
if (trans->transaction->state != TRANS_STATE_COMMIT_DOG) {
lockdep_assert_held(&fs_info->qgroup_ioctl_lock);
}
if (!fs_info->quota_root) {
return ret;
}
/* P... | int btrfs_run_qgroups(struct btrfs_trans_handle *trans) {
struct btrfs_fs_info *fs_info = trans->fs_info;
int ret = 0;
+ if (trans->transaction->state != TRANS_STATE_COMMIT_DOG) {
+ lockdep_assert_held(&fs_info->qgroup_ioctl_lock);
+ }
if (!fs_info->quota_root) {
return ret;
}... |
CVE-2023-1637 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/power/cpu.c | pm_check_save_msr | static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
return 0;
} | static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
pm_save_spec_msr();
return 0;
} | static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
return 0;
} | static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
pm_save_spec_msr();
return 0;
} | static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
return 0;
}
| static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
pm_save_spec_msr();
return 0;
}
| static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
return 0;
}
| static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
pm_save_spec_msr();
return 0;
} | static int pm_check_save_msr(void) {
dmi_check_system(msr_save_dmi_table);
pm_cpu_check(msr_save_cpu_table);
+ pm_save_spec_msr();
return 0;
} |
CVE-2023-1652 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/nfsd/nfs4proc.c | nfsd4_ssc_setup_dul | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
struct nfsd4_ssc_umount_item *ni = 0;
struct nfsd4_ssc_umount_item *work = NULL;
struct nfsd4_ssc_umount_item *tmp;
DEFE_WAIT(wait);
*ss_mnt = NULL;
*retwork =... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
struct nfsd4_ssc_umount_item *ni = 0;
struct nfsd4_ssc_umount_item *work = NULL;
struct nfsd4_ssc_umount_item *tmp;
DEFE_WAIT(wait);
*ss_mnt = NULL;
*retwork =... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
struct nfsd4_ssc_umount_item *ni = NULL;
struct nfsd4_ssc_umount_item *work = NULL;
struct nfsd4_ssc_umount_item *tmp;
DEFE_WAIT(wait);
*ss_mnt = NULL;
*retwor... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
struct nfsd4_ssc_umount_item *ni = NULL;
struct nfsd4_ssc_umount_item *work = NULL;
struct nfsd4_ssc_umount_item *tmp;
DEFE_WAIT(wait);
*ss_mnt = NULL;
*retwor... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
DEFE_WAIT(wait);
try_again:
spin_lock(&nn->nfsd_ssc_lock);
list_for_each_entry_safe(ni, tmp, &nn->nfsd_ssc_mount_list, nsui_list) {
if (ni->nsui_busy) {
... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
DEFE_WAIT(wait);
try_again:
spin_lock(&nn->nfsd_ssc_lock);
list_for_each_entry_safe(ni, tmp, &nn->nfsd_ssc_mount_list, nsui_list) {
if (ni->nsui_busy) {
... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
DEFE_WAIT(wait);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
try_again:
spin_lock(&nn->nfsd_ssc_lock);
list_for_eac... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
DEFE_WAIT(wait);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
try_again:
spin_lock(&nn->nfsd_ssc_lock);
list_for_eac... | static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, struct nfsd4_ssc_umount_item **retwork, struct vfsmount **ss_mnt) {
DEFE_WAIT(wait);
try_again:
spin_lock(&nn->nfsd_ssc_lock);
list_for_each_entry_safe(ni, tmp, &nn->nfsd_ssc_mount_list, nsui_list) {
if (ni->nsui_busy) {
... |
CVE-2023-1670 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/xircom/xirc2ps_cs.c | xirc2ps_detach | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xirc2ps_release(link);
free_netdev(dev);
} | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
struct local_info *local = netdev_priv(dev);
netif_carrier_off(dev);
netif_tx_disable(dev);
cancel_work_sync(&local->tx_timeout_task);
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xi... | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xirc2ps_release(link);
free_netdev(dev);
} | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
struct local_info *local = netdev_priv(dev);
netif_carrier_off(dev);
netif_tx_disable(dev);
cancel_work_sync(&local->tx_timeout_task);
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xi... | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xirc2ps_release(link);
free_netdev(dev);
}
| static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
struct local_info *local = netdev_priv(dev);
netif_carrier_off(dev);
netif_tx_disable(dev);
cancel_work_sync(&local->tx_timeout_task);
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xi... | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xirc2ps_release(link);
free_netdev(dev);
}
| static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
struct local_info *local = netdev_priv(dev);
netif_carrier_off(dev);
netif_tx_disable(dev);
cancel_work_sync(&local->tx_timeout_task);
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev);
xi... | static void xirc2ps_detach(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
+ struct local_info *local = netdev_priv(dev);
+ netif_carrier_off(dev);
+ netif_tx_disable(dev);
+ cancel_work_sync(&local->tx_timeout_task);
dev_dbg(&link->dev, "detach\n");
unregister_netdev(dev)... |
CVE-2023-1855 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hwmon/xgene-hwmon.c | xgene_hwmon_remove | static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
hwmon_device_unregister(ctx->hwmon_dev);
kfifo_free(&ctx->async_msg_fifo);
if (acpi_disabled) {
mbox_free_channel(ctx->mbox_chan);
} else {
pcc_mbox_free_channel(ct... | static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
cancel_work_sync(&ctx->workq);
hwmon_device_unregister(ctx->hwmon_dev);
kfifo_free(&ctx->async_msg_fifo);
if (acpi_disabled) {
mbox_free_channel(ctx->mbox_chan);
} else... | static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
hwmon_device_unregister(ctx->hwmon_dev);
kfifo_free(&ctx->async_msg_fifo);
if (acpi_disabled) {
mbox_free_channel(ctx->mbox_chan);
} else {
pcc_mbox_free_channel(ct... | static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
cancel_work_sync(&ctx->workq);
hwmon_device_unregister(ctx->hwmon_dev);
kfifo_free(&ctx->async_msg_fifo);
if (acpi_disabled) {
mbox_free_channel(ctx->mbox_chan);
} else... | static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
hwmon_device_unregister(ctx->hwmon_dev);
}
| static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
cancel_work_sync(&ctx->workq);
hwmon_device_unregister(ctx->hwmon_dev);
}
| static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
hwmon_device_unregister(ctx->hwmon_dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
cancel_work_sync(&ctx->workq);
hwmon_device_unregister(ctx->hwmon_dev);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static int xgene_hwmon_remove(struct platform_device *pdev) {
struct xgene_hwmon_dev *ctx = platform_get_drvdata(pdev);
+ cancel_work_sync(&ctx->workq);
hwmon_device_unregister(ctx->hwmon_dev);
} |
CVE-2023-1859 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/9p/trans_xen.c | xen_9pfs_front_free | static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
int i, j;
write_lock(&xen_9pfs_lock);
list_del(&priv->list);
write_unlock(&xen_9pfs_lock);
for (i = 0; i < priv->num_rings; i++) {
if (!priv->rings[i].intf) {
break;
}
if (priv->rings[i].irq > 0) ... | static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
int i, j;
write_lock(&xen_9pfs_lock);
list_del(&priv->list);
write_unlock(&xen_9pfs_lock);
for (i = 0; i < priv->num_rings; i++) {
struct xen_9pfs_dataring *ring = &priv->rings[i];
cancel_work_sync(&ring->work);
... | static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
int i, j;
write_lock(&xen_9pfs_lock);
list_del(&priv->list);
write_unlock(&xen_9pfs_lock);
for (i = 0; i < priv->num_rings; i++) {
if (!priv->rings[i].intf) {
break;
}
if (priv->rings[i].irq > 0) ... | static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
int i, j;
write_lock(&xen_9pfs_lock);
list_del(&priv->list);
write_unlock(&xen_9pfs_lock);
for (i = 0; i < priv->num_rings; i++) {
struct xen_9pfs_dataring *ring = &priv->rings[i];
cancel_work_sync(&ring->work);
... | static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
for (i = 0; i < priv->num_rings; i++) {
}
}
| static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
for (i = 0; i < priv->num_rings; i++) {
struct xen_9pfs_dataring *ring = &priv->rings[i];
cancel_work_sync(&ring->work);
}
}
| static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < priv->num_rings; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < priv->num_rings; i++) {
struct xen_9pfs_dataring *ring = &priv->rings[i];
cancel_work_sync(&ring->work);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/... | static void xen_9pfs_front_free(struct xen_9pfs_front_priv *priv) {
for (i = 0; i < priv->num_rings; i++) {
+ struct xen_9pfs_dataring *ring = &priv->rings[i];
+ cancel_work_sync(&ring->work);
}
} |
CVE-2023-1989 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/bluetooth/btsdio.c | btsdio_remove | static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
struct hci_dev *hdev;
BT_DBG("func %p", func);
if (!data) {
return;
}
hdev = data->hdev;
sdio_set_drvdata(func, NULL);
hci_unregister_dev(hdev);
hci_free_dev(hdev);
} | static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
struct hci_dev *hdev;
BT_DBG("func %p", func);
cancel_work_sync(&data->work);
if (!data) {
return;
}
hdev = data->hdev;
sdio_set_drvdata(func, NULL);
hci_unregister_dev(hdev... | static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
struct hci_dev *hdev;
BT_DBG("func %p", func);
if (!data) {
return;
}
hdev = data->hdev;
sdio_set_drvdata(func, NULL);
hci_unregister_dev(hdev);
hci_free_dev(hdev);
} | static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
struct hci_dev *hdev;
BT_DBG("func %p", func);
cancel_work_sync(&data->work);
if (!data) {
return;
}
hdev = data->hdev;
sdio_set_drvdata(func, NULL);
hci_unregister_dev(hdev... | static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
BT_DBG("func %p", func);
if (!data) {
return;
}
}
| static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
BT_DBG("func %p", func);
cancel_work_sync(&data->work);
if (!data) {
return;
}
}
| static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("func %p", func);
if (!data) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
BT_DBG("func %p", func);
cancel_work_sync(&data->work);
if (!data) {
return;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void btsdio_remove(struct sdio_func *func) {
struct btsdio_data *data = sdio_get_drvdata(func);
BT_DBG("func %p", func);
+ cancel_work_sync(&data->work);
if (!data) {
return;
}
} |
CVE-2023-1990 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/nfc/st-nci/ndlc.c | ndlc_remove | void ndlc_remove(struct llt_ndlc *ndlc) {
st_nci_remove(ndlc->ndev);
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
} | void ndlc_remove(struct llt_ndlc *ndlc) {
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
cancel_work_sync(&ndlc->sm_work);
st_nci_remove(ndlc->ndev);
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
} | void ndlc_remove(struct llt_ndlc *ndlc) {
st_nci_remove(ndlc->ndev);
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
} | void ndlc_remove(struct llt_ndlc *ndlc) {
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
cancel_work_sync(&ndlc->sm_work);
st_nci_remove(ndlc->ndev);
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
} | void ndlc_remove(struct llt_ndlc *ndlc) {
st_nci_remove(ndlc->ndev);
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
}
| void ndlc_remove(struct llt_ndlc *ndlc) {
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
cancel_work_sync(&ndlc->sm_work);
st_nci_remove(ndlc->ndev);
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
}
| void ndlc_remove(struct llt_ndlc *ndlc) {
st_nci_remove(ndlc->ndev);
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
}
| void ndlc_remove(struct llt_ndlc *ndlc) {
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
cancel_work_sync(&ndlc->sm_work);
st_nci_remove(ndlc->ndev);
skb_queue_purge(&ndlc->rcv_q);
skb_queue_purge(&ndlc->send_q);
} | void ndlc_remove(struct llt_ndlc *ndlc) {
- st_nci_remove(ndlc->ndev);
del_timer_sync(&ndlc->t1_timer);
del_timer_sync(&ndlc->t2_timer);
ndlc->t2_active = false;
ndlc->t1_active = false;
+ cancel_work_sync(&ndlc->sm_work);
+ st_nci_remove(ndlc->ndev);
skb_queue_purge(&ndlc->rcv_q);
... |
CVE-2023-1998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/bugs.c | spectre_v2_in_ibrs_mode | static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return mode == SPECTRE_V2_IBRS || mode == SPECTRE_V2_EIBRS || mode == SPECTRE_V2_EIBRS_RETPOLE || mode == SPECTRE_V2_EIBRS_LFENCE;
} | static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
} | static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return mode == SPECTRE_V2_IBRS || mode == SPECTRE_V2_EIBRS || mode == SPECTRE_V2_EIBRS_RETPOLE || mode == SPECTRE_V2_EIBRS_LFENCE;
} | static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
} | static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return mode == SPECTRE_V2_IBRS || mode == SPECTRE_V2_EIBRS || mode == SPECTRE_V2_EIBRS_RETPOLE || mode == SPECTRE_V2_EIBRS_LFENCE;
}
| static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
}
| static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return mode == SPECTRE_V2_IBRS || mode == SPECTRE_V2_EIBRS || mode == SPECTRE_V2_EIBRS_RETPOLE || mode == SPECTRE_V2_EIBRS_LFENCE;
}
| static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
} | static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode) {
- return mode == SPECTRE_V2_IBRS || mode == SPECTRE_V2_EIBRS || mode == SPECTRE_V2_EIBRS_RETPOLE || mode == SPECTRE_V2_EIBRS_LFENCE;
+ return spectre_v2_in_eibrs_mode(mode) || mode == SPECTRE_V2_IBRS;
} |
CVE-2023-1998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/bugs.c | spectre_v2_user_select_mitigation | static void spectre_v2_user_select_mitigation(void) {
enum spectre_v2_user_mitigation mode = SPECTRE_V2_USER_NONE;
bool smt_possible = IS_ENABLED(CONFIG_SMP);
enum spectre_v2_user_cmd cmd;
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_co... | static void spectre_v2_user_select_mitigation(void) {
enum spectre_v2_user_mitigation mode = SPECTRE_V2_USER_NONE;
bool smt_possible = IS_ENABLED(CONFIG_SMP);
enum spectre_v2_user_cmd cmd;
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_co... | static void spectre_v2_user_select_mitigation(void) {
enum spectre_v2_user_mitigation mode = SPECTRE_V2_USER_NONE;
bool smt_possible = IS_ENABLED(CONFIG_SMP);
enum spectre_v2_user_cmd cmd;
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_co... | static void spectre_v2_user_select_mitigation(void) {
enum spectre_v2_user_mitigation mode = SPECTRE_V2_USER_NONE;
bool smt_possible = IS_ENABLED(CONFIG_SMP);
enum spectre_v2_user_cmd cmd;
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_co... | static void spectre_v2_user_select_mitigation(void) {
bool smt_possible = IS_ENABLED(CONFIG_SMP);
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_control == CPU_SMT_FORCE_DISABLED || cpu_smt_control == CPU_SMT_NOT_SUPPORTED) {
smt_possible... | static void spectre_v2_user_select_mitigation(void) {
bool smt_possible = IS_ENABLED(CONFIG_SMP);
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_control == CPU_SMT_FORCE_DISABLED || cpu_smt_control == CPU_SMT_NOT_SUPPORTED) {
smt_possible... | static void spectre_v2_user_select_mitigation(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool smt_possible = IS_ENABLED(CONFIG_SMP);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_c... | static void spectre_v2_user_select_mitigation(void) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool smt_possible = IS_ENABLED(CONFIG_SMP);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_c... | static void spectre_v2_user_select_mitigation(void) {
bool smt_possible = IS_ENABLED(CONFIG_SMP);
if (!boot_cpu_has(X86_FEATURE_IBPB) && !boot_cpu_has(X86_FEATURE_STIBP)) {
return;
}
if (cpu_smt_control == CPU_SMT_FORCE_DISABLED || cpu_smt_control == CPU_SMT_NOT_SUPPORTED) {
smt_p... |
CVE-2023-1998 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | arch/x86/kernel/cpu/bugs.c | stibp_state | static char *stibp_state(void) {
if (spectre_v2_in_ibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
case SPECTRE_V2_USER_NONE:
return ", STIBP: disabled";
case SPECTRE_V2_USER_STRICT:
return ", STIBP: forced";
case SPECTRE_V2_USER_STRICT_PREF... | static char *stibp_state(void) {
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
case SPECTRE_V2_USER_NONE:
return ", STIBP: disabled";
case SPECTRE_V2_USER_STRICT:
return ", STIBP: forced";
case SPECTRE_V2_USER_STRICT_PRE... | static char *stibp_state(void) {
if (spectre_v2_in_ibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
case SPECTRE_V2_USER_NONE:
return ", STIBP: disabled";
case SPECTRE_V2_USER_STRICT:
return ", STIBP: forced";
case SPECTRE_V2_USER_STRICT_PREF... | static char *stibp_state(void) {
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
case SPECTRE_V2_USER_NONE:
return ", STIBP: disabled";
case SPECTRE_V2_USER_STRICT:
return ", STIBP: forced";
case SPECTRE_V2_USER_STRICT_PRE... | static char *stibp_state(void) {
if (spectre_v2_in_ibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
}
}
| static char *stibp_state(void) {
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
}
}
| static char *stibp_state(void) {
if (spectre_v2_in_ibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static char *stibp_state(void) {
if (spectre_v2_in_eibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static char *stibp_state(void) {
- if (spectre_v2_in_ibrs_mode(spectre_v2_enabled)) {
+ if (spectre_v2_in_eibrs_mode(spectre_v2_enabled)) {
return "";
}
switch (spectre_v2_user_stibp) {
}
} |
CVE-2023-2002 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/bluetooth/hci_sock.c | hci_sock_ioctl | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *)arg;
struct sock *sk = sock->sk;
int err;
BT_DBG("cmd %x arg %lx", cmd, arg);
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
err = -EBADFD;
goto done;
}
... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *)arg;
struct sock *sk = sock->sk;
int err;
BT_DBG("cmd %x arg %lx", cmd, arg);
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
err = -EBADFD;
goto done;
}
... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *)arg;
struct sock *sk = sock->sk;
int err;
BT_DBG("cmd %x arg %lx", cmd, arg);
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
err = -EBADFD;
goto done;
}
... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
void *argp = (void *)arg;
struct sock *sk = sock->sk;
int err;
BT_DBG("cmd %x arg %lx", cmd, arg);
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
err = -EBADFD;
goto done;
}
... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
struct sock *sk = sock->sk;
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
goto done;
}
if (hci_sock_gen_cookie(sk)) {
struct sk_buff *skb;
if (capable(CAP_NET_ADM)) {
... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
struct sock *sk = sock->sk;
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
goto done;
}
if (hci_sock_gen_cookie(sk)) {
struct sk_buff *skb;
if (sk_capable(sk, CAP_NET_ADM)) {
... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sock *sk = sock->sk;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
/* PLACEHOLDER: DO NOT DELETE... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct sock *sk = sock->sk;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
/* PLACEHOLDER: DO NOT DELETE... | static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) {
struct sock *sk = sock->sk;
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_RAW) {
goto done;
}
if (hci_sock_gen_cookie(sk)) {
struct sk_buff *skb;
- if (capable(CAP_NET_ADM)) {... |
CVE-2023-2006 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rxrpc/conn_client.c | rxrpc_alloc_bundle | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
struct rxrpc_bundle *bundle;
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
bundle->params = *cp;
rxrpc_get_peer(bundle->params.peer);
refcount_set(&bundle->ref, 1);
spin_lock... | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
struct rxrpc_bundle *bundle;
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
bundle->params = *cp;
rxrpc_get_peer(bundle->params.peer);
refcount_set(&bundle->ref, 1);
atomic_se... | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
struct rxrpc_bundle *bundle;
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
bundle->params = *cp;
rxrpc_get_peer(bundle->params.peer);
refcount_set(&bundle->ref, 1);
spin_lock... | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
struct rxrpc_bundle *bundle;
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
bundle->params = *cp;
rxrpc_get_peer(bundle->params.peer);
refcount_set(&bundle->ref, 1);
atomic_se... | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
refcount_set(&bundle->ref, 1);
spin_lock_init(&bundle->channel_lock);
}
}
| static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
refcount_set(&bundle->ref, 1);
atomic_set(&bundle->active, 1);
spin_lock_init(&bundle->channel_lock);
}
}
| static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
refcount_set(&bundle->ref, 1);
spin_lock_init(&b... | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
refcount_set(&bundle->ref, 1);
atomic_set(&bundl... | static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
bundle = kzalloc(sizeof(*bundle), gfp);
if (bundle) {
refcount_set(&bundle->ref, 1);
+ atomic_set(&bundle->active, 1);
spin_lock_init(&bundle->channel_lock);
}
} |
CVE-2023-2006 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rxrpc/conn_client.c | rxrpc_connect_call | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
struct rxrpc_bundle *bundle;
struct rxrpc_net *rxnet = cp->local->rxnet;
int ret = 0;
_enter("{%d,%lx},", call->debug_id, call->user_call_ID);
rxrpc_disca... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
struct rxrpc_bundle *bundle;
struct rxrpc_net *rxnet = cp->local->rxnet;
int ret = 0;
_enter("{%d,%lx},", call->debug_id, call->user_call_ID);
rxrpc_disca... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
struct rxrpc_bundle *bundle;
struct rxrpc_net *rxnet = cp->local->rxnet;
int ret = 0;
_enter("{%d,%lx},", call->debug_id, call->user_call_ID);
rxrpc_disca... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
struct rxrpc_bundle *bundle;
struct rxrpc_net *rxnet = cp->local->rxnet;
int ret = 0;
_enter("{%d,%lx},", call->debug_id, call->user_call_ID);
rxrpc_disca... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
if (IS_ERR(bundle)) {
goto out;
}
if (call->state == RXRPC_CALL_CLIENT_AWAIT_CONN) {
ret = r... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
if (IS_ERR(bundle)) {
goto out;
}
if (call->state == RXRPC_CALL_CLIENT_AWAIT_CONN) {
ret = r... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
if (IS_ERR(bundle)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
if (IS_ERR(bundle)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | int rxrpc_connect_call(struct rxrpc_sock *rx, struct rxrpc_call *call, struct rxrpc_conn_parameters *cp, struct sockaddr_rxrpc *srx, gfp_t gfp) {
bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
if (IS_ERR(bundle)) {
goto out;
}
if (call->state == RXRPC_CALL_CLIENT_AWAIT_CONN) {
... |
CVE-2023-2006 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rxrpc/conn_client.c | rxrpc_look_up_bundle | static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
static atomic_t rxrpc_bundle_id;
struct rxrpc_bundle *bundle, *candidate;
struct rxrpc_local *local = cp->local;
struct rb_node *p, **pp, *parent;
long diff;
_enter("{%px,%x,%u,%u}", cp->peer, key_ser... | static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
static atomic_t rxrpc_bundle_id;
struct rxrpc_bundle *bundle, *candidate;
struct rxrpc_local *local = cp->local;
struct rb_node *p, **pp, *parent;
long diff;
_enter("{%px,%x,%u,%u}", cp->peer, key_ser... | static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
static atomic_t rxrpc_bundle_id;
struct rxrpc_bundle *bundle, *candidate;
struct rxrpc_local *local = cp->local;
struct rb_node *p, **pp, *parent;
long diff;
_enter("{%px,%x,%u,%u}", cp->peer, key_ser... | static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
static atomic_t rxrpc_bundle_id;
struct rxrpc_bundle *bundle, *candidate;
struct rxrpc_local *local = cp->local;
struct rb_node *p, **pp, *parent;
long diff;
_enter("{%px,%x,%u,%u}", cp->peer, key_ser... | static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
found_bundle:
rxrpc_get_bundle(bundle);
spin_unlock(&local->client_bundles_lock);
}
| static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
found_bundle:
rxrpc_get_bundle(bundle);
atomic_inc(&bundle->active);
spin_unlock(&local->client_bundles_lock);
}
| static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
found_bundle:
rxrpc_get_bundle(bundle);
spin_unlock(&local->client_bundles_lock);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
found_bundle:
rxrpc_get_bundle(bundle);
atomic_inc(&bundle->active);
spin_unlock(&local->client_bundles_lock);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *cp, gfp_t gfp) {
found_bundle:
rxrpc_get_bundle(bundle);
+ atomic_inc(&bundle->active);
spin_unlock(&local->client_bundles_lock);
} |
CVE-2023-2006 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/rxrpc/conn_client.c | rxrpc_put_bundle | void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
bool dead;
int r;
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r);
if (dead) {
rxrpc_free_bundle(bundle);
}
} | void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
bool dead;
int r;
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r - 1);
if (dead) {
rxrpc_free_bundle(bundle);
}
} | void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
bool dead;
int r;
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r);
if (dead) {
rxrpc_free_bundle(bundle);
}
} | void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
bool dead;
int r;
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r - 1);
if (dead) {
rxrpc_free_bundle(bundle);
}
} | void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r);
}
| void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r - 1);
}
| void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dead = __refcount_dec_and_test(&bundle->ref, &r);
_debug("PUT B=%x %d", d, r - 1);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | void rxrpc_put_bundle(struct rxrpc_bundle *bundle) {
unsigned int d = bundle->debug_id;
dead = __refcount_dec_and_test(&bundle->ref, &r);
- _debug("PUT B=%x %d", d, r);
+ _debug("PUT B=%x %d", d, r - 1);
} |
CVE-2023-2008 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/dma-buf/udmabuf.c | udmabuf_vm_fault | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
vmf->page = ubuf->pages[vmf->pgoff];
get_page(vmf->page);
return 0;
} | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
pgoff_t pgoff = vmf->pgoff;
if (pgoff >= ubuf->pagecount) {
return VM_FAULT_SIGBUS;
}
vmf->page = ubuf->pages[pgoff];
get_page(vmf->page);
... | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
vmf->page = ubuf->pages[vmf->pgoff];
get_page(vmf->page);
return 0;
} | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
pgoff_t pgoff = vmf->pgoff;
if (pgoff >= ubuf->pagecount) {
return VM_FAULT_SIGBUS;
}
vmf->page = ubuf->pages[pgoff];
get_page(vmf->page);
... | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
vmf->page = ubuf->pages[vmf->pgoff];
get_page(vmf->page);
return 0;
}
| static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
pgoff_t pgoff = vmf->pgoff;
if (pgoff >= ubuf->pagecount) {
return VM_FAULT_SIGBUS;
}
vmf->page = ubuf->pages[pgoff];
get_page(vmf->page);
... | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
vmf->page = ubuf->pages[vmf->pgoff];
get_page(vmf->page);
return 0;
}
| static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
pgoff_t pgoff = vmf->pgoff;
if (pgoff >= ubuf->pagecount) {
return VM_FAULT_SIGBUS;
}
vmf->page = ubuf->pages[pgoff];
get_page(vmf->page);
... | static vm_fault_t udmabuf_vm_fault(struct vm_fault *vmf) {
struct vm_area_struct *vma = vmf->vma;
struct udmabuf *ubuf = vma->vm_private_data;
- vmf->page = ubuf->pages[vmf->pgoff];
+ pgoff_t pgoff = vmf->pgoff;
+ if (pgoff >= ubuf->pagecount) {
+ return VM_FAULT_SIGBUS;
+ }
+ vmf->page... |
CVE-2023-2019 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/netdevsim/fib.c | nsim_fib_create | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
struct nsim_fib_data *data;
struct nsim_dev *nsim_dev;
int err;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
data->devlink = devlink;
nsim_dev = ... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
struct nsim_fib_data *data;
struct nsim_dev *nsim_dev;
int err;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
data->devlink = devlink;
nsim_dev = ... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
struct nsim_fib_data *data;
struct nsim_dev *nsim_dev;
int err;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
data->devlink = devlink;
nsim_dev = ... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
struct nsim_fib_data *data;
struct nsim_dev *nsim_dev;
int err;
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
data->devlink = devlink;
nsim_dev = ... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
nsim_dev = devlink_priv(devlink);
err = nsim_fib_debugfs_init(data, nsim_dev);
IT_WORK(&data->fib_event_work... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
nsim_dev = devlink_priv(devlink);
err = nsim_fib_debugfs_init(data, nsim_dev);
IT_WORK(&data->fib_event_work... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
nsim_dev = devli... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
nsim_dev = devli... | struct nsim_fib_data *nsim_fib_create(struct devlink *devlink, struct netlink_ext_ack *extack) {
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data) {
return ERR_PTR(-ENOMEM);
}
nsim_dev = devlink_priv(devlink);
err = nsim_fib_debugfs_init(data, nsim_dev);
IT_WORK(&data->fib_ev... |
CVE-2023-2019 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/netdevsim/fib.c | nsim_fib_destroy | void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_NEXTHOPS);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB_RULES);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB);
devlink_res... | void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_NEXTHOPS);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB_RULES);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB);
devlink_res... | void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_NEXTHOPS);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB_RULES);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB);
devlink_res... | void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_NEXTHOPS);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB_RULES);
devlink_resource_occ_get_unregister(devlink, NSIM_RESOURCE_IPV6_FIB);
devlink_res... | void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
unregister_nexthop_notifier(devlink_net(devlink), &data->nexthop_nb);
flush_work(&data->fib_event_work);
}
| void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
unregister_nexthop_notifier(devlink_net(devlink), &data->nexthop_nb);
cancel_work_sync(&data->fib_flush_work);
flush_work(&data->fib_event_work);
}
| void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unregister_nexthop_notifier(devlink_net(devlink), &data->nexthop_nb);
flush_work(&data->fib_event_work);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
| void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unregister_nexthop_notifier(devlink_net(devlink), &data->nexthop_nb);
cancel_work_sync(&data->fib_flush_work);
flush_work(&data->fib_event_work);
/* PLACEHOLDER: DO NOT DELETE T... | void nsim_fib_destroy(struct devlink *devlink, struct nsim_fib_data *data) {
unregister_nexthop_notifier(devlink_net(devlink), &data->nexthop_nb);
+ cancel_work_sync(&data->fib_flush_work);
flush_work(&data->fib_event_work);
} |
CVE-2023-2019 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/netdevsim/fib.c | nsim_fib_event_schedule_work | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
struct nsim_fib_event *fib_event;
int err;
if (info->family != AF_ET && info->family != AF_ET6) {
return NOTIFY_DONE;
}
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMI... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
struct nsim_fib_event *fib_event;
int err;
if (info->family != AF_ET && info->family != AF_ET6) {
return NOTIFY_DONE;
}
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMI... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
struct nsim_fib_event *fib_event;
int err;
if (info->family != AF_ET && info->family != AF_ET6) {
return NOTIFY_DONE;
}
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMI... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
struct nsim_fib_event *fib_event;
int err;
if (info->family != AF_ET && info->family != AF_ET6) {
return NOTIFY_DONE;
}
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMI... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMIC);
if (!fib_event) {
return NOTIFY_BAD;
}
switch (info->family) {
case AF_ET:
err = nsim_fib4_prepare_event(inf... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMIC);
if (!fib_event) {
goto err_fib_event_alloc;
}
switch (info->family) {
case AF_ET:
err = nsim_fib4_prepare_ev... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMIC);
if (!fib_event) {
return NOTIFY_BAD;
}
/* PLACEHOLDER: DO NOT DELETE T... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMIC);
if (!fib_event) {
goto err_fib_event_alloc;
}
/* PLACEHOLDER: DO NOT D... | static int nsim_fib_event_schedule_work(struct nsim_fib_data *data, struct fib_notifier_info *info, unsigned long event) {
fib_event = kzalloc(sizeof(*fib_event), GFP_ATOMIC);
if (!fib_event) {
- return NOTIFY_BAD;
+ goto err_fib_event_alloc;
}
switch (info->family) {
case AF_ET:... |
CVE-2023-20928 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_alloc_deferred_release | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
struct rb_node *n;
int buffers, page_count;
struct binder_buffer *buffer;
buffers = 0;
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma);
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binde... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
struct rb_node *n;
int buffers, page_count;
struct binder_buffer *buffer;
buffers = 0;
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma_addr && vma_lookup(alloc->vma_vm_mm, alloc->vma_addr));
while ((n = rb_first(&alloc->allocated_... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
struct rb_node *n;
int buffers, page_count;
struct binder_buffer *buffer;
buffers = 0;
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma);
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binde... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
struct rb_node *n;
int buffers, page_count;
struct binder_buffer *buffer;
buffers = 0;
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma_addr && vma_lookup(alloc->vma_vm_mm, alloc->vma_addr));
while ((n = rb_first(&alloc->allocated_... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma);
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON(buffer->transaction);
if (buffer->clear_on_free) {
... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma_addr && vma_lookup(alloc->vma_vm_mm, alloc->vma_addr));
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON(buffer->transa... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma);
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binder_buffer, rb_node);
BUG_ON(buffer->transactio... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
mutex_lock(&alloc->mutex);
BUG_ON(alloc->vma_addr && vma_lookup(alloc->vma_vm_mm, alloc->vma_addr));
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct bind... | void binder_alloc_deferred_release(struct binder_alloc *alloc) {
mutex_lock(&alloc->mutex);
- BUG_ON(alloc->vma);
+ BUG_ON(alloc->vma_addr && vma_lookup(alloc->vma_vm_mm, alloc->vma_addr));
while ((n = rb_first(&alloc->allocated_buffers))) {
buffer = rb_entry(n, struct binder_buffer, rb_node);... |
CVE-2023-20928 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_alloc_get_vma | static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma) {
smp_rmb();
vma = alloc->vma;
}
return vma;
} | static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma_addr) {
vma = vma_lookup(alloc->vma_vm_mm, alloc->vma_addr);
}
return vma;
} | static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma) {
smp_rmb();
vma = alloc->vma;
}
return vma;
} | static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma_addr) {
vma = vma_lookup(alloc->vma_vm_mm, alloc->vma_addr);
}
return vma;
} | static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma) {
smp_rmb();
vma = alloc->vma;
}
return vma;
}
| static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma_addr) {
vma = vma_lookup(alloc->vma_vm_mm, alloc->vma_addr);
}
return vma;
}
| static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma) {
smp_rmb();
vma = alloc->vma;
}
return vma;
}
| static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
if (alloc->vma_addr) {
vma = vma_lookup(alloc->vma_vm_mm, alloc->vma_addr);
}
return vma;
} | static inline struct vm_area_struct *binder_alloc_get_vma( struct binder_alloc *alloc) {
struct vm_area_struct *vma = NULL;
- if (alloc->vma) {
- smp_rmb();
- vma = alloc->vma;
+ if (alloc->vma_addr) {
+ vma = vma_lookup(alloc->vma_vm_mm, alloc->vma_addr);
}
return vma;
} |
CVE-2023-20928 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_alloc_set_vma | static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
if (vma) {
alloc->vma_vm_mm = vma->vm_mm;
}
smp_wmb();
alloc->vma = vma;
} | static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
unsigned long vm_start = 0;
if (vma) {
vm_start = vma->vm_start;
alloc->vma_vm_mm = vma->vm_mm;
}
mmap_assert_write_locked(alloc->vma_vm_mm);
alloc->vma_addr = vm_start;
} | static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
if (vma) {
alloc->vma_vm_mm = vma->vm_mm;
}
smp_wmb();
alloc->vma = vma;
} | static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
unsigned long vm_start = 0;
if (vma) {
vm_start = vma->vm_start;
alloc->vma_vm_mm = vma->vm_mm;
}
mmap_assert_write_locked(alloc->vma_vm_mm);
alloc->vma_addr = vm_start;
} | static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
if (vma) {
alloc->vma_vm_mm = vma->vm_mm;
}
smp_wmb();
alloc->vma = vma;
}
| static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
unsigned long vm_start = 0;
if (vma) {
vm_start = vma->vm_start;
alloc->vma_vm_mm = vma->vm_mm;
}
mmap_assert_write_locked(alloc->vma_vm_mm);
alloc->vma_addr = vm_start;
}
| static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
if (vma) {
alloc->vma_vm_mm = vma->vm_mm;
}
smp_wmb();
alloc->vma = vma;
}
| static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
unsigned long vm_start = 0;
if (vma) {
vm_start = vma->vm_start;
alloc->vma_vm_mm = vma->vm_mm;
}
mmap_assert_write_locked(alloc->vma_vm_mm);
alloc->vma_addr = vm_start;
} | static inline void binder_alloc_set_vma(struct binder_alloc *alloc, struct vm_area_struct *vma) {
+ unsigned long vm_start = 0;
if (vma) {
+ vm_start = vma->vm_start;
alloc->vma_vm_mm = vma->vm_mm;
}
- smp_wmb();
- alloc->vma = vma;
+ mmap_assert_write_locked(alloc->vma_vm_mm);
+ ... |
CVE-2023-20928 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc.c | binder_update_page_range | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
void *page_addr;
unsigned long user_page_addr;
struct binder_lru_page *page;
struct vm_area_struct *vma = NULL;
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_D... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
void *page_addr;
unsigned long user_page_addr;
struct binder_lru_page *page;
struct vm_area_struct *vma = NULL;
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_D... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
void *page_addr;
unsigned long user_page_addr;
struct binder_lru_page *page;
struct vm_area_struct *vma = NULL;
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_D... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
void *page_addr;
unsigned long user_page_addr;
struct binder_lru_page *page;
struct vm_area_struct *vma = NULL;
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_D... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_DEBUG_BUFFER_ALLOC, "%d: %s pages %pK-%pK\n", alloc->pid, allocate ? "allocate" : "free", start, end);
if (end <= start) {
... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_DEBUG_BUFFER_ALLOC, "%d: %s pages %pK-%pK\n", alloc->pid, allocate ? "allocate" : "free", start, end);
if (end <= start) {
... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_DEBUG_BUFFER_ALLOC, "%d: %s pages %pK-%pK\n", alloc->pid, allocate ? "allocate"... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_DEBUG_BUFFER_ALLOC, "%d: %s pages %pK-%pK\n", alloc->pid, allocate ? "allocate"... | static int binder_update_page_range(struct binder_alloc *alloc, int allocate, void *start, void *end) {
struct mm_struct *mm = NULL;
bool need_mm = false;
binder_alloc_debug(BDER_DEBUG_BUFFER_ALLOC, "%d: %s pages %pK-%pK\n", alloc->pid, allocate ? "allocate" : "free", start, end);
if (end <= start)... |
CVE-2023-20928 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/android/binder_alloc_selftest.c | binder_selftest_alloc | void binder_selftest_alloc(struct binder_alloc *alloc) {
size_t end_offset[BUFFER_NUM];
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_alloc_offset(allo... | void binder_selftest_alloc(struct binder_alloc *alloc) {
size_t end_offset[BUFFER_NUM];
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma_addr) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_alloc_offset... | void binder_selftest_alloc(struct binder_alloc *alloc) {
size_t end_offset[BUFFER_NUM];
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_alloc_offset(allo... | void binder_selftest_alloc(struct binder_alloc *alloc) {
size_t end_offset[BUFFER_NUM];
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma_addr) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_alloc_offset... | void binder_selftest_alloc(struct binder_alloc *alloc) {
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_alloc_offset(alloc, end_offset, 0);
done:
mutex_... | void binder_selftest_alloc(struct binder_alloc *alloc) {
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma_addr) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_alloc_offset(alloc, end_offset, 0);
done:
m... | void binder_selftest_alloc(struct binder_alloc *alloc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma) {
goto done;
}
pr_info("STARTED\n");
binder_selftest_al... | void binder_selftest_alloc(struct binder_alloc *alloc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
if (!binder_selftest_run || !alloc->vma_addr) {
goto done;
}
pr_info("STARTED\n");
binder_selfte... | void binder_selftest_alloc(struct binder_alloc *alloc) {
if (!binder_selftest_run) {
return;
}
mutex_lock(&binder_selftest_lock);
- if (!binder_selftest_run || !alloc->vma) {
+ if (!binder_selftest_run || !alloc->vma_addr) {
goto done;
}
pr_info("STARTED\n");
binde... |
CVE-2023-2156 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/ipv6/rpl.c | ipv6_rpl_srh_size | size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
} | size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return sizeof(struct ipv6_rpl_sr_hdr) + (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
} | size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
} | size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return sizeof(struct ipv6_rpl_sr_hdr) + (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
} | size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
}
| size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return sizeof(struct ipv6_rpl_sr_hdr) + (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
}
| size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
}
| size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
return sizeof(struct ipv6_rpl_sr_hdr) + (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
} | size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) {
- return (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
+ return sizeof(struct ipv6_rpl_sr_hdr) + (n * IPV6_PFXTAIL_LEN(cmpri)) + IPV6_PFXTAIL_LEN(cmpre);
} |
CVE-2023-2162 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/iscsi_tcp.c | iscsi_sw_tcp_host_get_param | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session = tcp_sw_host->session;
struct iscsi_conn *conn;
struct iscsi_tcp_conn *tcp_conn;
struct iscsi_sw_tc... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session;
struct iscsi_conn *conn;
struct iscsi_tcp_conn *tcp_conn;
struct iscsi_sw_tcp_conn *tcp_sw_conn;
... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session = tcp_sw_host->session;
struct iscsi_conn *conn;
struct iscsi_tcp_conn *tcp_conn;
struct iscsi_sw_tc... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session;
struct iscsi_conn *conn;
struct iscsi_tcp_conn *tcp_conn;
struct iscsi_sw_tcp_conn *tcp_sw_conn;
... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session = tcp_sw_host->session;
struct iscsi_conn *conn;
switch (param) {
case ISCSI_HOST_PARAM_IPADDRESS:
... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session;
struct iscsi_conn *conn;
switch (param) {
case ISCSI_HOST_PARAM_IPADDRESS:
session = tcp_sw... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session = tcp_sw_host->session;
struct iscsi_conn *conn;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switc... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
struct iscsi_session *session;
struct iscsi_conn *conn;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
switch (param) {
case IS... | static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) {
struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost);
- struct iscsi_session *session = tcp_sw_host->session;
+ struct iscsi_session *session;
struct iscsi_conn *conn;
switch (param)... |
CVE-2023-2162 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/iscsi_tcp.c | iscsi_sw_tcp_session_create | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
struct iscsi_cls_session *cls_session;
struct iscsi_session *session;
struct iscsi_sw_tcp_host *tcp_sw_host;
struct Scsi_Host *shost;
int rc;
if ... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
struct iscsi_cls_session *cls_session;
struct iscsi_session *session;
struct iscsi_sw_tcp_host *tcp_sw_host;
struct Scsi_Host *shost;
int rc;
if ... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
struct iscsi_cls_session *cls_session;
struct iscsi_session *session;
struct iscsi_sw_tcp_host *tcp_sw_host;
struct Scsi_Host *shost;
if (ep) {
... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
struct iscsi_cls_session *cls_session;
struct iscsi_session *session;
struct iscsi_sw_tcp_host *tcp_sw_host;
struct Scsi_Host *shost;
if (ep) {
... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, sizeof(struct iscsi_sw_tcp_host), 1);
if (!shost) {
return NULL;
}
rc = iscsi_host_get_max_scsi_cmds(... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, sizeof(struct iscsi_sw_tcp_host), 1);
if (!shost) {
return NULL;
}
rc = iscsi_host_get_max_scsi_cmds(... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, sizeof(struct iscsi_sw_tcp_host), 1);
if (!shost) {
return ... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, sizeof(struct iscsi_sw_tcp_host), 1);
if (!shost) {
return ... | static struct iscsi_cls_session * iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max, uint16_t qdepth, uint32_t initial_cmdsn) {
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, sizeof(struct iscsi_sw_tcp_host), 1);
if (!shost) {
return NULL;
}
rc = iscsi_host_get_max_scsi... |
CVE-2023-2166 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/can/af_can.c | can_rcv | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || (!can_is_can_skb(skb)))) {
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n", dev->type, skb->len);
kfree_skb(skb)... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_can_skb(skb))) {
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n", dev->type, skb->len);... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU)) {
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || skb->len != CAN_MTU)) {
pr_warn_once("PF_CAN: dropped non con... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || (!can_is_can_skb(skb)))) {
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n", dev->type, skb->len);
kfree_skb(skb)... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_can_skb(skb))) {
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n", dev->type, skb->len);... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CAN_MTU)) {
pr_warn_once("PF_CAN: dropped non conform CAN skbuff: dev type... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || skb->len != CAN_MTU)) {
pr_warn_once("PF_CAN: dropped non con... | static int can_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
- if (unlikely(dev->type != ARPHRD_CAN || (!can_is_can_skb(skb)))) {
+ if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_can_skb(skb))) {
pr_warn_once("PF_CAN: dr... |
CVE-2023-2166 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/can/af_can.c | canfd_rcv | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || (!can_is_canfd_skb(skb)))) {
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n", dev->type, skb->len);
kfree_s... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_canfd_skb(skb))) {
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n", dev->type, skb... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CANFD_MTU)) {
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: d... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || skb->len != CANFD_MTU)) {
pr_warn_once("PF_CAN: dropped non... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || (!can_is_canfd_skb(skb)))) {
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n", dev->type, skb->len);
kfree_s... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_canfd_skb(skb))) {
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n", dev->type, skb... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || skb->len != CANFD_MTU)) {
pr_warn_once("PF_CAN: dropped non conform CAN FD skbuff: d... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || skb->len != CANFD_MTU)) {
pr_warn_once("PF_CAN: dropped non... | static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) {
- if (unlikely(dev->type != ARPHRD_CAN || (!can_is_canfd_skb(skb)))) {
+ if (unlikely(dev->type != ARPHRD_CAN || !can_get_ml_priv(dev) || !can_is_canfd_skb(skb))) {
pr_warn_once("PF_C... |
CVE-2023-2177 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sctp/associola.c | sctp_association_init | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
struct sctp_sock *sp;
struct sctp_paramhdr *p;
int i;
sp = sctp_sk((struct sock *)sk);
asoc->ep = (struct sctp_endpoint *)e... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
struct sctp_sock *sp;
struct sctp_paramhdr *p;
int i;
sp = sctp_sk((struct sock *)sk);
asoc->ep = (struct sctp_endpoint *)e... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
struct sctp_sock *sp;
struct sctp_paramhdr *p;
int i;
sp = sctp_sk((struct sock *)sk);
asoc->ep = (struct sctp_endpoint *)e... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
struct sctp_sock *sp;
struct sctp_paramhdr *p;
int i;
sp = sctp_sk((struct sock *)sk);
asoc->ep = (struct sctp_endpoint *)e... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
if (sctp_stream_init(&asoc->stream, asoc->c.sinit_num_ostreams, 0, gfp)) {
goto fail_init;
}
stream_free:
sctp_stream_free(... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
if (sctp_stream_init(&asoc->stream, asoc->c.sinit_num_ostreams, 0, gfp)) {
goto stream_free;
}
stream_free:
sctp_stream_fre... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sctp_stream_init(&asoc->stream, asoc->c.sinit_num_ostreams, 0, gfp)) {
goto f... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (sctp_stream_init(&asoc->stream, asoc->c.sinit_num_ostreams, 0, gfp)) {
goto s... | static struct sctp_association *sctp_association_init( struct sctp_association *asoc, const struct sctp_endpoint *ep, const struct sock *sk, enum sctp_scope scope, gfp_t gfp) {
if (sctp_stream_init(&asoc->stream, asoc->c.sinit_num_ostreams, 0, gfp)) {
- goto fail_init;
+ goto stream_free;
}
st... |
CVE-2023-2177 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sctp/stream.c | sctp_stream_init | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp_stream_o... | int sctp_stream_init(struct sctp_stream *stream, __u16 outcnt, __u16 incnt, gfp_t gfp) {
struct sctp_sched_ops *sched = sctp_sched_ops_from_stream(stream);
int i, ret = 0;
gfp |= __GFP_NOWARN;
if (outcnt == stream->outcnt) {
goto handle_in;
}
sched->unsched_all(stream);
sctp... |
CVE-2023-2194 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/i2c/busses/i2c-xgene-slimpro.c | slimpro_i2c_blkwr | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
dma_addr_t paddr;
u32 msg[3];
int rc;
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_single(ctx->dev, ctx->dma_buffer, writelen, DMA_TO_DEVICE);
if (dma_... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
dma_addr_t paddr;
u32 msg[3];
int rc;
if (writelen > I2C_SMBUS_BLOCK_MAX) {
return -EVAL;
}
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_si... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
dma_addr_t paddr;
u32 msg[3];
int rc;
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_single(ctx->dev, ctx->dma_buffer, writelen, DMA_TO_DEVICE);
if (dma_... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
dma_addr_t paddr;
u32 msg[3];
int rc;
if (writelen > I2C_SMBUS_BLOCK_MAX) {
return -EVAL;
}
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_si... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
int rc;
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_single(ctx->dev, ctx->dma_buffer, writelen, DMA_TO_DEVICE);
if (dma_mapping_error(ctx->dev, paddr)) {
... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
int rc;
if (writelen > I2C_SMBUS_BLOCK_MAX) {
return -EVAL;
}
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_single(ctx->dev, ctx->dma_buffer, writel... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_single(ctx->dev, ctx->dma_buffer, writelen, DMA_TO_DEVICE);
... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int rc;
if (writelen > I2C_SMBUS_BLOCK_MAX) {
return -EVAL;
}
memcpy(ctx->dma_buffer, data, writelen);
paddr ... | static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip, u32 addr, u32 addrlen, u32 protocol, u32 writelen, void *data) {
int rc;
+ if (writelen > I2C_SMBUS_BLOCK_MAX) {
+ return -EVAL;
+ }
memcpy(ctx->dma_buffer, data, writelen);
paddr = dma_map_single(ctx->dev, ctx->dma_buffer,... |
CVE-2023-2235 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/events/core.c | perf_group_detach | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
struct perf_event *sibling, *tmp;
struct perf_event_context *ctx = event->ctx;
lockdep_assert_held(&ctx->lock);
if (!(event->attach_state & PERF_ATTACH_GROUP)) {
return;
}
event... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
struct perf_event *sibling, *tmp;
struct perf_event_context *ctx = event->ctx;
lockdep_assert_held(&ctx->lock);
if (!(event->attach_state & PERF_ATTACH_GROUP)) {
return;
}
event... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
struct perf_event *sibling, *tmp;
struct perf_event_context *ctx = event->ctx;
lockdep_assert_held(&ctx->lock);
if (!(event->attach_state & PERF_ATTACH_GROUP)) {
return;
}
event... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
struct perf_event *sibling, *tmp;
struct perf_event_context *ctx = event->ctx;
lockdep_assert_held(&ctx->lock);
if (!(event->attach_state & PERF_ATTACH_GROUP)) {
return;
}
event... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
perf_put_aux_event(event);
if (leader != event) {
goto out;
}
list_for_each_entry_safe(sibling, tmp, &event->sibling_list, sibling_list) {
if (sibling->event_caps & PERF_EV_CAP_... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
perf_put_aux_event(event);
if (leader != event) {
goto out;
}
list_for_each_entry_safe(sibling, tmp, &event->sibling_list, sibling_list) {
if (sibling->event_caps & PERF_EV_CAP_... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
perf_put_aux_event(event);
if (leader != event) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out;
}
list_for_each_entry_saf... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
perf_put_aux_event(event);
if (leader != event) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
goto out;
}
list_for_each_entry_saf... | static void perf_group_detach(struct perf_event *event) {
struct perf_event *leader = event->group_leader;
perf_put_aux_event(event);
if (leader != event) {
goto out;
}
list_for_each_entry_safe(sibling, tmp, &event->sibling_list, sibling_list) {
if (sibling->event_caps & PERF... |
CVE-2023-2248 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_qfq.c | qfq_change_class | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
struct qfq_class *cl = (struct qfq_class *)*arg;
bool existing = false;
struct nlattr *tb[TCA_QFQ_MAX + 1];
stru... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
struct qfq_class *cl = (struct qfq_class *)*arg;
bool existing = false;
struct nlattr *tb[TCA_QFQ_MAX + 1];
stru... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
struct qfq_class *cl = (struct qfq_class *)*arg;
bool existing = false;
struct nlattr *tb[TCA_QFQ_MAX + 1];
stru... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
struct qfq_class *cl = (struct qfq_class *)*arg;
bool existing = false;
struct nlattr *tb[TCA_QFQ_MAX + 1];
stru... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
if (tb[TCA_QFQ_LMAX]) {
lmax = nla_get_u32(tb[TCA_QFQ_LMAX]);
if (lmax < QFQ_M_LMAX || lmax > (1UL << QFQ_MT... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
if (tb[TCA_QFQ_LMAX]) {
lmax = nla_get_u32(tb[TCA_QFQ_LMAX]);
} else {
lmax = psched_mtu(qdisc_dev(sch))... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (tb[TCA_QFQ_LMAX]) {
lmax = nla_get_u32(tb[TCA_QFQ_LMAX]);
... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (tb[TCA_QFQ_LMAX]) {
lmax = nla_get_u32(tb[TCA_QFQ_LMAX]);
... | static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
struct qfq_sched *q = qdisc_priv(sch);
if (tb[TCA_QFQ_LMAX]) {
lmax = nla_get_u32(tb[TCA_QFQ_LMAX]);
- if (lmax < QFQ_M_LMAX || lmax > (1UL << Q... |
CVE-2023-2269 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/md/dm-ioctl.c | table_clear | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
struct hash_cell *hc;
struct mapped_device *md;
struct dm_table *old_map = NULL;
bool has_new_map = false;
down_write(&_hash_lock);
hc = __find_device_hash_cell(param);
if (!hc) {
DMDEBUG_LIMIT("de... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
struct hash_cell *hc;
struct mapped_device *md;
struct dm_table *old_map = NULL;
bool has_new_map = false;
down_write(&_hash_lock);
hc = __find_device_hash_cell(param);
if (!hc) {
DMDEBUG_LIMIT("de... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
struct hash_cell *hc;
struct mapped_device *md;
struct dm_table *old_map = NULL;
down_write(&_hash_lock);
hc = __find_device_hash_cell(param);
if (!hc) {
DMDEBUG_LIMIT("device doesn't appear to be in t... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
struct hash_cell *hc;
struct mapped_device *md;
struct dm_table *old_map = NULL;
down_write(&_hash_lock);
hc = __find_device_hash_cell(param);
if (!hc) {
DMDEBUG_LIMIT("device doesn't appear to be in t... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
hc = __find_device_hash_cell(param);
if (!hc) {
return -ENXIO;
}
if (hc->new_map) {
has_new_map = true;
}
param->flags &= ~DM_ACTIVE_PRESENT_FLAG;
__dev_status(hc->md, param);
md = hc->... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
hc = __find_device_hash_cell(param);
if (!hc) {
return -ENXIO;
}
if (hc->new_map) {
has_new_map = true;
}
md = hc->md;
up_write(&_hash_lock);
param->flags &= ~DM_ACTIVE_PRESENT_FLAG;
... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
hc = __find_device_hash_cell(param);
if (!hc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -ENXIO;
}
if (hc->new_map) {
/* PLACEHOLDER: DO NO... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
hc = __find_device_hash_cell(param);
if (!hc) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
return -ENXIO;
}
if (hc->new_map) {
/* PLACEHOLDER: DO NO... | static int table_clear(struct file *filp, struct dm_ioctl *param, size_t param_size) {
hc = __find_device_hash_cell(param);
if (!hc) {
return -ENXIO;
}
if (hc->new_map) {
has_new_map = true;
}
- param->flags &= ~DM_ACTIVE_PRESENT_FLAG;
- __dev_status(hc->md, param);
... |
CVE-2023-22996 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/soc/qcom/qcom_aoss.c | qmp_get | struct qmp *qmp_get(struct device *dev) {
struct platform_device *pdev;
struct device_node *np;
struct qmp *qmp;
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_f... | struct qmp *qmp_get(struct device *dev) {
struct platform_device *pdev;
struct device_node *np;
struct qmp *qmp;
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_f... | struct qmp *qmp_get(struct device *dev) {
struct platform_device *pdev;
struct device_node *np;
struct qmp *qmp;
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_f... | struct qmp *qmp_get(struct device *dev) {
struct platform_device *pdev;
struct device_node *np;
struct qmp *qmp;
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_f... | struct qmp *qmp_get(struct device *dev) {
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_find_device_by_node(np);
if (!pdev) {
return ERR_PTR(-EVAL);
}
q... | struct qmp *qmp_get(struct device *dev) {
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_find_device_by_node(np);
if (!pdev) {
return ERR_PTR(-EVAL);
}
q... | struct qmp *qmp_get(struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_find_device_by_node(np);
/* PL... | struct qmp *qmp_get(struct device *dev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_find_device_by_node(np);
/* PL... | struct qmp *qmp_get(struct device *dev) {
if (!dev || !dev->of_node) {
return ERR_PTR(-EVAL);
}
np = of_parse_phandle(dev->of_node, "qcom,qmp", 0);
if (!np) {
return ERR_PTR(-ENODEV);
}
pdev = of_find_device_by_node(np);
if (!pdev) {
return ERR_PTR(-EVAL);
... |
CVE-2023-22997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/module/decompress.c | module_gzip_decompress | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
struct z_stream_s s = { 0 };
size_t new_size = 0;
size_t gzip_hdr_len;
ssize_t retval;
int rc;
gzip_hdr_len = module_gzip_header_len(buf, size);
if (!gzip_hdr_len) {
pr_err("not a gzip compr... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
struct z_stream_s s = { 0 };
size_t new_size = 0;
size_t gzip_hdr_len;
ssize_t retval;
int rc;
gzip_hdr_len = module_gzip_header_len(buf, size);
if (!gzip_hdr_len) {
pr_err("not a gzip compr... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
struct z_stream_s s = { 0 };
size_t new_size = 0;
size_t gzip_hdr_len;
ssize_t retval;
int rc;
gzip_hdr_len = module_gzip_header_len(buf, size);
if (!gzip_hdr_len) {
pr_err("not a gzip compr... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
struct z_stream_s s = { 0 };
size_t new_size = 0;
size_t gzip_hdr_len;
ssize_t retval;
int rc;
gzip_hdr_len = module_gzip_header_len(buf, size);
if (!gzip_hdr_len) {
pr_err("not a gzip compr... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
do {
struct page *page = module_get_next_page(info);
if (!page) {
retval = -ENOMEM;
goto out_inflate_end;
}
s.next_out = kmap_local_page(page);
s.avail_out = ... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
do {
struct page *page = module_get_next_page(info);
if (IS_ERR(page)) {
retval = PTR_ERR(page);
goto out_inflate_end;
}
s.next_out = kmap_local_page(page);
s... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
struct page *page = module_get_next_page(info);
if (!page) {
retval = -ENOMEM;
goto out_inflate_end;
}
s.next_o... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
struct page *page = module_get_next_page(info);
if (IS_ERR(page)) {
retval = PTR_ERR(page);
goto out_inflate_end;
}
... | static ssize_t module_gzip_decompress(struct load_info *info, const void *buf, size_t size) {
do {
struct page *page = module_get_next_page(info);
- if (!page) {
- retval = -ENOMEM;
+ if (IS_ERR(page)) {
+ retval = PTR_ERR(page);
goto out_inflate_end;
... |
CVE-2023-22997 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | kernel/module/decompress.c | module_xz_decompress | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
static const u8 signature[] = { 0xfd, '7', 'z', 'X', 'Z', 0 };
struct xz_dec *xz_dec;
struct xz_buf xz_buf;
enum xz_ret xz_ret;
size_t new_size = 0;
ssize_t retval;
if (size < sizeof(signature) || mem... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
static const u8 signature[] = { 0xfd, '7', 'z', 'X', 'Z', 0 };
struct xz_dec *xz_dec;
struct xz_buf xz_buf;
enum xz_ret xz_ret;
size_t new_size = 0;
ssize_t retval;
if (size < sizeof(signature) || mem... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
static const u8 signature[] = { 0xfd, '7', 'z', 'X', 'Z', 0 };
struct xz_dec *xz_dec;
struct xz_buf xz_buf;
enum xz_ret xz_ret;
size_t new_size = 0;
ssize_t retval;
if (size < sizeof(signature) || mem... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
static const u8 signature[] = { 0xfd, '7', 'z', 'X', 'Z', 0 };
struct xz_dec *xz_dec;
struct xz_buf xz_buf;
enum xz_ret xz_ret;
size_t new_size = 0;
ssize_t retval;
if (size < sizeof(signature) || mem... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
do {
struct page *page = module_get_next_page(info);
if (!page) {
retval = -ENOMEM;
goto out;
}
xz_buf.out = kmap_local_page(page);
xz_buf.out_pos = 0;
... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
do {
struct page *page = module_get_next_page(info);
if (IS_ERR(page)) {
retval = PTR_ERR(page);
goto out;
}
xz_buf.out = kmap_local_page(page);
xz_buf.out_pos ... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
struct page *page = module_get_next_page(info);
if (!page) {
retval = -ENOMEM;
goto out;
}
xz_buf.out = kmap_loca... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
do {
struct page *page = module_get_next_page(info);
if (IS_ERR(page)) {
retval = PTR_ERR(page);
goto out;
}
xz_buf.ou... | static ssize_t module_xz_decompress(struct load_info *info, const void *buf, size_t size) {
do {
struct page *page = module_get_next_page(info);
- if (!page) {
- retval = -ENOMEM;
+ if (IS_ERR(page)) {
+ retval = PTR_ERR(page);
goto out;
}
... |
CVE-2023-22999 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/usb/dwc3/dwc3-qcom.c | dwc3_qcom_probe | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
struct dwc3_qcom *qcom;
struct resource *res, *parent_res = NULL;
int ret, i;
bool ignore_pipe_clk;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNE... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
struct dwc3_qcom *qcom;
struct resource *res, *parent_res = NULL;
int ret, i;
bool ignore_pipe_clk;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNE... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
struct dwc3_qcom *qcom;
struct resource *res, *parent_res = NULL;
int ret, i;
bool ignore_pipe_clk;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNE... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
struct dwc3_qcom *qcom;
struct resource *res, *parent_res = NULL;
int ret, i;
bool ignore_pipe_clk;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNE... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL);
if (!qcom) {
return -ENOMEM;
}
platform_set_drvdata(pdev, qcom);
if (has_acpi_companion(... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL);
if (!qcom) {
return -ENOMEM;
}
platform_set_drvdata(pdev, qcom);
if (has_acpi_companion(... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL);
if (!qcom) {
return -ENOMEM;
}
platform_se... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL);
if (!qcom) {
return -ENOMEM;
}
platform_se... | static int dwc3_qcom_probe(struct platform_device *pdev) {
struct device_node *np = pdev->dev.of_node;
struct device *dev = &pdev->dev;
qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL);
if (!qcom) {
return -ENOMEM;
}
platform_set_drvdata(pdev, qcom);
if (has_acpi_c... |
CVE-2023-23001 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/scsi/ufs/ufs-mediatek.c | ufs_mtk_init_va09_pwr_ctrl | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (!host->reg_va09) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
}
} | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (IS_ERR(host->reg_va09)) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
... | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (!host->reg_va09) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
}
} | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (IS_ERR(host->reg_va09)) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
... | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (!host->reg_va09) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
}
}
| static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (IS_ERR(host->reg_va09)) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
... | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (!host->reg_va09) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
}
}
| static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
if (IS_ERR(host->reg_va09)) {
dev_info(hba->dev, "failed to get va09");
} else {
host->caps |= UFS_MTK_CAP_VA09_PWR_CTRL;
... | static void ufs_mtk_init_va09_pwr_ctrl(struct ufs_hba *hba) {
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
host->reg_va09 = regulator_get(hba->dev, "va09");
- if (!host->reg_va09) {
+ if (IS_ERR(host->reg_va09)) {
dev_info(hba->dev, "failed to get va09");
} else {
host->c... |
CVE-2023-23004 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/gpu/drm/arm/malidp_planes.c | malidp_check_pages_threshold | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
int i;
for (i = 0; i < ms->n_planes; i++) {
struct drm_gem_object *obj;
struct drm_gem_cma_object *cma_obj;
struct sg_table *sgt;
struct scatterlist *sgl;
obj = drm_gem_fb_get_obj(ms->ba... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
int i;
for (i = 0; i < ms->n_planes; i++) {
struct drm_gem_object *obj;
struct drm_gem_cma_object *cma_obj;
struct sg_table *sgt;
struct scatterlist *sgl;
obj = drm_gem_fb_get_obj(ms->ba... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
int i;
for (i = 0; i < ms->n_planes; i++) {
struct drm_gem_object *obj;
struct drm_gem_cma_object *cma_obj;
struct sg_table *sgt;
struct scatterlist *sgl;
obj = drm_gem_fb_get_obj(ms->ba... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
int i;
for (i = 0; i < ms->n_planes; i++) {
struct drm_gem_object *obj;
struct drm_gem_cma_object *cma_obj;
struct sg_table *sgt;
struct scatterlist *sgl;
obj = drm_gem_fb_get_obj(ms->ba... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
for (i = 0; i < ms->n_planes; i++) {
obj = drm_gem_fb_get_obj(ms->base.fb, i);
cma_obj = to_drm_gem_cma_obj(obj);
if (cma_obj->sgt) {
sgt = cma_obj->sgt;
} else {
sgt = obj->... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
for (i = 0; i < ms->n_planes; i++) {
obj = drm_gem_fb_get_obj(ms->base.fb, i);
cma_obj = to_drm_gem_cma_obj(obj);
if (cma_obj->sgt) {
sgt = cma_obj->sgt;
} else {
sgt = obj->... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < ms->n_planes; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
obj = drm_gem_fb_get_obj(ms->base.fb, i);
cma_obj = to_drm_gem_cma_obj(obj);
... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
for (i = 0; i < ms->n_planes; i++) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
obj = drm_gem_fb_get_obj(ms->base.fb, i);
cma_obj = to_drm_gem_cma_obj(obj);
... | static bool malidp_check_pages_threshold(struct malidp_plane_state *ms, u32 pgsize) {
for (i = 0; i < ms->n_planes; i++) {
obj = drm_gem_fb_get_obj(ms->base.fb, i);
cma_obj = to_drm_gem_cma_obj(obj);
if (cma_obj->sgt) {
sgt = cma_obj->sgt;
} else {
sgt... |
CVE-2023-23006 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c | dr_domain_init_resources | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
int ret;
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
if (ret) {
mlx5dr_dbg(dmn, "Couldn't allocate PD\n");
return ret;
}
dmn->uar = mlx5_get_uars_page(dmn->mdev);
if (!dmn->uar) {
mlx5dr_err(dmn, "Couldn... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
int ret;
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
if (ret) {
mlx5dr_dbg(dmn, "Couldn't allocate PD\n");
return ret;
}
dmn->uar = mlx5_get_uars_page(dmn->mdev);
if (IS_ERR(dmn->uar)) {
mlx5dr_err(dmn, ... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
int ret;
dmn->ste_ctx = mlx5dr_ste_get_ctx(dmn->info.caps.sw_format_ver);
if (!dmn->ste_ctx) {
mlx5dr_err(dmn, "SW Steering on this device is unsupported\n");
return -EOPNOTSUPP;
}
ret = mlx5_core_alloc_pd(dmn->mdev, &d... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
int ret;
dmn->ste_ctx = mlx5dr_ste_get_ctx(dmn->info.caps.sw_format_ver);
if (!dmn->ste_ctx) {
mlx5dr_err(dmn, "SW Steering on this device is unsupported\n");
return -EOPNOTSUPP;
}
ret = mlx5_core_alloc_pd(dmn->mdev, &d... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
dmn->uar = mlx5_get_uars_page(dmn->mdev);
if (!dmn->uar) {
mlx5dr_err(dmn, "Couldn't allocate UAR\n");
ret = -ENOMEM;
goto clean_pd;
}
dmn->ste_icm_pool = mlx5dr_i... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
dmn->uar = mlx5_get_uars_page(dmn->mdev);
if (IS_ERR(dmn->uar)) {
mlx5dr_err(dmn, "Couldn't allocate UAR\n");
ret = PTR_ERR(dmn->uar);
goto clean_pd;
}
dmn->ste_ic... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dmn->uar = mlx5_get_uars_page(dmn->mdev);
if (!dmn->uar) {
mlx5dr_err(dmn, "Couldn't al... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
dmn->uar = mlx5_get_uars_page(dmn->mdev);
if (IS_ERR(dmn->uar)) {
mlx5dr_err(dmn, "Coul... | static int dr_domain_init_resources(struct mlx5dr_domain *dmn) {
ret = mlx5_core_alloc_pd(dmn->mdev, &dmn->pdn);
dmn->uar = mlx5_get_uars_page(dmn->mdev);
- if (!dmn->uar) {
+ if (IS_ERR(dmn->uar)) {
mlx5dr_err(dmn, "Couldn't allocate UAR\n");
- ret = -ENOMEM;
+ ret = PTR_ERR(dmn... |
CVE-2023-23454 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_cbq.c | cbq_classify | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
struct cbq_class **defmap;
struct cbq_class *cl = NULL;
u32 prio = skb->priority;
struct tcf_proto *fl;
struct tcf_result... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
struct cbq_class **defmap;
struct cbq_class *cl = NULL;
u32 prio = skb->priority;
struct tcf_proto *fl;
struct tcf_result... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
struct cbq_class **defmap;
struct cbq_class *cl = NULL;
u32 prio = skb->priority;
struct tcf_proto *fl;
struct tcf_result... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
struct cbq_class **defmap;
struct cbq_class *cl = NULL;
u32 prio = skb->priority;
struct tcf_proto *fl;
struct tcf_result... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
u32 prio = skb->priority;
if (TC_H_MAJ(prio ^ sch->handle) == 0 && (cl = cbq_class_lookup(q, prio)) != NULL) {
return cl;
... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
u32 prio = skb->priority;
if (TC_H_MAJ(prio ^ sch->handle) == 0 && (cl = cbq_class_lookup(q, prio)) != NULL) {
return cl;
... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 prio = skb->priority;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (TC_... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
u32 prio = skb->priority;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (TC_... | static struct cbq_class * cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) {
struct cbq_sched_data *q = qdisc_priv(sch);
struct cbq_class *head = &q->link;
u32 prio = skb->priority;
if (TC_H_MAJ(prio ^ sch->handle) == 0 && (cl = cbq_class_lookup(q, prio)) != NULL) {
return c... |
CVE-2023-23455 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/sched/sch_atm.c | atm_tc_enqueue | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
struct atm_flow_data *flow;
struct tcf_result res;
int result;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
struct atm_flow_data *flow;
struct tcf_result res;
int result;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
struct atm_flow_data *flow;
struct tcf_result res;
int result;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
struct atm_flow_data *flow;
struct tcf_result res;
int result;
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
flow = NULL;
if (TC_H_MAJ(skb->priority) != sch->handle || !(flow = (struct atm_flow_data *)atm_t... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
flow = NULL;
if (TC_H_MAJ(skb->priority) != sch->handle || !(flow = (struct atm_flow_data *)atm_t... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
f... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
f... | static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) {
struct atm_qdisc_data *p = qdisc_priv(sch);
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
flow = NULL;
if (TC_H_MAJ(skb->priority) != sch->handle || !(flow = (struct atm_flow_data *)... |
CVE-2023-23559 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/wireless/rndis_wlan.c | rndis_query_oid | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret, buflen;
int... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret;
size_t bufl... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret, buflen;
int... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret;
size_t bufl... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret, buflen;
int... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret;
size_t bufl... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret, buflen;
int... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
int ret;
size_t bufl... | static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len) {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(dev);
union {
void *buf;
struct rndis_msg_hdr *header;
struct rndis_query *get;
struct rndis_query_c *get_c;
} u;
- int ret, buflen... |
CVE-2023-2483 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/net/ethernet/qualcomm/emac/emac.c | emac_remove | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
emac_clks_teardown(adpt);
put_device(&adpt->phydev->mdio.dev);
mdiobus... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
netif_carrier_off(netdev);
netif_tx_disable(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
free_irq(adpt->ir... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
emac_clks_teardown(adpt);
put_device(&adpt->phydev->mdio.dev);
mdiobus... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
netif_carrier_off(netdev);
netif_tx_disable(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
free_irq(adpt->ir... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
emac_clks_teardown(adpt);
free_netdev(netdev);
}
| static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
netif_carrier_off(netdev);
netif_tx_disable(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
free_irq(adpt->ir... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
emac_clks_teardown(adpt);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
netif_carrier_off(netdev);
netif_tx_disable(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
free_irq(adpt->ir... | static int emac_remove(struct platform_device *pdev) {
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
struct emac_adapter *adpt = netdev_priv(netdev);
+ netif_carrier_off(netdev);
+ netif_tx_disable(netdev);
unregister_netdev(netdev);
netif_napi_del(&adpt->rx_q.napi);
+ free_irq(... |
CVE-2023-25012 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-bigbenff.c | bigben_probe | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
struct bigben_device *bigben;
struct hid_input *hidinput;
struct list_head *report_list;
struct led_classdev *led;
char *name;
size_t name_sz;
int n, error;
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben),... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
bigben->work_ff = true;
schedule_work(&bigben->worker);
hid_info(hid, "LED a... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
bigben->work_ff = true;
bigben_schedule_work(bigben);
hid_info(hid, "LED and... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
/* PLACEHOLDER: DO NOT DELETE THIS... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
/* PLACEHOLDER: DO NOT DELETE THIS... | static int bigben_probe(struct hid_device *hid, const struct hid_device_id *id) {
bigben = devm_kzalloc(&hid->dev, sizeof(*bigben), GFP_KERNEL);
if (!bigben) {
return -ENOMEM;
}
hid_set_drvdata(hid, bigben);
bigben->work_ff = true;
- schedule_work(&bigben->worker);
+ bigben_sche... |
CVE-2023-25012 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-bigbenff.c | bigben_set_led | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
int n;
bool work;
unsigned long flags;
if (!bigben) {
hid_err(hid... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
int n;
bool work;
unsigned long flags;
if (!bigben) {
hid_err(hid... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
int n;
bool work;
unsigned long flags;
if (!bigben) {
hid_err(hid... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
int n;
bool work;
unsigned long flags;
if (!bigben) {
hid_err(hid... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
if (!bigben) {
return;
}
for (n = 0; n < NUM_LEDS; n++) {
if ... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
if (!bigben) {
return;
}
for (n = 0; n < NUM_LEDS; n++) {
if ... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!bigben) {
/* PLACEHOLDER: ... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!bigben) {
/* PLACEHOLDER: ... | static void bigben_set_led(struct led_classdev *led, enum led_brightness value) {
struct device *dev = led->dev->parent;
struct hid_device *hid = to_hid_device(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
if (!bigben) {
return;
}
for (n = 0; n < NUM_LEDS; n++) {
... |
CVE-2023-25012 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-bigbenff.c | bigben_worker | static void bigben_worker(struct work_struct *work) {
struct bigben_device *bigben = container_of(work, struct bigben_device, worker);
struct hid_field *report_field = bigben->report->field[0];
bool do_work_led = false;
bool do_work_ff = false;
u8 *buf;
u32 len;
unsigned long flags;
if (... | static void bigben_worker(struct work_struct *work) {
struct bigben_device *bigben = container_of(work, struct bigben_device, worker);
struct hid_field *report_field = bigben->report->field[0];
bool do_work_led = false;
bool do_work_ff = false;
u8 *buf;
u32 len;
unsigned long flags;
buf ... | static void bigben_worker(struct work_struct *work) {
struct bigben_device *bigben = container_of(work, struct bigben_device, worker);
struct hid_field *report_field = bigben->report->field[0];
bool do_work_led = false;
bool do_work_ff = false;
u8 *buf;
u32 len;
unsigned long flags;
if (... | static void bigben_worker(struct work_struct *work) {
struct bigben_device *bigben = container_of(work, struct bigben_device, worker);
struct hid_field *report_field = bigben->report->field[0];
bool do_work_led = false;
bool do_work_ff = false;
u8 *buf;
u32 len;
unsigned long flags;
buf ... | static void bigben_worker(struct work_struct *work) {
bool do_work_ff = false;
unsigned long flags;
if (bigben->removed) {
return;
}
buf = hid_alloc_report_buf(bigben->report, GFP_KERNEL);
}
| static void bigben_worker(struct work_struct *work) {
bool do_work_ff = false;
unsigned long flags;
buf = hid_alloc_report_buf(bigben->report, GFP_KERNEL);
}
| static void bigben_worker(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool do_work_ff = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long flags;
if (bigben->removed) {
return;
}
buf = hid_alloc_report_buf(bigben->report, GFP_KERNEL);
... | static void bigben_worker(struct work_struct *work) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
bool do_work_ff = false;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
unsigned long flags;
buf = hid_alloc_report_buf(bigben->report, GFP_KERNEL);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
} | static void bigben_worker(struct work_struct *work) {
bool do_work_ff = false;
unsigned long flags;
- if (bigben->removed) {
- return;
- }
buf = hid_alloc_report_buf(bigben->report, GFP_KERNEL);
} |
CVE-2023-25012 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | drivers/hid/hid-bigbenff.c | hid_bigben_play_effect | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
u8 right_motor_on;
u8 left_motor_force;
unsigned long flags;
if (!bigben) {
hid_err(hid, ... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
u8 right_motor_on;
u8 left_motor_force;
unsigned long flags;
if (!bigben) {
hid_err(hid, ... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
u8 right_motor_on;
u8 left_motor_force;
unsigned long flags;
if (!bigben) {
hid_err(hid, ... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
u8 right_motor_on;
u8 left_motor_force;
unsigned long flags;
if (!bigben) {
hid_err(hid, ... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
if (!bigben) {
return 0;
}
if (right_motor_on != bigben->right_motor_on || left_motor_force !... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
if (!bigben) {
return 0;
}
if (right_motor_on != bigben->right_motor_on || left_motor_force !... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!bigben) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!bigben) {
/* PLACEHOLDER: DO NOT DELETE THIS COMME... | static int hid_bigben_play_effect(struct input_dev *dev, void *data, struct ff_effect *effect) {
struct hid_device *hid = input_get_drvdata(dev);
struct bigben_device *bigben = hid_get_drvdata(hid);
if (!bigben) {
return 0;
}
if (right_motor_on != bigben->right_motor_on || left_motor_... |
CVE-2023-2513 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ext4/xattr.c | ext4_xattr_ibody_find | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_inode *raw_inode;
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
h... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_inode *raw_inode;
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
he... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_inode *raw_inode;
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
h... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_inode *raw_inode;
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
he... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
header = IHDR(inode, raw_inode);
is->s.base = is->s.first = IFIRST(header);... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
header = IHDR(inode, raw_inode);
is->s.base = is->s.first = IFIRST(header);
... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
header = IHDR(inode, raw_inod... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
}
raw_inode = ext4_raw_inode(&is->iloc)... | int ext4_xattr_ibody_find(struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
int error;
- if (EXT4_I(inode)->i_extra_isize == 0) {
+ if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return 0;
}
raw_inode = ext4_raw_inode(&is->iloc);
header = IHDR(inode, raw_in... |
CVE-2023-2513 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ext4/xattr.c | ext4_xattr_ibody_set | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_search *s = &is->s;
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return -ENOSPC;
}
error = ext4_... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_search *s = &is->s;
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return -ENOSPC;
}
error = ext4_x... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_search *s = &is->s;
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return -ENOSPC;
}
error = ext4_... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_search *s = &is->s;
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return -ENOSPC;
}
error = ext4_x... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_search *s = &is->s;
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return -ENOSPC;
}
error = ext4_xattr_set_entry(i, s, handle, inode, false )... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_search *s = &is->s;
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return -ENOSPC;
}
error = ext4_xattr_set_entry(i, s, handle, inode, false );... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ext4_xattr_search *s = &is->s;
int error;
if (EXT4_I(inode)->i_extra_isize == 0) {
return -ENOSPC;
}
error =... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ext4_xattr_search *s = &is->s;
int error;
if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return -ENOSPC;
}
error = ... | int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode, struct ext4_xattr_info *i, struct ext4_xattr_ibody_find *is) {
struct ext4_xattr_search *s = &is->s;
int error;
- if (EXT4_I(inode)->i_extra_isize == 0) {
+ if (!EXT4_ODE_HAS_XATTR_SPACE(inode)) {
return -ENOSPC;
}
error... |
CVE-2023-26544 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/inode.c | ntfs_read_mft | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
int err = 0;
struct ntfs_inode *ni = ntfs_i(inode);
struct super_block *sb = inode->i_sb;
struct ntfs_sb_info *sbi = sb->s_fs_info;
mode_t mode = 0;
struct ATTR_STD_FO5 *std5 = NULL;
... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
le = NULL;
attr = NULL;
next_attr:
run = NULL;
err = -EVAL;
attr = ni_enum_attr_ex(ni, attr, &le, NULL);
if (!attr) {
goto end_enum;... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
le = NULL;
attr = NULL;
next_attr:
run = NULL;
err = -EVAL;
attr = ni_enum_attr_ex(ni, attr, &le, NULL);
if (!attr) {
goto end_enum;... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ntfs_inode *ni = ntfs_i(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
le = NULL;
attr = NULL;
next_attr:
run = NULL;
e... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct ntfs_inode *ni = ntfs_i(inode);
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
le = NULL;
attr = NULL;
next_attr:
run = NULL;
e... | static struct inode *ntfs_read_mft(struct inode *inode, const struct cpu_str *name, const struct MFT_REF *ref) {
struct ntfs_inode *ni = ntfs_i(inode);
le = NULL;
attr = NULL;
next_attr:
run = NULL;
err = -EVAL;
attr = ni_enum_attr_ex(ni, attr, &le, NULL);
if (!attr) {
goto... |
CVE-2023-26545 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mpls/af_mpls.c | mpls_dev_sysctl_register | static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
char path[sizeof("net/mpls/conf/") + IFNAMSIZ];
struct net *net = dev_net(dev);
struct ctl_table *table;
int i;
table = kmemdup(&mpls_dev_table, sizeof(mpls_dev_table), GFP_KERNEL);
if (!table) {
goto ou... | static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
char path[sizeof("net/mpls/conf/") + IFNAMSIZ];
struct net *net = dev_net(dev);
struct ctl_table *table;
int i;
table = kmemdup(&mpls_dev_table, sizeof(mpls_dev_table), GFP_KERNEL);
if (!table) {
goto ou... | static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
char path[sizeof("net/mpls/conf/") + IFNAMSIZ];
struct net *net = dev_net(dev);
struct ctl_table *table;
int i;
table = kmemdup(&mpls_dev_table, sizeof(mpls_dev_table), GFP_KERNEL);
if (!table) {
goto ou... | static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
char path[sizeof("net/mpls/conf/") + IFNAMSIZ];
struct net *net = dev_net(dev);
struct ctl_table *table;
int i;
table = kmemdup(&mpls_dev_table, sizeof(mpls_dev_table), GFP_KERNEL);
if (!table) {
goto ou... | static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
if (!table) {
goto out;
}
free:
kfree(table);
out:
return -ENOBUFS;
}
| static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
if (!table) {
goto out;
}
free:
kfree(table);
out:
mdev->sysctl = NULL;
return -ENOBUFS;
}
| static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!table) {
goto out;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
free:
kfree(table);
out:
return -ENOBUFS;
}
| static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
if (!table) {
goto out;
}
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
free:
kfree(table);
out:
mdev->sysctl = NULL;
return -ENOBUFS;
} | static int mpls_dev_sysctl_register(struct net_device *dev, struct mpls_dev *mdev) {
if (!table) {
goto out;
}
free:
kfree(table);
out:
+ mdev->sysctl = NULL;
return -ENOBUFS;
} |
CVE-2023-26545 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | net/mpls/af_mpls.c | mpls_dev_sysctl_unregister | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netconf_notify_devconf(net, RTM_DELNETCONF, 0, mdev)... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
if (!mdev->sysctl) {
return;
}
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netco... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netconf_notify_devconf(net, RTM_DELNETCONF, 0, mdev)... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
if (!mdev->sysctl) {
return;
}
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netco... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netconf_notify_devconf(net, RTM_DELNETCONF, 0, mdev)... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
if (!mdev->sysctl) {
return;
}
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netco... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netconf_notify_devconf(net, RTM_DELNETCONF, 0, mdev)... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
if (!mdev->sysctl) {
return;
}
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
mpls_netco... | static void mpls_dev_sysctl_unregister(struct net_device *dev, struct mpls_dev *mdev) {
struct net *net = dev_net(dev);
struct ctl_table *table;
+ if (!mdev->sysctl) {
+ return;
+ }
table = mdev->sysctl->ctl_table_arg;
unregister_net_sysctl_table(mdev->sysctl);
kfree(table);
... |
CVE-2023-26606 | linux | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux | fs/ntfs3/bitmap.c | ntfs_trim_fs | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
int err = 0;
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
u32 wbits = 8 * sb->s_blocksize;
CLST len = 0, lcn = 0, done = 0;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_f... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
int err = 0;
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
u32 wbits = 8 * sb->s_blocksize;
CLST len = 0, lcn = 0, done = 0;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_f... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
int err = 0;
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
u32 wbits = 8 * sb->s_blocksize;
CLST len = 0, lcn = 0, done = 0;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_f... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
int err = 0;
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
u32 wbits = 8 * sb->s_blocksize;
CLST len = 0, lcn = 0, done = 0;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_f... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_from = bytes_to_cluster(sbi, range->start);
size_t iw = lcn_from >> (sb->s_blocksize_bit... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_from = bytes_to_cluster(sbi, range->start);
size_t iw = lcn_from >> (sb->s_blocksize_bit... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
CLST minlen = bytes_to_cluster(sbi, range->minlen);
C... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
/* PLACEHOLDER: DO NOT DELETE THIS COMMENT */
CLST minlen = bytes_to_cluster(sbi, range->minlen);
C... | int ntfs_trim_fs(struct ntfs_sb_info *sbi, struct fstrim_range *range) {
struct super_block *sb = sbi->sb;
struct wnd_bitmap *wnd = &sbi->used.bitmap;
CLST minlen = bytes_to_cluster(sbi, range->minlen);
CLST lcn_from = bytes_to_cluster(sbi, range->start);
size_t iw = lcn_from >> (sb->s_blocksi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.