func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
unsigned char *lpNew(void) {
unsigned char *lp = lp_malloc(LP_HDR_SIZE+1);
if (lp == NULL) return NULL;
lpSetTotalBytes(lp,LP_HDR_SIZE+1);
lpSetNumElements(lp,0);
lp[LP_HDR_SIZE] = LP_EOF;
return lp;
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 24,743,366,338,601,180,000,000,000,000,000,000,000 | 8 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
MYSQL *mysql_dr_connect(
SV* dbh,
MYSQL* sock,
char* mysql_socket,
char* host,
char* port,
char* user,
char* password,
char* dbname,
... | 0 | [
"CWE-125"
] | DBD-mysql | 793b72b1a0baa5070adacaac0e12fd995a6fbabe | 61,973,984,344,490,660,000,000,000,000,000,000,000 | 478 | Added Pali's fix for CVE-2016-1249 |
void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
{
/* Address WBINVD may be executed by guest */
if (need_emulate_wbinvd(vcpu)) {
if (kvm_x86_ops->has_wbinvd_exit())
cpumask_set_cpu(cpu, vcpu->arch.wbinvd_dirty_mask);
else if (vcpu->cpu != -1 && vcpu->cpu != cpu)
smp_call_function_single(vcpu->cpu,
... | 0 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 288,297,595,386,573,100,000,000,000,000,000,000,000 | 44 | KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per... |
bool Item_field::check_field_expression_processor(void *arg)
{
Field *org_field= (Field*) arg;
if (field->flags & NO_DEFAULT_VALUE_FLAG)
return 0;
if ((field->default_value && field->default_value->flags) || field->vcol_info)
{
if (field == org_field ||
(!org_field->vcol_info && field->vcol_info... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 68,227,266,792,351,110,000,000,000,000,000,000,000 | 21 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
struct ib_device *ib_dev)
{
struct ib_uverbs_file *file;
struct ib_uverbs_event_file *event_file;
struct ib_event event;
/* Pending running commands to terminate */
synchronize_srcu(&uverbs_dev->disassociate_srcu);
event.event = IB... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 271,958,594,273,654,100,000,000,000,000,000,000,000 | 61 | IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory... |
absl::optional<CelValue> UpstreamWrapper::operator[](CelValue key) const {
if (!key.IsString()) {
return {};
}
auto value = key.StringOrDie().value();
if (value == Address) {
auto upstream_host = info_.upstreamHost();
if (upstream_host != nullptr && upstream_host->address() != nullptr) {
retur... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 270,301,745,100,341,300,000,000,000,000,000,000,000 | 23 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
void ndpi_set_proto_breed(struct ndpi_detection_module_struct *ndpi_str, u_int16_t protoId, ndpi_protocol_breed_t breed) {
if(protoId >= NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS)
return;
else
ndpi_str->proto_defaults[protoId].protoBreed = breed;
} | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 259,822,955,502,559,760,000,000,000,000,000,000,000 | 6 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
sec_process_crypt_info(STREAM s)
{
uint8 *server_random = NULL;
uint8 modulus[SEC_MAX_MODULUS_SIZE];
uint8 exponent[SEC_EXPONENT_SIZE];
uint32 rc4_key_size;
logger(Protocol, Debug, "%s()", __func__);
memset(modulus, 0, sizeof(modulus));
memset(exponent, 0, sizeof(exponent));
if (!sec_parse_crypt_info(s, &rc4_... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 233,784,665,324,449,400,000,000,000,000,000,000,000 | 20 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
static int rtrs_post_send_rdma(struct rtrs_clt_con *con,
struct rtrs_clt_io_req *req,
struct rtrs_rbuf *rbuf, u32 off,
u32 imm, struct ib_send_wr *wr)
{
struct rtrs_clt_path *clt_path = to_clt_path(con->c.path);
enum ib_send_flags flags;
struct ib_sge sge;
if (!req->sg_size) {
rtrs_wrn(con->c.path,
... | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 63,409,825,373,733,850,000,000,000,000,000,000,000 | 35 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
void snd_usb_unlock_shutdown(struct snd_usb_audio *chip)
{
snd_usb_autosuspend(chip);
if (atomic_dec_and_test(&chip->usage_count))
wake_up(&chip->shutdown_wait);
} | 0 | [
"CWE-284",
"CWE-125"
] | linux | bfc81a8bc18e3c4ba0cbaa7666ff76be2f998991 | 47,664,227,744,880,650,000,000,000,000,000,000,000 | 6 | ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor
When a USB-audio device receives a maliciously adjusted or corrupted
buffer descriptor, the USB-audio driver may access an out-of-bounce
value at its parser. This was detected by syzkaller, something like:
BUG: KASAN: slab-out-of-bounds in ... |
static void kmem_cgroup_destroy(struct cgroup_subsys *ss,
struct cgroup *cont)
{
mem_cgroup_sockets_destroy(cont, ss);
} | 0 | [
"CWE-476",
"CWE-415"
] | linux | 371528caec553785c37f73fa3926ea0de84f986f | 192,249,758,882,877,670,000,000,000,000,000,000,000 | 5 | mm: memcg: Correct unregistring of events attached to the same eventfd
There is an issue when memcg unregisters events that were attached to
the same eventfd:
- On the first call mem_cgroup_usage_unregister_event() removes all
events attached to a given eventfd, and if there were no events left,
thresholds->prima... |
static void rb_time_set(rb_time_t *t, u64 val)
{
unsigned long cnt, top, bottom;
rb_time_split(val, &top, &bottom);
/* Writes always succeed with a valid number even if it gets interrupted. */
do {
cnt = local_inc_return(&t->cnt);
rb_time_val_set(&t->top, top, cnt);
rb_time_val_set(&t->bottom, bottom, cnt);... | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 121,860,920,663,154,050,000,000,000,000,000,000,000 | 13 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
int o2nm_depend_this_node(void)
{
int ret = 0;
struct o2nm_node *local_node;
local_node = o2nm_get_node_by_num(o2nm_this_node());
if (!local_node) {
ret = -EINVAL;
goto out;
}
ret = o2nm_depend_item(&local_node->nd_item);
o2nm_node_put(local_node);
out:
return ret;
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 853bc26a7ea39e354b9f8889ae7ad1492ffa28d2 | 260,294,237,068,656,270,000,000,000,000,000,000,000 | 17 | ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent
The subsystem.su_mutex is required while accessing the item->ci_parent,
otherwise, NULL pointer dereference to the item->ci_parent will be
triggered in the following situation:
add node delete node
sys_write
vfs_write
con... |
PixelFormat qemu_default_pixelformat(int bpp)
{
pixman_format_code_t fmt = qemu_default_pixman_format(bpp, true);
PixelFormat pf = qemu_pixelformat_from_pixman(fmt);
return pf;
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 276,836,778,823,944,700,000,000,000,000,000,000,000 | 6 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
decode_prefix6(netdissect_options *ndo,
const u_char *pd, u_int itemlen, char *buf, u_int buflen)
{
struct in6_addr addr;
u_int plen, plenbytes;
ND_TCHECK(pd[0]);
ITEMCHECK(1);
plen = pd[0];
if (128 < plen)
return -1;
itemlen -= 1;
memset(&addr, 0, sizeof(addr));
plenbytes = (plen + 7) / 8;
... | 0 | [
"CWE-674",
"CWE-787"
] | tcpdump | af2cf04a9394c1a56227c2289ae8da262828294a | 190,873,263,482,901,950,000,000,000,000,000,000,000 | 31 | (for 4.9.3) CVE-2018-16300/BGP: prevent stack exhaustion
Enforce a limit on how many times bgp_attr_print() can recurse.
This fixes a stack exhaustion discovered by Include Security working
under the Mozilla SOS program in 2018 by means of code audit. |
static void v4l_print_dv_timings_cap(const void *arg, bool write_only)
{
const struct v4l2_dv_timings_cap *p = arg;
switch (p->type) {
case V4L2_DV_BT_656_1120:
pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n",
p->bt.min_width, p->bt.max_width,
... | 0 | [
"CWE-401"
] | linux | fb18802a338b36f675a388fc03d2aa504a0d0899 | 200,481,064,392,735,730,000,000,000,000,000,000,000 | 17 | media: v4l: ioctl: Fix memory leak in video_usercopy
When an IOCTL with argument size larger than 128 that also used array
arguments were handled, two memory allocations were made but alas, only
the latter one of them was released. This happened because there was only
a single local variable to hold such a temporary a... |
int posix_cpu_clock_get(const clockid_t which_clock, struct timespec *tp)
{
const pid_t pid = CPUCLOCK_PID(which_clock);
int error = -EINVAL;
union cpu_time_count rtn;
if (pid == 0) {
/*
* Special case constant value for our own clocks.
* We don't have to do any lookup to find ourselves.
*/
if (CPUCLO... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 236,557,346,998,954,130,000,000,000,000,000,000,000 | 55 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
static void check_bt_irq(struct smi_info *smi_info, bool irq_on)
{
u8 irqstate = smi_info->io.inputb(&smi_info->io, IPMI_BT_INTMASK_REG);
irqstate &= IPMI_BT_INTMASK_ENABLE_IRQ_BIT;
if ((bool)irqstate == irq_on)
return;
if (irq_on)
smi_info->io.outputb(&smi_info->io, IPMI_BT_INTMASK_REG,
IPMI_BT_INT... | 0 | [
"CWE-416"
] | linux | 401e7e88d4ef80188ffa07095ac00456f901b8c4 | 245,068,400,443,643,060,000,000,000,000,000,000,000 | 15 | ipmi_si: fix use-after-free of resource->name
When we excute the following commands, we got oops
rmmod ipmi_si
cat /proc/ioports
[ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
[ 1623.482382] Mem abort info:
[ 1623.482383] ESR = 0x96000007
[ 1623.482385] Exception class =... |
do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info)
{
struct task_struct *p;
int error = -ESRCH;
rcu_read_lock();
p = find_task_by_vpid(pid);
if (p && (tgid <= 0 || task_tgid_vnr(p) == tgid)) {
error = check_kill_permission(sig, info, p);
/*
* The null signal is a permissions and process... | 0 | [] | linux-2.6 | da48524eb20662618854bb3df2db01fc65f3070c | 212,823,904,134,781,000,000,000,000,000,000,000,000 | 28 | Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code
Userland should be able to trust the pid and uid of the sender of a
signal if the si_code is SI_TKILL.
Unfortunately, the kernel has historically allowed sigqueueinfo() to
send any si_code at all (as long as it was negative - to distinguish i... |
Network::UdpListener& ActiveUdpListener::udpListener() { return *udp_listener_; } | 0 | [
"CWE-835"
] | envoy | c8de199e2971f79cbcbc6b5eadc8c566b28705d1 | 154,762,324,365,585,180,000,000,000,000,000,000,000 | 1 | listener: clean up accept filter before creating connection (#8922)
Signed-off-by: Yuchen Dai <silentdai@gmail.com> |
static uint16_t rtl8139_CSCR_read(RTL8139State *s)
{
uint16_t ret = s->CSCR;
DPRINTF("CSCR read val=0x%04x\n", ret);
return ret;
} | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 73,771,206,634,094,100,000,000,000,000,000,000,000 | 8 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
AssertNoContextChange() { } | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 246,043,133,258,903,520,000,000,000,000,000,000,000 | 1 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
static const char *cmd_audit_log_filemode(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
if (dcfg == NULL) return NULL;
if (strcasecmp(p1, "default") == 0) {
dcfg->auditlog_fileperms = NOT_SET;
}
else {
long int mode = str... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 242,860,739,816,642,380,000,000,000,000,000,000,000 | 21 | Added SecXmlExternalEntity |
static void rtrs_clt_add_path_to_arr(struct rtrs_clt_path *clt_path)
{
struct rtrs_clt_sess *clt = clt_path->clt;
mutex_lock(&clt->paths_mutex);
clt->paths_num++;
list_add_tail_rcu(&clt_path->s.entry, &clt->paths_list);
mutex_unlock(&clt->paths_mutex);
} | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 308,402,269,267,858,150,000,000,000,000,000,000,000 | 10 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
static int http_should_fail(struct connectdata *conn)
{
struct SessionHandle *data;
int httpcode;
DEBUGASSERT(conn);
data = conn->data;
DEBUGASSERT(data);
httpcode = data->req.httpcode;
/*
** If we haven't been asked to fail on error,
** don't fail.
*/
if(!data->set.http_fail_on_error)
retu... | 0 | [
"CWE-284"
] | curl | 79b9d5f1a42578f807a6c94914bc65cbaa304b6d | 272,279,134,688,407,060,000,000,000,000,000,000,000 | 62 | http_done: close Negotiate connections when done
When doing HTTP requests Negotiate authenticated, the entire connnection
may become authenticated and not just the specific HTTP request which is
otherwise how HTTP works, as Negotiate can basically use NTLM under the
hood. curl was not adhering to this fact but would a... |
static struct io_kiocb *io_req_link_next(struct io_kiocb *req)
{
struct io_kiocb *nxt;
/*
* The list should never be empty when we are called here. But could
* potentially happen if the chain is messed up, check to be on the
* safe side.
*/
if (unlikely(list_empty(&req->link_list)))
return NULL;
nxt = l... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 238,553,642,504,763,350,000,000,000,000,000,000,000 | 18 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static char *usb_get_fw_dev_path(DeviceState *qdev)
{
USBDevice *dev = USB_DEVICE(qdev);
char *fw_path, *in;
ssize_t pos = 0, fw_len;
long nr;
fw_len = 32 + strlen(dev->port->path) * 6;
fw_path = g_malloc(fw_len);
in = dev->port->path;
while (fw_len - pos > 0) {
nr = strtol(in, ... | 0 | [
"CWE-119"
] | qemu | 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a | 319,692,437,697,798,870,000,000,000,000,000,000,000 | 25 | usb: sanity check setup_index+setup_len in post_load
CVE-2013-4541
s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.
setup_len and setup_index should be checked to make sure
they are not negative.
Cc:... |
GF_Err gf_isom_track_cenc_add_sample_info(GF_ISOFile *the_file, u32 trackNumber, u32 container_type, u8 *buf, u32 len, Bool use_subsamples, Bool use_saio_32bit, Bool use_multikey)
{
GF_SampleEncryptionBox *senc;
GF_CENCSampleAuxInfo *sai;
GF_SampleTableBox *stbl;
GF_TrackBox *trak = gf_isom_get_track_from_file(the_... | 0 | [
"CWE-476"
] | gpac | 3b84ffcbacf144ce35650df958432f472b6483f8 | 242,635,886,286,773,680,000,000,000,000,000,000,000 | 49 | fixed #1735 |
TEST(ComparisonMatchExpression, ComparisonMatchExpressionsWithUnequalCollatorsAreUnequal) {
BSONObj operand = BSON("a" << 5);
CollatorInterfaceMock collator1(CollatorInterfaceMock::MockType::kReverseString);
EqualityMatchExpression eq1("a", operand["a"]);
eq1.setCollator(&collator1);
CollatorInterfa... | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 131,874,437,583,783,970,000,000,000,000,000,000,000 | 10 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
bgp_get_af_desc(u32 afi)
{
uint i;
for (i = 0; i < ARRAY_SIZE(bgp_af_table); i++)
if (bgp_af_table[i].afi == afi)
return &bgp_af_table[i];
return NULL;
} | 0 | [
"CWE-787"
] | bird | 8388f5a7e14108a1458fea35bfbb5a453e2c563c | 36,873,469,242,166,070,000,000,000,000,000,000,000 | 9 | BGP: Fix bugs in handling of shutdown messages
There is an improper check for valid message size, which may lead to
stack overflow and buffer leaks to log when a large message is received.
Thanks to Daniel McCarney for bugreport and analysis. |
*/
int netif_get_num_default_rss_queues(void)
{
return min_t(int, DEFAULT_MAX_NUM_RSS_QUEUES, num_online_cpus()); | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 304,039,609,460,281,300,000,000,000,000,000,000,000 | 4 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
size_t GetCpuCount ()
{
KAFFINITY activeCpuMap = KeQueryActiveProcessors();
size_t mapSize = sizeof (activeCpuMap) * 8;
size_t cpuCount = 0;
while (mapSize--)
{
if (activeCpuMap & 1)
++cpuCount;
activeCpuMap >>= 1;
}
if (cpuCount == 0)
return 1;
return cpuCount;
} | 0 | [
"CWE-119",
"CWE-787"
] | VeraCrypt | f30f9339c9a0b9bbcc6f5ad38804af39db1f479e | 187,630,622,223,620,300,000,000,000,000,000,000,000 | 19 | Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison. |
ecma_bigint_div_mod (ecma_value_t left_value, /**< left BigInt value */
ecma_value_t right_value, /**< right BigInt value */
bool is_mod) /**< true if return with remainder */
{
JERRY_ASSERT (ecma_is_value_bigint (left_value) && ecma_is_value_bigint (right_value));
if (rig... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 127,321,269,191,448,900,000,000,000,000,000,000,000 | 73 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
explicit UserDataLink(base::WeakPtr<WebContents> contents)
: web_contents(contents) {} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 74,476,327,800,405,240,000,000,000,000,000,000,000 | 2 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static inline u32 tcp_receive_window(const struct tcp_sock *tp)
{
s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt;
if (win < 0)
win = 0;
return (u32) win;
} | 0 | [
"CWE-416",
"CWE-269"
] | linux | bb1fceca22492109be12640d49f5ea5a544c6bb4 | 100,107,453,147,019,430,000,000,000,000,000,000,000 | 8 | tcp: fix use after free in tcp_xmit_retransmit_queue()
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()
Then it attempts to copy user data into this fresh skb.
If the copy fails, we undo the work and remove the fresh skb.
Unfortunately, t... |
int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd)
{
uchar UNINIT_VAR(c);
bool comment_closed;
int tokval;
uint length;
enum my_lex_states state;
LEX *lex= thd->lex;
CHARSET_INFO *const cs= thd->charset();
const uchar *const state_map= cs->state_map;
const uchar *const ident_map= cs->ident... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 282,467,991,163,387,900,000,000,000,000,000,000,000 | 596 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
int what, xmlChar end, xmlChar end2, xmlChar end3) {
xmlChar *buffer = NULL;
size_t buffer_size = 0;
size_t nbchars = 0;
xmlChar *current = NULL;
xmlChar *rep = NULL;
const xmlChar *last;
xmlEntityPtr en... | 1 | [] | libxml2 | 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 | 216,072,394,997,574,700,000,000,000,000,000,000,000 | 170 | Fix infinite loop in xmlStringLenDecodeEntities
When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef
return NULL which cause a infinite loop in xmlStringLenDecodeEntities
Found with libFuzzer.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
decode_OFPAT_RAW15_METER(uint32_t meter_id,
enum ofp_version ofp_version OVS_UNUSED,
struct ofpbuf *out)
{
struct ofpact_meter *om = ofpact_put_METER(out);
om->meter_id = meter_id;
om->provider_meter_id = UINT32_MAX; /* No provider meter ID. */
return 0;... | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 69,654,579,790,063,700,000,000,000,000,000,000,000 | 9 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
void PreluFree(TfLiteContext* context, void* buffer) {
delete reinterpret_cast<PreluOpData*>(buffer);
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 216,063,938,857,234,170,000,000,000,000,000,000,000 | 3 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
flatpak_dir_read_active (FlatpakDir *self,
const char *ref,
GCancellable *cancellable)
{
g_autoptr(GFile) deploy_base = NULL;
g_autoptr(GFile) active_link = NULL;
g_autoptr(GFileInfo) file_info = NULL;
deploy_base = flatpak_dir_get_deploy_dir (self, ref);
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 240,287,186,454,425,700,000,000,000,000,000,000,000 | 19 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
repeat(p, start, from, to)
register struct parse *p;
sopno start; /* operand from here to end of strip */
int from; /* repeated from this number */
int to; /* to this number of times (maybe INFINITY) */
{
register sopno finish = HERE();
# define N 2
# define INF 3
# define REP(f, t) ((f)*8 + (t))
# define MAP(n... | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 9,600,920,478,005,147,000,000,000,000,000,000,000 | 66 | Fixed bug #68739 #68740 #68741 |
void *js_savetrypc(js_State *J, js_Instruction *pc)
{
if (J->trytop == JS_TRYLIMIT)
js_error(J, "try: exception stack overflow");
J->trybuf[J->trytop].E = J->E;
J->trybuf[J->trytop].envtop = J->envtop;
J->trybuf[J->trytop].tracetop = J->tracetop;
J->trybuf[J->trytop].top = J->top;
J->trybuf[J->trytop].bot = J->... | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 34,678,971,904,841,980,000,000,000,000,000,000,000 | 12 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
vncProperties::LoadPassword(HKEY key, char *buffer)
{
DWORD type = REG_BINARY;
int slen=MAXPWLEN;
char inouttext[MAXPWLEN];
// Retrieve the encrypted password
if (RegQueryValueEx(key,
"Password",
NULL,
&type,
(LPBYTE) &inouttext,
(LPDWORD) &slen) != ERROR_SUCCESS)
return;
if (slen > M... | 0 | [
"CWE-787"
] | UltraVNC | 36a31b37b98f70c1db0428f5ad83170d604fb352 | 218,342,652,503,108,500,000,000,000,000,000,000,000 | 20 | security fix |
static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
long len, const ASN1_ITEM *it,
int tag, int aclass, char opt, ASN1_TLC *ctx,
int depth)
{
const ASN1_TEMPLATE *tt, *errtt = NULL;
const ASN1_EX... | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | openssl | 2ac4c6f7b2b2af20c0e2b0ba05367e454cd11b33 | 233,074,512,147,071,080,000,000,000,000,000,000,000 | 296 | Limit ASN.1 constructed types recursive definition depth
Constructed types with a recursive definition (such as can be found in
PKCS7) could eventually exceed the stack given malicious input with
excessive recursion. Therefore we limit the stack depth.
CVE-2018-0739
Credit to OSSFuzz for finding this issue.
Reviewe... |
static void client_cut_text(VncState *vs, size_t len, uint8_t *text)
{
} | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 238,848,113,779,574,280,000,000,000,000,000,000,000 | 3 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
void vnc_zrle_clear(VncState *vs)
{
if (vs->zrle.stream.opaque) {
deflateEnd(&vs->zrle.stream);
}
buffer_free(&vs->zrle.zrle);
buffer_free(&vs->zrle.fb);
buffer_free(&vs->zrle.zlib);
} | 1 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 111,462,368,938,314,510,000,000,000,000,000,000,000 | 9 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... |
R_API bool r_bin_file_close(RBin *bin, int bd) {
r_return_val_if_fail (bin, false);
RBinFile *bf = r_id_storage_take (bin->ids, bd);
if (bf) {
// file_free removes the fd already.. maybe its unnecessary
r_id_storage_delete (bin->ids, bd);
r_bin_file_free (bf);
return true;
}
return false;
} | 0 | [
"CWE-125"
] | radare2 | 193f4fe01d7f626e2ea937450f2e0c4604420e9d | 180,433,789,463,307,000,000,000,000,000,000,000,000 | 11 | Fix integer overflow in string search causing oobread ##crash
* Reported by @greatergoodest via huntrdev
* BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04
* Reproducer bfileovf |
static void dmar_disable_intr_remapping(struct dmar_drhd_rt *dmar_unit)
{
uint32_t status;
spinlock_obtain(&(dmar_unit->lock));
if ((dmar_unit->gcmd & DMA_GCMD_IRE) != 0U) {
dmar_unit->gcmd &= ~DMA_GCMD_IRE;
iommu_write32(dmar_unit, DMAR_GCMD_REG, dmar_unit->gcmd);
/* 32-bit register */
dmar_wait_completion... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 103,180,329,711,441,070,000,000,000,000,000,000,000 | 14 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
SshIo::SshImpl::SshImpl(const std::wstring& wurl, size_t blockSize):Impl(wurl, blockSize)
{
std::string url;
url.assign(wurl.begin(), wurl.end());
path_ = url;
hostInfo_ = Exiv2::Uri::Parse(url);
Exiv2::Uri::Decode(hostInfo_);
// remove / at the beginning of the... | 0 | [
"CWE-125"
] | exiv2 | edb4bf78ca5820f2c7a852c8f2df11e6aba45704 | 125,300,153,563,967,500,000,000,000,000,000,000,000 | 22 | Add bounds check to MemIo::seek(). (#944)
- Regression test for missing bounds check in MemIo::seek()
- Add bounds check to MemIo::seek(), this fixes CVE-2019-13504
(cherry picked from commit bd0afe0390439b2c424d881c8c6eb0c5624e31d9)
Additional fixes for 0.27:
- Add fix for the linux variant of MemIo::seek
- Change ... |
MagickExport size_t GetOptimalKernelWidth1D(const double radius,
const double sigma)
{
double
alpha,
beta,
gamma,
normalize,
value;
ssize_t
i;
size_t
width;
ssize_t
j;
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (radius > MagickEpsilon)
return((siz... | 0 | [
"CWE-369"
] | ImageMagick6 | 90255f0834eead08d59f46b0bda7b1580451cc0f | 46,145,981,920,673,760,000,000,000,000,000,000,000 | 40 | https://github.com/ImageMagick/ImageMagick/issues/3077 |
static BOOL rdg_process_close_packet(rdpRdg* rdg)
{
int status = -1;
size_t s;
wStream* sChunk;
UINT32 packetSize = 12;
char chunkSize[11];
int chunkLen = sprintf_s(chunkSize, sizeof(chunkSize), "%" PRIx32 "\r\n", packetSize);
if (chunkLen < 0)
return FALSE;
sChunk = Stream_New(NULL, (size_t)chunkLen + pack... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 133,975,418,499,035,500,000,000,000,000,000,000,000 | 32 | Fixed oob read in irp_write and similar |
kvp_get_ip_address(int family, char *buffer, int length)
{
struct ifaddrs *ifap;
struct ifaddrs *curp;
int ipv4_len = strlen("255.255.255.255") + 1;
int ipv6_len = strlen("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")+1;
int offset = 0;
const char *str;
char tmp[50];
int error = 0;
/*
* On entry into this funct... | 0 | [
"CWE-20"
] | linux-2.6 | bcc2c9c3fff859e0eb019fe6fec26f9b8eba795c | 326,325,964,854,152,970,000,000,000,000,000,000,000 | 82 | Tools: hv: verify origin of netlink connector message
The SuSE security team suggested to use recvfrom instead of recv to be
certain that the connector message is originated from kernel.
CVE-2012-2669
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Sebasti... |
GF_Err gf_isom_text_add_hyperlink(GF_TextSample *samp, char *URL, char *altString, u16 start_char, u16 end_char)
{
GF_TextHyperTextBox*a;
if (!samp) return GF_BAD_PARAM;
a = (GF_TextHyperTextBox*) gf_isom_box_new(GF_ISOM_BOX_TYPE_HREF);
if (!a) return GF_OUT_OF_MEM;
a->startcharoffset = start_char;
a->endcharoffs... | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 155,023,249,291,118,550,000,000,000,000,000,000,000 | 12 | fixed #1768 |
static int sisusb_all_free(struct sisusb_usb_data *sisusb)
{
int i;
for (i = 0; i < sisusb->numobufs; i++) {
if (sisusb->urbstatus[i] & SU_URB_BUSY)
return 0;
}
return 1;
} | 0 | [
"CWE-476"
] | linux | 9a5729f68d3a82786aea110b1bfe610be318f80a | 10,250,846,980,946,523,000,000,000,000,000,000,000 | 13 | USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must
be set before the error is logged.
v2: fix that minor is not available before registration
Signed-off-by: oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail... |
sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_association *new_asoc;
sctp_init_chunk_t *peer_init;
struct sctp_chun... | 0 | [
"CWE-119"
] | linux-2.6 | 9fcb95a105758b81ef0131cd18e2db5149f13e95 | 184,550,286,024,698,500,000,000,000,000,000,000,000 | 201 | sctp: Avoid memory overflow while FWD-TSN chunk is received with bad stream ID
If FWD-TSN chunk is received with bad stream ID, the sctp will not do the
validity check, this may cause memory overflow when overwrite the TSN of
the stream ID.
The FORWARD-TSN chunk is like this:
FORWARD-TSN chunk
Type ... |
void arch_pick_mmap_layout(struct mm_struct *mm)
{
unsigned long random_factor = 0UL;
if (current->flags & PF_RANDOMIZE)
random_factor = arch_mmap_rnd();
/*
* Fall back to the standard layout if the personality
* bit is set, or if the expected stack growth is unlimited:
*/
if (mmap_is_legacy()) {
mm->mm... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 335,309,748,690,248,170,000,000,000,000,000,000,000 | 19 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static bool handle_client_work(PgSocket *client, PktHdr *pkt)
{
SBuf *sbuf = &client->sbuf;
switch (pkt->type) {
/* one-packet queries */
case 'Q': /* Query */
if (cf_disable_pqexec) {
slog_error(client, "Client used 'Q' packet type.");
disconnect_client(client, true, "PQexec disallowed");
return fals... | 0 | [
"CWE-287",
"CWE-284"
] | pgbouncer | 7ca3e5279d05fceb1e8a043c6f5b6f58dea3ed38 | 213,794,707,755,329,500,000,000,000,000,000,000,000 | 73 | Remove too early set of auth_user
When query returns 0 rows (user not found),
this user stays as login user...
Should fix #69. |
void LinkResolver::lookup_polymorphic_method(methodHandle& result,
KlassHandle klass, Symbol* name, Symbol* full_signature,
KlassHandle current_klass,
Handle *appendix_result_or_null,
... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 13,594,470,783,496,894,000,000,000,000,000,000,000 | 102 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static bool is_reg64(struct bpf_verifier_env *env, struct bpf_insn *insn,
u32 regno, struct bpf_reg_state *reg, enum reg_arg_type t)
{
u8 code, class, op;
code = insn->code;
class = BPF_CLASS(code);
op = BPF_OP(code);
if (class == BPF_JMP) {
/* BPF_EXIT for "main" will reach here. Return TRUE
* conser... | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 14,301,649,962,465,417,000,000,000,000,000,000,000 | 83 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
frame_new_height(
frame_T *topfrp,
int height,
int topfirst, // resize topmost contained frame first
int wfh) // obey 'winfixheight' when there is a choice;
// may cause the height not to be set
{
frame_T *frp;
int extra_lines;
int h;
if (topfrp->fr_win != NULL)
{
// Simp... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 106,099,129,054,914,500,000,000,000,000,000,000,000 | 104 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
private int
mget(struct magic_set *ms, struct magic *m, const struct buffer *b,
const unsigned char *s, size_t nbytes, size_t o, unsigned int cont_level,
int mode, int text, int flip, uint16_t *indir_count, uint16_t *name_count,
int *printed_something, int *need_separator, int *returnval,
int *found_ma... | 0 | [
"CWE-787"
] | file | d65781527c8134a1202b2649695d48d5701ac60b | 261,997,396,734,863,300,000,000,000,000,000,000,000 | 330 | PR/62: spinpx: limit size of file_printable. |
void linenoisePreloadBuffer(const char* preloadText) {
if (!preloadText) {
return;
}
int bufferSize = strlen(preloadText) + 1;
unique_ptr<char[]> tempBuffer(new char[bufferSize]);
strncpy(&tempBuffer[0], preloadText, bufferSize);
// remove characters that won't display correctly
cha... | 0 | [
"CWE-200"
] | mongo | 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0 | 63,425,774,203,518,890,000,000,000,000,000,000 | 51 | SERVER-25335 avoid group and other permissions when creating .dbshell history file |
ex_stag(exarg_T *eap)
{
postponed_split = -1;
postponed_split_flags = cmdmod.split;
postponed_split_tab = cmdmod.tab;
ex_tag_cmd(eap, cmdnames[eap->cmdidx].cmd_name + 1);
postponed_split_flags = 0;
postponed_split_tab = 0;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 161,681,389,003,140,420,000,000,000,000,000,000,000 | 9 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
zzip_dir_free(ZZIP_DIR * dir)
{
if (dir->refcount)
return (dir->refcount); /* still open files attached */
if (dir->fd >= 0)
dir->io->fd.close(dir->fd);
if (dir->hdr0)
free(dir->hdr0);
if (dir->cache.fp)
free(dir->cache.fp);
if (dir->cache.buf32k)
free(dir->c... | 0 | [
"CWE-770"
] | zziplib | 0c0c9256b0903f664bca25dd8d924211f81e01d3 | 225,982,881,196,714,530,000,000,000,000,000,000,000 | 18 | Reject the ZIP file and report it as corrupt if the size of the
central directory and/or the offset of start of central directory
point beyond the end of the ZIP file. [CVE-2018-6484] |
PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, zend_string **out, const char *out_charset, const char *in_charset)
{
#if !ICONV_SUPPORTS_ERRNO
size_t in_size, out_size, out_left;
char *out_p;
iconv_t cd;
size_t result;
zend_string *ret, *out_buffer;
*out = NULL;
/*
This is n... | 0 | [
"CWE-125"
] | php-src | 70523ce41ff400ea00343a03f297332cb1f1b77b | 149,283,160,416,375,530,000,000,000,000,000,000,000 | 173 | Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
(cherry picked from commit 7cf7148a8f8f4f55fb04de2a517d740bb6253eac) |
static MemTxResult subpage_read(void *opaque, hwaddr addr, uint64_t *data,
unsigned len, MemTxAttrs attrs)
{
subpage_t *subpage = opaque;
uint8_t buf[8];
MemTxResult res;
#if defined(DEBUG_SUBPAGE)
printf("%s: subpage %p len %u addr " TARGET_FMT_plx "\n", __func__,
... | 0 | [] | qemu | e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83 | 22,296,405,899,562,465,000,000,000,000,000,000,000 | 33 | exec: clamp accesses against the MemoryRegionSection
Because the clamping was done against the MemoryRegion,
address_space_rw was effectively broken if a write spanned
multiple sections that are not linear in underlying memory
(with the memory not being under an IOMMU).
This is visible with the MIPS rc4030 IOMMU, whi... |
sctp_disposition_t sctp_sf_violation(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
/* Make sure that the chunk has a valid length. */
... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 318,927,843,590,739,830,000,000,000,000,000,000,000 | 16 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static int call_netdevice_notifiers_mtu(unsigned long val,
struct net_device *dev, u32 arg)
{
struct netdev_notifier_info_ext info = {
.info.dev = dev,
.ext.mtu = arg,
};
BUILD_BUG_ON(offsetof(struct netdev_notifier_info_ext, info) != 0);
return call_netdevice_notifiers_info(val, &info.info);
} | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 285,669,361,492,025,560,000,000,000,000,000,000,000 | 12 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
void luaV_concat (lua_State *L, int total) {
if (total == 1)
return; /* "all" values already concatenated */
do {
StkId top = L->top;
int n = 2; /* number of elements handled in this pass (at least 2) */
if (!(ttisstring(s2v(top - 2)) || cvt2str(s2v(top - 2))) ||
!tostring(L, s2v(top - 1))... | 1 | [
"CWE-787"
] | lua | 42d40581dd919fb134c07027ca1ce0844c670daf | 200,068,475,935,117,750,000,000,000,000,000,000,000 | 40 | Save stack space while handling errors
Because error handling (luaG_errormsg) uses slots from EXTRA_STACK,
and some errors can recur (e.g., string overflow while creating an
error message in 'luaG_runerror', or a C-stack overflow before calling
the message handler), the code should use stack slots with parsimony.
Thi... |
setup_call2_call(Node* node)
{
switch (NODE_TYPE(node)) {
case NODE_LIST:
case NODE_ALT:
do {
setup_call2_call(NODE_CAR(node));
} while (IS_NOT_NULL(node = NODE_CDR(node)));
break;
case NODE_QUANT:
setup_call2_call(NODE_BODY(node));
break;
case NODE_ANCHOR:
if (ANCHOR_HAS_BODY(... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 110,797,680,350,197,590,000,000,000,000,000,000,000 | 64 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
sixel_dither_apply_palette(
sixel_dither_t /* in */ *dither,
unsigned char /* in */ *pixels,
int /* in */ width,
int /* in */ height)
{
SIXELSTATUS status = SIXEL_FALSE;
size_t bufsize;
unsigned char *dest = NULL;
int ncolors;
unsigned char *normalized_pixe... | 0 | [
"CWE-200"
] | libsixel | cb373ab6614c910407c5e5a93ab935144e62b037 | 281,463,762,499,667,180,000,000,000,000,000,000,000 | 97 | Avoid illegal memory access problem with 1 color paletted png(#73),
Thanks to HongxuChen. |
void addReplyStreamID(client *c, streamID *id) {
sds replyid = sdscatfmt(sdsempty(),"%U-%U",id->ms,id->seq);
addReplyBulkSds(c,replyid);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 39,572,954,069,003,160,000,000,000,000,000,000,000 | 4 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
fst_open(struct net_device *dev)
{
int err;
struct fst_port_info *port;
port = dev_to_port(dev);
if (!try_module_get(THIS_MODULE))
return -EBUSY;
if (port->mode != FST_RAW) {
err = hdlc_open(dev);
if (err) {
module_put(THIS_MODULE);
return err;
}
}
fst_openport(port);
netif_wake_queue(d... | 0 | [
"CWE-399"
] | linux | 96b340406724d87e4621284ebac5e059d67b2194 | 217,996,554,014,033,100,000,000,000,000,000,000,000 | 21 | farsync: fix info leak in ioctl
The fst_get_iface() code fails to initialize the two padding bytes of
struct sync_serial_settings after the ->loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. ... |
static int v4l_g_parm(const struct v4l2_ioctl_ops *ops,
struct file *file, void *fh, void *arg)
{
struct v4l2_streamparm *p = arg;
v4l2_std_id std;
int ret = check_fmt(file, p->type);
if (ret)
return ret;
if (ops->vidioc_g_parm)
return ops->vidioc_g_parm(file, fh, p);
if (p->type != V4L2_BUF_TYPE_VIDEO_C... | 0 | [
"CWE-401"
] | linux | fb18802a338b36f675a388fc03d2aa504a0d0899 | 285,217,389,858,183,620,000,000,000,000,000,000,000 | 20 | media: v4l: ioctl: Fix memory leak in video_usercopy
When an IOCTL with argument size larger than 128 that also used array
arguments were handled, two memory allocations were made but alas, only
the latter one of them was released. This happened because there was only
a single local variable to hold such a temporary a... |
static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,
struct sk_buff_head *xmitq)
{
struct tipc_msg *hdr = buf_msg(skb);
struct tipc_gap_ack_blks *ga = NULL;
bool reply = msg_probe(hdr), retransmitted = false;
u32 dlen = msg_data_sz(hdr), glen = 0;
u16 peers_snd_nxt = msg_next_sent(hd... | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 2,175,013,531,700,865,600,000,000,000,000,000,000 | 149 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
FT_INFO *ha_maria::ft_init_ext(uint flags, uint inx, String * key)
{
return maria_ft_init_search(flags, file, inx,
(uchar *) key->ptr(), key->length(),
key->charset(), table->record[0]);
} | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 89,441,167,425,252,100,000,000,000,000,000,000,000 | 6 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
replace(PyStringObject *self,
const char *from_s, Py_ssize_t from_len,
const char *to_s, Py_ssize_t to_len,
Py_ssize_t maxcount)
{
if (maxcount < 0) {
maxcount = PY_SSIZE_T_MAX;
} else if (maxcount == 0 || PyString_GET_SIZE(self) == 0) {
/* nothing to do; return the original string *... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 289,144,418,870,689,500,000,000,000,000,000,000,000 | 68 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
static int wcd9335_codec_enable_slim(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kc,
int event)
{
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
struct wcd9335_codec *wcd = snd_soc_component_get_drvdata(comp);
struct wcd_slim_codec_dai_data *dai = &wcd->dai[w->shif... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 65,886,148,623,824,480,000,000,000,000,000,000,000 | 21 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
X509 *recip, unsigned int flags)
{
CMS_RecipientInfo *ri = NULL;
CMS_EnvelopedData *env;
EVP_PKEY *pk = NULL;
env = cms_get0_enveloped(cms);
if (!env)
goto err;
/* Initialize reci... | 0 | [
"CWE-311",
"CWE-327"
] | openssl | 08229ad838c50f644d7e928e2eef147b4308ad64 | 159,030,105,036,080,680,000,000,000,000,000,000,000 | 52 | Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey
An attack is simple, if the first CMS_recipientInfo is valid but the
second CMS_recipientInfo is chosen ciphertext. If the second
recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
encryption key will be replaced by garbage, and the mess... |
VTerm *vterm_new(int rows, int cols)
{
return vterm_new_with_allocator(rows, cols, &default_allocator, NULL);
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 207,310,521,146,033,900,000,000,000,000,000,000,000 | 4 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
absl::optional<CelValue> extractSslInfo(const Ssl::ConnectionInfo& ssl_info,
absl::string_view value) {
if (value == TLSVersion) {
return CelValue::CreateString(&ssl_info.tlsVersion());
} else if (value == SubjectLocalCertificate) {
return CelValue::CreateString(&ssl_... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 253,208,939,565,429,260,000,000,000,000,000,000,000 | 27 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
bool Helper::isPartcloneFile(const QString &fileName)
{
return processExec(QStringLiteral("partclone.info %1").arg(fileName)) == 0;
} | 0 | [
"CWE-59",
"CWE-61"
] | deepin-clone | e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab | 31,199,478,223,659,154,000,000,000,000,000,000,000 | 4 | fix: Do not use the "/tmp" directory
https://github.com/linuxdeepin/deepin-clone/issues/16
https://bugzilla.opensuse.org/show_bug.cgi?id=1130388 |
static int __init cmdline_parse_kernelcore(char *p)
{
/* parse kernelcore=mirror */
if (parse_option_str(p, "mirror")) {
mirrored_kernelcore = true;
return 0;
}
return cmdline_parse_core(p, &required_kernelcore);
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 31,314,147,815,104,670,000,000,000,000,000,000,000 | 10 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
static void load_branch(struct branch *b)
{
load_tree(&b->branch_tree);
if (!b->active) {
b->active = 1;
b->active_next_branch = active_branches;
active_branches = b;
cur_active_branches++;
branch_load_count++;
}
} | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 269,165,442,900,340,620,000,000,000,000,000,000,000 | 11 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
static void numa_migrate_preferred(struct task_struct *p)
{
unsigned long interval = HZ;
/* This task has no NUMA fault statistics yet */
if (unlikely(p->numa_preferred_nid == NUMA_NO_NODE || !p->numa_faults))
return;
/* Periodically retry migrating the task to the preferred node */
interval = min(interval, ms... | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 5,609,717,790,864,460,000,000,000,000,000,000,000 | 19 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
gpgsm_get_fingerprint_string (ksba_cert_t cert, int algo)
{
unsigned char digest[MAX_DIGEST_LEN];
char *buf;
int len;
if (!algo)
algo = GCRY_MD_SHA1;
len = gcry_md_get_algo_dlen (algo);
assert (len <= MAX_DIGEST_LEN );
gpgsm_get_fingerprint (cert, algo, digest, NULL);
buf = xmalloc (len*3+1);
bi... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 243,549,477,542,019,860,000,000,000,000,000,000,000 | 16 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
dirserv_get_status_impl(const char *id_digest, const char *nickname,
const char *address,
uint32_t addr, uint16_t or_port,
const char *platform, const char *contact,
const char **msg, int should_log)
{
int reject_unlisted ... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 99,910,119,778,785,180,000,000,000,000,000,000,000 | 107 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
QueryParamsTest()
: cxxtools::unit::TestSuite("queryparams")
{
registerMethod("testQueryParams", *this, &QueryParamsTest::testQueryParams);
registerMethod("testCopy", *this, &QueryParamsTest::testCopy);
registerMethod("testParseUrl", *this, &QueryParamsTes... | 0 | [
"CWE-399"
] | cxxtools | 142bb2589dc184709857c08c1e10570947c444e3 | 59,817,720,828,533,870,000,000,000,000,000,000,000 | 13 | fix parsing double % in query parameters |
static void xmlGROW (xmlParserCtxtPtr ctxt) {
ptrdiff_t curEnd = ctxt->input->end - ctxt->input->cur;
ptrdiff_t curBase = ctxt->input->cur - ctxt->input->base;
if (((curEnd > XML_MAX_LOOKUP_LIMIT) ||
(curBase > XML_MAX_LOOKUP_LIMIT)) &&
((ctxt->input->buf) &&
(ctxt->input->buf->... | 0 | [
"CWE-401"
] | libxml2 | 5a02583c7e683896d84878bd90641d8d9b0d0549 | 237,913,083,204,867,400,000,000,000,000,000,000,000 | 23 | Fix memory leak in xmlParseBalancedChunkMemoryRecover
When doc is NULL, namespace created in xmlTreeEnsureXMLDecl
is bind to newDoc->oldNs, in this case, set newDoc->oldNs to
NULL and free newDoc will cause a memory leak.
Found with libFuzzer.
Closes #82. |
static void change_curseg(struct f2fs_sb_info *sbi, int type)
{
struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
struct curseg_info *curseg = CURSEG_I(sbi, type);
unsigned int new_segno = curseg->next_segno;
struct f2fs_summary_block *sum_node;
struct page *sum_page;
write_sum_page(sbi, curseg->sum_blk,
GE... | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 340,257,704,637,372,940,000,000,000,000,000,000,000 | 26 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
static int ocfs2_populate_write_desc(struct inode *inode,
struct ocfs2_write_ctxt *wc,
unsigned int *clusters_to_alloc,
unsigned int *extents_to_split)
{
int ret;
struct ocfs2_write_cluster_desc *desc;
unsigned int num_clusters = 0;
unsigned int ext_flags = 0;
u32 phys = 0;
int i;
*cl... | 0 | [
"CWE-20"
] | linux-2.6 | 272b62c1f0f6f742046e45b50b6fec98860208a0 | 89,706,375,401,068,230,000,000,000,000,000,000,000 | 82 | Treat writes as new when holes span across page boundaries
When a hole spans across page boundaries, the next write forces
a read of the block. This could end up reading existing garbage
data from the disk in ocfs2_map_page_blocks. This leads to
non-zero holes. In order to avoid this, mark the writes as new
when the h... |
struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry)
{
struct dentry *temp;
char name[20];
snprintf(name, sizeof(name), "#%lx", (unsigned long) dentry);
temp = lookup_one_len(name, workdir, strlen(name));
if (!IS_ERR(temp) && temp->d_inode) {
pr_err("overlayfs: workdir/%s already exist... | 0 | [
"CWE-20"
] | linux | 11f3710417d026ea2f4fcf362d866342c5274185 | 47,227,122,016,552,270,000,000,000,000,000,000,000 | 16 | ovl: verify upper dentry before unlink and rename
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. However the dentry can go
stale also by being unhashed, for example.
Expand the verification to actually look up the name again (under parent
lock) an... |
test_main (void)
{
/* Producing the signature for corresponding test in
ecdsa-verify-test.c, with special u1 and u2. */
test_ecdsa (&_nettle_secp_224r1,
"99b5b787484def12894ca507058b3bf5"
"43d72d82fa7721d2e805e5e6",
"2",
SHEX("cdb887ac805a3b42e22d224c85482053"
"16c755d4a736bb20... | 0 | [
"CWE-787"
] | nettle | 74ee0e82b6891e090f20723750faeb19064e31b2 | 201,833,111,129,606,400,000,000,000,000,000,000,000 | 114 | Fix bug in ecc_ecdsa_verify.
* ecc-ecdsa-verify.c (ecc_ecdsa_verify): Use ecc_mod_mul_canonical
to compute the scalars used for ecc multiplication.
* testsuite/ecdsa-verify-test.c (test_main): Add test case that
triggers an assert on 64-bit platforms, without above fix.
* testsuite/ecdsa-sign-test.c (test_main): Test ... |
long do_fork(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size,
int __user *parent_tidptr,
int __user *child_tidptr)
{
struct task_struct *p;
int trace = 0;
long nr;
/*
* Do some preliminary argument and permissions checking be... | 0 | [
"CWE-264"
] | linux-2.6 | 2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205 | 291,612,181,894,143,140,000,000,000,000,000,000,000 | 106 | copy_process: fix CLONE_PARENT && parent_exec_id interaction
CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use ->parent_exec_id to make
sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed
task exits.
Also, move down the "p->parent_ex... |
mark_fill_rect16_alpha0(int w, int h, uint16_t *gs_restrict dst_ptr, uint16_t *gs_restrict src, int num_comp, int num_spots, int first_blend_spot,
uint16_t src_alpha_, int rowstride, int planestride, bool additive, pdf14_device *pdev, gs_blend_mode_t blend_mode,
bool overprint, gx_color_in... | 0 | [
"CWE-476"
] | ghostpdl | 7870f4951bcc6a153f317e3439e14d0e929fd231 | 254,911,740,280,069,400,000,000,000,000,000,000,000 | 26 | Bug 701795: Segv due to image mask issue |
static int sctp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
int noblock, int flags, int *addr_len)
{
struct sctp_ulpevent *event = NULL;
struct sctp_sock *sp = sctp_sk(sk);
struct sk_buff *skb;
int copied;
int err = 0;
int skb_len;
pr_debug("%s: sk:%p, msghdr:%p, len:%zd, noblock:%d, flags:0x%x,... | 0 | [
"CWE-362",
"CWE-703"
] | linux | 2d45a02d0166caf2627fe91897c6ffc3b19514c4 | 69,311,789,689,678,140,000,000,000,000,000,000,000 | 108 | sctp: fix ASCONF list handling
->auto_asconf_splist is per namespace and mangled by functions like
sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization.
Also, the call to inet_sk_copy_descendant() was backuping
->auto_asconf_list through the copy but was not honoring
->do_auto_asconf, which could l... |
void __bpf_prog_free(struct bpf_prog *fp)
{
kfree(fp->aux);
vfree(fp);
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 143,121,095,859,508,760,000,000,000,000,000,000,000 | 5 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
CImgDisplay& paint() {
return assign();
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 207,274,045,597,113,200,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
pgprot_t vm_get_page_prot(unsigned long vm_flags)
{
pgprot_t ret = __pgprot(pgprot_val(protection_map[vm_flags &
(VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)]) |
pgprot_val(arch_vm_get_page_prot(vm_flags)));
return arch_filter_pgprot(ret);
} | 0 | [
"CWE-476"
] | linux | 27ae357fa82be5ab73b2ef8d39dcb8ca2563483a | 142,668,378,743,301,500,000,000,000,000,000,000,000 | 8 | mm, oom: fix concurrent munlock and oom reaper unmap, v3
Since exit_mmap() is done without the protection of mm->mmap_sem, it is
possible for the oom reaper to concurrently operate on an mm until
MMF_OOM_SKIP is set.
This allows munlock_vma_pages_all() to concurrently run while the oom
reaper is operating on a vma. ... |
static inline void shrink_free_pagepool(struct xen_blkif *blkif, int num)
{
/* Remove requested pages in batches of NUM_BATCH_FREE_PAGES */
struct page *page[NUM_BATCH_FREE_PAGES];
unsigned int num_pages = 0;
unsigned long flags;
spin_lock_irqsave(&blkif->free_pages_lock, flags);
while (blkif->free_pages_num > n... | 0 | [
"CWE-20"
] | linux-2.6 | 604c499cbbcc3d5fe5fb8d53306aa0fae1990109 | 286,501,369,205,609,700,000,000,000,000,000,000,000 | 25 | xen/blkback: Check device permissions before allowing OP_DISCARD
We need to make sure that the device is not RO or that
the request is not past the number of sectors we want to
issue the DISCARD operation for.
This fixes CVE-2013-2140.
Cc: stable@vger.kernel.org
Acked-by: Jan Beulich <JBeulich@suse.com>
Acked-by: Ia... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.