func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
Status KernelAndDeviceOp::Run(
ScopedStepContainer* step_container, const EagerKernelArgs& inputs,
std::vector<EagerKernelRet>* outputs,
CancellationManager* cancellation_manager,
const absl::optional<EagerRemoteFunctionParams>& remote_func_params) {
OpKernelContext::Params params;
params.device = d... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | da8558533d925694483d2c136a9220d6d49d843c | 159,214,455,117,997,480,000,000,000,000,000,000,000 | 82 | Fix undefined behavior in `tf.raw_ops.Switch` in eager mode.
PiperOrigin-RevId: 332578058
Change-Id: I9727571d2f21476b10d8aa27c1b7176564b76ac9 |
png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
{
unsigned int nb = (unsigned int)num_bytes;
png_debug(1, "in png_set_sig_bytes");
if (png_ptr == NULL)
return;
if (num_bytes < 0)
nb = 0;
if (nb > 8)
png_error(png_ptr, "Too many bytes for PNG signature");
png_ptr->sig_byte... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 49,441,674,240,387,600,000,000,000,000,000,000,000 | 17 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
static struct pgv *alloc_pg_vec(struct tpacket_req *req, int order)
{
unsigned int block_nr = req->tp_block_nr;
struct pgv *pg_vec;
int i;
pg_vec = kcalloc(block_nr, sizeof(struct pgv), GFP_KERNEL | __GFP_NOWARN);
if (unlikely(!pg_vec))
goto out;
for (i = 0; i < block_nr; i++) {
pg_vec[i].buffer = alloc_one... | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 158,354,250,873,422,290,000,000,000,000,000,000,000 | 24 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
GF_Err chrm_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_ChromaInfoBox *ptr = (GF_ChromaInfoBox *)s;
ISOM_DECREASE_SIZE(s, 2);
ptr->chroma = gf_bs_read_u16(bs);
return GF_OK;
} | 0 | [
"CWE-476"
] | gpac | 6170024568f4dda310e98ef7508477b425c58d09 | 106,714,711,136,726,120,000,000,000,000,000,000,000 | 9 | fixed potential crash - cf #1263 |
static void display_switch(DisplayChangeListener *dcl,
struct DisplaySurface *surface)
{
SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
qemu_spice_display_switch(ssd, surface);
} | 0 | [
"CWE-200"
] | qemu | ab9509cceabef28071e41bdfa073083859c949a7 | 128,211,257,296,951,260,000,000,000,000,000,000,000 | 6 | 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... |
static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self)
{
VALUE obj = mString_to_json_raw_object(self);
Check_Type(obj, T_HASH);
return mHash_to_json(argc, argv, obj);
} | 0 | [
"CWE-119",
"CWE-787"
] | json | 8f782fd8e181d9cfe9387ded43a5ca9692266b85 | 310,100,117,793,622,980,000,000,000,000,000,000,000 | 6 | Fix arbitrary heap exposure problem |
static struct bfq_queue *
bfq_choose_bfqq_for_injection(struct bfq_data *bfqd)
{
struct bfq_queue *bfqq, *in_serv_bfqq = bfqd->in_service_queue;
unsigned int limit = in_serv_bfqq->inject_limit;
/*
* If
* - bfqq is not weight-raised and therefore does not carry
* time-critical I/O,
* or
* - regardless of ... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 332,084,619,210,056,070,000,000,000,000,000,000,000 | 87 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
index_array_reverse (
FriBidiStrIndex *arr,
const FriBidiStrIndex len
)
{
FriBidiStrIndex i;
fribidi_assert (arr);
for (i = 0; i < len / 2; i++)
{
FriBidiStrIndex tmp = arr[i];
arr[i] = arr[len - 1 - i];
arr[len - 1 - i] = tmp;
}
} | 0 | [
"CWE-120",
"CWE-787"
] | fribidi | 034c6e9a1d296286305f4cfd1e0072b879f52568 | 240,912,504,551,322,450,000,000,000,000,000,000,000 | 16 | Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL |
BGD_DECLARE(gdImagePtr) gdImageCreateFromGifPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
if(!in) {
return 0;
}
im = gdImageCreateFromGifCtx(in);
in->gd_free(in);
return im;
} | 0 | [
"CWE-681"
] | libgd | a11f47475e6443b7f32d21f2271f28f417e2ac04 | 128,563,829,532,287,620,000,000,000,000,000,000,000 | 11 | Fix #420: Potential infinite loop in gdImageCreateFromGifCtx
Due to a signedness confusion in `GetCode_` a corrupt GIF file can
trigger an infinite loop. Furthermore we make sure that a GIF without
any palette entries is treated as invalid *after* open palette entries
have been removed.
CVE-2018-5711
See also https... |
bool Parser::parse_block_node(bool is_root) {
Block_Obj block = block_stack.back();
parse_block_comments();
// throw away white-space
// includes line comments
lex < css_whitespace >();
Lookahead lookahead_result;
// also parse block comments
// first parse everything that is all... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 285,188,531,865,500,600,000,000,000,000,000,000,000 | 111 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
ssize_t SMB_VFS_PWRITE_RECV(struct tevent_req *req, int *perrno)
{
struct smb_vfs_call_pwrite_state *state = tevent_req_data(
req, struct smb_vfs_call_pwrite_state);
int err;
if (tevent_req_is_unix_error(req, &err)) {
*perrno = err;
return -1;
}
return state->retval;
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 248,212,929,888,223,630,000,000,000,000,000,000,000 | 12 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
static int is_under(struct vfsmount *mnt, struct dentry *dentry,
struct path *path)
{
if (mnt != path->mnt) {
for (;;) {
if (mnt->mnt_parent == mnt)
return 0;
if (mnt->mnt_parent == path->mnt)
break;
mnt = mnt->mnt_parent;
}
dentry = mnt->mnt_mountpoint;
}
return is_subdir(dentry, path-... | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 166,178,457,240,106,870,000,000,000,000,000,000,000 | 15 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
d_lite_offset(VALUE self)
{
get_d1(self);
return m_of_in_day(dat);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 81,272,381,352,818,770,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
cpTags(TIFF* in, TIFF* out)
{
struct cpTag *p;
for (p = tags; p < &tags[NTAGS]; p++)
{
if( p->tag == TIFFTAG_GROUP3OPTIONS )
{
uint16 compression;
if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
compression != COMPRESSION_CCITTFAX3 )
... | 0 | [
"CWE-476"
] | libtiff | 99b10edde9a0fc28cc0e7b7757aa18ac4c8c225f | 235,806,459,089,148,800,000,000,000,000,000,000,000 | 22 | tiff2bw: avoid null pointer dereference in case of out of memory situation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2819 / CVE-2018-18661 |
void h2_beam_on_file_beam(h2_bucket_beam *beam,
h2_beam_can_beam_callback *cb, void *ctx)
{
h2_beam_lock bl;
if (enter_yellow(beam, &bl) == APR_SUCCESS) {
beam->can_beam_fn = cb;
beam->can_beam_ctx = ctx;
leave_yellow(beam, &bl);
}
} | 0 | [
"CWE-400"
] | mod_h2 | 83a2e3866918ce6567a683eb4c660688d047ee81 | 33,186,902,391,456,373,000,000,000,000,000,000,000 | 11 | * fixes a race condition where aborting streams triggers an unnecessary timeout. |
static void tcp_chr_connect(void *opaque)
{
CharDriverState *chr = opaque;
TCPCharDriver *s = chr->opaque;
g_free(chr->filename);
chr->filename = sockaddr_to_str(
&s->sioc->localAddr, s->sioc->localAddrLen,
&s->sioc->remoteAddr, s->sioc->remoteAddrLen,
s->is_listen, s->is_telnet... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 332,463,137,538,893,070,000,000,000,000,000,000,000 | 20 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
std::vector<Box_iref::Reference> Box_iref::get_references_from(heif_item_id itemID) const
{
std::vector<Reference> references;
for (const Reference& ref : m_references) {
if (ref.from_item_ID == itemID) {
references.push_back(ref);
}
}
return references;
} | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 61,998,616,979,316,705,000,000,000,000,000,000,000 | 12 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
vq_retchain(struct virtio_vq_info *vq)
{
vq->last_avail--;
} | 0 | [
"CWE-476"
] | acrn-hypervisor | 154fe59531c12b82e26d1b24b5531f5066d224f5 | 272,299,364,341,055,760,000,000,000,000,000,000,000 | 4 | dm: validate inputs in vq_endchains
inputs shall be validated to avoid NULL pointer access.
Tracked-On: #6129
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> |
find_wrapper (MonoMethod *m, gint no, gint ilo, gboolean managed, gpointer data)
{
if (managed)
return TRUE;
if (m->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE ||
m->wrapper_type == MONO_WRAPPER_XDOMAIN_INVOKE ||
m->wrapper_type == MONO_WRAPPER_XDOMAIN_DISPATCH)
{
*((gboolean*)data) = TRUE;
return TRUE;
... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 254,482,793,768,507,720,000,000,000,000,000,000,000 | 14 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
win_free_lsize(win_T *wp)
{
// TODO: why would wp be NULL here?
if (wp != NULL)
VIM_CLEAR(wp->w_lines);
} | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 144,588,455,609,809,340,000,000,000,000,000,000,000 | 6 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
static ssize_t adu_read(struct file *file, __user char *buffer, size_t count,
loff_t *ppos)
{
struct adu_device *dev;
size_t bytes_read = 0;
size_t bytes_to_read = count;
int retval = 0;
int timeout = 0;
int should_submit = 0;
unsigned long flags;
DECLARE_WAITQUEUE(wait, current);
dev = file->private_data;... | 0 | [
"CWE-416"
] | linux | 44efc269db7929f6275a1fa927ef082e533ecde0 | 155,819,915,072,674,300,000,000,000,000,000,000,000 | 162 | USB: adutux: fix use-after-free on disconnect
The driver was clearing its struct usb_device pointer, which it used as
an inverted disconnected flag, before deregistering the character device
and without serialising against racing release().
This could lead to a use-after-free if a racing release() callback
observes t... |
static void event_nick(IRC_SERVER_REC *server, const char *data,
const char *orignick)
{
QUERY_REC *query;
CHAT_DCC_REC *dcc;
char *params, *nick, *tag;
g_return_if_fail(data != NULL);
g_return_if_fail(orignick != NULL);
params = event_get_params(data, 1, &nick);
if (g_ascii_strcasecmp(n... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 293,747,284,201,084,070,000,000,000,000,000,000,000 | 40 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
static int ath6kl_wmi_delba_req_event_rx(struct wmi *wmi, u8 *datap, int len,
struct ath6kl_vif *vif)
{
struct wmi_delba_event *cmd = (struct wmi_delba_event *) datap;
aggr_recv_delba_req_evt(vif, cmd->tid);
return 0;
} | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 249,606,716,692,169,200,000,000,000,000,000,000,000 | 9 | 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... |
void Item::split_sum_func2(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &fields, Item **ref,
uint split_flags)
{
if (unlikely(type() == SUM_FUNC_ITEM))
{
/* An item of type Item_sum is registered if ref_by != 0 */
if ((split_flags & SPLIT_SUM_S... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 188,002,925,308,950,530,000,000,000,000,000,000,000 | 96 | 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... |
DetectSmoothImage24 (rfbClientPtr cl,
rfbPixelFormat *fmt,
int w,
int h)
{
int off;
int x, y, d, dx, c;
int diffStat[256];
int pixelCount = 0;
int pix, left[3];
unsigned long avgError;
/* If client is big-endian, color samples b... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 99,677,709,557,786,640,000,000,000,000,000,000,000 | 58 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
lys_leaf_free(struct ly_ctx *ctx, struct lys_node_leaf *leaf,
void (*private_destructor)(const struct lys_node *node, void *priv))
{
int i;
/* leafref backlinks */
ly_set_free((struct ly_set *)leaf->backlinks);
for (i = 0; i < leaf->must_size; i++) {
lys_restr_free(ctx, &leaf->mu... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 12,642,888,283,986,886,000,000,000,000,000,000,000 | 19 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
bool MainWindow::isMultitrackValid() const
{
return m_timelineDock->model()->tractor()
&& !m_timelineDock->model()->trackList().empty();
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 110,805,557,156,883,830,000,000,000,000,000,000,000 | 5 | fix upgrade check is not using TLS correctly |
void __init files_init(unsigned long mempages)
{
unsigned long n;
filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0,
SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
/*
* One file with associated inode and dcache is very roughly 1K.
* Per default don't use more than 10% of our memory for files.
*/
... | 1 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 211,564,125,913,700,730,000,000,000,000,000,000,000 | 18 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static int perf_mmap(struct file *file, struct vm_area_struct *vma)
{
struct perf_event *event = file->private_data;
unsigned long user_locked, user_lock_limit;
struct user_struct *user = current_user();
unsigned long locked, lock_limit;
struct ring_buffer *rb;
unsigned long vma_size;
unsigned long nr_pages;
lo... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 302,287,929,579,611,500,000,000,000,000,000,000,000 | 105 | 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... |
uint get_srid() { return srid; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 26,149,500,133,330,810,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
htmlTagLookup(const xmlChar *tag) {
unsigned int i;
for (i = 0; i < (sizeof(html40ElementTable) /
sizeof(html40ElementTable[0]));i++) {
if (!xmlStrcasecmp(tag, BAD_CAST html40ElementTable[i].name))
return((htmlElemDescPtr) &html40ElementTable[i]);
}
return(NULL);
} | 0 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 268,795,095,033,853,000,000,000,000,000,000,000,000 | 10 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
static inline void sync_lapic_to_cr8(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
u64 cr8;
if (is_nested(svm) && (vcpu->arch.hflags & HF_VINTR_MASK))
return;
cr8 = kvm_get_cr8(vcpu);
svm->vmcb->control.int_ctl &= ~V_TPR_MASK;
svm->vmcb->control.int_ctl |= cr8 & V_TPR_MASK;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 301,315,884,402,030,600,000,000,000,000,000,000,000 | 12 | 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-... |
static void init_vmcb(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct vmcb *vmcb = svm->vmcb01.ptr;
struct vmcb_control_area *control = &vmcb->control;
struct vmcb_save_area *save = &vmcb->save;
svm_set_intercept(svm, INTERCEPT_CR0_READ);
svm_set_intercept(svm, INTERCEPT_CR3_READ);
svm_set_... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 249,199,054,834,890,380,000,000,000,000,000,000,000 | 154 | 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 ... |
static void ikev2_parent_inI2outR2_continue(struct pluto_crypto_req_cont *pcrc,
struct pluto_crypto_req *r,
err_t ugh)
{
struct dh_continuation *dh = (struct dh_continuation *)pcrc;
struct msg_digest *md = dh->md;
struct state *const st = md->st;
stf_status e;
DBG(DBG_CONTROLMORE,
DBG_log("... | 0 | [
"CWE-20"
] | libreswan | 2899351224fe2940aec37d7656e1e392c0fe07f0 | 127,864,814,776,302,970,000,000,000,000,000,000,000 | 52 | SECURITY: Properly handle IKEv2 I1 notification packet without KE payload |
static int rom_write(struct pci_dev *dev, int offset, u32 value, void *data)
{
struct pci_bar_info *bar = data;
if (unlikely(!bar)) {
pr_warn(DRV_NAME ": driver data not found for %s\n",
pci_name(dev));
return XEN_PCI_ERR_op_failed;
}
/* A write to obtain the length must happen as a 32-bit write.
*... | 0 | [
"CWE-284",
"CWE-264"
] | linux | af6fc858a35b90e89ea7a7ee58e66628c55c776b | 203,118,053,411,470,220,000,000,000,000,000,000,000 | 29 | xen-pciback: limit guest control of command register
Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal ... |
get_dir_list_from_file_data (FrWindow *window,
FileData *fdata)
{
char *dirname;
GList *list;
dirname = g_strconcat (fr_window_get_current_location (window),
fdata->list_name,
NULL);
list = get_dir_list_from_path (window, dirname);
g_free (dirname);
return list;
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 141,767,415,209,184,340,000,000,000,000,000,000,000 | 14 | libarchive: sanitize filenames before extracting |
void i40e_update_stats(struct i40e_vsi *vsi)
{
struct i40e_pf *pf = vsi->back;
if (vsi == pf->vsi[pf->lan_vsi])
i40e_update_pf_stats(pf);
i40e_update_vsi_stats(vsi);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 235,307,613,918,926,300,000,000,000,000,000,000,000 | 9 | 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> |
int TDStretch::seekBestOverlapPosition(const SAMPLETYPE *refPos)
{
if (bQuickSeek)
{
return seekBestOverlapPositionQuick(refPos);
}
else
{
return seekBestOverlapPositionFull(refPos);
}
}
| 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 227,234,561,439,323,470,000,000,000,000,000,000,000 | 11 | Replaced illegal-number-of-channel assertions with run-time exception |
static av_cold int decode_close(AVCodecContext *avctx)
{
AnsiContext *s = avctx->priv_data;
av_frame_free(&s->frame);
return 0;
} | 0 | [
"CWE-190"
] | FFmpeg | d42ec8433c687fcbccefa51a7716d81920218e4f | 250,793,230,867,959,600,000,000,000,000,000,000,000 | 7 | avcodec/ansi: fix integer overflow
Fixes out of array read
Fixes: 5f9698e86d92f19bb08d54ff0d57027f-signal_sigsegv_b30756_3795_cov_2693691257_ansi256.ans
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void resiliency_test(void)
{
u8 *p;
printk(KERN_ERR "SLUB resiliency testing\n");
printk(KERN_ERR "-----------------------\n");
printk(KERN_ERR "A. Corruption after allocation\n");
p = kzalloc(16, GFP_KERNEL);
p[16] = 0x12;
printk(KERN_ERR "\n1. kmalloc-16: Clobber Redzone/next pointer"
" 0x12->0x%p\... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 295,569,663,078,640,860,000,000,000,000,000,000,000 | 53 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
glue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_8)(CirrusVGAState *s,
uint8_t *dst,const uint8_t *src,
int dstpitch,int srcpitch,
int bltwidth,int bltheight)
{
int x,y;
uint8_t p;
dstpitch -= bltwidth;
srcpitch -= bltwidth;
for (y = 0; y < bltheight; y++) {... | 0 | [
"CWE-787"
] | qemu | b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef | 192,867,493,684,831,850,000,000,000,000,000,000,000 | 21 | CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow
I have just noticed that patch for CVE-2007-1320 has never been applied
to the QEMU CVS. Please find it below.
| Multiple heap-based buffer overflows in the cirrus_invalidate_region
| function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and
| possib... |
static void xen_set_debugreg(int reg, unsigned long val)
{
HYPERVISOR_set_debugreg(reg, val);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 96,917,135,268,745,840,000,000,000,000,000,000,000 | 4 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static inline void fixup_slab_list(struct kmem_cache *cachep,
struct kmem_cache_node *n, struct page *page,
void **list)
{
/* move slabp to correct slabp list: */
list_del(&page->lru);
if (page->active == cachep->num) {
list_add(&page->lru, &n->slabs_full);
if (OBJFREELIST_SLAB(cachep)) {
#if DEBUG
/*... | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 123,775,763,711,012,920,000,000,000,000,000,000,000 | 23 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
TEST_F(TcpHealthCheckerImplTest, Timeout) {
InSequence s;
setupData(1);
health_checker_->start();
expectSessionCreate();
expectClientCreate();
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())};
EXPECT_CALL(*connection_, write(_, _... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 17,842,471,803,519,557,000,000,000,000,000,000,000 | 33 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
//! Erode image by a rectangular structuring element of specified size \newinstance.
CImg<T> get_erode(const unsigned int sx, const unsigned int sy, const unsigned int sz=1) const {
return (+*this).erode(sx,sy,sz); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 138,856,810,014,886,480,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
cmsInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, void* data, cmsUInt32Number BufferSize)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
void *Object;
int i;
cmsIOHANDLER* MemIO;
cmsTagTypeHandler* TypeHandler = NULL;
cmsTagDescriptor* TagDescriptor = NULL;
... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 83,235,719,870,049,530,000,000,000,000,000,000,000 | 94 | Fixes from coverity check |
SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC)
{
if (sapi_module.getenv) {
char *value, *tmp = sapi_module.getenv(name, name_len TSRMLS_CC);
if (tmp) {
value = estrdup(tmp);
} else {
return NULL;
}
if (sapi_module.input_filter) {
sapi_module.input_filter(PARSE_STRING, name, &valu... | 1 | [
"CWE-601"
] | php-src | 98b9dfaec95e6f910f125ed172cdbd25abd006ec | 223,506,967,840,856,340,000,000,000,000,000,000,000 | 16 | Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
local environment |
static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
Vdbe *v = pParse->pVdbe;
if( zAff==0 ){
assert( pParse->db->mallocFailed );
return;
}
assert( v!=0 );
/* Adjust base and n to skip over SQLITE_AFF_BLOB and SQLITE_AFF_NONE
** entries at the beginning and end of the affinity ... | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 183,454,863,906,175,820,000,000,000,000,000,000,000 | 26 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
void JSStream::New(const FunctionCallbackInfo<Value>& args) {
// This constructor should not be exposed to public javascript.
// Therefore we assert that we are not trying to call this as a
// normal function.
CHECK(args.IsConstructCall());
Environment* env = Environment::GetCurrent(args);
new JSStream(env,... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 320,904,689,044,776,950,000,000,000,000,000,000,000 | 8 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
print_prefix(netdissect_options *ndo, const u_char *prefix, u_int max_length)
{
int plenbytes;
char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx::/128")];
if (prefix[0] >= 96 && max_length >= IPV4_MAPPED_HEADING_LEN + 1 &&
is_ipv4_mapped_address(&prefix[1])) {
struct in_addr addr;
... | 1 | [
"CWE-125"
] | tcpdump | 83a412a5275cac973c5841eca3511c766bed778d | 157,596,030,951,060,410,000,000,000,000,000,000,000 | 33 | (for 4.9.3) CVE-2018-16228/HNCP: make buffer access safer
print_prefix() has a buffer and does not initialize it. It may call
decode_prefix6(), which also does not initialize the buffer on invalid
input. When that happens, make sure to return from print_prefix() before
trying to print the [still uninitialized] buffer.... |
int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode )
{
int entry_id = SMB_ACL_FIRST_ENTRY;
SMB_ACL_ENTRY_T entry;
SMB_ACL_T posix_acl;
int result = -1;
posix_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, fname, SMB_ACL_TYPE_ACCESS);
if (posix_acl == (SMB_ACL_T)NULL)
return -1;
while (SMB... | 0 | [
"CWE-264"
] | samba | d6c28913f3109d1327a3d1369b6eafd3874b2dca | 338,582,081,002,673,800,000,000,000,000,000,000,000 | 38 | Bug 6488: acl_group_override() call in posix acls references an uninitialized variable.
(cherry picked from commit f92195e3a1baaddda47a5d496f9488c8445b41ad) |
virDomainIdmapDefParseXML(xmlXPathContextPtr ctxt,
xmlNodePtr *node,
size_t num)
{
size_t i;
virDomainIdMapEntryPtr idmap = NULL;
VIR_XPATH_NODE_AUTORESTORE(ctxt);
if (VIR_ALLOC_N(idmap, num) < 0)
return idmap;
for (i = 0; i < num; i++) {... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 136,750,838,620,309,530,000,000,000,000,000,000,000 | 36 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static INLINE BOOL RLEDECOMPRESS(const BYTE* pbSrcBuffer, UINT32 cbSrcBuffer, BYTE* pbDestBuffer,
UINT32 rowDelta, UINT32 width, UINT32 height)
{
const BYTE* pbSrc = pbSrcBuffer;
const BYTE* pbEnd;
const BYTE* pbDestEnd;
BYTE* pbDest = pbDestBuffer;
PIXEL temp;
PIXEL fgPel = WHITE... | 1 | [
"CWE-125"
] | FreeRDP | 0a98c450c58ec150e44781c89aa6f8e7e0f571f5 | 9,826,210,098,596,620,000,000,000,000,000,000,000 | 329 | Fixed out of bound read in RLEDECOMPRESS
CVE-2020-4033 thanks to @antonio-morales for finding this. |
Tracing::Config& ConnectionManagerImpl::ActiveStream::tracingConfig() { return *this; } | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 238,827,684,342,420,000,000,000,000,000,000,000,000 | 1 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static struct attr_stack *read_attr_from_array(const char **list)
{
struct attr_stack *res;
const char *line;
int lineno = 0;
res = xcalloc(1, sizeof(*res));
while ((line = *(list++)) != NULL)
handle_attr_line(res, line, "[builtin]", ++lineno, 1);
return res;
} | 0 | [] | git | f66cf96d7c613a8129436a5d76ef7b74ee302436 | 329,036,139,241,442,350,000,000,000,000,000,000,000 | 11 | Fix buffer overflow in prepare_attr_stack
If PATH_MAX on your system is smaller than a path stored in the git repo,
it may cause the buffer overflow in prepare_attr_stack.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static int __init aio_setup(void)
{
static struct file_system_type aio_fs = {
.name = "aio",
.mount = aio_mount,
.kill_sb = kill_anon_super,
};
aio_mnt = kern_mount(&aio_fs);
if (IS_ERR(aio_mnt))
panic("Failed to create aio fs mount.");
kiocb_cachep = KMEM_CACHE(aio_kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC)... | 0 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 190,836,184,106,218,730,000,000,000,000,000,000,000 | 15 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
size_t CLASS fread(void *ptr, size_t size, size_t nmemb, FILE *stream) {
size_t num = ::fread(ptr, size, nmemb, stream);
if ( num != nmemb ) {
if (eofCount < 10)
// Maybe this should be a DCRAW_WARNING
dcraw_message(DCRAW_VERBOSE, "%s: fread %d != %d\n",
ifnam... | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 307,857,496,859,175,470,000,000,000,000,000,000,000 | 15 | Avoid overflow in ljpeg_start(). |
static void jas_image_calcbbox2(jas_image_t *image, jas_image_coord_t *tlx,
jas_image_coord_t *tly, jas_image_coord_t *brx, jas_image_coord_t *bry)
{
jas_image_cmpt_t *cmpt;
jas_image_coord_t tmptlx;
jas_image_coord_t tmptly;
jas_image_coord_t tmpbrx;
jas_image_coord_t tmpbry;
jas_image_coord_t t;
int i;
if (... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 233,195,020,940,518,970,000,000,000,000,000,000,000 | 40 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static void megasas_flush_cache(struct megasas_instance *instance)
{
struct megasas_cmd *cmd;
struct megasas_dcmd_frame *dcmd;
if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR)
return;
cmd = megasas_get_cmd(instance);
if (!cmd)
return;
dcmd = &cmd->frame->dcmd;
memset(dcmd->mbox.b, 0... | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 234,703,556,506,991,800,000,000,000,000,000,000,000 | 36 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
static int _hostfs_umount2(oe_device_t* device, const char* target, int flags)
{
int ret = -1;
device_t* fs = _cast_device(device);
OE_UNUSED(flags);
/* Fail if any required parameters are null. */
if (!fs || !target)
OE_RAISE_ERRNO(OE_EINVAL);
/* Fail if this file system is not mount... | 0 | [
"CWE-200",
"CWE-552"
] | openenclave | bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b | 3,738,681,397,325,893,600,000,000,000,000,000,000 | 30 | Merge pull request from GHSA-525h-wxcc-f66m
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com> |
write_pseudonym(esp, inp, len, id)
eap_state *esp;
u_char *inp;
int len, id;
{
u_char val;
u_char *datp, *digp;
SHA1_CTX ctxt;
u_char dig[SHA_DIGESTSIZE];
int dsize, fd, olen = len;
/*
* Do the decoding by working backwards. This eliminates the need
* to save the decoded output in a separate buffer.
*/
v... | 0 | [
"CWE-120",
"CWE-787"
] | ppp | 8d7970b8f3db727fe798b65f3377fe6787575426 | 215,234,787,217,970,040,000,000,000,000,000,000,000 | 56 | pppd: Fix bounds check in EAP code
Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname). This fixes the check so we
actually avoid overflowing the rhostname array.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Paul Mackerras <paulus... |
ModuleExport void UnregisterSFWImage(void)
{
(void) UnregisterMagickInfo("SFW");
} | 0 | [
"CWE-119"
] | ImageMagick | d4145e664aea3752ca6d3bf1ee825352b595dab5 | 311,025,317,706,831,780,000,000,000,000,000,000,000 | 4 | https://github.com/ImageMagick/ImageMagick/issues/682 |
compute_permissions (GKeyFile *app_metadata,
GKeyFile *runtime_metadata,
GError **error)
{
g_autoptr(FlatpakContext) app_context = NULL;
app_context = flatpak_context_new ();
add_default_permissions (app_context);
if (!flatpak_context_load_metadata (app_context, run... | 0 | [
"CWE-20"
] | flatpak | 902fb713990a8f968ea4350c7c2a27ff46f1a6c4 | 181,046,148,174,344,400,000,000,000,000,000,000,000 | 19 | Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty. |
static bool find_mpvio_user(MPVIO_EXT *mpvio)
{
DBUG_ENTER("find_mpvio_user");
DBUG_PRINT("info", ("entry: %s", mpvio->auth_info.user_name));
DBUG_ASSERT(mpvio->acl_user == 0);
mysql_mutex_lock(&acl_cache->lock);
for (uint i=0; i < acl_users.elements; i++)
{
ACL_USER *acl_user_tmp= dynamic_element(&acl_... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 151,082,130,411,119,850,000,000,000,000,000,000,000 | 72 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
cmsBool FileWrite(cmsIOHANDLER* iohandler, cmsUInt32Number size, const void* Buffer)
{
if (size == 0) return TRUE; // We allow to write 0 bytes, but nothing is written
iohandler->UsedSpace += size;
return (fwrite(Buffer, size, 1, (FILE*) iohandler->stream) == 1);
} | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 276,456,644,551,178,040,000,000,000,000,000,000,000 | 7 | >Changes from Richard Hughes |
g_execvp(const char* p1, char* args[])
{
#if defined(_WIN32)
return 0;
#else
int rv;
g_rm_temp_dir();
rv = execvp(p1, args);
g_mk_temp_dir(0);
return rv;
#endif
} | 0 | [] | xrdp | cadad6e181d2a67698e5eb7cacd6b233ae29eb97 | 177,717,931,031,387,430,000,000,000,000,000,000,000 | 13 | /tmp cleanup |
bool get_sections_symbols_from_code_objects(RzBinPycObj *pyc, RzBuffer *buffer, RzList *sections, RzList *symbols, RzList *cobjs, ut32 magic) {
bool ret;
pyc->magic_int = magic;
pyc->refs = rz_list_newf((RzListFree)free_object);
if (!pyc->refs) {
return false;
}
ret = extract_sections_symbols(pyc, get_object(py... | 0 | [
"CWE-787"
] | rizin | 38d8006cd609ac75de82b705891d3508d2c218d5 | 276,989,864,353,483,000,000,000,000,000,000,000,000 | 11 | fix #2963 - oob write (1 byte) in pyc/marshal.c |
int neigh_resolve_output(struct sk_buff *skb)
{
struct dst_entry *dst = skb->dst;
struct neighbour *neigh;
int rc = 0;
if (!dst || !(neigh = dst->neighbour))
goto discard;
__skb_pull(skb, skb->nh.raw - skb->data);
if (!neigh_event_send(neigh, skb)) {
int err;
struct net_device *dev = neigh->dev;
if (de... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 24,411,077,371,019,447,000,000,000,000,000,000,000 | 42 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int removeNode(Rtree *pRtree, RtreeNode *pNode, int iHeight){
int rc;
int rc2;
RtreeNode *pParent = 0;
int iCell;
assert( pNode->nRef==1 );
/* Remove the entry in the parent cell. */
rc = nodeParentIndex(pRtree, pNode, &iCell);
if( rc==SQLITE_OK ){
pParent = pNode->pParent;
pNode->pPare... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 290,050,781,523,225,200,000,000,000,000,000,000,000 | 48 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
p11_rpc_message_read_ulong (p11_rpc_message *msg,
CK_ULONG *val)
{
uint64_t v;
assert (msg != NULL);
assert (msg->input != NULL);
/* Make sure this is in the right order */
assert (!msg->signature || p11_rpc_message_verify_part (msg, "u"));
if (!p11_rpc_buffer_get_uint64 (msg->input... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 213,989,862,097,682,960,000,000,000,000,000,000,000 | 17 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
int mingw_chmod(const char *filename, int mode)
{
wchar_t wfilename[MAX_PATH];
if (xutftowcs_path(wfilename, filename) < 0)
return -1;
return _wchmod(wfilename, mode);
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 242,606,334,793,725,440,000,000,000,000,000,000,000 | 7 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
struct fuse_req *fuse_get_req_for_background(struct fuse_conn *fc,
unsigned npages)
{
return __fuse_get_req(fc, npages, true);
} | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 157,233,881,857,289,700,000,000,000,000,000,000 | 5 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
zskiplistNode *zslUpdateScore(zskiplist *zsl, double curscore, sds ele, double newscore) {
zskiplistNode *update[ZSKIPLIST_MAXLEVEL], *x;
int i;
/* We need to seek to element to update to start: this is useful anyway,
* we'll have to update or remove it. */
x = zsl->header;
for (i = zsl->level... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 1,974,913,048,623,087,000,000,000,000,000,000,000 | 43 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
int __sk_mem_schedule(struct sock *sk, int size, int kind)
{
struct proto *prot = sk->sk_prot;
int amt = sk_mem_pages(size);
long allocated;
int parent_status = UNDER_LIMIT;
sk->sk_forward_alloc += amt * SK_MEM_QUANTUM;
allocated = sk_memory_allocated_add(sk, amt, &parent_status);
/* Under limit. */
if (pare... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 82981930125abfd39d7c8378a9cfdf5e1be2002b | 250,007,427,659,465,320,000,000,000,000,000,000,000 | 76 | net: cleanups in sock_setsockopt()
Use min_t()/max_t() macros, reformat two comments, use !!test_bit() to
match !!sock_flag()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int test_not_prime(int i)
{
int ret = 0;
BIGNUM *r = NULL;
int trial;
if (!TEST_ptr(r = BN_new()))
goto err;
for (trial = 0; trial <= 1; ++trial) {
if (!TEST_true(BN_set_word(r, not_primes[i]))
|| !TEST_false(BN_check_prime(r, ctx, NULL)))
goto er... | 0 | [] | openssl | 336923c0c8d705cb8af5216b29a205662db0d590 | 325,217,734,043,435,000,000,000,000,000,000,000,000 | 20 | Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets
bn_sqr_comba8 does for instance compute a wrong result for the value:
a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45
The correct result is:
r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f
9... |
static void Ins_SFVFS( INS_ARG )
{
Short S;
Long X, Y;
/* Only use low 16bits, then sign extend */
S = (Short)args[1];
Y = (Long)S;
S = (Short)args[0];
X = S;
if ( NORMalize( X, Y, &CUR.GS.freeVector ) == FAILURE )
return;
COMPUTE_Funcs();
} | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 58,399,821,214,011,250,000,000,000,000,000,000,000 | 16 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
static void dynamic_debug_setup(struct module *mod, struct _ddebug *debug, unsigned int num)
{
if (!debug)
return;
ddebug_add_module(debug, num, mod->name);
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 120,206,228,989,114,750,000,000,000,000,000,000,000 | 6 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value)
{
BIGNUM *bn = NULL;
ASN1_INTEGER *aint;
int isneg, ishex;
int ret;
if (!value) {
X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE);
return 0;
}
bn = BN_new();
if (value[0] == '-') {
value++;
isneg = 1;
} else isneg =... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 285,103,871,101,366,270,000,000,000,000,000,000,000 | 41 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
static void zlib_stateful_finish(COMP_CTX *ctx)
{
struct zlib_state *state =
(struct zlib_state *)CRYPTO_get_ex_data(&ctx->ex_data,
zlib_stateful_ex_idx);
inflateEnd(&state->istream);
deflateEnd(&state->ostream);
OPENSSL_free(state);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_COMP,ctx,&ctx->ex_data);
} | 0 | [
"CWE-399"
] | openssl | 1b31b5ad560b16e2fe1cad54a755e3e6b5e778a3 | 196,507,213,193,854,240,000,000,000,000,000,000,000 | 10 | Modify compression code so it avoids using ex_data free functions. This
stops applications that call CRYPTO_free_all_ex_data() prematurely leaking
memory. |
do_color(Linecolor c)
{
if (c & 0x8)
setfcolor(c & 0x7);
else if (color_mode & 0x8)
setfcolor(basic_color);
#ifdef USE_BG_COLOR
if (c & 0x80)
setbcolor((c >> 4) & 0x7);
else if (color_mode & 0x80)
setbcolor(bg_color);
#endif
color_mode = c;
} | 0 | [
"CWE-119"
] | w3m | 0c3f5d0e0d9269ad47b8f4b061d7818993913189 | 82,868,698,562,438,840,000,000,000,000,000,000,000 | 14 | Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38 |
std::string get_intl_dir()
{
#ifdef _WIN32
return get_cwd() + "/translations";
#else
#ifdef USE_INTERNAL_DATA
return get_cwd() + "/" LOCALEDIR;
#endif
#if HAS_RELATIVE_LOCALEDIR
std::string res = game_config::path + "/" LOCALEDIR;
#else
std::string res = LOCALEDIR;
#endif
return res;
#endif
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 69,462,188,135,097,410,000,000,000,000,000,000,000 | 19 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
TEST_F(OwnedImplTest, ReserveZeroCommit) {
BufferFragmentImpl frag("", 0, nullptr);
Buffer::OwnedImpl buf;
buf.addBufferFragment(frag);
buf.prepend("bbbbb");
buf.add("");
constexpr uint32_t reserve_slices = 16;
Buffer::RawSlice slices[reserve_slices];
const uint32_t allocated_slices = buf.reserve(1280, ... | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 35,662,731,134,793,636,000,000,000,000,000,000,000 | 35 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
void Display::slotAuthenticationFinished(const QString &user, bool success) {
if (success) {
qDebug() << "Authenticated successfully";
m_auth->setCookie(qobject_cast<XorgDisplayServer *>(m_displayServer)->cookie());
// save last user and last session
if (mai... | 0 | [
"CWE-613",
"CWE-287",
"CWE-284"
] | sddm | 147cec383892d143b5e02daa70f1e7def50f5d98 | 112,513,192,783,616,190,000,000,000,000,000,000,000 | 30 | Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service |
Status SQLiteSQLPlugin::detach(const std::string& name) {
// Detach requests occurring via the plugin/registry APIs must act on the
// primary database. To allow this, getConnection can explicitly request the
// primary instance and avoid the contention decisions.
auto dbc = SQLiteDBManager::getConnection(true)... | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 230,379,512,109,383,300,000,000,000,000,000,000,000 | 7 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
CryptRsaSelectScheme(
TPMI_DH_OBJECT rsaHandle, // IN: handle of an RSA key
TPMT_RSA_DECRYPT *scheme // IN: a sign or decrypt scheme
)
{
OBJECT *rsaObject;
TPMT_ASYM_SCHEME *keyScheme;
TPMT_RSA_DECRYPT *retVal = NULL;
// Get sign object pointe... | 0 | [
"CWE-787"
] | libtpms | 505ef841c00b4c096b1977c667cb957bec3a1d8b | 15,947,735,976,073,020,000,000,000,000,000,000,000 | 37 | tpm2: Fix output buffer parameter and size for RSA decyrption
For the RSA decryption we have to use an output buffer of the size of the
(largest possible) RSA key for the decryption to always work.
This fixes a stack corruption bug that caused a SIGBUS and termination of
'swtpm'.
Signed-off-by: Stefan Berger <stefan... |
static PHP_GINIT_FUNCTION(libxml)
{
libxml_globals->stream_context = NULL;
libxml_globals->error_buffer.c = NULL;
libxml_globals->error_list = NULL;
libxml_globals->entity_loader_disabled = 0;
} | 0 | [
"CWE-200"
] | php-src | 8e76d0404b7f664ee6719fd98f0483f0ac4669d6 | 292,686,029,646,555,700,000,000,000,000,000,000,000 | 7 | Fixed external entity loading |
cmsHPROFILE CMSEXPORT cmsCreateXYZProfileTHR(cmsContext ContextID)
{
cmsHPROFILE hProfile;
cmsPipeline* LUT = NULL;
hProfile = cmsCreateRGBProfileTHR(ContextID, cmsD50_xyY(), NULL, NULL);
if (hProfile == NULL) return NULL;
cmsSetProfileVersion(hProfile, 4.3);
cmsSetDeviceClass(hProfile, cmsSi... | 1 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 189,171,240,569,923,100,000,000,000,000,000,000,000 | 37 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
run_interrupt_trap (will_throw)
int will_throw; /* from throw_to_top_level? */
{
if (will_throw && running_trap > 0)
run_trap_cleanup (running_trap - 1);
_run_trap_internal (SIGINT, "interrupt trap");
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 302,684,328,463,719,600,000,000,000,000,000,000,000 | 7 | bash-4.4-rc2 release |
extern "C" void slave_io_thread_detach_vio()
{
THD *thd= current_thd;
if (thd && thd->slave_thread)
thd->clear_active_vio();
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 316,601,570,853,734,060,000,000,000,000,000,000,000 | 6 | 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 struct priority_group *alloc_priority_group(void)
{
struct priority_group *pg;
pg = kzalloc(sizeof(*pg), GFP_KERNEL);
if (pg)
INIT_LIST_HEAD(&pg->pgpaths);
return pg;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 27,761,826,868,037,060,000,000,000,000,000,000,000 | 11 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
int LUKS2_reencrypt_digest_verify(struct crypt_device *cd,
struct luks2_hdr *hdr,
struct volume_key *vks)
{
int r, keyslot_reencrypt;
struct volume_key *data;
keyslot_reencrypt = LUKS2_find_keyslot(hdr, "reencrypt");
if (keyslot_reencrypt < 0)
return keyslot_reencrypt;
r = reencrypt_assembly_verification_dat... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 293,730,892,448,590,550,000,000,000,000,000,000,000 | 27 | 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... |
static int cap_sb_kern_mount(struct super_block *sb, int flags, void *data)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 194,727,499,115,054,730,000,000,000,000,000,000,000 | 4 | 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... |
bool canCreate() override {
if (!useRetryBudget()) {
return max_retry_resource_.canCreate();
}
clearRemainingGauge();
return count() < max();
} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 145,808,088,931,587,900,000,000,000,000,000,000,000 | 7 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
QPDFObjectHandle::parseContentStream_data(
PointerHolder<Buffer> stream_data,
std::string const& description,
ParserCallbacks* callbacks)
{
size_t length = stream_data->getSize();
PointerHolder<InputSource> input =
new BufferInputSource(description, stream_data.getPointer());
QPDFTokeniz... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 253,956,386,374,447,750,000,000,000,000,000,000,000 | 48 | 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 ... |
static void vnc_mouse_set(DisplayChangeListener *dcl,
int x, int y, int visible)
{
/* can we ask the client(s) to move the pointer ??? */
} | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 261,982,731,892,830,730,000,000,000,000,000,000,000 | 5 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
MatchExpression::ExpressionOptimizerFunc ExprMatchExpression::getOptimizer() const {
return [](std::unique_ptr<MatchExpression> expression) {
auto& exprMatchExpr = static_cast<ExprMatchExpression&>(*expression);
// If '_expression' can be rewritten to a MatchExpression, we will return a $and node w... | 1 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 13,755,386,551,788,884,000,000,000,000,000,000,000 | 26 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static inline int kiocb_wait_page_queue_init(struct kiocb *kiocb,
struct wait_page_queue *wait,
wait_queue_func_t func,
void *data)
{
/* Can't support async wakeup with polled IO */
if (kiocb->ki_flags & IOCB_HIPRI)
return -EINVAL;
if (kiocb->ki_filp->f_mode & FMODE_BUF_RASYNC) {
wa... | 0 | [
"CWE-416"
] | linux | 6d816e088c359866f9867057e04f244c608c42fe | 271,626,974,880,219,900,000,000,000,000,000,000,000 | 20 | io_uring: hold 'ctx' reference around task_work queue + execute
We're holding the request reference, but we need to go one higher
to ensure that the ctx remains valid after the request has finished.
If the ring is closed with pending task_work inflight, and the
given io_kiocb finishes sync during issue, then we need a... |
WalSndXLogSendHandler(SIGNAL_ARGS)
{
int save_errno = errno;
latch_sigusr1_handler();
errno = save_errno;
} | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 214,625,477,537,045,400,000,000,000,000,000,000,000 | 8 | 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... |
static int ocfs2_dio_wr_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct ocfs2_inode_info *oi = OCFS2_I(inode);
struct ocfs2_write_ctxt *wc;
struct ocfs2_write_cluster_desc *desc = NULL;
struct ocfs2_dio_w... | 0 | [
"CWE-362"
] | linux | 3e4c56d41eef5595035872a2ec5a483f42e8917f | 296,811,102,952,295,300,000,000,000,000,000,000,000 | 130 | ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
ip_alloc_sem should be taken in ocfs2_get_block() when reading file in
DIRECT mode to prevent concurrent access to extent tree with
ocfs2_dio_end_io_write(), which may cause BUGON in the following
situation:
read file 'A' end_io... |
static int __ipx_bind(struct socket *sock,
struct sockaddr *uaddr, int addr_len)
{
struct sock *sk = sock->sk;
struct ipx_sock *ipxs = ipx_sk(sk);
struct ipx_interface *intrfc;
struct sockaddr_ipx *addr = (struct sockaddr_ipx *)uaddr;
int rc = -EINVAL;
if (!sock_flag(sk, SOCK_ZAPPED) || addr_len != sizeof(str... | 0 | [
"CWE-416"
] | linux | ee0d8d8482345ff97a75a7d747efc309f13b0d80 | 154,741,746,753,576,690,000,000,000,000,000,000,000 | 95 | ipx: call ipxitf_put() in ioctl error path
We should call ipxitf_put() if the copy_to_user() fails.
Reported-by: 李强 <liqiang6-s@360.cn>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.