func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void flock_to_lock(struct flock *flock, struct lock *lock) { memset(lock, 0, sizeof(struct lock)); lock->type = flock->l_type; lock->start = flock->l_start; lock->end = flock->l_len ? flock->l_start + flock->l_len - 1 : OFFSET_MAX; lock->pid = flock->l_pid; }
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
12,664,948,397,428,257,000,000,000,000,000,000,000
8
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
string_replace(PyStringObject *self, PyObject *args) { Py_ssize_t count = -1; PyObject *from, *to; const char *from_s, *to_s; Py_ssize_t from_len, to_len; if (!PyArg_ParseTuple(args, "OO|n:replace", &from, &to, &count)) return NULL; if (PyString_Check(from)) { from_s = PyString...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
115,339,088,258,149,000,000,000,000,000,000,000,000
38
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
read_resolution(const char *arg) { char *sep = strchr(arg, ','); if (sep == NULL) sep = strchr(arg, 'x'); if (sep == NULL) sep = strchr(arg, ':'); if (sep == NULL) sep = strchr(arg, ';'); x_resolution = fz_atoi(arg); if (sep && sep[1]) y_resolution = fz_atoi(arg); else y_resolution = x_resolution; }
0
[ "CWE-369", "CWE-22" ]
mupdf
22c47acbd52949421f8c7cb46ea1556827d0fcbf
295,941,203,092,858,380,000,000,000,000,000,000,000
17
Bug 704834: Fix division by zero for zero width pages in muraster.
long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg) { int ret=0; switch (cmd) { case DTLS_CTRL_GET_TIMEOUT: if (dtls1_get_timeout(s, (struct timeval*) parg) != NULL) { ret = 1; } break; case DTLS_CTRL_HANDLE_TIMEOUT: ret = dtls1_handle_timeout(s); break; case DTLS_CTRL_LISTEN: ret = dtls...
1
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
75,214,798,141,192,820,000,000,000,000,000,000,000
25
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
TEST(ExprMatchTest, ShallowClonedExpressionIsEquivalentToOriginal) { BSONObj expression = BSON("$expr" << BSON("$eq" << BSON_ARRAY("$a" << 5))); boost::intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); ExprMatchExpression pipelineExpr(expression.firstElement(), std::move(expCt...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
114,583,930,692,581,270,000,000,000,000,000,000,000
8
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
authz_status oidc_authz_checker(request_rec *r, const char *require_args, const void *parsed_require_args, oidc_authz_match_claim_fn_type match_claim_fn) { oidc_debug(r, "enter"); /* check for anonymous access and PASS mode */ if (r->user != NULL && strlen(r->user) == 0) { r->user = NULL; if (oidc_dir_cfg_...
0
[ "CWE-601" ]
mod_auth_openidc
5c15dfb08106c2451c2c44ce7ace6813c216ba75
290,484,643,153,437,800,000,000,000,000,000,000,000
36
improve validation of the post-logout URL; closes #449 - to avoid an open redirect; thanks AIMOTO Norihito - release 2.4.0.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
Py_ssize_t TensorShapeNumDims(PyObject* value) { const auto size = PySequence_Size(value); if (size == -1) { // TensorShape.__len__ raises an error in the scenario where the shape is an // unknown, which needs to be cleared. // TODO(nareshmodi): ensure that this is actually a TensorShape. PyErr_Clea...
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
127,240,231,094,398,570,000,000,000,000,000,000,000
10
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
void packet_init( /*@out@*/ struct gps_packet_t *lexer) { lexer->char_counter = 0; lexer->retry_counter = 0; #ifdef PASSTHROUGH_ENABLE lexer->json_depth = 0; #endif /* PASSTHROUGH_ENABLE */ #ifdef TIMING_ENABLE lexer->start_time = 0.0; #endif /* TIMING_ENABLE */ packet_reset(lexer); }
0
[]
gpsd
dd9c3c2830cb8f8fd8491ce68c82698dc5538f50
133,297,245,450,221,550,000,000,000,000,000,000,000
12
Fix a malformed-packet crash. Under weird circumstances, this line of device input $GPGGA,030130$GPGLL,2638.1728,N,08011.3893,W,030131.000,A,A*41 could core-dump the packet parser. The context had to be exactly right for it to happen. The bug was an incorrect attempt at optimizing recovery from this rare case.
RotationSpec(int angle = 0, bool relative = false) : angle(angle), relative(relative) { }
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
330,429,914,999,441,640,000,000,000,000,000,000,000
5
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
main (int argc, char *const *argv) { unsigned int errorCount = 0; (void) argc; (void) argv; /* Unused. Silent compiler warning. */ errorCount += test_multipart_splits (); errorCount += test_multipart_garbage (); errorCount += test_urlencoding (); errorCount += test_multipart (); errorCount += test_neste...
0
[ "CWE-120" ]
libmicrohttpd
a110ae6276660bee3caab30e9ff3f12f85cf3241
164,743,107,377,378,160,000,000,000,000,000,000,000
16
fix buffer overflow and add test
static void bgp_packet_mpattr_tea(struct bgp *bgp, struct peer *peer, struct stream *s, struct attr *attr, uint8_t attrtype) { unsigned int attrlenfield = 0; unsigned int attrhdrlen = 0; struct bgp_attr_encap_subtlv *subtlvs; struct bgp_attr_encap_subtlv *st; const char *attrname; if (!attr || (attrt...
1
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
150,871,677,651,580,330,000,000,000,000,000,000,000
91
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
void pcnet_ioport_writel(void *opaque, uint32_t addr, uint32_t val) { PCNetState *s = opaque; pcnet_poll_timer(s); #ifdef PCNET_DEBUG_IO printf("pcnet_ioport_writel addr=0x%08x val=0x%08x\n", addr, val); #endif if (BCR_DWIO(s)) { switch (addr & 0x0f) { case 0x00: /* RDP */ pc...
0
[]
qemu
837f21aacf5a714c23ddaadbbc5212f9b661e3f7
196,429,611,360,042,620,000,000,000,000,000,000,000
29
net: pcnet: add check to validate receive data size(CVE-2015-7504) In loopback mode, pcnet_receive routine appends CRC code to the receive buffer. If the data size given is same as the buffer size, the appended CRC code overwrites 4 bytes after s->buffer. Added a check to avoid that. Reported by: Qinghao Tang <luodal...
xps_parse_real_num(char *s, float *number) { char buf[64]; char *p = buf; while (is_real_num_char(*s)) *p++ = *s++; *p = 0; if (buf[0]) *number = fz_atof(buf); return s; }
0
[ "CWE-119" ]
mupdf
60dabde18d7fe12b19da8b509bdfee9cc886aafc
41,879,408,443,749,640,000,000,000,000,000,000,000
11
Bug 694957: fix stack buffer overflow in xps_parse_color xps_parse_color happily reads more than FZ_MAX_COLORS values out of a ContextColor array which overflows the passed in samples array. Limiting the number of allowed samples to FZ_MAX_COLORS and make sure to use that constant for all callers fixes the problem. T...
TMC_Initialise(void) { char *point_file; CNF_GetTempComp(&filename, &update_interval, &point_file, &T0, &k0, &k1, &k2); if (filename == NULL) return; if (update_interval <= 0.0) update_interval = 1.0; if (point_file) read_points(point_file); logfileid = CNF_GetLogTempComp() ? LOG_FileOpen("...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
103,912,844,948,839,250,000,000,000,000,000,000,000
21
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static int ql_populate_free_queue(struct ql3_adapter *qdev) { struct ql_rcv_buf_cb *lrg_buf_cb = qdev->lrg_buf_free_head; dma_addr_t map; int err; while (lrg_buf_cb) { if (!lrg_buf_cb->skb) { lrg_buf_cb->skb = netdev_alloc_skb(qdev->ndev, qdev->lrg_buffer_len); if (unlikely(!lrg_buf_cb->skb)) {...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
149,283,911,320,213,780,000,000,000,000,000,000,000
55
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
double Number() const { return chk(isNumber()).number(); }
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
118,795,841,318,089,480,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
const char *jsC_opcodestring(enum js_OpCode opcode) { if (opcode < nelem(opname)-1) return opname[opcode]; return "<unknown>"; }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
163,121,826,918,600,860,000,000,000,000,000,000,000
6
Issue #161: Cope with empty programs in mujs-pp.
static void test_bug6049() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[1]; MYSQL_RES *res; MYSQL_ROW row; const char *stmt_text; char buffer[30]; ulong length; int rc; myheader("test_bug6049"); if (mysql_get_server_version(mysql) < 50600) { if (!opt_silent) fprintf(stdout, "Skipping test_bu...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
123,473,505,724,102,730,000,000,000,000,000,000,000
55
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...
void Gfx::saveState() { out->saveState(state); state = state->save(); stackHeight++; }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
342,017,278,680,494,100,000,000,000,000,000,000
5
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) { off_t n = file_hdr->c_filesize + 1; char *link_name; if (n == 0 || n > SIZE_MAX) { error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); link_name = NULL; } else { link_name = xmalloc (n); ...
1
[]
cpio
54d1c42ac2cb91389fca04a5018ad573e4ae265a
106,128,251,771,782,920,000,000,000,000,000,000,000
19
Bugfix * src/copyin.c (get_link_name): Fix range checking. * tests/symlink-bad-length.at: Change expected error message.
virtual void saveState(GfxState * /*state*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
210,124,062,975,593,930,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
void ConnectionManagerImpl::initializeReadFilterCallbacks(Network::ReadFilterCallbacks& callbacks) { read_callbacks_ = &callbacks; stats_.named_.downstream_cx_total_.inc(); stats_.named_.downstream_cx_active_.inc(); if (read_callbacks_->connection().ssl()) { stats_.named_.downstream_cx_ssl_total_.inc(); ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
113,847,680,549,384,400,000,000,000,000,000,000,000
24
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
int key_instantiate_and_link(struct key *key, const void *data, size_t datalen, struct key *keyring, struct key *authkey) { struct key_preparsed_payload prep; struct assoc_array_edit *edit; int ret; memset(&prep, 0, sizeof(prep)); prep.data = data; prep.datalen = datalen; prep.qu...
0
[ "CWE-703" ]
linux
38327424b40bcebe2de92d07312c89360ac9229a
172,640,342,220,620,460,000,000,000,000,000,000,000
43
KEYS: potential uninitialized variable If __key_link_begin() failed then "edit" would be uninitialized. I've added a check to fix that. This allows a random user to crash the kernel, though it's quite difficult to achieve. There are three ways it can be done as the user would have to cause an error to occur in __ke...
gql_eval_post_hook(agooReq req) { struct _agooErr err = AGOO_ERR_INIT; gqlValue result; const char *s; int len; int indent = 0; if (NULL != (s = agoo_req_query_value(req, indent_str, sizeof(indent_str) - 1, &len))) { indent = (int)strtol(s, NULL, 10); } if (NULL == (result = eval...
0
[ "CWE-703" ]
agoo
ecb72fa66f3d846b724b4fa1d7648669cebabe0c
5,950,882,402,126,758,000,000,000,000,000,000,000
18
Protect against recursive fragment in schema Really a error on the developers part but this catches the error.
static void mpage_add_bh_to_extent(struct mpage_da_data *mpd, sector_t logical, size_t b_size, unsigned long b_state) { sector_t next; int nrblocks = mpd->b_size >> mpd->inode->i_blkbits; /* check if thereserved journal credits might overflow */ if (!(EXT4_I(mpd->inode)->i_flags & EXT4_EXTENTS_FL)) {...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
304,055,584,542,007,160,000,000,000,000,000,000,000
58
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...
pipe_fopen(gx_io_device * iodev, const char *fname, const char *access, gp_file ** pfile, char *rfname, uint rnamelen, gs_memory_t *mem) { #ifdef GS_NO_FILESYSTEM return 0; #else gs_lib_ctx_t *ctx = mem->gs_lib_ctx; gs_fs_list_t *fs = ctx->core->fs; if (gp_validate_path(mem, fname, access) !...
1
[ "CWE-20" ]
ghostpdl
a9bd3dec9fde03327a4a2c69dad1036bf9632e20
249,780,074,905,328,820,000,000,000,000,000,000,000
34
Bug 704342: Include device specifier strings in access validation for the "%pipe%", %handle%" and %printer% io devices. We previously validated only the part after the "%pipe%" Postscript device specifier, but this proved insufficient. This rebuilds the original file name string, and validates it complete. The sligh...
Item* Item_singlerow_subselect::expr_cache_insert_transformer(THD *tmp_thd, uchar *unused) { DBUG_ENTER("Item_singlerow_subselect::expr_cache_insert_transformer"); DBUG_ASSERT(thd == tmp_thd); /* Do not create subquery cache if the subquery was e...
0
[ "CWE-89" ]
server
5100b20b15edd93200f34a79d25f1b14e46a677e
18,957,047,010,184,387,000,000,000,000,000,000,000
28
MDEV-26047: MariaDB server crash at Item_subselect::init_expr_cache_tracker The cause of crash: remove_redundant_subquery_clauses() removes redundant item expressions. The primary goal of this is to remove the subquery items. The removal process unlinks the subquery from SELECT_LEX tree, but does not remove it from SE...
GC_API void GC_CALL GC_register_disclaim_proc(int kind, GC_disclaim_proc proc, int mark_unconditionally) { GC_ASSERT((unsigned)kind < MAXOBJKINDS); GC_obj_kinds[kind].ok_disclaim_proc = proc; GC_obj_kinds[kind].ok_mark_unconditionally = (GC_bool)mark_uncondition...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
158,642,126,589,558,600,000,000,000,000,000,000,000
7
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
pfm_buf_fmt_restart_active(pfm_buffer_fmt_t *fmt, struct task_struct *task, pfm_ovfl_ctrl_t *ctrl, void *buf, struct pt_regs *regs) { int ret = 0; if (fmt->fmt_restart_active) ret = (*fmt->fmt_restart_active)(task, ctrl, buf, regs); return ret; }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
8,901,447,454,980,395,000,000,000,000,000,000,000
6
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan) { struct l2cap_conf_efs efs; switch (chan->mode) { case L2CAP_MODE_ERTM: efs.id = chan->local_id; efs.stype = chan->local_stype; efs.msdu = cpu_to_le16(chan->local_msdu); efs.sdu_itime = cpu_to_le32(chan->local_sdu_itime); efs.acc_lat = c...
1
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
146,170,902,051,848,000,000,000,000,000,000,000,000
30
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
inline static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color, int t) { int dr,dg,db,p,r,g,b; dr = gdTrueColorGetRed(color); dg = gdTrueColorGetGreen(color); db = gdTrueColorGetBlue(color); p = gdImageGetPixel(im,x,y); r = gdTrueColorGetRed(p); g = gdTrueColorGetGreen(p); b = gdTrueColorGetB...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
211,104,644,967,794,460,000,000,000,000,000,000,000
17
Fix #66387: Stack overflow with imagefilltoborder The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent t...
gdk_pixbuf__tiff_image_load_increment (gpointer data, const guchar *buf, guint size, GError **error) { TiffContext *context = (TiffContext *) data; g_return_val_if_fail (data != NULL, FALSE); if (!make_available_at_least (context, size)) { ...
0
[ "CWE-20" ]
gdk-pixbuf
3bac204e0d0241a0d68586ece7099e6acf0e9bea
210,054,784,438,415,460,000,000,000,000,000,000,000
19
Initial stab at getting the focus code to work. Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_c...
routerset_get_countryname(const char *c) { char *country; if (strlen(c) < 4 || c[0] !='{' || c[3] !='}') return NULL; country = tor_strndup(c+1, 2); tor_strlower(country); return country; }
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
116,118,828,117,418,560,000,000,000,000,000,000,000
11
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
void traverse_bitmap_commit_list(show_reachable_fn show_reachable) { assert(bitmap_git.result); show_objects_for_type(bitmap_git.result, bitmap_git.commits, OBJ_COMMIT, show_reachable); show_objects_for_type(bitmap_git.result, bitmap_git.trees, OBJ_TREE, show_reachable); show_objects_for_type(bitmap_git.result...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
261,734,918,177,239,300,000,000,000,000,000,000,000
18
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
TEST_F(HttpConnectionManagerImplTest, HitResponseBufferLimitsAfterHeaders) { initial_buffer_limit_ = 10; setup(false, ""); setUpEncoderAndDecoder(false, false); sendRequestHeadersAndData(); // Start the response, and make sure the request headers are fully processed. ResponseHeaderMapPtr response_headers{n...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
285,283,215,624,623,100,000,000,000,000,000,000,000
29
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
fst_init_dma(struct fst_card_info *card) { /* * This is only required for the PLX 9054 */ if (card->family == FST_FAMILY_TXU) { pci_set_master(card->device); outl(0x00020441, card->pci_conf + DMAMODE0); outl(0x00020441, card->pci_conf + DMAMODE1); outl(0x0, card->pci_conf + DMATHR); } }
0
[ "CWE-399" ]
linux
96b340406724d87e4621284ebac5e059d67b2194
236,733,073,091,672,700,000,000,000,000,000,000,000
12
farsync: fix info leak in ioctl The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. ...
tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){ tsize_t written=0; uint32 i=0; char buffer[64]; uint16 nextchar=0; size_t namelen=0; namelen = strlen((char *)name); if (namelen>126) { namelen=126; } written += t2pWriteFile(output, (tdata_t) "/", 1); for (i=0;i<namelen;i++){ if ( ((unsign...
0
[ "CWE-119" ]
libtiff
b5d6803f0898e931cf772d3d0755704ab8488e63
17,458,846,731,784,896,000,000,000,000,000,000,000
93
* tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG compressed images. Reported by Tyler Bohan of Cisco Talos as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2 extra uninitialized bytes to the file stream.
mono_thread_clr_state (MonoInternalThread *thread, MonoThreadState state) { ensure_synch_cs_set (thread); EnterCriticalSection (thread->synch_cs); thread->state &= ~state; LeaveCriticalSection (thread->synch_cs); }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
266,387,192,862,669,070,000,000,000,000,000,000,000
8
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
PHP_FUNCTION(stream_socket_server) { char *host; int host_len; zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL; php_stream *stream = NULL; int err = 0; long flags = STREAM_XPORT_BIND | STREAM_XPORT_LISTEN; char *errstr = NULL; php_stream_context *context = NULL; RETVAL_FALSE; if (zend_parse_parameter...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
199,446,182,478,531,130,000,000,000,000,000,000,000
61
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
void libxsmm_generator_spgemm_csc_bsparse( libxsmm_generated_code* io_generated_code, const libxsmm_gemm_descriptor* i_xgemm_desc, const char* i_arch, const unsig...
0
[ "CWE-295" ]
libxsmm
3f417e5e0670b066d558052fd32fc8093c81ee94
90,507,773,317,872,590,000,000,000,000,000,000,000
104
Issue 513: merge fixes from master/main.
TEST_F(QueryPlannerTest, SortSkipLimit) { runQuerySortProjSkipNToReturn(BSONObj(), fromjson("{a: 1}"), BSONObj(), 2, -3); assertNumSolutions(1U); // Limit in sort node should be adjusted by skip count assertSolutionExists( "{skip: {n: 2, node: " "{sort: {pattern: {a: 1}, limit: 5, node: ...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
25,955,242,672,277,590,000,000,000,000,000,000,000
9
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
bool Tracks::TrackIsVideo(uint64_t track_number) const { const Track* const track = GetTrackByNumber(track_number); if (track->type() == kVideo) return true; return false; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
28,698,856,679,509,540,000,000,000,000,000,000,000
8
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
iperf_create_send_timers(struct iperf_test * test) { struct timeval now; struct iperf_stream *sp; TimerClientData cd; if (gettimeofday(&now, NULL) < 0) { i_errno = IEINITTEST; return -1; } SLIST_FOREACH(sp, &test->streams, streams) { sp->green_light = 1; if (test->settings->rate != 0...
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
194,247,072,648,437,600,000,000,000,000,000,000,000
24
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
ftp_loop (struct url *u, char **local_file, int *dt, struct url *proxy, bool recursive, bool glob) { ccon con; /* FTP connection */ uerr_t res; *dt = 0; xzero (con); con.csock = -1; con.st = ON_YOUR_OWN; con.rs = ST_UNIX; con.id = NULL; con.proxy = proxy; /* If the...
1
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
173,197,912,256,458,500,000,000,000,000,000,000,000
95
Introduce --trust-server-names. Close CVE-2010-2252.
jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr) { jp2_box_t *box; int found; jas_image_t *image; jp2_dec_t *dec; bool samedtype; int dtype; unsigned int i; jp2_cmap_t *cmapd; jp2_pclr_t *pclrd; jp2_cdef_t *cdefd; unsigned int channo; int newcmptno; int_fast32_t *lutents; #if 0 jp2_cdefchan_t...
1
[ "CWE-476" ]
jasper
f94e7499a8b1471a4905c4f9c9e12e60fe88264b
43,831,262,275,168,830,000,000,000,000,000,000,000
393
Fixes #269. Added a check for an invalid component reference in the JP2 decoder. Added a related test case for the JP2 codec.
int gnutls_x509_ext_import_tlsfeatures(const gnutls_datum_t * ext, gnutls_x509_tlsfeatures_t f, unsigned int flags) { int ret; ASN1_TYPE c2 = ASN1_TYPE_EMPTY; if (ext->size == 0 || ext->data == NULL) { gnutls_assert(); return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE; } ret = asn1_create_el...
0
[ "CWE-415" ]
gnutls
c5aaa488a3d6df712dc8dff23a049133cab5ec1b
172,555,169,872,135,570,000,000,000,000,000,000,000
36
gnutls_x509_ext_import_proxy: fix issue reading the policy language If the language was set but the policy wasn't, that could lead to a double free, as the value returned to the user was freed.
ConnectionHandlerImpl::ActiveTcpListener::ActiveTcpListener(ConnectionHandlerImpl& parent, Network::ListenerPtr&& listener, Network::ListenerConfig& config) : ConnectionHandlerImpl::ActiveListener...
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
72,353,328,957,570,740,000,000,000,000,000,000,000
8
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
PHP_FUNCTION(glob) { int cwd_skip = 0; #ifdef ZTS char cwd[MAXPATHLEN]; char work_pattern[MAXPATHLEN]; char *result; #endif char *pattern = NULL; int pattern_len; long flags = 0; glob_t globbuf; int n; int ret; zend_bool basedir_limit = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &patter...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
234,400,416,467,580,200,000,000,000,000,000,000,000
124
Fixed bug #69418 - more s->p fixes for filenames
static int decode_slice(AVCodecContext *c, void *arg) { FFV1Context *fs = *(void **)arg; FFV1Context *f = fs->avctx->priv_data; int width, height, x, y, ret; const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step_minus1 + 1; AVFrame * const p = f->cur; int i, si; for( si=0; ...
0
[ "CWE-125" ]
FFmpeg
d893253fcd93d11258e98857175e93be7d158708
259,465,178,263,985,030,000,000,000,000,000,000,000
111
avcodec/ffv1dec: Fix out of array read in slice counting Fixes: test-201710.mp4 Found-by: 连一汉 <lianyihan@360.cn> and Zhibin Hu Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c20f4fcb74da2d0432c7b54499bb98f48236b904) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
PXA2xxState *pxa270_init(MemoryRegion *address_space, unsigned int sdram_size, const char *revision) { PXA2xxState *s; int i; DriveInfo *dinfo; s = (PXA2xxState *) g_malloc0(sizeof(PXA2xxState)); if (revision && strncmp(revision, "pxa27", 5)) { fprintf(stderr, "Mach...
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
220,215,060,496,769,000,000,000,000,000,000,000,000
136
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...
ves_icall_System_GC_WaitForPendingFinalizers (void) { #ifndef HAVE_NULL_GC if (!mono_gc_pending_finalizers ()) return; if (mono_thread_internal_current () == gc_thread) /* Avoid deadlocks */ return; ResetEvent (pending_done_event); mono_gc_finalize_notify (); /* g_print ("Waiting for pending finalizers.......
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
205,396,728,522,690,430,000,000,000,000,000,000,000
17
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
static __always_inline bool bpf_tree_less(struct latch_tree_node *a, struct latch_tree_node *b) { return bpf_get_prog_addr_start(a) < bpf_get_prog_addr_start(b); }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
15,686,117,644,187,600,000,000,000,000,000,000,000
5
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
PoolParameters::PoolParameters(OpKernelContext* context, const std::vector<int32>& ksize, const std::vector<int32>& stride, Padding padding, std::vector<int64> explicit_paddings, ...
0
[ "CWE-20" ]
tensorflow
136b51f10903e044308cf77117c0ed9871350475
8,153,104,485,771,066,000,000,000,000,000,000,000
83
Add missing validation to `maxpooling_op.cc` PiperOrigin-RevId: 387932441 Change-Id: I43a0b24e6a12cc965611144ba035accd384594b9
parse_wbxml_tag (proto_tree *tree, tvbuff_t *tvb, guint32 offset, guint32 str_tbl, guint8 *level, guint8 *codepage_stag, guint8 *codepage_attr) { guint32 tvb_len = tvb_reported_length (tvb); guint32 off = offset; guint32 len; guint str_len; guint32 ent; guin...
1
[ "CWE-399", "CWE-119", "CWE-787" ]
wireshark
b8e0d416898bb975a02c1b55883342edc5b4c9c0
242,930,241,836,869,970,000,000,000,000,000,000,000
390
WBXML: add a basic sanity check for offset overflow This is a naive approach allowing to detact that something went wrong, without the need to replace all proto_tree_add_text() calls as what was done in master-2.0 branch. Bug: 12408 Change-Id: Ia14905005e17ae322c2fc639ad5e491fa08b0108 Reviewed-on: https://code.wiresh...
check_auth (struct url *u, char *user, char *passwd, struct response *resp, struct request *req, bool *ntlm_seen_ref, bool *retry, bool *basic_auth_finished_ref, bool *auth_finished_ref) { uerr_t auth_err = RETROK; bool basic_auth_finished = *basic_auth_finished_ref; bool auth_finished = *...
0
[ "CWE-200" ]
wget
a933bdd31eee9c956a3b5cc142f004ef1fa94cb3
31,249,556,889,136,730,000,000,000,000,000,000,000
133
Keep fetched URLs in POSIX extended attributes * configure.ac: Check for xattr availability * src/Makefile.am: Add xattr.c * src/ftp.c: Include xattr.h. (getftp): Set attributes if enabled. * src/http.c: Include xattr.h. (gethttp): Add parameter 'original_url', set attributes if enabled. (http_loop): Add 'orig...
BPF_CALL_1(__skb_get_pay_offset, struct sk_buff *, skb) { return skb_get_poff(skb); }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
132,024,687,899,660,900,000,000,000,000,000,000,000
4
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static void __find_good_pkt_pointers(struct bpf_func_state *state, struct bpf_reg_state *dst_reg, enum bpf_reg_type type, int new_range) { struct bpf_reg_state *reg; int i; for (i = 0; i < MAX_BPF_REG; i++) { reg = &state->regs[i]; if (reg->type == type && reg->id == dst_reg->id) /* keep th...
0
[]
linux
9b00f1b78809309163dda2d044d9e94a3c0248a3
194,325,338,895,335,840,000,000,000,000,000,000,000
21
bpf: Fix truncation handling for mod32 dst reg wrt zero Recently noticed that when mod32 with a known src reg of 0 is performed, then the dst register is 32-bit truncated in verifier: 0: R1=ctx(id=0,off=0,imm=0) R10=fp0 0: (b7) r0 = 0 1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0 1: (b7) r1 = -1 2: R0_w=inv...
int rdma_set_reuseaddr(struct rdma_cm_id *id, int reuse) { struct rdma_id_private *id_priv; unsigned long flags; int ret; id_priv = container_of(id, struct rdma_id_private, id); spin_lock_irqsave(&id_priv->lock, flags); if ((reuse && id_priv->state != RDMA_CM_LISTEN) || id_priv->state == RDMA_CM_IDLE) { i...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
38,801,795,100,016,880,000,000,000,000,000,000,000
18
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static RzList *create_cache_bins(RzDyldCache *cache) { RzList *bins = rz_list_newf((RzListFree)free_bin); if (!bins) { return NULL; } char *target_libs = NULL; RzList *target_lib_names = NULL; int *deps = NULL; target_libs = rz_sys_getenv("RZ_DYLDCACHE_FILTER"); if (target_libs) { target_lib_names = rz_str...
0
[ "CWE-787" ]
rizin
556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810
192,313,097,483,872,200,000,000,000,000,000,000,000
167
Fix oob write in dyldcache When the individual n_slide_infos were too high, the sum would overflow and too few entries would be allocated.
static void avic_set_running(struct kvm_vcpu *vcpu, bool is_run) { struct vcpu_svm *svm = to_svm(vcpu); svm->avic_is_running = is_run; if (is_run) avic_vcpu_load(vcpu, vcpu->cpu); else avic_vcpu_put(vcpu); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
189,726,624,734,313,150,000,000,000,000,000,000,000
10
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
void slirp_set_nonblock(int fd) { #ifndef _WIN32 int f; f = fcntl(fd, F_GETFL); assert(f != -1); f = fcntl(fd, F_SETFL, f | O_NONBLOCK); assert(f != -1); #else unsigned long opt = 1; ioctlsocket(fd, FIONBIO, &opt); #endif }
0
[ "CWE-120" ]
libslirp
30648c03b27fb8d9611b723184216cd3174b6775
182,275,846,210,583,130,000,000,000,000,000,000,000
13
util: add slirp_fmt() helpers Various calls to snprintf() in libslirp assume that snprintf() returns "only" the number of bytes written (excluding terminating NUL). https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04 "Upon successful completion, the snprintf() function shall return...
do_checksum_math(u_int16_t *data, int len) { int sum = 0; union { u_int16_t s; u_int8_t b[2]; } pad; while (len > 1) { sum += *data++; len -= 2; } if (len == 1) { pad.b[0] = *(u_int8_t *)data; pad.b[1] = 0; sum += pad.s; } return...
0
[ "CWE-119", "CWE-787" ]
tcpreplay
d689d14dbcd768c028eab2fb378d849e543dcfe9
14,834,783,392,540,495,000,000,000,000,000,000,000
21
#278 fail if capture has a packet that is too large (#286) * #278 fail if capture has a packet that is too large * Update CHANGELOG
TEST_F(QueryPlannerTest, CanMakeCoveredPlanForNonArrayTrailingFieldWithPathLevelMultikeyInfo) { MultikeyPaths multikeyPaths{{1U}, {}, {1U}}; addIndex(BSON("a.z" << 1 << "b" << 1 << "c.z" << 1), multikeyPaths); runQueryAsCommand(fromjson( "{find: 'testns', filter: {'a.z': 1, 'c.z': 2, b: 3}, projecti...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
207,173,553,288,679,500,000,000,000,000,000,000,000
12
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
static enum dc_status add_dsc_to_stream_resource(struct dc *dc, struct dc_state *dc_ctx, struct dc_stream_state *dc_stream) { enum dc_status result = DC_OK; int i; const struct resource_pool *pool = dc->res_pool; /* Get a DSC if required and available */ for (i = 0; i < dc->res_pool->pipe_count; i++) { stru...
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
281,612,707,391,156,650,000,000,000,000,000,000,000
28
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
TEST_P(DownstreamProtocolIntegrationTest, ConnectStreamRejection) { // TODO(danzh) add "allow_connect" to http3 options. EXCLUDE_DOWNSTREAM_HTTP3; if (downstreamProtocol() == Http::CodecClient::Type::HTTP1) { return; } config_helper_.addConfigModifier( [](envoy::extensions::filters::network::http_co...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
304,202,523,601,062,500,000,000,000,000,000,000,000
25
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
PJ_DEF(pj_status_t) pjsip_dlg_terminate( pjsip_dialog *dlg ) { /* Number of sessions must be zero. */ PJ_ASSERT_RETURN(dlg->sess_count==0, PJ_EINVALIDOP); /* MUST not have pending transactions. */ PJ_ASSERT_RETURN(dlg->tsx_count==0, PJ_EINVALIDOP); return unregister_and_destroy_dialog(dlg, PJ_FALS...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
105,826,013,016,886,860,000,000,000,000,000,000,000
10
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
void LinkResolver::resolve_invokestatic(CallInfo& result, const constantPoolHandle& pool, int index, TRAPS) { LinkInfo link_info(pool, index, CHECK); resolve_static_call(result, link_info, /*initialize_class*/true, CHECK); }
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
206,379,653,752,409,080,000,000,000,000,000,000,000
4
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static int setcalrgbspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref rgbdict; int code = 0; float gamma[3], white[3], black[3], matrix[9]; static const float dflt_gamma[3] = { 1.0, 1.0, 1.0 }; static const float dflt_black[3] = {0,0,0}, dflt_whi...
0
[]
ghostpdl
b326a71659b7837d3acde954b18bda1a6f5e9498
29,905,618,456,723,020,000,000,000,000,000,000,000
61
Bug 699655: Properly check the return value.... ...when getting a value from a dictionary
spell_iswordp_nmw(char_u *p, win_T *wp) { int c; if (has_mbyte) { c = mb_ptr2char(p); if (c > 255) return spell_mb_isword_class(mb_get_class(p), wp); return spelltab.st_isw[c]; } return spelltab.st_isw[*p]; }
0
[ "CWE-416" ]
vim
2813f38e021c6e6581c0c88fcf107e41788bc835
313,146,865,509,483,200,000,000,000,000,000,000,000
13
patch 8.2.5072: using uninitialized value and freed memory in spell command Problem: Using uninitialized value and freed memory in spell command. Solution: Initialize "attr". Check for empty line early.
R_API RBinJavaCPTypeObj *r_bin_java_methodhandle_cp_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz) { ut8 tag = buffer[0]; int quick_check = r_bin_java_quick_check (R_BIN_JAVA_CP_METHODHANDLE, tag, sz, "RBinJavaCPTypeMethodHandle"); if (quick_check > 0) { return NULL; } RBinJavaCPTypeObj *obj = R_NEW0 (RBinJavaCPTyp...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
322,613,418,851,538,200,000,000,000,000,000,000,000
17
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void rtl8xxxu_tx_complete(struct urb *urb) { struct sk_buff *skb = (struct sk_buff *)urb->context; struct ieee80211_tx_info *tx_info; struct ieee80211_hw *hw; struct rtl8xxxu_priv *priv; struct rtl8xxxu_tx_urb *tx_urb = container_of(urb, struct rtl8xxxu_tx_urb, urb); tx_info = IEEE80211_SKB_CB(skb); hw...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
245,870,855,111,055,700,000,000,000,000,000,000,000
26
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static int rdn_rename_callback(struct ldb_request *req, struct ldb_reply *ares) { struct ldb_context *ldb; struct rename_context *ac; struct ldb_request *mod_req; const char *rdn_name; const struct ldb_schema_attribute *a = NULL; const struct ldb_val *rdn_val_p; struct ldb_val rdn_val; struct ldb_message *msg; ...
1
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
301,431,107,046,966,760,000,000,000,000,000,000,000
99
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
RawSliceVector OwnedImpl::getRawSlices(absl::optional<uint64_t> max_slices) const { uint64_t max_out = slices_.size(); if (max_slices.has_value()) { max_out = std::min(max_out, max_slices.value()); } RawSliceVector raw_slices; raw_slices.reserve(max_out); for (const auto& slice : slices_) { if (raw...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
148,295,961,400,464,710,000,000,000,000,000,000,000
27
[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>
rndr_quote(struct buf *ob, const struct buf *text, void *opaque) { if (!text || !text->size) return 0; BUFPUTSL(ob, "<q>"); bufput(ob, text->data, text->size); BUFPUTSL(ob, "</q>"); return 1; }
1
[ "CWE-79", "CWE-74" ]
redcarpet
a699c82292b17c8e6a62e1914d5eccc252272793
339,130,827,029,288,600,000,000,000,000,000,000,000
11
Fix a security issue using `:quote` with `:escape_html` Reported by @johan-smits.
static char **shell_name_completion(const char *text, int start __attribute__((__unused__)), int end __attribute__((__unused__))) { rl_attempted_completion_over = 1; return rl_completion_matches(text, shell_name_generator); }
1
[ "CWE-209" ]
util-linux
faa5a3a83ad0cb5e2c303edbfd8cd823c9d94c17
322,689,000,981,391,900,000,000,000,000,000,000,000
7
chsh, chfn: remove readline support [CVE-2022-0563] The readline library uses INPUTRC= environment variable to get a path to the library config file. When the library cannot parse the specified file, it prints an error message containing data from the file. Unfortunately, the library does not use secure_getenv() (or ...
static int fbo_emulate_read_toc(struct tcmu_device *dev, uint8_t *cdb, struct iovec *iovec, size_t iov_cnt, uint8_t *sense) { struct fbo_state *state = tcmu_get_dev_private(dev); uint8_t time_bit = cdb[1] & 0x02; uint8_t format = cdb[2] & 0x0f; uint8_t buf[512]; memset(buf, 0, sizeof(buf)); // TBD: If w...
0
[ "CWE-200" ]
tcmu-runner
8cf8208775022301adaa59c240bb7f93742d1329
117,581,874,252,604,790,000,000,000,000,000,000,000
69
removed all check_config callback implementations to avoid security issues see github issue #194 qcow.c contained an information leak, could test for existance of any file in the system file_example.c and file_optical.c allow also to test for existance of any file, plus to temporarily create empty new files anywhere...
R_API char *r_bin_java_resolve_cp_idx_to_string(RBinJavaObj *BIN_OBJ, int idx) { RBinJavaCPTypeObj *item = NULL; char *value = NULL; if (BIN_OBJ && BIN_OBJ->cp_count < 1) { return NULL; } item = (RBinJavaCPTypeObj *) r_bin_java_get_item_from_bin_cp_list (BIN_OBJ, idx); if (item) { value = ((RBinJavaCPTypeMeta...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
113,015,438,558,069,250,000,000,000,000,000,000,000
14
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
\note If true, set coordinates (n,x,y). **/ template<typename t> bool contains(const T& pixel, t& n, t& x, t&y) const {
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
134,591,823,774,493,310,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
gs_copypage(gs_gstate * pgs) { return gs_output_page(pgs, 1, 0); }
0
[]
ghostpdl
79cccf641486a6595c43f1de1cd7ade696020a31
89,298,686,910,385,720,000,000,000,000,000,000,000
4
Bug 699654(2): preserve LockSafetyParams in the nulldevice The nulldevice does not necessarily use the normal setpagedevice machinery, but can be set using the nulldevice operator. In which case, we don't preserve the settings from the original device (in the way setpagedevice does). Since nulldevice does nothing, th...
MagickExport Image *ChannelFxImage(const Image *image,const char *expression, ExceptionInfo *exception) { #define ChannelFxImageTag "ChannelFx/Image" ChannelFx channel_op; ChannelType channel_mask; char token[MagickPathExtent]; const char *p; const Image *source_image; double ...
0
[ "CWE-416" ]
ImageMagick
a47e7a994766b92b10d4a87df8c1c890c8b170f3
327,450,138,264,053,150,000,000,000,000,000,000,000
266
https://github.com/ImageMagick/ImageMagick/issues/1724
static int mspack_write(int fd, const void *buff, unsigned int count, struct cab_file *file) { int ret; if(file->max_size) { if(file->written_size >= file->max_size) return CL_BREAK; if(file->written_size + count > file->max_size) count = file->max_size - file->written_size; } if((ret = cli_w...
0
[]
clamav-devel
158c35e81a25ea5fda55a2a7f62ea9fec2e883d9
49,818,595,982,668,920,000,000,000,000,000,000,000
16
libclamav/mspack.c: improve unpacking of malformed cabinets (bb#1826)
int cipso_v4_req_setattr(struct request_sock *req, const struct cipso_v4_doi *doi_def, const struct netlbl_lsm_secattr *secattr) { int ret_val = -EPERM; unsigned char *buf = NULL; u32 buf_len; u32 opt_len; struct ip_options_rcu *opt = NULL; struct inet_request_sock *req_inet; /* We allocate the maximum ...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
285,316,993,129,489,060,000,000,000,000,000,000,000
54
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...
void OSD::handle_pg_remove(OpRequestRef op) { const MOSDPGRemove *m = static_cast<const MOSDPGRemove *>(op->get_req()); assert(m->get_type() == MSG_OSD_PG_REMOVE); assert(osd_lock.is_locked()); if (!require_osd_peer(op->get_req())) return; dout(7) << "handle_pg_remove from " << m->get_source() << " on "...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
9,654,630,081,812,611,000,000,000,000,000,000,000
55
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 int LocaleTagCompare(const void *x,const void *y) { register char **p, **q; p=(char **) x; q=(char **) y; return(LocaleCompare(*p,*q)); }
0
[ "CWE-125" ]
ImageMagick
07eebcd72f45c8fd7563d3f9ec5d2bed48f65f36
295,695,840,578,253,130,000,000,000,000,000,000,000
10
...
static size_t vhost_get_avail_size(struct vhost_virtqueue *vq, unsigned int num) { size_t event __maybe_unused = vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX) ? 2 : 0; return sizeof(*vq->avail) + sizeof(*vq->avail->ring) * num + event; }
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
45,185,495,678,948,350,000,000,000,000,000,000,000
9
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
static u64 btrfs_num_devices(struct btrfs_fs_info *fs_info) { u64 num_devices = fs_info->fs_devices->num_devices; down_read(&fs_info->dev_replace.rwsem); if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace)) { ASSERT(num_devices > 1); num_devices--; } up_read(&fs_info->dev_replace.rwsem); return num_devi...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
82,217,664,628,867,870,000,000,000,000,000,000,000
13
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
void error_handler(int priority, const char *format, ...) { gdTestAssert(priority == GD_WARNING); gdTestAssert(!strcmp(format, MSG)); }
0
[ "CWE-20" ]
libgd
1846f48e5fcdde996e7c27a4bbac5d0aef183e4b
172,315,528,411,184,930,000,000,000,000,000,000,000
5
Fix #340: System frozen gdImageCreate() doesn't check for oversized images and as such is prone to DoS vulnerabilities. We fix that by applying the same overflow check that is already in place for gdImageCreateTrueColor(). CVE-2016-9317
static void nfs4_xdr_enc_link(struct rpc_rqst *req, struct xdr_stream *xdr, const struct nfs4_link_arg *args) { struct compound_hdr hdr = { .minorversion = nfs4_xdr_minorversion(&args->seq_args), }; encode_compound_hdr(xdr, req, &hdr); encode_sequence(xdr, &args->seq_args, &hdr); encode_putfh(xdr, args-...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
268,303,876,133,075,900,000,000,000,000,000,000,000
18
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
static DSA_SIG *dsa_do_sign(const unsigned char *dgst, int dlen, DSA *dsa) { BIGNUM *kinv = NULL, *r = NULL, *s = NULL; BIGNUM *m, *blind, *blindm, *tmp; BN_CTX *ctx = NULL; int reason = ERR_R_BN_LIB; DSA_SIG *ret = NULL; int noredo = 0; if (dsa->p == NULL || dsa->q == NULL || dsa->g == NUL...
0
[ "CWE-327", "CWE-320" ]
openssl
43e6a58d4991a451daf4891ff05a48735df871ac
152,266,770,732,792,600,000,000,000,000,000,000,000
119
Merge DSA reallocation timing fix CVE-2018-0734. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7513)
http_CountHdr(const struct http *hp, hdr_t hdr) { unsigned retval = 0; unsigned u; CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); for (u = HTTP_HDR_FIRST; u < hp->nhd; u++) { Tcheck(hp->hd[u]); if (http_IsHdr(&hp->hd[u], hdr)) retval++; } return (retval); }
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
272,531,488,120,408,050,000,000,000,000,000,000,000
14
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
bool Item_param::set_str(const char *str, ulong length) { DBUG_ENTER("Item_param::set_str"); /* Assign string with no conversion: data is converted only after it's been written to the binary log. */ uint dummy_errors; if (str_value.copy(str, length, &my_charset_bin, &my_charset_bin, ...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
124,572,711,471,302,400,000,000,000,000,000,000,000
20
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
void read_user_name(char *name) { if (geteuid() == 0) strcpy(name,"root"); /* allow use of surun */ else { #ifdef HAVE_GETPWUID struct passwd *skr; const char *str; if ((skr=getpwuid(geteuid())) != NULL) { str=skr->pw_name; } else if ((str=getlogin()) == NULL) { if (!(str=...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
98,391,629,658,583,710,000,000,000,000,000,000,000
27
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
Item *Item_hex_constant::safe_charset_converter(CHARSET_INFO *tocs) { Item_string *conv; String tmp, *str= val_str(&tmp); if (!(conv= new Item_string(str->ptr(), str->length(), tocs))) return NULL; conv->str_value.copy(); conv->str_value.mark_as_const(); return conv; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
279,043,804,985,288,530,000,000,000,000,000,000,000
11
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
dissect_spoolss_relstr(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep, int hf_index, int struct_start, char **data) { proto_item *item; proto_tree *subtree; guint32 relstr_offset, relstr_start, relstr_end; char *text; /* Peek ahead to read the stri...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
142,094,294,958,144,300,000,000,000,000,000,000,000
44
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
static void test_ps_i18n() { MYSQL_STMT *stmt; int rc; const char *stmt_text; MYSQL_BIND bind_array[2]; /* Represented as numbers to keep UTF8 tools from clobbering them. */ const char *koi8= "\xee\xd5\x2c\x20\xda\xc1\x20\xd2\xd9\xc2\xc1\xcc\xcb\xd5"; const char *cp1251= "\xcd\xf3\x2c\x20\xe7\xe0\x20\xf0...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
302,964,434,598,415,430,000,000,000,000,000,000,000
185
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static void intel_pmu_enable_event(struct perf_event *event) { struct hw_perf_event *hwc = &event->hw; struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); if (unlikely(hwc->idx == INTEL_PMC_IDX_FIXED_BTS)) { if (!__this_cpu_read(cpu_hw_events.enabled)) return; intel_pmu_enable_bts(hwc->config); re...
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
148,069,402,930,879,940,000,000,000,000,000,000,000
34
perf/x86: Fix offcore_rsp valid mask for SNB/IVB The valid mask for both offcore_response_0 and offcore_response_1 was wrong for SNB/SNB-EP, IVB/IVB-EP. It was possible to write to reserved bit and cause a GP fault crashing the kernel. This patch fixes the problem by correctly marking the reserved bits in the valid m...
static inline int is_atext(char ch) { switch (ch) { case ' ': case '\t': case '\n': case '\r': #if 0 case '(': case ')': #endif case '<': case '>': #if 0 case '@': #endif case ',': case '"': case ':': case ';': return FALSE; default: return TRUE; } }
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
249,777,098,425,273,400,000,000,000,000,000,000,000
25
Fixed crash #274
static inline size_t xfrm_sa_len(struct xfrm_state *x) { size_t l = 0; if (x->aead) l += nla_total_size(aead_len(x->aead)); if (x->aalg) { l += nla_total_size(sizeof(struct xfrm_algo) + (x->aalg->alg_key_len + 7) / 8); l += nla_total_size(xfrm_alg_auth_len(x->aalg)); } if (x->ealg) l += nla_total_s...
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
86,761,688,239,874,950,000,000,000,000,000,000,000
35
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
BlockDriver *bdrv_find_protocol(const char *filename, bool allow_protocol_prefix) { BlockDriver *drv1; char protocol[128]; int len; const char *p; /* TODO Drivers without bdrv_file_open must be specified explicitly */ /* * XXX(hch): we really should not let...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
170,547,401,680,513,940,000,000,000,000,000,000,000
41
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
const TestCodecSettingsProvider& getSettingsProvider() { if (validate_client_) { return *client_; } return *server_; }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
24,124,549,324,619,560,000,000,000,000,000,000,000
6
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...