func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void add_input_randomness(unsigned int type, unsigned int code,
unsigned int value)
{
static unsigned char last_value;
/* ignore autorepeat and the like */
if (value == last_value)
return;
last_value = value;
add_timer_randomness(&input_timer_state,
(type << 4) ^ code ^ (code >> 4) ^ value);
trac... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 80,070,416,679,519,250,000,000,000,000,000,000,000 | 14 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
delegpt_add_addr(struct delegpt* dp, struct regional* region,
struct sockaddr_storage* addr, socklen_t addrlen, uint8_t bogus,
uint8_t lame, char* tls_auth_name, int* additions)
{
struct delegpt_addr* a;
log_assert(!dp->dp_type_mlc);
/* check for duplicates */
if((a = delegpt_find_addr(dp, addr, addrlen))) {
... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 109,952,218,712,373,150,000,000,000,000,000,000,000 | 41 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
STATIC void GC_init_size_map(void)
{
int i;
/* Map size 0 to something bigger. */
/* This avoids problems at lower levels. */
GC_size_map[0] = 1;
for (i = 1; i <= GRANULES_TO_BYTES(TINY_FREELISTS-1) - EXTRA_BYTES; i++) {
GC_size_map[i] = (unsigned)ROUNDED_UP_GR... | 1 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 76,948,983,952,850,330,000,000,000,000,000,000,000 | 16 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static noinstr unsigned long xen_get_debugreg(int reg)
{
return HYPERVISOR_get_debugreg(reg);
} | 0 | [
"CWE-703"
] | linux | 96e8fc5818686d4a1591bb6907e7fdb64ef29884 | 303,566,220,333,206,100,000,000,000,000,000,000,000 | 4 | x86/xen: Use clear_bss() for Xen PV guests
Instead of clearing the bss area in assembly code, use the clear_bss()
function.
This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-of... |
int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
struct kvm_sregs *sregs)
{
vcpu_load(vcpu);
memcpy(&sregs->acrs, &vcpu->run->s.regs.acrs, sizeof(sregs->acrs));
memcpy(&sregs->crs, &vcpu->arch.sie_block->gcr, sizeof(sregs->crs));
vcpu_put(vcpu);
return 0;
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 67,726,073,301,747,065,000,000,000,000,000,000,000 | 11 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
do_set_display_name (GVfsBackend *backend,
GVfsJobSetDisplayName *job,
const char *filename,
const char *display_name)
{
SoupMessage *msg;
SoupURI *source;
SoupURI *target;
char *target_path;
char ... | 0 | [] | gvfs | f81ff2108ab3b6e370f20dcadd8708d23f499184 | 339,564,923,881,318,270,000,000,000,000,000,000,000 | 60 | dav: don't unescape the uri twice
path_equal tries to unescape path before comparing. Unfortunately
this function is used also for already unescaped paths. Therefore
unescaping can fail. This commit reverts changes which was done in
commit 50af53d and unescape just uris, which aren't unescaped yet.
https://bugzilla.g... |
void CUser::SetAutoClearQueryBuffer(bool b) { m_bAutoClearQueryBuffer = b; } | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 41,694,244,785,973,770,000,000,000,000,000,000,000 | 1 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
rfc2254_escape (gchar *str)
{
gint i;
gint len = strlen (str);
gint newlen = 0;
for (i = 0; i < len; i++) {
if (IS_RFC2254_CHAR (str[i]))
newlen += 3;
else
newlen++;
}
if (len == newlen) {
return g_strdup (str);
}
else {
gchar *newstr = g_malloc0 (newlen + 1);
gint j = 0;
for (i = 0; i < len... | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 227,441,332,028,104,120,000,000,000,000,000,000,000 | 31 | Bug 796174 - strcat() considered unsafe for buffer overflow |
static bool kvm_use_posted_timer_interrupt(struct kvm_vcpu *vcpu)
{
return kvm_can_post_timer_interrupt(vcpu) && vcpu->mode == IN_GUEST_MODE;
} | 0 | [
"CWE-703",
"CWE-459"
] | linux | f7d8a19f9a056a05c5c509fa65af472a322abfee | 336,871,750,409,800,740,000,000,000,000,000,000,000 | 4 | Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
Revert a change to open code bits of kvm_lapic_set_base() when emulating
APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base
and apic_hw_disabled being unsyncrhonized when the APIC is created. If
kvm_arch_vcpu_crea... |
pad_ofpat(struct ofpbuf *openflow, size_t start_ofs)
{
struct ofp_action_header *oah;
ofpbuf_put_zeros(openflow, PAD_SIZE(openflow->size - start_ofs,
OFP_ACTION_ALIGN));
oah = ofpbuf_at_assert(openflow, start_ofs, sizeof *oah);
oah->len = htons(openflow->size - ... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 205,391,001,435,590,900,000,000,000,000,000,000,000 | 10 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
zval *object;
zval *property = &opline->op2.u.constant;... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 97,309,972,264,237,520,000,000,000,000,000,000,000 | 85 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void CLASS samsung3_load_raw()
{
int opt, init, mag, pmode, row, tab, col, pred, diff, i, c;
ushort lent[3][2], len[4], *prow[2];
order = 0x4949;
fseek(ifp, 9, SEEK_CUR);
opt = fgetc(ifp);
init = (get2(), get2());
for (row = 0; row < raw_height; row++)
{
#ifdef LIBRAW_LIBRARY_BUILD
checkCancel();
#... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 69,536,416,315,807,110,000,000,000,000,000,000,000 | 59 | Secunia SA75000 advisory: several buffer overruns |
GF_Box *clap_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_CleanApertureBox, GF_ISOM_BOX_TYPE_CLAP);
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 74,443,141,159,147,150,000,000,000,000,000,000,000 | 5 | fixed #2255 |
void calc_group_buffer(TMP_TABLE_PARAM *param, ORDER *group)
{
uint key_length=0, parts=0, null_parts=0;
for (; group ; group=group->next)
{
Item *group_item= *group->item;
Field *field= group_item->get_tmp_table_field();
if (field)
{
enum_field_types type;
if ((type= field->type()) =... | 0 | [] | server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | 100,099,613,518,781,490,000,000,000,000,000,000,000 | 77 | MDEV-28094 Window function in expression in ORDER BY
call item->split_sum_func() in setup_order() just as
it's done in setup_fields() |
void* CMSEXPORT cmsStageData(const cmsStage* mpe)
{
return mpe -> Data;
} | 0 | [] | Little-CMS | b0d5ffd4ad91cf8683ee106f13742db3dc66599a | 45,998,558,261,836,790,000,000,000,000,000,000,000 | 4 | Memory Squeezing: LCMS2: CLUTElemDup
Check for allocation failures and tidy up if found. |
ring_buffer_read_finish(struct ring_buffer_iter *iter)
{
struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer;
unsigned long flags;
/*
* Ring buffer is disabled from recording, here's a good place
* to check the integrity of the ring buffer.
* Must prevent readers from trying to read, as the check
* cl... | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 335,115,824,203,535,560,000,000,000,000,000,000,000 | 19 | 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_... |
SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
u32, min_complete, u32, flags, const sigset_t __user *, sig,
size_t, sigsz)
{
struct io_ring_ctx *ctx;
long ret = -EBADF;
int submitted = 0;
struct fd f;
io_run_task_work();
if (flags & ~(IORING_ENTER_GETEVENTS | IORING_ENTER_SQ_WAKEUP))
re... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 197,411,744,366,034,400,000,000,000,000,000,000,000 | 73 | 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 bool hidinput_has_been_populated(struct hid_input *hidinput)
{
int i;
unsigned long r = 0;
for (i = 0; i < BITS_TO_LONGS(EV_CNT); i++)
r |= hidinput->input->evbit[i];
for (i = 0; i < BITS_TO_LONGS(KEY_CNT); i++)
r |= hidinput->input->keybit[i];
for (i = 0; i < BITS_TO_LONGS(REL_CNT); i++)
r |= hidi... | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 322,805,109,979,663,060,000,000,000,000,000,000,000 | 34 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... |
~PostponeInterruptsScope() {
if (--stack_guard_->thread_local_.postpone_interrupts_nesting_ == 0) {
stack_guard_->EnableInterrupts();
}
} | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 68,564,151,511,852,660,000,000,000,000,000,000,000 | 5 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
static int ec_device_release(struct inode *inode, struct file *filp)
{
return 0;
} | 0 | [
"CWE-362"
] | linux | 096cdc6f52225835ff503f987a0d68ef770bb78e | 43,688,550,712,158,340,000,000,000,000,000,000,000 | 4 | platform/chrome: cros_ec_dev - double fetch bug in ioctl
We verify "u_cmd.outsize" and "u_cmd.insize" but we need to make sure
that those values have not changed between the two copy_from_user()
calls. Otherwise it could lead to a buffer overflow.
Additionally, cros_ec_cmd_xfer() can set s_cmd->insize to a lower val... |
Item_decimal::Item_decimal(THD *thd, const char *str_arg, uint length,
CHARSET_INFO *charset):
Item_num(thd)
{
str2my_decimal(E_DEC_FATAL_ERROR, str_arg, length, charset, &decimal_value);
name= (char*) str_arg;
decimals= (uint8) decimal_value.frac;
fixed= 1;
max_length= my_decimal... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 334,683,383,619,657,060,000,000,000,000,000,000,000 | 13 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
void operator()(output_buffer* buffer) { total_ += buffer->get_size(); } | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 102,194,718,321,768,960,000,000,000,000,000,000,000 | 1 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static MMacro *is_mmacro(Token * tline, int *nparamp, Token ***paramsp)
{
MMacro *head, *m, *found;
Token **params, **comma;
int raw_nparam, nparam;
const char *finding = tok_text(tline);
bool empty_args = !tline->next;
*nparamp = 0;
*paramsp = NULL;
head = (MMacro *) hash_findix(&mmac... | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 176,553,060,429,613,580,000,000,000,000,000,000,000 | 177 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
_poppler_document_get_layer_rbgroup (PopplerDocument *document,
Layer *layer)
{
GList *l;
for (l = document->layers_rbgroups; l && l->data; l = g_list_next (l)) {
GList *group = (GList *)l->data;
if (g_list_find (group, layer->oc))
return group;
}
return nullptr;
} | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 263,230,146,849,764,350,000,000,000,000,000,000,000 | 14 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
static int perf_get_aux_event(struct perf_event *event,
struct perf_event *group_leader)
{
/*
* Our group leader must be an aux event if we want to be
* an aux_output. This way, the aux event will precede its
* aux_output events in the group, and therefore will always
* schedule first.
*/
if (!grou... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 250,792,873,223,507,540,000,000,000,000,000,000,000 | 38 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
static int interface_client_monitors_config(QXLInstance *sin,
VDAgentMonitorsConfig *mc)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
QemuUIInfo info;
int rc;
if (!mc) {
return 1;
}
/*
* FIXME: multihead is tri... | 0 | [
"CWE-200"
] | qemu | ab9509cceabef28071e41bdfa073083859c949a7 | 173,252,070,520,851,860,000,000,000,000,000,000,000 | 29 | spice: make sure we don't overflow ssd->buf
Related spice-only bug. We have a fixed 16 MB buffer here, being
presented to the spice-server as qxl video memory in case spice is
used with a non-qxl card. It's also used with qxl in vga mode.
When using display resolutions requiring more than 16 MB of memory we
are goi... |
Status ReduceScatterShape(shape_inference::InferenceContext* c) {
shape_inference::ShapeHandle in = c->input(0);
if (!c->RankKnown(in)) {
// Input shape unknown, so set unknown output shape.
c->set_output(0, in);
return Status::OK();
}
shape_inference::ShapeHandle group_assignment_shape = c->input(... | 0 | [
"CWE-125"
] | tensorflow | a0d64445116c43cf46a5666bd4eee28e7a82f244 | 111,704,021,154,217,620,000,000,000,000,000,000,000 | 39 | Prevent OOB access in QuantizeV2 shape inference
PiperOrigin-RevId: 400309614
Change-Id: I31412c71b05b4f21b677f7fa715a61499cbee39d |
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;
struct page *page;
/* FOLL_DUMP will return -EFAULT on huge zero page */
page = follow_trans_huge_pmd(vma, addr, pmd, FOLL_DUMP);
if (IS_ERR_OR... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 37,210,526,967,370,860,000,000,000,000,000,000,000 | 21 | 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 void hci_cc_le_add_to_white_list(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_cp_le_add_to_white_list *sent;
__u8 status = *((__u8 *) skb->data);
BT_DBG("%s status 0x%2.2x", hdev->name, status);
if (status)
return;
sent = hci_sent_cmd_data(hdev, HCI_OP_LE_ADD_TO_WHITE_LIST);
if (!sent)... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 237,046,576,589,925,440,000,000,000,000,000,000,000 | 18 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
ZEND_METHOD(exception, getTraceAsString)
{
zval *trace;
char *res, **str, *s_tmp;
int res_len = 0, *len = &res_len, num = 0;
DEFAULT_0_PARAMS;
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
if(Z_TYPE_P(trace) != IS_ARRAY) {
RETURN_FALSE;
}
res = estrdu... | 0 | [
"CWE-20"
] | php-src | 4d2278143a08b7522de9471d0f014d7357c28fea | 42,864,013,534,554,270,000,000,000,000,000,000,000 | 26 | Fix #69793 - limit what we accept when unserializing exception |
CImg<T>& blur_anisotropic(const CImg<t>& G,
const float amplitude=60, const float dl=0.8f, const float da=30,
const float gauss_prec=2, const unsigned int interpolation_type=0,
const bool is_fast_approx=1) {
// Check ar... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 152,466,593,164,560,620,000,000,000,000,000,000,000 | 269 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt,
unsigned long addr,
const void *old,
const void *new,
unsigned int bytes,
struct x86_exception *exception)
{
struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
gpa_t gpa;
struct page *page;
char *kaddr;
bool e... | 0 | [] | linux | f78146b0f9230765c6315b2e14f56112513389ad | 139,154,484,557,793,950,000,000,000,000,000,000,000 | 65 | KVM: Fix page-crossing MMIO
MMIO that are split across a page boundary are currently broken - the
code does not expect to be aborted by the exit to userspace for the
first MMIO fragment.
This patch fixes the problem by generalizing the current code for handling
16-byte MMIOs to handle a number of "fragments", and cha... |
TEST_P(ProtocolIntegrationTest, 304WithBody) {
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
auto response = codec_client_->makeHeaderOnlyRequest(default_request_headers_);
waitForNextUpstreamRequest();
Http::TestResponseHeaderMapImpl response_headers{{":status", "304"}, {"content-l... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 125,270,908,201,251,100,000,000,000,000,000,000,000 | 42 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, const char* hostname, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify)
{
GIOChannel *handle, *ssl_handle;
handle = net_connect_ip(ip, port, my_ip);
if (handle == NULL)
return NULL;
ssl_handle = irssi_... | 0 | [
"CWE-20"
] | irssi-proxy | 85bbc05b21678e80423815d2ef1dfe26208491ab | 307,597,078,870,597,000,000,000,000,000,000,000,000 | 12 | Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
void Binary::remove_section(const std::string& name, bool clear) {
Section* sec_to_delete = get_section(name);
if (sec_to_delete == nullptr) {
LIEF_ERR("Can't find section '{}'", name);
return;
}
SegmentCommand* segment = sec_to_delete->segment();
if (segment == nullptr) {
LIEF_ERR("The section {}... | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 231,359,571,921,568,750,000,000,000,000,000,000,000 | 15 | Resolve #764 |
static int pharobj_cancompress(HashTable *manifest) /* {{{ */
{
int test;
test = 1;
zend_hash_apply_with_argument(manifest, phar_test_compression, &test);
return test;
} | 0 | [
"CWE-20"
] | php-src | 1e9b175204e3286d64dfd6c9f09151c31b5e099a | 299,187,106,257,991,900,000,000,000,000,000,000,000 | 8 | Fix bug #71860: Require valid paths for phar filenames |
void o2nm_node_put(struct o2nm_node *node)
{
config_item_put(&node->nd_item);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 853bc26a7ea39e354b9f8889ae7ad1492ffa28d2 | 76,677,731,929,642,180,000,000,000,000,000,000,000 | 4 | 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... |
void ssl3_free_digest_list(SSL *s)
{
int i;
if (!s->s3->handshake_dgst) return;
for (i=0;i<SSL_MAX_DIGEST;i++)
{
if (s->s3->handshake_dgst[i])
EVP_MD_CTX_destroy(s->s3->handshake_dgst[i]);
}
OPENSSL_free(s->s3->handshake_dgst);
s->s3->handshake_dgst=NULL;
} | 0 | [
"CWE-310"
] | openssl | e5420be6cd09af2550b128575a675490cfba0483 | 183,830,931,493,603,140,000,000,000,000,000,000,000 | 12 | Make CBC decoding constant time.
This patch makes the decoding of SSLv3 and TLS CBC records constant
time. Without this, a timing side-channel can be used to build a padding
oracle and mount Vaudenay's attack.
This patch also disables the stitched AESNI+SHA mode pending a similar
fix to that code.
In order to be eas... |
php_apache_sapi_flush(void *server_context)
{
php_struct *ctx;
request_rec *r;
TSRMLS_FETCH();
ctx = server_context;
/* If we haven't registered a server_context yet,
* then don't bother flushing. */
if (!server_context) {
return;
}
r = ctx->r;
sapi_send_headers(TSRMLS_C);
r->status = SG(sapi_headers... | 0 | [
"CWE-20"
] | php-src | 809610f5ea38a83b284e1125d1fff129bdd615e7 | 54,013,440,891,681,030,000,000,000,000,000,000,000 | 25 | Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) |
virNodeDevCapsDefParseULong(const char *xpath,
xmlXPathContextPtr ctxt,
unsigned *value,
virNodeDeviceDefPtr def,
const char *missing_error_fmt,
const char *invalid_error_fmt)
{
... | 0 | [
"CWE-119"
] | libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 21,312,516,925,177,698,000,000,000,000,000,000,000 | 21 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... |
genjmp2(codegen_scope *s, mrb_code i, uint16_t a, uint32_t pc, int val)
{
uint32_t pos;
if (!no_peephole(s) && !val) {
struct mrb_insn_data data = mrb_last_insn(s);
switch (data.insn) {
case OP_MOVE:
if (data.a == a && data.a > s->nlocals) {
rewind_pc(s);
a = data.b;
}
... | 0 | [
"CWE-415",
"CWE-122"
] | mruby | 38b164ace7d6ae1c367883a3d67d7f559783faad | 181,634,958,757,195,480,000,000,000,000,000,000,000 | 56 | codegen.c: fix a bug in `gen_values()`.
- Fix limit handling that fails 15 arguments method calls.
- Fix too early argument packing in arrays. |
g_deinit(void)
{
#if defined(_WIN32)
WSACleanup();
#endif
g_rm_temp_dir();
} | 0 | [] | xrdp | cadad6e181d2a67698e5eb7cacd6b233ae29eb97 | 161,499,833,803,162,160,000,000,000,000,000,000,000 | 7 | /tmp cleanup |
struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
unsigned int id)
{
return kvm_x86_ops->vcpu_create(kvm, id);
} | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 56,112,551,185,191,660,000,000,000,000,000,000,000 | 5 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
static bool is_obsolete_sp(struct kvm *kvm, struct kvm_mmu_page *sp)
{
if (sp->role.invalid)
return true;
/* TDP MMU pages due not use the MMU generation. */
return !sp->tdp_mmu_page &&
unlikely(sp->mmu_valid_gen != kvm->arch.mmu_valid_gen);
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 31,023,178,396,036,390,000,000,000,000,000,000,000 | 9 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
void CWebServer::Cmd_SystemShutdown(WebEmSession & session, const request& req, Json::Value &root)
{
if (session.rights != 2)
{
session.reply_status = reply::forbidden;
return; //Only admin user allowed
}
#ifdef WIN32
int ret = system("shutdown -s -f -t 1 -d up:125:1");
#else
int ret = system... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 79,680,056,310,181,310,000,000,000,000,000,000,000 | 20 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
invoke_NPN_PrintData(PluginInstance *plugin, uint32_t platform_print_id, NPPrintData *printData)
{
if (printData == NULL)
return;
npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection));
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_PRINT_DATA,
RPC_TYPE_UINT32, platfor... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 330,368,020,693,034,400,000,000,000,000,000,000,000 | 25 | Support all the new variables added |
static errno_t sssctl_backup(bool force)
{
const char *files[] = {SSS_BACKUP_USER_OVERRIDES,
SSS_BACKUP_GROUP_OVERRIDES,
NULL};
enum sssctl_prompt_result prompt;
errno_t ret;
ret = sssctl_create_backup_dir(SSS_BACKUP_DIR);
if (ret != EOK) {
... | 1 | [
"CWE-78"
] | sssd | 7ab83f97e1cbefb78ece17232185bdd2985f0bbe | 330,523,350,166,596,400,000,000,000,000,000,000,000 | 45 | TOOLS: replace system() with execvp() to avoid execution of user supplied command
:relnote: A flaw was found in SSSD, where the sssctl command was
vulnerable to shell command injection via the logs-fetch and
cache-expire subcommands. This flaw allows an attacker to trick
the root user into running a specially crafted ... |
static void ev_proto_error(h2_proxy_session *session, int arg, const char *msg)
{
switch (session->state) {
case H2_PROXYS_ST_DONE:
case H2_PROXYS_ST_LOCAL_SHUTDOWN:
/* just leave */
transit(session, "proto error", H2_PROXYS_ST_DONE);
break;
defau... | 0 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 108,336,246,654,258,400,000,000,000,000,000,000,000 | 16 | * fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now,
mpm event backport to 2.4.x up for vote).
* Fixes stream cleanup when connection throttling is in place.
* Counts stream resets by client on streams initiated by client as cause
for connection throttling.
* Header length checks are no... |
int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
{
struct btrfs_key key;
struct btrfs_root *dev_root = fs_info->dev_root;
struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
struct extent_buffer *eb;
int slot;
int ret = 0;
struct btrfs_path *path = NULL;
int item_size;
struct btrfs_dev_repl... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 91,096,879,090,382,510,000,000,000,000,000,000,000 | 140 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
GF_RTPHinter *gf_hinter_track_new(GF_ISOFile *file, u32 TrackNum,
u32 Path_MTU, u32 max_ptime, u32 default_rtp_rate, u32 flags, u8 PayloadID,
Bool copy_media, u32 InterleaveGroupID, u8 InterleaveGroupPriority, GF_Err *e)
{
GF_SLConfig my_sl;
u32 des... | 1 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 52,704,732,978,928,150,000,000,000,000,000,000,000 | 443 | fixed #1706 |
int allPersistenceDisabled(void) {
return server.saveparamslen == 0 && server.aof_state == AOF_OFF;
} | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 109,344,120,643,823,850,000,000,000,000,000,000,000 | 3 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
void Jp2Image::writeMetadata()
{
if (io_->open() != 0)
{
throw Error(kerDataSourceOpenFailed, io_->path(), strError());
}
IoCloser closer(*io_);
BasicIo::AutoPtr tempIo(new MemIo);
assert (tempIo.get() != 0);
doWriteMetadata(*tempIo); // may t... | 0 | [
"CWE-125"
] | exiv2 | f6ee71526eef5649a529ac6da3f2843e3b63e227 | 31,769,029,115,867,670,000,000,000,000,000,000,000 | 15 | Add more bounds checks in Jp2Image::encodeJp2Header |
static int copy_tiles_additional_pass(void) {
int x, y, n;
int diffs = 0, ct;
if (unixpw_in_progress) return 0;
for (y=0; y < ntiles_y; y++) {
for (x=0; x < ntiles_x; x++) {
n = x + y * ntiles_x; /* number of this tile */
if (! tile_has_diff[n]) {
continue;
}
if (tile_copied[n]) {
continue... | 0 | [
"CWE-862",
"CWE-284",
"CWE-732"
] | x11vnc | 69eeb9f7baa14ca03b16c9de821f9876def7a36a | 318,391,645,954,495,550,000,000,000,000,000,000,000 | 28 | scan: limit access to shared memory segments to current user |
static bool vgacon_scroll(struct vc_data *c, unsigned int t, unsigned int b,
enum con_scroll dir, unsigned int lines)
{
unsigned long oldo;
unsigned int delta;
if (t || b != c->vc_rows || vga_is_gfx || c->vc_mode != KD_TEXT)
return false;
if (!vga_hardscroll_enabled || lines >= c->vc_rows / 2)
return false;... | 1 | [
"CWE-125"
] | linux | 973c096f6a85e5b5f2a295126ba6928d9a6afd45 | 255,874,837,462,257,100,000,000,000,000,000,000,000 | 48 | vgacon: remove software scrollback support
Yunhai Zhang recently fixed a VGA software scrollback bug in commit
ebfdfeeae8c0 ("vgacon: Fix for missing check in scrollback handling"),
but that then made people look more closely at some of this code, and
there were more problems on the vgacon side, but also the fbcon sof... |
SpoolssStartDocPrinter_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
dcerpc_info *di, guint8 *drep)
{
/* Parse packet */
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
hf_job_id, NULL);
offset = dissect_doserror(
tvb, offset, pinfo, tree, di, drep, hf... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 296,861,051,994,290,640,000,000,000,000,000,000,000 | 14 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
setup (Test *test,
gconstpointer data)
{
test->auth = cockpit_auth_new (FALSE);
} | 0 | [] | cockpit | c51f6177576d7e12614c64d316cf0b67addd17c9 | 104,357,946,266,092,100,000,000,000,000,000,000,000 | 5 | ws: Fix bug parsing invalid base64 headers
The len parameter to g_base64_decode_inplace() is a inout
parameter, and needs to be initialized. Lets just use
the simpler g_base64_decode() function. This fixes a segfault.
Closes #10819 |
CONST_EDGE_TO_ENTRY_CONN(const edge_connection_t *c)
{
return EDGE_TO_ENTRY_CONN((edge_connection_t*)c);
} | 0 | [
"CWE-532"
] | tor | 80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9 | 67,990,113,126,659,800,000,000,000,000,000,000,000 | 4 | Log warning when connecting to soon-to-be-deprecated v2 onions. |
u32 _ilog_(u32 v)
{
u32 ret=0;
while(v) {
ret++;
v>>=1;
}
return(ret);
} | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 45,031,840,860,969,850,000,000,000,000,000,000,000 | 9 | fix some exploitable overflows (#994, #997) |
*/
static int client_mpvio_write_packet(struct st_plugin_vio *mpv,
const uchar *pkt, int pkt_len)
{
int res;
MCPVIO_EXT *mpvio= (MCPVIO_EXT*)mpv;
if (mpvio->packets_written == 0)
{
if (mpvio->mysql_change_user)
res= send_change_user_packet(mpvio, pkt, pkt_len);
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 170,297,720,117,517,000,000,000,000,000,000,000,000 | 37 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static void ax_changedmtu(struct mkiss *ax)
{
struct net_device *dev = ax->dev;
unsigned char *xbuff, *rbuff, *oxbuff, *orbuff;
int len;
len = dev->mtu * 2;
/*
* allow for arrival of larger UDP packets, even if we say not to
* also fixes a bug in which SunOS sends 512-byte packets even with
* an MSS of 128... | 0 | [
"CWE-416"
] | linux | b2f37aead1b82a770c48b5d583f35ec22aabb61e | 156,631,696,122,685,340,000,000,000,000,000,000,000 | 65 | hamradio: improve the incomplete fix to avoid NPD
The previous commit 3e0588c291d6 ("hamradio: defer ax25 kfree after
unregister_netdev") reorder the kfree operations and unregister_netdev
operation to prevent UAF.
This commit improves the previous one by also deferring the nullify of
the ax->tty pointer. Otherwise, ... |
int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
{
return snd_pcm_update_hw_ptr0(substream, 0);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 98,797,027,309,580,120,000,000,000,000,000,000,000 | 4 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... |
static void amd_gpio_irq_handler(struct irq_desc *desc)
{
u32 i;
u32 off;
u32 reg;
u32 pin_reg;
u64 reg64;
int handled = 0;
unsigned int irq;
unsigned long flags;
struct irq_chip *chip = irq_desc_get_chip(desc);
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct amd_gpio *gpio_dev = gpiochip_get_... | 0 | [
"CWE-415"
] | linux | 251e22abde21833b3d29577e4d8c7aaccd650eee | 100,972,582,572,961,800,000,000,000,000,000,000,000 | 59 | pinctrl: amd: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration and clean
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> |
static int ssl_negotiate (CONNECTION *conn, sslsockdata* ssldata)
{
int err;
const char* errmsg;
if ((HostExDataIndex = SSL_get_ex_new_index (0, "host", NULL, NULL, NULL)) == -1)
{
dprint (1, (debugfile, "failed to get index for application specific data\n"));
return -1;
}
if (! SSL_set_ex_data (s... | 0 | [
"CWE-74"
] | mutt | c547433cdf2e79191b15c6932c57f1472bfb5ff4 | 111,593,443,752,509,800,000,000,000,000,000,000,000 | 75 | Fix STARTTLS response injection attack.
Thanks again to Damian Poddebniak and Fabian Ising from the Münster
University of Applied Sciences for reporting this issue. Their
summary in ticket 248 states the issue clearly:
We found another STARTTLS-related issue in Mutt. Unfortunately, it
affects SMTP, POP3 and IMAP... |
static int ath6kl_wmi_proc_events_vif(struct wmi *wmi, u16 if_idx, u16 cmd_id,
u8 *datap, u32 len)
{
struct ath6kl_vif *vif;
vif = ath6kl_get_vif_by_index(wmi->parent_dev, if_idx);
if (!vif) {
ath6kl_dbg(ATH6KL_DBG_WMI,
"Wmi event for unavailable vif, vif_index:%d\n",
if_idx);
return -EINVAL;
... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 212,635,819,624,247,960,000,000,000,000,000,000,000 | 82 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
proto_tree *tree, guint8 *drep _U_, char **data,
int hf_name)
{
gint len, remaining;
char *text;
if (offset % 2)
offset += 2 - (offset % 2);
/* Get remaining data in buffer as a string */
remaining = tvb_captured_length_rem... | 1 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 117,070,056,112,412,590,000,000,000,000,000,000,000 | 31 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
static int dmg_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVDMGState *s = bs->opaque;
uint64_t info_begin, info_end, last_in_offset, last_out_offset;
uint32_t count, tmp;
uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;
int64_t offset;
... | 1 | [
"CWE-119"
] | qemu | f0dce23475b5af5da6b17b97c1765271307734b6 | 125,419,023,656,339,090,000,000,000,000,000,000,000 | 179 | dmg: prevent chunk buffer overflow (CVE-2014-0145)
Both compressed and uncompressed I/O is buffered. dmg_open() calculates
the maximum buffer size needed from the metadata in the image file.
There is currently a buffer overflow since ->lengths[] is accounted
against the maximum compressed buffer size but actually us... |
static inline void make_dentry_ptr_inline(struct inode *inode,
struct f2fs_dentry_ptr *d, void *t)
{
int entry_cnt = NR_INLINE_DENTRY(inode);
int bitmap_size = INLINE_DENTRY_BITMAP_SIZE(inode);
int reserved_size = INLINE_RESERVED_SIZE(inode);
d->inode = inode;
d->max = entry_cnt;
d->nr_bitmap = bitmap_size;... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 49,486,221,111,648,800,000,000,000,000,000,000,000 | 15 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
void lcdSetPixels_ArrayBuffer_flat(JsGraphics *gfx, short x, short y, short pixelCount, unsigned int col) {
unsigned char *ptr = (unsigned char*)gfx->backendData;
unsigned int idx = lcdGetPixelIndex_ArrayBuffer(gfx,x,y,pixelCount);
ptr += idx>>3;
unsigned int whiteMask = (1U<<gfx->data.bpp)-1;
bool shortCut ... | 0 | [
"CWE-125"
] | Espruino | 8a44b04b584b3d3ab1cb68fed410f7ecb165e50e | 323,901,927,311,632,530,000,000,000,000,000,000,000 | 45 | Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421) |
static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
int alen, int flags)
{
struct sock *sk = sock->sk;
struct net *net = sock_net(sk);
struct sockaddr_un *sunaddr = (struct sockaddr_un *)addr;
struct sock *other;
unsigned int hash;
int err;
err = -EINVAL;
if (alen < offsetofend(s... | 0 | [
"CWE-362"
] | linux | cbcf01128d0a92e131bd09f1688fe032480b65ca | 103,770,054,018,414,650,000,000,000,000,000,000,000 | 79 | af_unix: fix garbage collect vs MSG_PEEK
unix_gc() assumes that candidate sockets can never gain an external
reference (i.e. be installed into an fd) while the unix_gc_lock is
held. Except for MSG_PEEK this is guaranteed by modifying inflight
count under the unix_gc_lock.
MSG_PEEK does not touch any variable protec... |
static unsigned int _rtl_rx_get_padding(struct ieee80211_hdr *hdr,
unsigned int len)
{
#if NET_IP_ALIGN != 0
unsigned int padding = 0;
#endif
/* make function no-op when possible */
if (NET_IP_ALIGN == 0 || len < sizeof(*hdr))
return 0;
#if NET_IP_ALIGN != 0
/* alignment calculation as in lbtf_rx() / carl9... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 3f93616951138a598d930dcaec40f2bfd9ce43bb | 77,044,531,698,912,030,000,000,000,000,000,000,000 | 34 | rtlwifi: prevent memory leak in rtl_usb_probe
In rtl_usb_probe if allocation for usb_data fails the allocated hw
should be released. In addition the allocated rtlpriv->usb_data should
be released on error handling path.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeau... |
void blkcg_policy_unregister(struct blkcg_policy *pol)
{
struct blkcg *blkcg;
mutex_lock(&blkcg_pol_register_mutex);
if (WARN_ON(blkcg_policy[pol->plid] != pol))
goto out_unlock;
/* kill the intf files first */
if (pol->dfl_cftypes)
cgroup_rm_cftypes(pol->dfl_cftypes);
if (pol->legacy_cftypes)
cgroup_rm_... | 0 | [
"CWE-415"
] | linux | 9b54d816e00425c3a517514e0d677bb3cec49258 | 256,052,073,740,118,030,000,000,000,000,000,000,000 | 32 | blkcg: fix double free of new_blkg in blkcg_init_queue
If blkg_create fails, new_blkg passed as an argument will
be freed by blkg_create, so there is no need to free it again.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Jens Axboe <axboe@fb.com> |
Status AuthorizationManager::acquirePrivilegesFromPrivilegeDocument(
const std::string& dbname, const PrincipalName& principal, const BSONObj& privilegeDocument) {
if (!_authenticatedPrincipals.lookup(principal)) {
return Status(ErrorCodes::UserNotFound,
mon... | 0 | [
"CWE-264"
] | mongo | 23344f8b7506df694f66999693ee3c00dfd6afae | 336,839,802,343,635,060,000,000,000,000,000,000,000 | 13 | SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user.
Uncorrected, this can cause replica set heartbeats to stall behind operations
that hold the read lock for a long time. |
Py_SymtableString(const char *str, const char *filename_str, int start)
{
PyObject *filename;
struct symtable *st;
filename = PyUnicode_DecodeFSDefault(filename_str);
if (filename == NULL)
return NULL;
st = Py_SymtableStringObject(str, filename, start);
Py_DECREF(filename);
return s... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 150,264,023,349,983,360,000,000,000,000,000,000,000 | 12 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
init_driver(driver_instance *d, driver_info *drivers_available,
int size_of_info, uschar *class)
{
driver_info *dd;
for (dd = drivers_available; dd->driver_name[0] != 0;
dd = (driver_info *)(((uschar *)dd) + size_of_info))
{
if (Ustrcmp(d->driver_name, dd->driver_name) == 0)
{
int i;
int len = d... | 0 | [
"CWE-264"
] | exim | e2f5dc151e2e79058e93924e6d35510557f0535d | 86,307,805,813,190,580,000,000,000,000,000,000,000 | 26 | Check configure file permissions even for non-default files if still privileged
(Bug 1044, CVE-2010-4345) |
R_API RBinPlugin *r_bin_get_binplugin_by_bytes(RBin *bin, const ut8 *bytes, ut64 sz) {
RBinPlugin *plugin;
RListIter *it;
if (!bin || !bytes) {
return NULL;
}
r_list_foreach (bin->plugins, it, plugin) {
if (plugin->check_bytes && plugin->check_bytes (bytes, sz)) {
return plugin;
}
}
return NULL;
} | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 301,625,878,157,937,230,000,000,000,000,000,000,000 | 13 | Fix #8748 - Fix oobread on string search |
int mailimf_fws_parse(const char * message, size_t length, size_t * indx)
{
size_t cur_token;
size_t final_token;
int fws_1;
int fws_2;
int fws_3;
int r;
cur_token = * indx;
fws_1 = FALSE;
while (1) {
r = mailimf_wsp_parse(message, length, &cur_token);
if (r != MAILIMF_NO_ERROR) {
if... | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 275,571,135,517,146,970,000,000,000,000,000,000,000 | 60 | Fixed crash #274 |
static inline void f2fs_lock_op(struct f2fs_sb_info *sbi)
{
down_read(&sbi->cp_rwsem);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 180,071,383,000,660,550,000,000,000,000,000,000,000 | 4 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
static int snd_compress_dev_disconnect(struct snd_device *device)
{
struct snd_compr *compr;
compr = device->device_data;
snd_unregister_device(SNDRV_DEVICE_TYPE_COMPRESS, compr->card,
compr->device);
return 0;
} | 0 | [
"CWE-703"
] | linux | 6217e5ede23285ddfee10d2e4ba0cc2d4c046205 | 290,778,070,965,372,860,000,000,000,000,000,000,000 | 9 | ALSA: compress: fix an integer overflow check
I previously added an integer overflow check here but looking at it now,
it's still buggy.
The bug happens in snd_compr_allocate_buffer(). We multiply
".fragments" and ".fragment_size" and that doesn't overflow but then we
save it in an unsigned int so it truncates the h... |
static void geneve_build_header(struct genevehdr *geneveh,
const struct ip_tunnel_info *info)
{
geneveh->ver = GENEVE_VER;
geneveh->opt_len = info->options_len / 4;
geneveh->oam = !!(info->key.tun_flags & TUNNEL_OAM);
geneveh->critical = !!(info->key.tun_flags & TUNNEL_CRIT_OPT);
geneveh->rsvd1 = 0;
tunnel_id... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 95,182,579,534,662,830,000,000,000,000,000,000,000 | 15 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
static inline void respond_ID(struct tty_struct *tty)
{
respond_string(VT102ID, tty->port);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 242,048,631,905,638,200,000,000,000,000,000,000,000 | 4 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
virNodeDeviceDefFree(virNodeDeviceDefPtr def)
{
virNodeDevCapsDefPtr caps;
if (!def)
return;
VIR_FREE(def->name);
VIR_FREE(def->parent);
VIR_FREE(def->parent_wwnn);
VIR_FREE(def->parent_wwpn);
VIR_FREE(def->parent_fabric_wwn);
VIR_FREE(def->driver);
VIR_FREE(def->sysfs_path... | 0 | [
"CWE-119"
] | libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 261,216,536,634,924,660,000,000,000,000,000,000,000 | 27 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... |
static void _fb_rdunlock(void)
{
slurm_mutex_lock(&file_bcast_mutex);
fb_read_lock--;
slurm_cond_broadcast(&file_bcast_cond);
slurm_mutex_unlock(&file_bcast_mutex);
} | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 234,170,206,385,953,800,000,000,000,000,000,000,000 | 7 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
Item_return_date_time(const char *name_arg, enum_field_types field_type_arg)
:Item_partition_func_safe_string(name_arg, 0, &my_charset_bin),
date_time_field_type(field_type_arg)
{ } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 300,854,953,344,313,300,000,000,000,000,000,000,000 | 4 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
ecb_ews_disconnect_sync (ECalMetaBackend *meta_backend,
GCancellable *cancellable,
GError **error)
{
ECalBackendEws *cbews;
g_return_val_if_fail (E_IS_CAL_BACKEND_EWS (meta_backend), FALSE);
cbews = E_CAL_BACKEND_EWS (meta_backend);
ecb_ews_unset_connection (cbews);
return TRUE;
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 288,254,622,763,791,460,000,000,000,000,000,000,000 | 14 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
long vorbis_book_decodev_add(codebook *book,float *a,oggpack_buffer *b,int n){
if(book->used_entries>0){
int i,j,entry;
float *t;
for(i=0;i<n;){
entry = decode_packed_entry_number(book,b);
if(entry==-1)return(-1);
t = book->valuelist+entry*book->dim;
for(j=0;i<n && j<book->dim... | 0 | [
"CWE-787"
] | vorbis | 667ceb4aab60c1f74060143bb24e5f427b3cce5f | 175,054,424,556,224,740,000,000,000,000,000,000,000 | 15 | CVE-2018-5146: Prevent out-of-bounds write in codebook decoding.
Codebooks that are not an exact divisor of the partition size are now
truncated to fit within the partition. |
InputEvent *qemu_input_event_new_key(KeyValue *key, bool down)
{
InputEvent *evt = g_new0(InputEvent, 1);
evt->u.key.data = g_new0(InputKeyEvent, 1);
evt->type = INPUT_EVENT_KIND_KEY;
evt->u.key.data->key = key;
evt->u.key.data->down = down;
return evt;
} | 0 | [
"CWE-772"
] | qemu | fa18f36a461984eae50ab957e47ec78dae3c14fc | 22,907,967,395,200,716,000,000,000,000,000,000,000 | 9 | input: limit kbd queue depth
Apply a limit to the number of items we accept into the keyboard queue.
Impact: Without this limit vnc clients can exhaust host memory by
sending keyboard events faster than qemu feeds them to the guest.
Fixes: CVE-2017-8379
Cc: P J P <ppandit@redhat.com>
Cc: Huawei PSIRT <PSIRT@huawei.c... |
int __init early_acpi_boot_init(void)
{
/*
* If acpi_disabled, bail out
*/
if (acpi_disabled)
return 1;
/*
* Process the Multiple APIC Description Table (MADT), if present
*/
early_acpi_process_madt();
/*
* Hardware-reduced ACPI mode initialization:
*/
acpi_reduced_hw_init();
return 0;
} | 0 | [
"CWE-120"
] | linux | dad5ab0db8deac535d03e3fe3d8f2892173fa6a4 | 172,156,366,183,508,280,000,000,000,000,000,000,000 | 20 | x86/acpi: Prevent out of bound access caused by broken ACPI tables
The bus_irq argument of mp_override_legacy_irq() is used as the index into
the isa_irq_to_gsi[] array. The bus_irq argument originates from
ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI
tables, but is nowhere sanity checked.
Th... |
inline Item *and_conds(THD *thd, Item *a, Item *b)
{
if (!b) return a;
if (!a) return b;
return new (thd->mem_root) Item_cond_and(thd, a, b);
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 294,545,145,426,933,720,000,000,000,000,000,000,000 | 6 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
void mbedtls_ssl_buffering_free( mbedtls_ssl_context *ssl )
{
unsigned offset;
mbedtls_ssl_handshake_params * const hs = ssl->handshake;
if( hs == NULL )
return;
ssl_free_buffered_record( ssl );
for( offset = 0; offset < MBEDTLS_SSL_MAX_BUFFERED_HS; offset++ )
ssl_buffering_free_s... | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 96,123,887,778,208,180,000,000,000,000,000,000,000 | 13 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_op *op_data = opline+1;
zend_free_op free_op2;
zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
zval *property_name = _get_zval_ptr_var(&opline->op2, EX(Ts... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 183,917,272,854,179,280,000,000,000,000,000,000,000 | 25 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static void save_host_msrs(struct kvm_vcpu *vcpu)
{
#ifdef CONFIG_X86_64
rdmsrl(MSR_GS_BASE, to_svm(vcpu)->host_gs_base);
#endif
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 298,134,126,188,081,650,000,000,000,000,000,000,000 | 6 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor)
{
float _angle = ((float) (-degrees / 180.0f) * (float)M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int... | 0 | [
"CWE-125"
] | libgd | 4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a | 260,763,620,842,067,720,000,000,000,000,000,000,000 | 55 | Fixed memory overrun bug in gdImageScaleTwoPass
_gdContributionsCalc would compute a window size and then adjust
the left and right positions of the window to make a window within
that size. However, it was storing the values in the struct *before*
it made the adjustment. This change fixes that. |
snmpDecodePacket(SnmpRequest * rq)
{
struct snmp_pdu *PDU;
u_char *Community;
u_char *buf = rq->buf;
int len = rq->len;
if (!Config.accessList.snmp) {
debugs(49, DBG_IMPORTANT, "WARNING: snmp_access not configured. agent query DENIED from : " << rq->from);
return;
}
debugs(... | 0 | [
"CWE-772"
] | squid | 983c5c36e5f109512ed1af38a329d0b5d0967498 | 62,622,467,225,202,780,000,000,000,000,000,000,000 | 41 | Fix memory leak when parsing SNMP packet (#313)
SNMP queries denied by snmp_access rules and queries with certain
unsupported SNMPv2 commands were leaking a few hundred bytes each. Such
queries trigger "SNMP agent query DENIED from..." WARNINGs in cache.log. |
http_loop (struct url *u, struct url *original_url, char **newloc,
char **local_file, const char *referer, int *dt, struct url *proxy,
struct iri *iri)
{
int count;
bool got_head = false; /* used for time-stamping and filename detection */
bool time_came_from_head = false;
bool got... | 0 | [
"CWE-20"
] | wget | 3e25a9817f47fbb8660cc6a3b2f3eea239526c6c | 97,806,534,825,385,080,000,000,000,000,000,000,000 | 544 | Introduce --trust-server-names. Close CVE-2010-2252. |
WasmResult enqueue(uint32_t token, absl::string_view value) {
absl::WriterMutexLock l(&mutex);
auto it = queues.find(token);
if (it == queues.end()) {
return WasmResult::NotFound;
}
it->second.queue.push_back(std::string(value));
auto vm_id = it->second.vm_id;
auto context_id = it->s... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 69,467,347,988,495,320,000,000,000,000,000,000,000 | 17 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
static int reencrypt_wipe_moved_segment(struct crypt_device *cd, struct luks2_reencrypt *rh)
{
int r = 0;
uint64_t offset, length;
if (rh->jobj_segment_moved) {
offset = json_segment_get_offset(rh->jobj_segment_moved, 0);
length = json_segment_get_size(rh->jobj_segment_moved, 0);
log_dbg(cd, "Wiping %" PRIu64... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 265,109,533,787,986,370,000,000,000,000,000,000,000 | 16 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
ioat3_prep_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
unsigned int src_cnt, const unsigned char *scf, size_t len,
enum sum_check_flags *pqres, unsigned long flags)
{
/* specify valid address for disabled result */
if (flags & DMA_PREP_PQ_DISABLE_P)
pq[0] = pq[1];
if (flags & DMA_PREP_PQ... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 157,850,971,466,048,950,000,000,000,000,000,000,000 | 21 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int vpc_read(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors)
{
BDRVVPCState *s = bs->opaque;
int ret;
int64_t offset;
int64_t sectors, sectors_per_block;
VHDFooter *footer = (VHDFooter *) s->footer_buf;
if (cpu_to_be32(footer->type) == VHD_FIXE... | 0 | [
"CWE-20"
] | qemu | 97f1c45c6f456572e5b504b8614e4a69e23b8e3a | 317,705,639,902,373,230,000,000,000,000,000,000,000 | 37 | vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144)
This adds checks to make sure that max_table_entries and block_size
are in sane ranges. Memory is allocated based on max_table_entries,
and block_size is used to calculate indices into that allocated
memory, so if these values are incorrec... |
long keyctl_describe_key(key_serial_t keyid,
char __user *buffer,
size_t buflen)
{
struct key *key, *instkey;
key_ref_t key_ref;
char *infobuf;
long ret;
int desclen, infolen;
key_ref = lookup_user_key(keyid, KEY_LOOKUP_PARTIAL, KEY_NEED_VIEW);
if (IS_ERR(key_ref)) {
/* viewing a key under constructio... | 0 | [
"CWE-347"
] | linux | ee8f844e3c5a73b999edf733df1c529d6503ec2f | 319,692,155,812,601,850,000,000,000,000,000,000,000 | 61 | KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings
This fixes CVE-2016-9604.
Keyrings whose name begin with a '.' are special internal keyrings and so
userspace isn't allowed to create keyrings by this name to prevent
shadowing. However, the patch that added the guard didn't fix
KEYCTL_JOIN_... |
maybe_bool CLua::callmaybefn(const char *fn, const char *params, ...)
{
va_list args;
va_start(args, params);
maybe_bool r = callmaybefn(fn, params, args);
va_end(args);
return r;
} | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 19,621,661,207,828,685,000,000,000,000,000,000,000 | 8 | Disable lua load(), loadstring() bytcode loading |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.