func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline short _swap16(short &wData) { wData = ((wData >> 8) & 0x00FF) | ((wData << 8) & 0xFF00); return wData; }
0
[ "CWE-119" ]
soundtouch
9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e
117,642,661,367,914,070,000,000,000,000,000,000,000
6
Added minimum size check for WAV header block lengh values
int ptrace_request(struct task_struct *child, long request, unsigned long addr, unsigned long data) { bool seized = child->ptrace & PT_SEIZED; int ret = -EIO; kernel_siginfo_t siginfo, *si; void __user *datavp = (void __user *) data; unsigned long __user *datalp = datavp; unsigned long flags; switch (reque...
0
[ "CWE-264", "CWE-269" ]
linux
6994eefb0053799d2e07cd140df6c2ea106c41ee
12,265,125,843,513,233,000,000,000,000,000,000,000
231
ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like struct cred do not permit unconditionally ...
return *this; } CImgList<T>& _load_gif_external(const char *const filename, const bool use_graphicsmagick=false) { CImg<charT> command(1024), filename_tmp(256), filename_tmp2(256); std::FILE *file = 0; do { cimg_snprintf(filename_tmp,filename_tmp._width,"%s%c%s", ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
162,373,642,645,266,040,000,000,000,000,000,000,000
42
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
should_skip_readdir_error (CommonJob *common, GFile *dir) { if (common->skip_readdir_error != NULL) { return g_hash_table_lookup (common->skip_readdir_error, dir) != NULL; } return FALSE; }
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
33,976,971,007,230,023,000,000,000,000,000,000,000
8
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
static int mailbox_read_header(struct mailbox *mailbox, const char *fname) { int r = 0; int flag; const char *name, *p, *tab, *eol; struct stat sbuf; const char *base = NULL; size_t len = 0; unsigned magic_size = sizeof(MAILBOX_HEADER_MAGIC) - 1; /* can't be dirty if we're reading it */...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
73,364,805,767,653,155,000,000,000,000,000,000,000
124
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
static uint_fast32_t jpc_abstorelstepsize(jpc_fix_t absdelta, int scaleexpn) { int p; uint_fast32_t mant; uint_fast32_t expn; int n; if (absdelta < 0) { abort(); } p = jpc_firstone(absdelta) - JPC_FIX_FRACBITS; n = 11 - jpc_firstone(absdelta); mant = ((n < 0) ? (absdelta >> (-n)) : (absdelta << n)) & 0x7ff...
1
[ "CWE-617" ]
jasper
e6c8d5a838b49f94616be14753aa5c89d64605b5
72,127,700,512,832,880,000,000,000,000,000,000,000
20
jpc_math: split jpc_firstone() in int/jpc_fix_t overloads Fixes CVE-2018-9055 (denial of service via a reachable assertion due to integer overflow). Based on a patch from Fridrich Strba <fstrba@suse.com>. Instead of switching to `int_fast32_t`, this patch splits jpc_firstone() into two overloads, one for `int` and o...
static inline double safe_substract(ulonglong a, ulonglong b) { return (a > b)? double(a - b) : -double(b - a); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
106,703,115,110,485,360,000,000,000,000,000,000,000
4
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...
Status Conv2DShapeImpl(shape_inference::InferenceContext* c, bool supports_explicit_padding) { string data_format_str, filter_format_str; if (!c->GetAttr("data_format", &data_format_str).ok()) { data_format_str = "NHWC"; } if (!c->GetAttr("filter_format", &filter_format_str).ok()) { ...
0
[ "CWE-125" ]
tensorflow
a0d64445116c43cf46a5666bd4eee28e7a82f244
19,379,298,955,210,933,000,000,000,000,000,000,000
156
Prevent OOB access in QuantizeV2 shape inference PiperOrigin-RevId: 400309614 Change-Id: I31412c71b05b4f21b677f7fa715a61499cbee39d
void automataUnitTest() { void *automa = ndpi_init_automa(); assert(automa); assert(ndpi_add_string_to_automa(automa, "hello") == 0); assert(ndpi_add_string_to_automa(automa, "world") == 0); ndpi_finalize_automa(automa); assert(ndpi_match_string(automa, "This is the wonderful world of nDPI") == 1); ndpi_...
0
[ "CWE-125" ]
nDPI
b7e666e465f138ae48ab81976726e67deed12701
164,340,388,917,932,200,000,000,000,000,000,000,000
10
Added fix to avoid potential heap buffer overflow in H.323 dissector Modified HTTP report information to make it closer to the HTTP field names
rsRetVal qqueueEnqObjDirectBatch(qqueue_t *pThis, batch_t *pBatch) { DEFiRet; ASSERT(pThis != NULL); /* calling the consumer is quite different here than it is from a worker thread */ /* we need to provide the consumer's return value back to the caller because in direct * mode the consumer probably has a lot to...
0
[ "CWE-772" ]
rsyslog
dfa88369d4ca4290db56b843f9eabdae1bfe0fd5
123,758,166,742,462,580,000,000,000,000,000,000,000
18
bugfix: memory leak when $RepeatedMsgReduction on was used bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225
static Image *ReadMATImageV4(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { typedef struct { unsigned char Type[4]; unsigned int nRows; unsigned int nCols; unsigned int imagf; unsigned int nameLen; } MAT4_HDR; long ldblk; EndianType endian; Image *ro...
0
[ "CWE-787" ]
ImageMagick6
db7a4be592328af06d776ce3bab24b8c6de5be20
275,042,072,900,460,460,000,000,000,000,000,000,000
243
https://github.com/ImageMagick/ImageMagick/issues/1221
static void gui_windows_remove_parent(MAIN_WINDOW_REC *window) { MAIN_WINDOW_REC *new_parent; GSList *tmp; new_parent = mainwindows->data; for (tmp = windows; tmp != NULL; tmp = tmp->next) { WINDOW_REC *rec = tmp->data; if (rec->gui_data != NULL && WINDOW_MAIN(rec) == window) ...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
130,842,376,728,015,730,000,000,000,000,000,000,000
13
check the error condition of mainwindow_create
static SQInteger array_find(HSQUIRRELVM v) { SQObject &o = stack_get(v,1); SQObjectPtr &val = stack_get(v,2); SQArray *a = _array(o); SQInteger size = a->Size(); SQObjectPtr temp; for(SQInteger n = 0; n < size; n++) { bool res = false; a->Get(n,temp); if(SQVM::IsEqual(tem...
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
7,107,704,084,307,370,000,000,000,000,000,000,000
17
fix in thread.call
static void vrend_update_frontface_state(struct vrend_context *ctx) { struct pipe_rasterizer_state *state = &ctx->sub->rs_state; int front_ccw = state->front_ccw; front_ccw ^= (ctx->sub->inverted_fbo_content ? 0 : 1); if (front_ccw) glFrontFace(GL_CCW); else glFrontFace(GL_CW); }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
142,752,912,343,918,220,000,000,000,000,000,000,000
11
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
bool ValidateBaseCode() { bool pass = true, fail; byte data[255]; for (unsigned int i=0; i<255; i++) data[i] = byte(i); const char hexEncoded[] = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627" "28292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A...
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
321,709,432,635,175,000,000,000,000,000,000,000,000
103
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
event_nr2name(event_T event) { int i; for (i = 0; event_names[i].name != NULL; ++i) if (event_names[i].event == event) return (char_u *)event_names[i].name; return (char_u *)"Unknown"; }
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
31,085,162,550,169,920,000,000,000,000,000,000,000
9
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
static void storm_memset_func_cfg(struct bnx2x *bp, struct tstorm_eth_function_common_config *tcfg, u16 abs_fid) { size_t size = sizeof(struct tstorm_eth_function_common_config); u32 addr = BAR_TSTRORM_INTMEM + TSTORM_FUNCTION_COMMON_CONFIG_OFFSET(abs_fid); __storm_memset_struct(bp, addr, size, (u32 *...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
212,012,675,621,820,000,000,000,000,000,000,000,000
11
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
inode_val_compare (const void *val1, const void *val2) { const struct inode_val *ival1 = val1; const struct inode_val *ival2 = val2; return ival1->inode == ival2->inode && ival1->major_num == ival2->major_num && ival1->minor_num == ival2->minor_num; }
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
145,127,091,348,972,280,000,000,000,000,000,000,000
8
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
static half cut(const double val) { return (half)val; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
330,770,419,315,365,760,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
static void reclaim_consumed_buffers(struct port *port) { struct port_buffer *buf; unsigned int len; if (!port->portdev) { /* Device has been unplugged. vqs are already gone. */ return; } while ((buf = virtqueue_get_buf(port->out_vq, &len))) { free_buf(buf, false); port->outvq_full = false; } }
0
[ "CWE-119", "CWE-787" ]
linux
c4baad50297d84bde1a7ad45e50c73adae4a2192
327,255,425,201,582,980,000,000,000,000,000,000,000
14
virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Michael S. Tsirkin <mst@redhat...
rfbClientConnFailed(rfbClientPtr cl, char *reason) { char *buf; int len = strlen(reason); rfbLog("rfbClientConnFailed(\"%s\")\n", reason); buf = (char *)malloc(8 + len); ((uint32_t *)buf)[0] = 0; ((uint32_t *)buf)[1] = Swap32IfLE(len); memcpy(buf + 8, reason, len); ...
0
[ "CWE-119" ]
vino
dff52694a384fe95195f2211254026b752d63ec4
297,753,274,351,407,320,000,000,000,000,000,000,000
19
Avoid out-of-bounds memory accesses This fixes two critical security vulnerabilities that lead to an out-of-bounds memory access with a crafted client framebuffer update request packet. The dimensions of the update from the packet are checked to ensure that they are within the screen dimensions. Thanks to Kevin Chen ...
make_codepage_from_charset(const char *charset) { char cs[16]; char *p; unsigned cp; int a, b; if (charset == NULL || strlen(charset) > 15) return -1; /* Copy name to uppercase. */ p = cs; while (*charset) { char c = *charset++; if (c >= 'a' && c <= 'z') c -= 'a' - 'A'; *p++ = c; } *p++ = '\0'; ...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
1,924,500,446,331,817,400,000,000,000,000,000,000
62
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
GF_Err trun_Write(GF_Box *s, GF_BitStream *bs) { GF_TrunEntry *p; GF_Err e; u32 i, count; GF_TrackFragmentRunBox *ptr = (GF_TrackFragmentRunBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->sample_count); //The rest depends on the flags if ...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
154,264,481,722,027,350,000,000,000,000,000,000,000
49
prevent dref memleak on invalid input (#1183)
static inline void complete_tx(struct sdma_engine *sde, struct sdma_txreq *tx, int res) { /* protect against complete modifying */ struct iowait *wait = tx->wait; callback_t complete = tx->complete; #ifdef CONFIG_HFI1_DEBUG_SDMA_ORDER trace_hfi1_sdma_out_sn(sde, tx->sn); if (WARN_ON_ONCE(sde->...
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
26,975,545,866,339,376,000,000,000,000,000,000,000
21
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
evutil_socket_(int domain, int type, int protocol) { evutil_socket_t r; #if defined(SOCK_NONBLOCK) && defined(SOCK_CLOEXEC) r = socket(domain, type, protocol); if (r >= 0) return r; else if ((type & (SOCK_NONBLOCK|SOCK_CLOEXEC)) == 0) return -1; #endif #define SOCKET_TYPE_MASK (~(EVUTIL_SOCK_NONBLOCK|EVUTIL_SOC...
0
[ "CWE-119", "CWE-787" ]
libevent
329acc18a0768c21ba22522f01a5c7f46cacc4d5
106,902,952,853,052,820,000,000,000,000,000,000,000
28
evutil_parse_sockaddr_port(): fix buffer overflow @asn-the-goblin-slayer: "Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is the length is more than 2<<31 (INT_MAX), len will hold a negative value. Consequently, it will pass the check at line 1816. Segfault happens at line 1819. ...
#endif } inline FILE* _stderr(const bool throw_exception) { #ifndef cimg_use_r cimg::unused(throw_exception); return stderr; #else if (throw_exception) { cimg::exception_mode(0); throw CImgIOException("cimg::stderr(): Reference to 'stderr' stream not allowed in R mode " ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
91,606,865,418,207,590,000,000,000,000,000,000,000
13
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void rtl8139_TxStatus_write(RTL8139State *s, uint32_t txRegOffset, uint32_t val) { int descriptor = txRegOffset/4; /* handle C+ transmit mode register configuration */ if (s->cplus_enabled) { DPRINTF("RTL8139C+ DTCCR write offset=0x%x val=0x%08x " "descriptor=%d\n", txRegOf...
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
244,833,278,875,818,480,000,000,000,000,000,000,000
41
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
new_scope(cctx_T *cctx, scopetype_T type) { scope_T *scope = ALLOC_CLEAR_ONE(scope_T); if (scope == NULL) return NULL; scope->se_outer = cctx->ctx_scope; cctx->ctx_scope = scope; scope->se_type = type; scope->se_local_count = cctx->ctx_locals.ga_len; return scope; }
0
[ "CWE-703", "CWE-122" ]
vim
d1d8f6bacb489036d0fd479c9dd3c0102c988889
115,350,370,000,789,230,000,000,000,000,000,000,000
12
patch 9.0.0211: invalid memory access when compiling :lockvar Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
ar6000_transfer_bin_file(struct ar6_softc *ar, AR6K_BIN_FILE file, u32 address, bool compressed) { int status; const char *filename; const struct firmware *fw_entry; u32 fw_entry_size; switch (file) { case AR6K_OTP_FILE: if (ar->arVersion.target_ver == AR6003_REV1_VERSION) { ...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
322,537,328,274,402,200,000,000,000,000,000,000,000
175
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit) { int retval; struct tree *t1 = commit->tree; if (!t1) return 0; tree_difference = REV_TREE_SAME; DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES); retval = diff_tree_sha1(NULL, t1->object.sha1, "", &revs->pruning); return retval >= 0 ...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
279,520,526,191,592,900,000,000,000,000,000,000,000
14
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static QuantizationTable *DestroyQuantizationTable(QuantizationTable *table) { assert(table != (QuantizationTable *) NULL); if (table->slot != (char *) NULL) table->slot=DestroyString(table->slot); if (table->description != (char *) NULL) table->description=DestroyString(table->description); if (table->...
0
[ "CWE-416" ]
ImageMagick
39f226a9c137f547e12afde972eeba7551124493
90,250,907,886,306,300,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1641
xmlRegisterCharEncodingHandler(xmlCharEncodingHandlerPtr handler) { if (handlers == NULL) xmlInitCharEncodingHandlers(); if ((handler == NULL) || (handlers == NULL)) { xmlEncodingErr(XML_I18N_NO_HANDLER, "xmlRegisterCharEncodingHandler: NULL handler !\n", NULL); return; } if (nbCharEncodingH...
0
[ "CWE-189" ]
libxml2
69f04562f75212bfcabecd190ea8b06ace28ece2
198,415,676,516,062,200,000,000,000,000,000,000,000
16
Fix an off by one error in encoding this off by one error doesn't seems to reproduce on linux but the error is real.
hook_timer (struct t_weechat_plugin *plugin, long interval, int align_second, int max_calls, t_hook_callback_timer *callback, void *callback_data) { struct t_hook *new_hook; struct t_hook_timer *new_hook_timer; if ((interval <= 0) || !callback) return NULL; new_...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
29,624,479,502,314,510,000,000,000,000,000,000,000
35
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
flatpak_context_load_metadata (FlatpakContext *context, GKeyFile *metakey, GError **error) { gboolean remove; g_auto(GStrv) groups = NULL; gsize i; if (g_key_file_has_key (metakey, FLATPAK_METADATA_GROUP_CONTEXT, FLATPAK_METADATA_KEY_SH...
1
[ "CWE-74" ]
flatpak
4108e022452303093d8b90c838695a0476cb09c7
250,871,480,456,206,170,000,000,000,000,000,000,000
223
context: Add --unset-env option and a corresponding override This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality that I noticed while resolving that vulnerability, but is not required for fixing the vulnerability. Signed-off-by: Simon McVittie <smcv@collabora.com>
void CLASS parse_fuji(int offset) { unsigned entries, tag, len, save, c; fseek(ifp, offset, SEEK_SET); entries = get4(); if (entries > 255) return; while (entries--) { tag = get2(); len = get2(); save = ftell(ifp); if (tag == 0x100) { raw_height = get2(); raw_width = ge...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
241,557,489,018,302,540,000,000,000,000,000,000,000
99
Secunia SA75000 advisory: several buffer overruns
bool Column_definition::set_compressed(const char *method) { if (!method || !strcmp(method, zlib_compression_method->name)) { unireg_check= Field::TMYSQL_COMPRESSED; compression_method_ptr= zlib_compression_method; return false; } my_error(ER_UNKNOWN_COMPRESSION_METHOD, MYF(0), method); return tru...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
52,651,389,175,999,230,000,000,000,000,000,000,000
11
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...
ssize_t ip_append_page(struct sock *sk, struct page *page, int offset, size_t size, int flags) { struct inet_sock *inet = inet_sk(sk); struct sk_buff *skb; struct rtable *rt; struct ip_options *opt = NULL; int hh_len; int mtu; int len; int err; unsigned int maxfraglen, fragheaderlen, fraggap; if (in...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
311,977,164,162,068,370,000,000,000,000,000,000,000
142
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
PHP_FUNCTION(imagecolortransparent) { zval *IM; long COL = 0; gdImagePtr im; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc TSRMLS_CC, "r|l", &IM, &COL) == FAILURE) { return; } ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd); if (argc > 1) { gdImageColorTransparent(im, COL); } ...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
278,464,989,253,954,450,000,000,000,000,000,000,000
19
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
static void ctrn_write_ctso(GF_TrackFragmentRunBox *ctrn, GF_BitStream *bs, u32 ctso, u32 field_size) { if (!field_size) return; if (ctrn->ctso_multiplier) { gf_bs_write_int(bs, ctso / ctrn->ctso_multiplier, field_size); } else { gf_bs_write_int(bs, ctso, field_size); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
279,242,421,719,895,070,000,000,000,000,000,000,000
10
fixed #1587
int pneigh_delete(struct neigh_table *tbl, const void *pkey, struct net_device *dev) { struct pneigh_entry *n, **np; int key_len = tbl->key_len; u32 hash_val = *(u32 *)(pkey + key_len - 4); hash_val ^= (hash_val >> 16); hash_val ^= hash_val >> 8; hash_val ^= hash_val >> 4; hash_val &= PNEIGH_HASHMASK; wri...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
161,965,007,883,343,460,000,000,000,000,000,000,000
29
[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>
TEST_P(MessengerTest, SyntheticInjectTest2) { g_ceph_context->_conf->set_val("ms_inject_socket_failures", "30"); g_ceph_context->_conf->set_val("ms_inject_internal_delays", "0.1"); SyntheticWorkload test_msg(8, 16, GetParam(), 100, Messenger::Policy::lossless_peer_reuse(0), ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
73,219,056,865,745,420,000,000,000,000,000,000,000
32
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 ...
static MagickOffsetType TIFFSeekCustomStream(const MagickOffsetType offset, const int whence,void *user_data) { PhotoshopProfile *profile; profile=(PhotoshopProfile *) user_data; switch (whence) { case SEEK_SET: default: { if (offset < 0) return(-1); profile->offset=offset...
0
[ "CWE-125", "CWE-787" ]
ImageMagick
930ff0d1a9bc42925a7856e9ea53f5fc9f318bf3
179,094,529,073,299,840,000,000,000,000,000,000,000
41
eliminate heap buffer overflow vulnerability, thanks to ZhangJiaxing (@r0fm1a) from Codesafe Team of Legendsec at Qi'anxin Group
static void sctp_cmd_del_non_primary(struct sctp_association *asoc) { struct sctp_transport *t; struct list_head *pos; struct list_head *temp; list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { t = list_entry(pos, struct sctp_transport, transports); if (!sctp_cmp_addr_exact(&t->ipaddr, &aso...
0
[]
linux
196d67593439b03088913227093e374235596e33
222,882,143,387,694,230,000,000,000,000,000,000,000
14
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
void gfs2_trim_blocks(struct inode *inode) { u64 size = inode->i_size; int ret; ret = do_shrink(inode, size, size); WARN_ON(ret != 0); }
0
[ "CWE-119", "CWE-787" ]
linux
64dd153c83743af81f20924c6343652d731eeecb
163,475,901,414,896,640,000,000,000,000,000,000,000
8
GFS2: rewrite fallocate code to write blocks directly GFS2's fallocate code currently goes through the page cache. Since it's only writing to the end of the file or to holes in it, it doesn't need to, and it was causing issues on low memory environments. This patch pulls in some of Steve's block allocation work, and u...
static int php_zip_ops_flush(php_stream *stream TSRMLS_DC) { if (!stream) { return 0; } return 0; }
0
[ "CWE-119" ]
php-src
81406c0c1d45f75fcc7972ed974d2597abb0b9e9
291,576,738,299,726,550,000,000,000,000,000,000,000
8
Fix fir bug #72520
static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
339,830,006,569,422,260,000,000,000,000,000,000,000
4
- 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
Status DenseCountSparseOutputShapeFn(InferenceContext *c) { auto values = c->input(0); auto weights = c->input(1); ShapeHandle output; auto num_weights = c->NumElements(weights); if (c->ValueKnown(num_weights) && c->Value(num_weights) == 0) { output = values; } else { TF_RETURN_IF_ERROR(c->Merge(wei...
0
[ "CWE-125" ]
tensorflow
701cfaca222a82afbeeb17496bd718baa65a67d2
115,759,854,333,683,580,000,000,000,000,000,000,000
17
Fix heap out of bounds error in tf.raw_ops.SparseCountSparseOutput shape inference when it is called with invalid inputs, and add a test for it. PiperOrigin-RevId: 405766415 Change-Id: I77d244ef35f351ef7b6f821efd959cac2c66db24
reconstructLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, LineOrder lineOrder, vector<Int64> &lineOffsets) { Int64 position = is.tellg(); try { for (unsigned int i = 0; i < lineOffsets.size(); i++) { Int64 lineOffset = is.tellg(); int y; OPENEXR_IMF_INTERNAL_NAMESPACE::Xd...
0
[ "CWE-770" ]
openexr
bc88cdb6c97fbf5bc5d11ad8ca55306da931283a
340,205,869,863,239,100,000,000,000,000,000,000,000
44
sanity check ScanlineInput bytesPerLine instead of lineOffset size (#863) Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> Co-authored-by: Cary Phillips <cary@ilm.com>
static int mptsas_process_scsi_io_request(MPTSASState *s, MPIMsgSCSIIORequest *scsi_io, hwaddr addr) { MPTSASRequest *req; MPIMsgSCSIIOReply reply; SCSIDevice *sdev; int status; mptsas_fix_scsi_io_endianness(scsi_io...
1
[ "CWE-416" ]
qemu
3791642c8d60029adf9b00bcb4e34d7d8a1aea4d
283,982,666,294,271,800,000,000,000,000,000,000,000
91
mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392) While processing SCSI i/o requests in mptsas_process_scsi_io_request(), the Megaraid emulator appends new MPTSASRequest object 'req' to the 's->pending' queue. In case of an error, this same object gets dequeued in mptsas_free_request() only if SCSIRequ...
static inline void register_as_ext3(void) { int err = register_filesystem(&ext3_fs_type); if (err) printk(KERN_WARNING "EXT4-fs: Unable to register as ext3 (%d)\n", err); }
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
62,412,992,574,985,370,000,000,000,000,000,000,000
7
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
static void vrend_pipe_resource_unref(struct pipe_resource *pres, UNUSED void *data) { struct vrend_resource *res = (struct vrend_resource *)pres; if (vrend_state.finishing || pipe_reference(&res->base.reference, NULL)) vrend_renderer_resource_destroy(res); }
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
55,158,397,831,269,250,000,000,000,000,000,000,000
8
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
std::string help() const override { return "count objects in collection"; }
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
134,838,774,082,343,170,000,000,000,000,000,000,000
3
SERVER-38275 ban find explain with UUID
gxps_archive_input_stream_class_init (GXPSArchiveInputStreamClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GInputStreamClass *istream_class = G_INPUT_STREAM_CLASS (klass); object_class->finalize = gxps_archive_input_stream_finalize; istream_class->read_fn = gxps_archive_input_stream_rea...
0
[ "CWE-125" ]
libgxps
b458226e162fe1ffe7acb4230c114a52ada5131b
66,113,534,095,057,290,000,000,000,000,000,000,000
11
gxps-archive: Ensure gxps_archive_read_entry() fills the GError in case of failure And fix the callers to not overwrite the GError.
atrim(const char *str) { size_t start; // Position of first non-space char size_t term; // Position of 0-terminator size_t size; char *result; if (!str) return NULL; start = 0; term = strlen(str); while ((start < term) && isspace(str[start])) start++; while ((term > start) && isspace(str[...
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
37,580,331,786,808,927,000,000,000,000,000,000,000
27
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
static void __device_release_driver(struct device *dev, struct device *parent) { struct device_driver *drv; drv = dev->driver; if (drv) { while (device_links_busy(dev)) { __device_driver_unlock(dev, parent); device_links_unbind_consumers(dev); __device_driver_lock(dev, parent); /* * A concurrent...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
248,953,414,688,769,060,000,000,000,000,000,000,000
62
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static double mp_permutations(_cimg_math_parser& mp) { return cimg::permutations((int)_mp_arg(2),(int)_mp_arg(3),(bool)_mp_arg(4));
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
253,142,240,063,271,400,000,000,000,000,000,000,000
3
.
static void flush_cpu_slab(void *d) { struct kmem_cache *s = d; __flush_cpu_slab(s, smp_processor_id()); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
148,917,511,392,805,060,000,000,000,000,000,000,000
6
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static int handle_pml_full(struct kvm_vcpu *vcpu) { unsigned long exit_qualification; trace_kvm_pml_full(vcpu->vcpu_id); exit_qualification = vmcs_readl(EXIT_QUALIFICATION); /* * PML buffer FULL happened while executing iret from NMI, * "blocked by NMI" bit has to be set before next VM entry. */ if (!(to_...
0
[ "CWE-284", "CWE-264" ]
linux
3ce424e45411cf5a13105e0386b6ecf6eeb4f66f
339,541,641,801,181,440,000,000,000,000,000,000,000
24
kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC...
static void set_output_verbosity(int level, uchar priority) { int j; if (level > MAX_VERBOSITY) level = MAX_VERBOSITY; for (j = 1; j <= level; j++) { parse_output_words(info_words, info_levels, info_verbosity[j], priority); parse_output_words(debug_words, debug_levels, debug_verbosity[j], priority); } }
0
[]
rsync
eac858085e3ac94ec0ab5061d11f52652c90a869
51,223,469,629,538,170,000,000,000,000,000,000,000
12
Add compat flag to allow proper seed checksum order. Fixes the equivalent of librsync's CVE-2014-8242 issue.
static int ca8210_register_ext_clock(struct spi_device *spi) { struct device_node *np = spi->dev.of_node; struct ca8210_priv *priv = spi_get_drvdata(spi); struct ca8210_platform_data *pdata = spi->dev.platform_data; int ret = 0; if (!np) return -EFAULT; priv->clk = clk_register_fixed_rate( &spi->dev, np->...
0
[ "CWE-400", "CWE-401" ]
linux
6402939ec86eaf226c8b8ae00ed983936b164908
272,507,479,640,332,180,000,000,000,000,000,000,000
35
ieee802154: ca8210: prevent memory leak In ca8210_probe the allocated pdata needs to be assigned to spi_device->dev.platform_data before calling ca8210_get_platform_data. Othrwise when ca8210_get_platform_data fails pdata cannot be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lor...
void clear(Content plane = EMPTY) { *this = Nef_polyhedron_2(plane); }
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
242,571,832,715,956,060,000,000,000,000,000,000,000
2
Fix Nef_2 and Nef_S2 IO
void NumberFormatTest::Test11626_CustomizeCurrencyPluralInfo() { IcuTestErrorCode errorCode(*this, "Test11626_CustomizeCurrencyPluralInfo"); // Ticket #11626: No unit test demonstrating how to use CurrencyPluralInfo to // change formatting spelled out currencies // Use locale sr because it has interesti...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
195,608,823,854,520,960,000,000,000,000,000,000,000
27
ICU-20246 Fixing another integer overflow in number parsing.
static int process_packet(struct pptp_conn_t *conn) { struct pptp_header *hdr = (struct pptp_header *)conn->in_buf; switch(ntohs(hdr->ctrl_type)) { case PPTP_START_CTRL_CONN_RQST: return pptp_start_ctrl_conn_rqst(conn); case PPTP_STOP_CTRL_CONN_RQST: return pptp_stop_ctrl_conn_rqst(conn); case PPTP_STOP_...
0
[ "CWE-787" ]
accel-ppp
a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f
83,293,978,135,181,760,000,000,000,000,000,000,000
28
Fix post_msg implementation bug I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`: https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L5...
RI_FKey_restrict_del(PG_FUNCTION_ARGS) { /* * Check that this is a valid trigger call on the right time and event. */ ri_CheckTrigger(fcinfo, "RI_FKey_restrict_del", RI_TRIGTYPE_DELETE); /* * Share code with NO ACTION case. */ return ri_restrict_del((TriggerData *) fcinfo->context, false); }
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
166,230,592,668,221,850,000,000,000,000,000,000,000
12
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
gnutls_priority_mac_list(gnutls_priority_t pcache, const unsigned int **list) { if (pcache->mac.algorithms == 0) return 0; *list = pcache->mac.priority; return pcache->mac.algorithms; }
0
[ "CWE-310" ]
gnutls
21f89efad7014a5ee0debd4cd3d59e27774b29e6
236,772,490,313,698,100,000,000,000,000,000,000,000
9
handshake: add FALLBACK_SCSV priority option This allows clients to enable the TLS_FALLBACK_SCSV mechanism during the handshake, as defined in RFC7507.
static Bool gf_sm_check_for_modif(GF_SceneEngine *seng, GF_AUContext *au) { GF_Command *com; Bool modified=0; u32 i=0; /*au is marked as modified - this happens when commands are concatenated into the au*/ if (au->flags & GF_SM_AU_MODIFIED) { au->flags &= ~GF_SM_AU_MODIFIED; modified=1; } /*check each comman...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
205,837,638,085,984,600,000,000,000,000,000,000,000
61
fixed #2138
ins_redraw(int ready) // not busy with something { #ifdef FEAT_CONCEAL linenr_T conceal_old_cursor_line = 0; linenr_T conceal_new_cursor_line = 0; int conceal_update_lines = FALSE; #endif if (char_avail()) return; // Trigger CursorMoved if the cursor moved. Not when the popup menu is //...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
336,662,863,923,416,600,000,000,000,000,000,000,000
122
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
void mlx5_ib_free_bfreg(struct mlx5_ib_dev *dev, struct mlx5_bfreg_info *bfregi, int bfregn) { mutex_lock(&bfregi->lock); bfregi->count[bfregn]--; mutex_unlock(&bfregi->lock); }
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
178,938,029,277,116,180,000,000,000,000,000,000,000
6
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
void RemoteFsDevice::saveProperties(const DeviceOptions &newOpts, const Details &nd) { bool connected=isConnected(); if (configured && (!connected || opts==newOpts) && (connected || details==nd)) { return; } bool isLocal=details.isLocalFile(); if (connected) { if (!configured) { ...
0
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
198,123,986,203,667,570,000,000,000,000,000,000,000
57
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
openssl_callback(int ok, X509_STORE_CTX * ctx) { #ifdef DEBUG if (!ok) { char buf[DN_BUF_LEN]; X509_NAME_oneline(X509_get_subject_name(ctx->current_cert), buf, sizeof(buf)); pkiDebug("cert = %s\n", buf); pkiDebug("callback function: %d (%s)\n", ctx->error, X509_veri...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
114,732,336,109,975,350,000,000,000,000,000,000,000
14
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm *kvm = filp->private_data; void __user *argp = (void __user *)arg; struct kvm_device_attr attr; int r; switch (ioctl) { case KVM_S390_INTERRUPT: { struct kvm_s390_interrupt s390int; r = -EFAULT; if (copy...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
11,306,033,882,466,288,000,000,000,000,000,000,000
130
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ */ { /* parameters */ char *regex; /* Regular expression */ char *subject; /* String to match against */ int regex_len; int subject_len; pcre_cache_entry *pce; /* Compiled regular expression */ zval *subpats ...
1
[]
php-src
03964892c054d0c736414c10b3edc7a40318b975
77,159,530,700,824,440,000,000,000,000,000,000,000
25
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
static int padzero(unsigned long elf_bss) { unsigned long nbyte; nbyte = ELF_PAGEOFFSET(elf_bss); if (nbyte) { nbyte = ELF_MIN_ALIGN - nbyte; if (clear_user((void __user *) elf_bss, nbyte)) return -EFAULT; } return 0; }
0
[ "CWE-284", "CWE-264" ]
linux
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
188,807,401,235,139,800,000,000,000,000,000,000,000
12
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top...
send_fprtime_if_not_null (ctrl_t ctrl, const char *keyword, int number, const unsigned char *stamp) { char numbuf1[50], numbuf2[50]; unsigned long value; value = buf32_to_ulong (stamp); if (!value) return; sprintf (numbuf1, "%d", number); sprintf (numbuf2, "%lu", value); sen...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
322,918,362,359,742,500,000,000,000,000,000,000,000
15
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
TEST_P(ProtocolIntegrationTest, ResponseWithHostHeader) { initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto response = codec_client_->makeHeaderOnlyRequest( Http::TestRequestHeaderMapImpl{{":method", "GET"}, {":path", "/test/long/url"}, ...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
223,999,121,725,359,180,000,000,000,000,000,000,000
17
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static bool vhost_can_busy_poll(unsigned long endtime) { return likely(!need_resched() && !time_after(busy_clock(), endtime) && !signal_pending(current)); }
0
[ "CWE-787" ]
linux
42d84c8490f9f0931786f1623191fcab397c3d64
65,048,447,435,955,730,000,000,000,000,000,000,000
5
vhost: Check docket sk_family instead of call getname Doing so, we save one call to get data we already have in the struct. Also, since there is no guarantee that getname use sockaddr_ll parameter beyond its size, we add a little bit of security here. It should do not do beyond MAX_ADDR_LEN, but syzbot found that ax2...
static inline int select_idle_core(struct task_struct *p, struct sched_domain *sd, int target) { return -1; }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
275,691,781,409,750,800,000,000,000,000,000,000,000
4
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
void ConnectionImpl::onDispatch(const Buffer::Instance& data) { getBytesMeter().addWireBytesReceived(data.length()); }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
127,633,341,827,026,700,000,000,000,000,000,000,000
3
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int copy_rules(apr_pool_t *mp, msre_ruleset *parent_ruleset, msre_ruleset *child_ruleset, apr_array_header_t *exceptions_arr) { copy_rules_phase(mp, parent_ruleset->phase_request_headers, child_ruleset->phase_request_headers, exceptions_arr); copy_rules...
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
254,007,113,786,520,720,000,000,000,000,000,000,000
17
Added SecXmlExternalEntity
DU_ngetStatusString(Uint16 statusCode) { const char *s = NULL; switch (statusCode) { case STATUS_Success: s = "Success"; break; case STATUS_N_ClassInstanceConflict: s = "Failure: ClassInstanceConflict"; break; case STATUS_N_DuplicateInvocation: ...
0
[ "CWE-476", "CWE-787" ]
dcmtk
5c14bf53fb42ceca12bbcc0016e8704b1580920d
168,304,695,417,970,430,000,000,000,000,000,000,000
54
Fixed possible NULL pointer dereference. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch.
static int mwifiex_init_pcie(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; int ret; struct pci_dev *pdev = card->dev; pci_set_drvdata(pdev, card); ret = pci_enable_device(pdev); if (ret) goto err_enable_dev; pci_set_master(pdev); ret = pci_set_dma_mask(pdev, DMA_BIT_MA...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
215,362,423,322,139,200,000,000,000,000,000,000,000
72
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) { flush_fp_to_thread(src); flush_altivec_to_thread(src); flush_vsx_to_thread(src); flush_spe_to_thread(src); *dst = *src; clear_task_ebb(dst); return 0; }
1
[ "CWE-20" ]
linux
621b5060e823301d0cba4cb52a7ee3491922d291
21,917,628,157,399,120,000,000,000,000,000,000,000
13
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...
GF_Err smhd_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SoundMediaHeaderBox *ptr = (GF_SoundMediaHeaderBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u16(bs, ptr->balance); gf_bs_write_u16(bs, ptr->reserved); return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
108,615,906,656,097,740,000,000,000,000,000,000,000
10
fixed #1587
static void ProcessRadioTxTimeout( void ) { if( MacCtx.NvmCtx->DeviceClass != CLASS_C ) { Radio.Sleep( ); } UpdateRxSlotIdleState( ); MacCtx.McpsConfirm.Status = LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT; LoRaMacConfirmQueueSetStatusCmn( LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT ); ...
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
264,268,408,680,859,800,000,000,000,000,000,000,000
16
Added received buffer size checks.
interface_removed (GDBusObjectManager *manager, GDBusObject *object, GDBusInterface *interface, gpointer user_data) { BluetoothClient *client = user_data; if (IS_ADAPTER1 (interface)) { adapter_removed (manager, g_dbus_object_get_object_path (object), client); } else...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
153,905,944,886,710,440,000,000,000,000,000,000,000
16
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
process_cmd_minpoll(CMD_Request *msg, char *line) { IPAddr address; int minpoll; int ok; if (read_address_integer(line, &address, &minpoll)) { UTI_IPHostToNetwork(&address, &msg->data.modify_minpoll.address); msg->data.modify_minpoll.new_minpoll = htonl(minpoll); msg->command = htons(REQ_MODIFY_M...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
307,430,926,987,553,200,000,000,000,000,000,000,000
18
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static unsigned long dev_pagemap_mapping_shift(struct page *page, struct vm_area_struct *vma) { unsigned long address = vma_address(page, vma); pgd_t *pgd; p4d_t *p4d; pud_t *pud; pmd_t *pmd; pte_t *pte; pgd = pgd_offset(vma->vm_mm, address); if (!pgd_present(*pgd)) return 0; p4d = p4d_offset(pgd, address...
0
[]
linux
46612b751c4941c5c0472ddf04027e877ae5990f
56,001,718,531,290,490,000,000,000,000,000,000,000
33
mm: hwpoison: fix thp split handing in soft_offline_in_use_page() When soft_offline_in_use_page() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): Memory failure: 0x3755ff: non anonymous thp __get_any_page: 0x3755ff: unknown zero refcount page type 2fffff80000000 Soft offli...
MaybeLocal<Object> AddIssuerChainToObject( X509Pointer* cert, Local<Object> object, StackOfX509&& peer_certs, Environment* const env) { Local<Context> context = env->isolate()->GetCurrentContext(); cert->reset(sk_X509_delete(peer_certs.get(), 0)); for (;;) { int i; for (i = 0; i < sk_X509_...
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
114,049,886,610,243,420,000,000,000,000,000,000,000
35
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
void __init sched_init_smp(void) { cpumask_var_t non_isolated_cpus; alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL); alloc_cpumask_var(&fallback_doms, GFP_KERNEL); sched_init_numa(); /* * There's no userspace yet to cause hotplug operations; hence all the * cpu masks are stable and all blatant races in th...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
76,042,382,092,231,740,000,000,000,000,000,000,000
36
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
Client::swanSong() { // get rid of our piping obligations if (requestBodySource != NULL) stopConsumingFrom(requestBodySource); #if USE_ADAPTATION cleanAdaptation(); #endif if (!doneWithServer()) closeServer(); if (!doneWithFwd) { doneWithFwd = "swanSong()"; fwd->ha...
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
83,936,584,138,361,350,000,000,000,000,000,000,000
32
Handle more partial responses (#791)
static inline Status _badValue(const char* reason, int location) { return Status(ErrorCodes::BadValue, reason, location); }
0
[ "CWE-264" ]
mongo
23344f8b7506df694f66999693ee3c00dfd6afae
118,681,332,002,757,550,000,000,000,000,000,000,000
3
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
static void free_arg_pages(struct linux_binprm *bprm) { }
0
[ "CWE-200" ]
linux-2.6
b66c5984017533316fd1951770302649baf1aa33
40,844,954,569,806,580,000,000,000,000,000,000,000
3
exec: do not leave bprm->interp on stack If a series of scripts are executed, each triggering module loading via unprintable bytes in the script header, kernel stack contents can leak into the command line. Normally execution of binfmt_script and binfmt_misc happens recursively. However, when modules are enabled, and...
void Context::initializeWriteFilterCallbacks(Network::WriteFilterCallbacks& callbacks) { network_write_filter_callbacks_ = &callbacks; }
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
99,181,418,105,995,600,000,000,000,000,000,000,000
3
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
set_xattrs(struct archive_write_disk *a) { struct archive_entry *entry = a->entry; static int warning_done = 0; int ret = ARCHIVE_OK; int i = archive_entry_xattr_reset(entry); while (i--) { const char *name; const void *value; size_t size; archive_entry_xattr_next(entry, &name, &value, &size); if (name ...
0
[ "CWE-703", "CWE-22" ]
libarchive
59357157706d47c365b2227739e17daba3607526
87,405,328,221,502,970,000,000,000,000,000,000,000
60
Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option This fixes a directory traversal in the cpio tool.
sign (gcry_mpi_t r, gcry_mpi_t s, gcry_mpi_t input, DSA_secret_key *skey, int flags, int hashalgo) { gpg_err_code_t rc; gcry_mpi_t hash; gcry_mpi_t k; gcry_mpi_t kinv; gcry_mpi_t tmp; const void *abuf; unsigned int abits, qbits; int extraloops = 0; qbits = mpi_get_nbits (skey->q); /* Convert...
1
[ "CWE-203" ]
libgcrypt
7c2943309d14407b51c8166c4dcecb56a3628567
42,523,480,536,828,030,000,000,000,000,000,000,000
77
dsa,ecdsa: Fix use of nonce, use larger one. * cipher/dsa-common.c (_gcry_dsa_modify_k): New. * cipher/pubkey-internal.h (_gcry_dsa_modify_k): New. * cipher/dsa.c (sign): Use _gcry_dsa_modify_k. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise. * cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise. CVE-id: CVE-201...
TEST(RegexMatchExpression, MatchesElementExtendedOn) { BSONObj match = BSON("x" << "ab"); BSONObj notMatch = BSON("x" << "a b"); RegexMatchExpression regex("", "a b", "x"); ASSERT(regex.matchesSingleElement(match.firstElement())); ASSERT(!regex.ma...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
30,100,801,040,499,130,000,000,000,000,000,000,000
9
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void tcp6_proc_exit(struct net *net) { tcp_proc_unregister(net, &tcp6_seq_afinfo); }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
9,287,367,070,364,252,000,000,000,000,000,000,000
4
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static int bus_socket_auth_verify(sd_bus *b) { assert(b); if (b->is_server) return bus_socket_auth_verify_server(b); else return bus_socket_auth_verify_client(b); }
0
[ "CWE-787" ]
systemd
6d586a13717ae057aa1b4127400c3de61cd5b9e7
37,579,987,550,853,065,000,000,000,000,000,000,000
8
sd-bus: if we receive an invalid dbus message, ignore and proceeed dbus-daemon might have a slightly different idea of what a valid msg is than us (for example regarding valid msg and field sizes). Let's hence try to proceed if we can and thus drop messages rather than fail the connection if we fail to validate a mess...
compress_application_type(int compression) { struct compression_decoder *d; for (d = compression_decoders; d->type != CMP_NOCOMPRESS; d++) { if (d->type == compression) return d->mime_type; } return NULL; }
0
[ "CWE-476" ]
w3m
59b91cd8e30c86f23476fa81ae005cabff49ebb6
214,429,789,837,078,360,000,000,000,000,000,000,000
10
Prevent segfault with malformed input type Bug-Debian: https://github.com/tats/w3m/issues/7
int select_task_rq(struct rq *rq, struct task_struct *p, int sd_flags, int wake_flags) { int cpu = p->sched_class->select_task_rq(rq, p, sd_flags, wake_flags); /* * In order not to call set_task_cpu() on a blocking task we need * to rely on ttwu() to place the task on a valid ->cpus_allowed * cpu. * * Sinc...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
88,370,157,070,454,530,000,000,000,000,000,000,000
20
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...