func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
GC_API GC_word GC_CALL GC_get_gc_no(void) { return GC_gc_no; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
256,946,667,926,209,740,000,000,000,000,000,000,000
4
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...
bool SM_io_parser<Decorator_>::check_sep(const char* sep) { char c; do in.get(c); while (isspace(c)); while (*sep != '\0') { if (*sep != c) { in.putback(c); return false; } ++sep; in.get(c); } in.putback(c); return true; }
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
286,312,218,572,703,400,000,000,000,000,000,000,000
14
Fix Nef_2 and Nef_S2 IO
_gsasl_gssapi_server_start (Gsasl_session * sctx, void **mech_data) { _Gsasl_gssapi_server_state *state; state = (_Gsasl_gssapi_server_state *) malloc (sizeof (*state)); if (state == NULL) return GSASL_MALLOC_ERROR; state->step = 0; state->cred = GSS_C_NO_CREDENTIAL; state->context = GSS_C_NO_CONTEXT;...
0
[ "CWE-125" ]
gsasl
796e4197f696261c1f872d7576371232330bcc30
256,477,134,053,841,100,000,000,000,000,000,000,000
16
GSSAPI server: Boundary check gss_wrap token (read OOB).
u8 gf_isom_get_pl_indication(GF_ISOFile *movie, GF_ISOProfileLevelType PL_Code) { GF_IsomInitialObjectDescriptor *iod; if (!movie || !movie->moov) return 0xFF; if (!movie->moov->iods || !movie->moov->iods->descriptor) return 0xFF; if (movie->moov->iods->descriptor->tag != GF_ODF_ISOM_IOD_TAG) return 0xFF; iod = (...
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
170,242,716,241,795,600,000,000,000,000,000,000,000
26
fixed #2120
static bool check_new_pcp(struct page *page) { return false; }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
40,362,163,188,116,946,000,000,000,000,000,000,000
4
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...
explicit EinsumOp(OpKernelConstruction* c) : OpKernel(c) { OP_REQUIRES_OK(c, c->GetAttr("equation", &equation_)); OP_REQUIRES_OK( c, EinsumHelper::ParseEquation( equation_, &input_labels_, &output_labels_, &label_types_, &input_label_counts_, &output_label_counts_, ...
0
[ "CWE-703", "CWE-824" ]
tensorflow
f09caa532b6e1ac8d2aa61b7832c78c5b79300c6
132,062,187,289,188,180,000,000,000,000,000,000,000
8
Fix EinsumHelper::ParseEquation to avoid uninitialized accesses. EinsumHelper::ParseEquation is supposed to return true or false in input_has_ellipsis and output_has_ellipsis to indicate whether there is ellipsis in the inputs and output. Previously, when there is no ellipsis in the inputs or output, the routine doesn...
void HttpsUpstream::error_reply(unsigned int status_code) { auto downstream = get_downstream(); if (!downstream) { attach_downstream( std::make_unique<Downstream>(this, handler_->get_mcpool(), 1)); downstream = get_downstream(); } auto &resp = downstream->response(); auto &balloc = downstrea...
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
325,216,161,897,843,960,000,000,000,000,000,000,000
43
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static struct btrfs_fs_devices *find_fsid_changed( struct btrfs_super_block *disk_super) { struct btrfs_fs_devices *fs_devices; /* * Handles the case where scanned device is part of an fs that had * multiple successful changes of FSID but currently device didn't * observe it. Meaning our fsid will be diff...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
125,437,865,782,918,620,000,000,000,000,000,000,000
34
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
static void vmx_vcpu_put(struct kvm_vcpu *vcpu) { __vmx_load_host_state(to_vmx(vcpu)); if (!vmm_exclusive) { __vcpu_clear(to_vmx(vcpu)); kvm_cpu_vmxoff(); } }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
293,050,059,918,637,650,000,000,000,000,000,000,000
8
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-...
ews_user_id_free (EwsUserId *id) { if (id) { g_free (id->sid); g_free (id->primary_smtp); g_free (id->display_name); g_free (id->distinguished_user); g_free (id->external_user); g_free (id); } }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
219,724,673,198,606,440,000,000,000,000,000,000,000
11
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
void ptirq_remove_intx_remapping(const struct acrn_vm *vm, uint32_t virt_gsi, bool pic_pin) { enum intx_ctlr vgsi_ctlr = pic_pin ? INTX_CTLR_PIC : INTX_CTLR_IOAPIC; spinlock_obtain(&ptdev_lock); remove_intx_remapping(vm, virt_gsi, vgsi_ctlr); spinlock_release(&ptdev_lock); }
0
[ "CWE-120", "CWE-787" ]
acrn-hypervisor
25c0e3817eb332660dd63d1d4522e63dcc94e79a
333,991,623,125,850,640,000,000,000,000,000,000,000
8
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: ...
void Http2IntegrationTest::simultaneousRequest(int32_t request1_bytes, int32_t request2_bytes) { FakeHttpConnectionPtr fake_upstream_connection1; FakeHttpConnectionPtr fake_upstream_connection2; Http::StreamEncoder* encoder1; Http::StreamEncoder* encoder2; FakeStreamPtr upstream_request1; FakeStreamPtr upst...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
138,127,990,751,227,720,000,000,000,000,000,000,000
68
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...
static inline void xenvif_tx_dealloc_action(struct xenvif *vif) { struct gnttab_unmap_grant_ref *gop; pending_ring_idx_t dc, dp; u16 pending_idx, pending_idx_release[MAX_PENDING_REQS]; unsigned int i = 0; dc = vif->dealloc_cons; gop = vif->tx_unmap_ops; /* Free up any grants we have finished using */ do { d...
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
189,644,631,930,454,220,000,000,000,000,000,000,000
65
xen-netback: disable rogue vif in kthread context When netback discovers frontend is sending malformed packet it will disables the interface which serves that frontend. However disabling a network interface involving taking a mutex which cannot be done in softirq context, so we need to defer this process to kthread c...
**/ CImg<T>& operator>>=(const char *const expression) { return *this>>=(+*this)._fill(expression,true,1,0,0,"operator>>=",this);
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
161,606,616,216,135,600,000,000,000,000,000,000,000
3
.
UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) { UBaseType_t uxReturn; Queue_t * const pxQueue = xQueue; configASSERT( pxQueue ); uxReturn = pxQueue->uxMessagesWaiting; return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not poi...
0
[ "CWE-200", "CWE-190" ]
FreeRTOS-Kernel
47338393f1f79558f6144213409f09f81d7c4837
156,366,495,844,566,740,000,000,000,000,000,000,000
10
add assert for addition overflow on queue creation (#225)
compileRule (FileInfo * nested) { int ok = 1; CharsString token; TranslationTableOpcode opcode; CharsString ruleChars; CharsString ruleDots; CharsString cells; CharsString scratchPad; TranslationTableCharacterAttributes after = 0; TranslationTableCharacterAttributes before = 0; int k; noback = no...
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
116,358,963,947,031,430,000,000,000,000,000,000,000
588
Merge branch 'table_resolver'
static inline void setup_syscall_restart(struct pt_regs *regs) { regs->ARM_r0 = regs->ARM_ORIG_r0; regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
77,010,842,540,068,490,000,000,000,000,000,000,000
5
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
AddInterp(CompatInfo *info, SymInterpInfo *new, bool same_file) { SymInterpInfo *old = FindMatchingInterp(info, new); if (old) { const int verbosity = xkb_context_get_log_verbosity(info->ctx); const bool report = (same_file && verbosity > 0) || verbosity > 9; enum si_field collide = 0; ...
0
[ "CWE-476" ]
libxkbcommon
96df3106d49438e442510c59acad306e94f3db4d
337,219,993,881,538,200,000,000,000,000,000,000,000
53
xkbcomp: Don't crash on no-op modmask expressions If we have an expression of the form 'l1' in an interp section, we unconditionally try to dereference its args, even if it has none. Signed-off-by: Daniel Stone <daniels@collabora.com>
static void cirrus_mem_writeb_mode4and5_8bpp(CirrusVGAState * s, unsigned mode, unsigned offset, uint32_t mem_value) { int x; unsigned val = mem_value; uint8_t *dst; dst = s->vga.vram_ptr + (offset &= s->cirrus_addr_mask); for (x = 0; x < 8; x++) { if (val & 0x80) { ...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
115,988,920,955,756,240,000,000,000,000,000,000,000
21
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
filter_data(uint64_t reqid, const char *line) { struct filter_session *fs; fs = tree_xget(&sessions, reqid); filter_data_internal(fs, 0, reqid, line); }
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
57,630,803,884,380,540,000,000,000,000,000,000,000
8
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
eog_image_load_error_message_area_new (const gchar *caption, const GError *error) { GtkWidget *message_area; gchar *error_message = NULL; gchar *message_details = NULL; gchar *pango_escaped_caption = NULL; g_return_val_if_fail (caption != NULL, NULL); g_return_val_if_fail (error != NULL, NULL); /* ...
0
[ "CWE-787" ]
eog
e99a8c00f959652fe7c10e2fa5a3a7a5c25e6af4
188,170,086,167,032,700,000,000,000,000,000,000,000
31
EogErrorMessageArea: Make sure error messages are valid UTF8 GMarkup requires valid UTF8 input strings and would cause odd looking messages if given invalid input. This could also trigger an out-of-bounds write in glib before 2.44.1. Reported by kaslovdmitri. https://bugzilla.gnome.org/show_bug.cgi?id=770143
static void print_repo(FILE *f, struct cgit_repo *repo) { struct string_list_item *item; fprintf(f, "repo.url=%s\n", repo->url); fprintf(f, "repo.name=%s\n", repo->name); fprintf(f, "repo.path=%s\n", repo->path); if (repo->owner) fprintf(f, "repo.owner=%s\n", repo->owner); if (repo->desc) { char *tmp = get_fi...
0
[]
cgit
1c581a072651524f3b0d91f33e22a42c4166dd96
280,266,104,526,857,130,000,000,000,000,000,000,000
69
ui-blob: Do not accept mimetype from user
filter_pread (struct backend *b, struct connection *conn, void *buf, uint32_t count, uint64_t offset, uint32_t flags, int *err) { struct backend_filter *f = container_of (b, struct backend_filter, backend); void *handle = connection_get_handle (conn, b->i); struct b_conn nxdata = { .b ...
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
127,638,675,171,534,820,000,000,000,000,000,000,000
14
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
static int _bpf_append_blk(struct bpf_program *prg, const struct bpf_blk *blk) { int rc; bpf_instr_raw *i_new; bpf_instr_raw *i_iter; unsigned int old_cnt = prg->blk_cnt; unsigned int iter; /* (re)allocate the program memory */ prg->blk_cnt += blk->blk_cnt; i_new = realloc(prg->blks, BPF_PGM_SIZE(prg)); if (i...
0
[]
libseccomp
cf5d1538d243fb6f1839db70b69469d3d7e9e077
220,668,694,722,467,260,000,000,000,000,000,000,000
66
bpf: pass the correct accumulator state to the next level We were mistakenly passing the wrong accumulator state (the state at the start of the instruction block, not at the end) which was causing us to generate unnecessary load instructions. Signed-off-by: Paul Moore <paul@paul-moore.com>
static void print_stats(const EncoderSession *encoder_session) { if(flac__utils_verbosity_ >= 2) { char ratiostr[16]; FLAC__ASSERT(encoder_session->total_samples_to_encode > 0); if (encoder_session->compression_ratio > 0.0) flac_snprintf(ratiostr, sizeof(ratiostr), "%0.3f", encoder_session->compression_rati...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
178,164,292,057,046,730,000,000,000,000,000,000,000
26
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
static bool svm_get_nested_state_pages(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); if (!nested_svm_vmrun_msrpm(svm)) { vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR; vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION; vcpu->run->internal.ndata = 0; return false; } return tr...
0
[ "CWE-416" ]
linux
a58d9166a756a0f4a6618e4f593232593d6df134
212,525,857,173,666,900,000,000,000,000,000,000,000
13
KVM: SVM: load control fields from VMCB12 before checking them Avoid races between check and use of the nested VMCB controls. This for example ensures that the VMRUN intercept is always reflected to the nested hypervisor, instead of being processed by the host. Without this patch, it is possible to end up with svm->...
void fdctrl_init_sysbus(qemu_irq irq, int dma_chann, hwaddr mmio_base, DriveInfo **fds) { FDCtrl *fdctrl; DeviceState *dev; SysBusDevice *sbd; FDCtrlSysBus *sys; dev = qdev_create(NULL, "sysbus-fdc"); sys = SYSBUS_FDC(dev); fdctrl = &sys->state; fdctrl->dma_chann...
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
273,158,444,191,233,250,000,000,000,000,000,000,000
23
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
pathWithEscapedSlashesAction() const override { return path_with_escaped_slashes_action_; }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
16,735,439,331,600,920,000,000,000,000,000,000,000
3
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static ssize_t proc_fault_inject_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file->f_dentry->d_inode); char buffer[PROC_NUMBUF]; size_t len; int make_it_fail; if (!task) return -ESRCH; make_it_fail = task->make_it_fail; put_task_...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
219,077,999,424,435,100,000,000,000,000,000,000,000
17
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
GF_Err uuid_Size(GF_Box *s) { GF_UnknownUUIDBox*ptr = (GF_UnknownUUIDBox*)s; ptr->size += ptr->dataSize; return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
259,694,722,436,730,700,000,000,000,000,000,000,000
6
prevent dref memleak on invalid input (#1183)
Cluster* Cluster::Create(Segment* pSegment, long idx, long long off) { if (!pSegment || off < 0) return NULL; const long long element_start = pSegment->m_start + off; Cluster* const pCluster = new (std::nothrow) Cluster(pSegment, idx, element_start); return pCluster; }
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
231,339,926,000,487,840,000,000,000,000,000,000,000
11
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
obj_respond_to(mrb_state *mrb, mrb_value self) { mrb_value mid; mrb_sym id, rtm_id; mrb_bool priv = FALSE, respond_to_p = TRUE; mrb_get_args(mrb, "o|b", &mid, &priv); if (mrb_symbol_p(mid)) { id = mrb_symbol(mid); } else { mrb_value tmp; if (mrb_string_p(mid)) { tmp = mrb_check_intern_...
0
[ "CWE-824" ]
mruby
b64ce17852b180dfeea81cf458660be41a78974d
166,427,206,578,756,600,000,000,000,000,000,000,000
48
Should not call `initialize_copy` for `TT_ICLASS`; fix #4027 Since `TT_ICLASS` is a internal object that should never be revealed to Ruby world.
PendingResponse(ConnectionImpl& connection, HeaderKeyFormatter* header_key_formatter, ResponseDecoder* decoder) : encoder_(connection, header_key_formatter), decoder_(decoder) {}
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
270,787,820,128,929,330,000,000,000,000,000,000,000
3
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
has_magic(const char *p, const char *pend, int flags, rb_encoding *enc) { const int escape = !(flags & FNM_NOESCAPE); int hasalpha = 0; int hasmagical = 0; register char c; while (p < pend && (c = *p++) != 0) { switch (c) { case '{': return BRACE; case '*': case '?': case '[': ...
0
[]
ruby
a0a2640b398cffd351f87d3f6243103add66575b
183,364,241,296,359,000,000,000,000,000,000,000,000
44
Fix for wrong fnmatch patttern * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617
swevent_hlist_deref(struct swevent_htable *swhash) { return rcu_dereference_protected(swhash->swevent_hlist, lockdep_is_held(&swhash->hlist_mutex)); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
138,942,796,905,202,170,000,000,000,000,000,000,000
5
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
child_death_dispatch(GPid pid, gint status, gpointer user_data) { int signo = 0; int exitcode = 0; mainloop_child_t *child = user_data; crm_trace("Managed process %d exited: %p", pid, child); if (WIFEXITED(status)) { exitcode = WEXITSTATUS(status); crm_trace("Managed process %d (%s...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
107,664,172,037,911,060,000,000,000,000,000,000,000
32
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
static pyc_object *get_long_object(RzBuffer *buffer) { pyc_object *ret = NULL; bool error = false; bool neg = false; ut32 tmp = 0; size_t size; size_t i, j = 0, left = 0; ut32 n; char *hexstr; char digist2hex[] = "0123456789abcdef"; st32 ndigits = get_st32(buffer, &error); if (error) { return NULL; } re...
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
339,539,151,729,246,130,000,000,000,000,000,000,000
66
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
static inline bool io_acct_run_queue(struct io_wqe_acct *acct) { if (!wq_list_empty(&acct->work_list) && !test_bit(IO_ACCT_STALLED_BIT, &acct->flags)) return true; return false; }
0
[ "CWE-200" ]
linux
713b9825a4c47897f66ad69409581e7734a8728e
221,248,586,699,636,870,000,000,000,000,000,000,000
7
io-wq: fix cancellation on create-worker failure WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1151 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1146 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 io_req_complete_post+0xf5...
const char* InstanceKlass::signature_name() const { int hash_len = 0; char hash_buf[40]; // If this is an anonymous class, append a hash to make the name unique if (is_anonymous()) { intptr_t hash = (java_mirror() != NULL) ? java_mirror()->identity_hash() : 0; jio_snprintf(hash_buf, sizeof(hash_buf), "...
0
[]
jdk11u-dev
41825fa33d605f8501164f9296572e4378e8183b
119,032,462,484,195,730,000,000,000,000,000,000,000
36
8270386: Better verification of scan methods Reviewed-by: mbaesken Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static int if6_seq_show(struct seq_file *seq, void *v) { struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v; seq_printf(seq, "%04x%04x%04x%04x%04x%04x%04x%04x %02x %02x %02x %02x %8s\n", NIP6(ifp->addr), ifp->idev->dev->ifindex, ifp->prefix_len, ifp->scope, ifp->flags, ifp->idev->d...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
339,697,705,761,972,640,000,000,000,000,000,000,000
13
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) { struct ipv6_txoptions opt_space; DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name); struct in6_addr *daddr, *final_p, final; struct ipv6_pinfo *np = inet6_sk(sk); struct ipv6_txoptions *opt_to_free = NULL; struct ipv6_txo...
0
[ "CWE-416", "CWE-284" ]
linux
32c231164b762dddefa13af5a0101032c70b50ef
144,529,739,230,549,190,000,000,000,000,000,000,000
172
l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() Lock socket before checking the SOCK_ZAPPED flag in l2tp_ip6_bind(). Without lock, a concurrent call could modify the socket flags between the sock_flag(sk, SOCK_ZAPPED) test and the lock_sock() call. This way, a socket could be inserted twice in l2tp_ip6_bin...
PHP_FUNCTION(imagewbmp) { #ifdef USE_GD_IOCTX _php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", gdImageWBMPCtx); #else _php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", gdImageWBMP); #endif }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
178,196,644,992,534,760,000,000,000,000,000,000,000
8
- 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 inline s64 entity_key(struct cfs_rq *cfs_rq, struct sched_entity *se) { return se->vruntime - cfs_rq->min_vruntime; }
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
103,142,850,491,174,670,000,000,000,000,000,000,000
4
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
static void decrement_qlen(const struct sk_buff *skb, struct sfb_sched_data *q) { u32 sfbhash; sfbhash = sfb_hash(skb, 0); if (sfbhash) decrement_one_qlen(sfbhash, 0, q); sfbhash = sfb_hash(skb, 1); if (sfbhash) decrement_one_qlen(sfbhash, 1, q); }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
280,478,378,773,037,100,000,000,000,000,000,000,000
12
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
BuildTestPacket(uint8_t proto, uint16_t id, uint16_t off, int mf, const char content, int content_len) { Packet *p = NULL; int hlen = 20; int ttl = 64; uint8_t *pcontent; IPV4Hdr ip4h; p = SCCalloc(1, sizeof(*p) + default_packet_size); if (unlikely(p == NULL)) return NULL; ...
0
[ "CWE-358" ]
suricata
4a04f814b15762eb446a5ead4d69d021512df6f8
164,812,033,457,845,600,000,000,000,000,000,000,000
72
defrag - take protocol into account during re-assembly The IP protocol was not being used to match fragments with their packets allowing a carefully constructed packet with a different protocol to be matched, allowing re-assembly to complete, creating a packet that would not be re-assembled by the destination host.
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_o...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
9,562,904,420,296,684,000,000,000,000,000,000,000
12
- 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 tipc_aead_free(struct rcu_head *rp) { struct tipc_aead *aead = container_of(rp, struct tipc_aead, rcu); struct tipc_tfm *tfm_entry, *head, *tmp; if (aead->cloned) { tipc_aead_put(aead->cloned); } else { head = *get_cpu_ptr(aead->tfm_entry); put_cpu_ptr(aead->tfm_entry); list_for_each_entry_safe...
0
[ "CWE-20" ]
linux
fa40d9734a57bcbfa79a280189799f76c88f7bb0
158,551,121,915,084,190,000,000,000,000,000,000,000
24
tipc: fix size validations for the MSG_CRYPTO type The function tipc_crypto_key_rcv is used to parse MSG_CRYPTO messages to receive keys from other nodes in the cluster in order to decrypt any further messages from them. This patch verifies that any supplied sizes in the message body are valid for the received message...
unsuppress_quant_table (JPEGState* sp, int tblno) { JQUANT_TBL* qtbl; if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL) qtbl->sent_table = FALSE; }
0
[ "CWE-369" ]
libtiff
47f2fb61a3a64667bce1a8398a8fcb1b348ff122
217,919,357,036,277,130,000,000,000,000,000,000,000
7
* libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653
Item_uint::Item_uint(const char *str_arg, longlong i, uint length): Item_int(str_arg, i, length) { unsigned_flag= 1; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
137,207,320,910,647,900,000,000,000,000,000,000,000
5
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
void Inflator::ProcessInput(bool flush) { while (true) { switch (m_state) { case PRE_STREAM: if (!flush && m_inQueue.CurrentSize() < MaxPrestreamHeaderSize()) return; ProcessPrestreamHeader(); m_state = WAIT_HEADER; m_wrappedAround = false; m_current = 0; m_lastFlush = 0; ...
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
307,075,231,860,886,570,000,000,000,000,000,000,000
44
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
array_keys (s, quoted) char *s; int quoted; { int len; char *retval, *t, *temp; WORD_LIST *l; SHELL_VAR *var; var = array_variable_part (s, &t, &len); /* [ */ if (var == 0 || ALL_ELEMENT_SUB (t[0]) == 0 || t[1] != ']') return (char *)NULL; if (var_isset (var) == 0 || invisible_p (var)) ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
231,418,041,896,841,900,000,000,000,000,000,000,000
39
bash-4.4-rc2 release
rfbBool rfbFilenameTranslate2UNIX(rfbClientPtr cl, /* in */ char *path, /* out */ char *unixPath, size_t unixPathMaxLen) { int x; char *home=NULL; FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN("", cl, FALSE); /* * Do not use strncpy() - truncating the file name would probably have undesirable side effects...
0
[ "CWE-787" ]
libvncserver
502821828ed00b4a2c4bef90683d0fd88ce495de
323,592,751,899,136,970,000,000,000,000,000,000,000
37
LibVNCServer: fix heap out-of-bound write access Closes #243
ciInstance* ciEnv::ClassCastException_instance() { if (_ClassCastException_instance == NULL) { _ClassCastException_instance = get_or_create_exception(_ClassCastException_handle, vmSymbols::java_lang_ClassCastException()); } return _ClassCastException_instance; }
0
[]
jdk17u
8be0fc09f0ba2dd1dbfd6627456fa929d5574b04
224,916,629,704,482,850,000,000,000,000,000,000,000
8
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
int rsa_rsaes_oaep_decrypt( rsa_context *ctx, int mode, const unsigned char *label, size_t label_len, size_t *olen, const unsigned char *input, unsigned char *output, ...
1
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
267,752,129,939,712,730,000,000,000,000,000,000,000
86
RSA blinding on CRT operations to counter timing attacks
ZipInputStream::~ZipInputStream() { }
0
[ "CWE-22" ]
poco
bb7e5feece68ccfd8660caee93da25c5c39a4707
28,279,346,175,380,690,000,000,000,000,000,000,000
3
merge zip entry absolute path vulnerability fix (#1968) from develop
TEST(BasicFlatBufferModel, TestBuildFromModel) { TestErrorReporter reporter; FileCopyAllocation model_allocation( "tensorflow/lite/testdata/test_model.bin", &reporter); ASSERT_TRUE(model_allocation.valid()); ::flatbuffers::Verifier verifier( reinterpret_cast<const uint8_t*>(model_allocation.base()),...
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
292,609,843,438,333,300,000,000,000,000,000,000,000
20
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
static inline int zr364xx_stop_acquire(struct zr364xx_camera *cam) { cam->b_acquire = 0; return 0; }
0
[ "CWE-476" ]
linux
5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e
158,326,648,340,076,840,000,000,000,000,000,000,000
5
media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap SyzKaller hit the null pointer deref while reading from uninitialized udev->product in zr364xx_vidioc_querycap(). ================================================================== BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20 in...
static SLJIT_INLINE PCRE2_SPTR compile_charn_matchingpath(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, jump_list **backtracks) { /* This function consumes at least one input character. */ /* To decrease the number of length checks, we try to concatenate the fixed length character sequences. */ DEFINE_COMPI...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
120,916,256,570,040,880,000,000,000,000,000,000,000
65
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr, unsigned length) { u32 align_buffer; u32 *to_u32_ptr; u16 *from_u16_ptr, *to_u16_ptr; to_u32_ptr = dest_ptr; from_u16_ptr = src_ptr; align_buffer = 0; for (; length > 3; length -= 4) { to_u16_ptr = (u16 *)&align_buffer; *to_u16_ptr++...
0
[ "CWE-703", "CWE-824" ]
linux
d0d62baa7f505bd4c59cd169692ff07ec49dde37
192,966,873,783,642,500,000,000,000,000,000,000,000
47
net: xilinx_emaclite: Do not print real IOMEM pointer Printing kernel pointers is discouraged because they might leak kernel memory layout. This fixes smatch warning: drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn: argument 4 to %08lX specifier is cast from pointer Signed-off-by: YueH...
static MagickBooleanType ReadRectangle(Image *image,PICTRectangle *rectangle) { rectangle->top=(short) ReadBlobMSBShort(image); rectangle->left=(short) ReadBlobMSBShort(image); rectangle->bottom=(short) ReadBlobMSBShort(image); rectangle->right=(short) ReadBlobMSBShort(image); if ((EOFBlob(image) != MagickFal...
0
[ "CWE-252" ]
ImageMagick6
11d9dac3d991c62289d1ef7a097670166480e76c
233,570,461,920,240,950,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1199
QPDFAcroFormDocumentHelper::Members::Members() : cache_valid(false) { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
77,987,904,743,551,680,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, kInputTensor); const TfLiteTensor* begin = GetInput(context, node, kBeginTensor); const TfLiteTensor* size = GetInput(context, node, kSizeTensor); TfLiteTensor* output = GetOutput(context, node, kOu...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
244,142,914,641,409,420,000,000,000,000,000,000,000
93
[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...
static int pcan_usb_fd_set_filter_std(struct peak_usb_device *dev, int idx, u32 mask) { struct pucan_filter_std *cmd = pcan_usb_fd_cmd_buffer(dev); int i, n; /* select all rows when idx is out of range [0..63] */ if ((idx < 0) || (idx >= (1 << PUCAN_FLTSTD_ROW_IDX_BITS))) { n = 1 << PUCAN_FLTSTD_ROW_ID...
0
[ "CWE-908" ]
linux
30a8beeb3042f49d0537b7050fd21b490166a3d9
170,957,494,517,814,900,000,000,000,000,000,000,000
26
can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> Reported-by: syzbot+513e4d0985298538bf9b@syzkaller.appspotmail.com Fixes: 0a25e1f4f...
static int send_sub_rect(VncState *vs, int x, int y, int w, int h) { uint32_t bg = 0, fg = 0; int colors; int ret = 0; #ifdef CONFIG_VNC_JPEG bool force_jpeg = false; bool allow_jpeg = true; #endif if (!color_count_palette) { color_count_palette = g_malloc(sizeof(VncPalette)); v...
1
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
147,183,660,185,217,930,000,000,000,000,000,000,000
53
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'. ...
cell_queue_append(cell_queue_t *queue, packed_cell_t *cell) { if (queue->tail) { tor_assert(!queue->tail->next); queue->tail->next = cell; } else { queue->head = cell; } queue->tail = cell; cell->next = NULL; ++queue->n; }
0
[ "CWE-200", "CWE-617" ]
tor
56a7c5bc15e0447203a491c1ee37de9939ad1dcd
58,086,043,760,424,540,000,000,000,000,000,000,000
12
TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell On an hidden service rendezvous circuit, a BEGIN_DIR could be sent (maliciously) which would trigger a tor_assert() because connection_edge_process_relay_cell() thought that the circuit is an or_circuit_t but is an origin circuit in reality. ...
R_API int r_bin_java_new_bin(RBinJavaObj *bin, ut64 loadaddr, Sdb *kv, const ut8 *buf, ut64 len) { R_BIN_JAVA_GLOBAL_BIN = bin; if (!r_str_constpool_init (&bin->constpool)) { return false; } bin->lines.count = 0; bin->loadaddr = loadaddr; r_bin_java_get_java_null_cp (); bin->id = r_num_rand (UT32_MAX); bin->k...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
134,155,523,992,286,200,000,000,000,000,000,000,000
13
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
socket_endcopyout(bool errorAbort) { if (!DoingCopyOut) return; if (errorAbort) pq_putbytes("\n\n\\.\n", 5); /* in non-error case, copy.c will have emitted the terminator line */ DoingCopyOut = false; }
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
128,083,816,494,227,200,000,000,000,000,000,000,000
9
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
void task_release_frames(davs2_t *h) { int i; /* release reference to all reference frames */ for (i = 0; i < h->num_of_references; i++) { release_one_frame(h->fref[i]); h->fref[i] = NULL; } h->num_of_references = 0; /* release reference to the reconstructed frame */ relea...
0
[ "CWE-787" ]
davs2
b41cf117452e2d73d827f02d3e30aa20f1c721ac
258,125,941,951,340,870,000,000,000,000,000,000,000
16
Add checking for `frame_rate_code`. Signed-off-by: luofl <falei.luo@gmail.com>
static int ldb_msg_check_element_flags(struct ldb_context *ldb, const struct ldb_message *message) { unsigned i; for (i=0; i<message->num_elements; i++) { if (message->elements[i].flags & LDB_FLAG_INTERNAL_MASK) { ldb_asprintf_errstring(ldb, "Invalid element flags 0x%08x on element %s in %s\n", ...
0
[ "CWE-476" ]
samba
d8b9bb274b7e7a390cf3bda9cd732cb2227bdbde
132,291,735,239,978,920,000,000,000,000,000,000,000
14
CVE-2020-10730: lib ldb: Check if ldb_lock_backend_callback called twice Prevent use after free issues if ldb_lock_backend_callback is called twice, usually due to ldb_module_done being called twice. This can happen if a module ignores the return value from function a function that calls ldb_module_done as part of it'...
int OSD::init_op_flags(OpRequestRef& op) { const MOSDOp *m = static_cast<const MOSDOp*>(op->get_req()); vector<OSDOp>::const_iterator iter; // client flags have no bearing on whether an op is a read, write, etc. op->rmw_flags = 0; if (m->has_flag(CEPH_OSD_FLAG_RWORDERED)) { op->set_force_rwordered(); ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
70,986,258,602,671,380,000,000,000,000,000,000,000
184
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
Http1StreamEncoderOptionsOptRef ConnectionManagerImpl::ActiveStream::http1StreamEncoderOptions() { return response_encoder_->http1StreamEncoderOptions(); }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
58,067,917,978,564,105,000,000,000,000,000,000,000
3
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr *nlh) { struct net *net = sock_net(in_skb->sk); struct ifaddrmsg *ifm; struct nlattr *tb[IFA_MAX+1]; struct in6_addr *addr = NULL, *peer; struct net_device *dev = NULL; struct inet6_ifaddr *ifa; struct sk_buff *skb; int err; err = nlmsg_pars...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
86,876,378,551,240,900,000,000,000,000,000,000,000
51
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
void ring_buffer_normalize_time_stamp(struct ring_buffer *buffer, int cpu, u64 *ts) { /* Just stupid testing the normalize function and deltas */ *ts >>= DEBUG_SHIFT; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
124,051,685,492,202,200,000,000,000,000,000,000,000
6
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
static int ftrace_allocate_records(struct ftrace_page *pg, int count) { int order; int cnt; if (WARN_ON(!count)) return -EINVAL; order = get_count_order(DIV_ROUND_UP(count, ENTRIES_PER_PAGE)); /* * We want to fill as much as possible. No more than a page * may be empty. */ while ((PAGE_SIZE << order) /...
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
248,350,244,374,546,740,000,000,000,000,000,000,000
36
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
static void uas_free_unsubmitted_urbs(struct scsi_cmnd *cmnd) { struct uas_cmd_info *cmdinfo; if (!cmnd) return; cmdinfo = (void *)&cmnd->SCp; if (cmdinfo->state & SUBMIT_CMD_URB) usb_free_urb(cmdinfo->cmd_urb); /* data urbs may have never gotten their submit flag set */ if (!(cmdinfo->state & DATA_IN_URB...
0
[ "CWE-125" ]
linux
786de92b3cb26012d3d0f00ee37adf14527f35c4
24,525,424,352,020,130,000,000,000,000,000,000,000
18
USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->al...
config_vars( config_tree *ptree ) { attr_val *curr_var; int len; curr_var = HEAD_PFIFO(ptree->vars); for (; curr_var != NULL; curr_var = curr_var->link) { /* Determine which variable to set and set it */ switch (curr_var->attr) { case T_Broadcastdelay: proto_config(PROTO_BROADDELAY, 0, curr_var->value....
0
[ "CWE-19" ]
ntp
fe46889f7baa75fc8e6c0fcde87706d396ce1461
53,847,474,902,705,200,000,000,000,000,000,000,000
100
[Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn.
void __mnt_drop_write_file(struct file *file) { if (!(file->f_mode & FMODE_WRITER)) __mnt_drop_write(file->f_path.mnt); }
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
142,716,485,055,375,360,000,000,000,000,000,000,000
5
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static int specific_minor(int minor) { int r; if (minor >= (1 << MINORBITS)) return -EINVAL; idr_preload(GFP_KERNEL); spin_lock(&_minor_lock); r = idr_alloc(&_minor_idr, MINOR_ALLOCED, minor, minor + 1, GFP_NOWAIT); spin_unlock(&_minor_lock); idr_preload_end(); if (r < 0) return r == -ENOSPC ? -EBUSY : ...
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
107,570,304,410,824,800,000,000,000,000,000,000,000
18
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct net *net = seq_file_net(seq); return seq_hlist_next_rcu(v, &net->packet.sklist, pos); }
0
[ "CWE-909" ]
linux-2.6
67286640f638f5ad41a946b9a3dc75327950248f
150,909,773,510,395,000,000,000,000,000,000,000,000
5
net: packet: fix information leak to userland packet_getname_spkt() doesn't initialize all members of sa_data field of sockaddr struct if strlen(dev->name) < 13. This structure is then copied to userland. It leads to leaking of contents of kernel stack memory. We have to fully fill sa_data with strncpy() instead of ...
pixOctcubeQuantMixedWithGray(PIX *pixs, l_int32 depth, l_int32 graylevels, l_int32 delta) { l_int32 w, h, wpls, wpld, i, j, size, octlevels; l_int32 rval, gval, bval, del, val, midval; l_int32 *carray, *rarray, *garray...
0
[ "CWE-125" ]
leptonica
5ee24b398bb67666f6d173763eaaedd9c36fb1e5
71,343,564,843,300,260,000,000,000,000,000,000,000
150
Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow * color quantized pix must be 8 bpp before extra colors are added.
struct sctp_chunk *sctp_make_abort_no_data( const struct sctp_association *asoc, const struct sctp_chunk *chunk, __u32 tsn) { struct sctp_chunk *retval; __be32 payload; retval = sctp_make_abort(asoc, chunk, sizeof(sctp_errhdr_t) + sizeof(tsn)); if (!retval) goto no_mem; /* Put the tsn back into network...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
303,654,929,701,736,740,000,000,000,000,000,000,000
33
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
static long long *mysql_sys_var_longlong(THD* thd, int offset) { return (long long *) intern_sys_var_ptr(thd, offset, true); }
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
298,995,018,577,699,700,000,000,000,000,000,000,000
4
MDEV-26323 use-after-poison issue of MariaDB server
void trak_del(GF_Box *s) { GF_TrackBox *ptr = (GF_TrackBox *) s; if (ptr == NULL) return; if (ptr->Header) gf_isom_box_del((GF_Box *)ptr->Header); if (ptr->udta) gf_isom_box_del((GF_Box *)ptr->udta); if (ptr->Media) gf_isom_box_del((GF_Box *)ptr->Media); if (ptr->References) gf_isom_box_del((GF_Box *)ptr->Refere...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
214,806,470,471,147,250,000,000,000,000,000,000,000
15
prevent dref memleak on invalid input (#1183)
static int v4l_dqbuf(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct v4l2_buffer *p = arg; int ret = check_fmt(file, p->type); return ret ? ret : ops->vidioc_dqbuf(file, fh, p); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
52,691,748,936,560,620,000,000,000,000,000,000,000
8
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...
SPL_METHOD(DirectoryIterator, getBasename) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char *suffix = 0, *fname; int slen = 0; size_t flen; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &suffix, &slen) == FAILURE) { return; } php_...
1
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
256,981,041,789,251,980,000,000,000,000,000,000,000
15
Fix bug #72262 - do not overflow int
static inline int vmx_get_current_vpid(struct kvm_vcpu *vcpu) { if (is_guest_mode(vcpu)) return nested_get_vpid02(vcpu); return to_vmx(vcpu)->vpid; }
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
131,550,381,845,980,860,000,000,000,000,000,000,000
6
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
yang_check_string(struct lys_module *module, const char **target, char *what, char *where, char *value, struct lys_node *node) { if (*target) { LOGVAL(module->ctx, LYE_TOOMANY, (node) ? LY_VLOG_LYS : LY_VLOG_NONE, node, what, where); free(value); return 1; } else { ...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
239,160,136,137,608,440,000,000,000,000,000,000,000
12
yang parser BUGFIX double free Fixes #742
static void __exit i40e_exit_module(void) { pci_unregister_driver(&i40e_driver); destroy_workqueue(i40e_wq); i40e_dbg_exit(); }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
273,512,634,330,309,000,000,000,000,000,000,000,000
6
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CImgDisplay& set_title(const char *const format, ...) { if (is_empty()) return *this; char *const tmp = new char[1024]; va_list ap; va_start(ap, format); cimg_vsnprintf(tmp,1024,format,ap); va_end(ap); if (!std::strcmp(_title,tmp)) { delete[] tmp; return *this; } del...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
226,139,838,951,563,900,000,000,000,000,000,000,000
16
Fix other issues in 'CImg<T>::load_bmp()'.
TEST_F(RouterTest, GrpcOk) { NiceMock<Http::MockRequestEncoder> encoder1; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::ConnectionPool::Callbacks& callb...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
115,118,863,156,050,460,000,000,000,000,000,000,000
37
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
encode_locals (MonoDynamicImage *assembly, MonoReflectionILGen *ilgen) { MonoDynamicTable *table; guint32 *values; guint32 idx, sig_idx; guint nl = mono_array_length (ilgen->locals); SigBuffer buf; int i; sigbuffer_init (&buf, 32); sigbuffer_add_value (&buf, 0x07); sigbuffer_add_value (&buf, nl); for (i = 0;...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
178,537,031,694,470,630,000,000,000,000,000,000,000
41
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static void fuse_kill_sb_anon(struct super_block *sb) { fuse_sb_destroy(sb); kill_anon_super(sb); }
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
2,068,081,725,139,690,300,000,000,000,000,000,000
5
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, unsigned long nbytes) { unsigned long stack_page; unsigned long cpu = task_cpu(p); /* * Avoid crashing if the stack has overflowed and corrupted * task_cpu(p), which is in the thread_info struct. */ if (cpu < NR_CPUS && cpu_poss...
0
[ "CWE-20" ]
linux
621b5060e823301d0cba4cb52a7ee3491922d291
76,421,707,626,357,370,000,000,000,000,000,000,000
23
powerpc/tm: Fix crash when forking inside a transaction When we fork/clone we currently don't copy any of the TM state to the new thread. This results in a TM bad thing (program check) when the new process is switched in as the kernel does a tmrechkpt with TEXASR FS not set. Also, since R1 is from userspace, we trig...
longlong val_int() { return (longlong) rint(val_real()); }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
128,523,091,568,891,400,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...
opj_image_t* pgxtoimage(const char *filename, opj_cparameters_t *parameters) { FILE *f = NULL; int w, h, prec; int i, numcomps, max; OPJ_COLOR_SPACE color_space; opj_image_cmptparm_t cmptparm; /* maximum of 1 component */ opj_image_t * image = NULL; int adjustS, ushift, dshift, force8; ...
1
[ "CWE-787" ]
openjpeg
e5285319229a5d77bf316bb0d3a6cbd3cb8666d9
125,220,381,048,142,290,000,000,000,000,000,000,000
153
pgxtoimage(): fix write stack buffer overflow (#997)
create_dummy_encoding_for_tk_core(interp, name, error_mode) VALUE interp; VALUE name; VALUE error_mode; { get_ip(interp); StringValue(name); #if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1) if (Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(name)) == (Tcl_Encoding)...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
237,060,465,619,839,560,000,000,000,000,000,000,000
39
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
int LuaSettings::l_get(lua_State* L) { NO_MAP_LOCK_REQUIRED; LuaSettings* o = checkobject(L, 1); std::string key = std::string(luaL_checkstring(L, 2)); if (o->m_settings->exists(key)) { std::string value = o->m_settings->get(key); lua_pushstring(L, value.c_str()); } else { lua_pushnil(L); } return 1; }
0
[]
minetest
da71e86633d0b27cd02d7aac9fdac625d141ca13
232,536,097,390,999,500,000,000,000,000,000,000,000
15
Protect a few more settings from being set from mods Of those settings main_menu_script has concrete security impact, the rest are added out of abundance of caution.
dissect_tcp_payload(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 seq, guint32 nxtseq, guint32 sport, guint32 dport, proto_tree *tree, proto_tree *tcp_tree, struct tcp_analysis *tcpd, struct tcpinfo *tcpinfo) { gint nbytes; gboolean save_fragmented; nbytes = tvb...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
203,962,469,285,003,800,000,000,000,000,000,000,000
30
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
void j2k_dump (opj_j2k_t* p_j2k, OPJ_INT32 flag, FILE* out_stream) { /* Check if the flag is compatible with j2k file*/ if ( (flag & OPJ_JP2_INFO) || (flag & OPJ_JP2_IND)){ fprintf(out_stream, "Wrong flag\n"); return; } /* Dump the image_header */ ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
157,525,547,017,297,060,000,000,000,000,000,000,000
45
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
rb_str_buf_cat_ascii(VALUE str, const char *ptr) { /* ptr must reference NUL terminated ASCII string. */ int encindex = ENCODING_GET(str); rb_encoding *enc = rb_enc_from_index(encindex); if (rb_enc_asciicompat(enc)) { return rb_enc_cr_str_buf_cat(str, ptr, strlen(ptr), encindex, ENC_...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
237,457,483,166,167,950,000,000,000,000,000,000,000
22
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e