func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool operator != (const _glat_iterator<W> & rhs) { return !operator==(rhs); }
0
[ "CWE-476" ]
graphite
db132b4731a9b4c9534144ba3a18e65b390e9ff6
310,995,727,098,124,300,000,000,000,000,000,000,000
1
Deprecate and make ineffective gr_face_dumbRendering
alloc_open_clump(gs_ref_memory_t * mem) { #ifdef DEBUG if (gs_debug_c('A')) { dmlprintf1((const gs_memory_t *)mem, "[a%d]", alloc_trace_space(mem)); dmprintf_clump((const gs_memory_t *)mem, "opening clump", mem->cc); } #endif }
0
[ "CWE-190" ]
ghostpdl
cfde94be1d4286bc47633c6e6eaf4e659bd78066
40,719,121,768,018,275,000,000,000,000,000,000,000
9
Bug 697985: bounds check the array allocations methods The clump allocator has four allocation functions that use 'number of elements' and 'size of elements' parameters (rather than a simple 'number of bytes'). Those need specific bounds checking.
_gcry_mpi_point_snatch_set (mpi_point_t point, gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_t z) { if (!point) point = mpi_point_new (0); if (x) mpi_snatch (point->x, x); else mpi_clear (point->x); if (y) mpi_snatch (point->y, y); else mpi_clear (point->y); if (z) ...
0
[ "CWE-200" ]
libgcrypt
88e1358962e902ff1cbec8d53ba3eee46407851a
65,472,445,131,686,480,000,000,000,000,000,000,000
21
ecc: Constant-time multiplication for Weierstrass curve. * mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary method for Weierstrass curve when SCALAR is secure.
static ssize_t probe_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { u64 phys_addr; int nid, ret; unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block; ret = kstrtoull(buf, 0, &phys_addr); if (ret) return ret; if (phys_addr & ((pages_per_block ...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
242,691,888,195,823,270,000,000,000,000,000,000,000
30
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...
create_socket (GSocketClient *client, GSocketAddress *dest_address, GError **error) { GSocketFamily family; GSocket *socket; family = client->priv->family; if (family == G_SOCKET_FAMILY_INVALID && client->priv->local_address != NULL) family = g_socket_address_get_family (clien...
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
159,856,421,672,038,990,000,000,000,000,000,000,000
38
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
apr_status_t h2_stream_add_header(h2_stream *stream, const char *name, size_t nlen, const char *value, size_t vlen) { h2_session *session = stream->session; int error = 0; apr_status_t status; if (stream->has_response) { re...
1
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
292,977,856,887,897,500,000,000,000,000,000,000,000
66
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
njs_string_base64(njs_vm_t *vm, njs_value_t *value, const njs_str_t *src) { size_t length; njs_str_t dst; length = njs_encode_base64_length(src, &dst.length); if (njs_slow_path(dst.length == 0)) { vm->retval = njs_string_empty; return NJS_OK; } dst.start = njs_string_allo...
0
[]
njs
36f04a3178fcb6da8513cc3dbf35215c2a581b3f
146,311,951,206,358,500,000,000,000,000,000,000,000
21
Fixed String.prototype.replace() with byte strings. This closes #522 issue on Github.
static void airspy_urb_complete(struct urb *urb) { struct airspy *s = urb->context; struct airspy_frame_buf *fbuf; dev_dbg_ratelimited(s->dev, "status=%d length=%d/%d errors=%d\n", urb->status, urb->actual_length, urb->transfer_buffer_length, urb->error_count); switch (urb->status) { case 0: /*...
0
[ "CWE-119" ]
media_tree
aa93d1fee85c890a34f2510a310e55ee76a27848
171,581,281,338,522,600,000,000,000,000,000,000,000
47
media: fix airspy usb probe error path Fix a memory leak on probe error of the airspy usb device driver. The problem is triggered when more than 64 usb devices register with v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV. The memory leak is caused by the probe function of the airspy driver mishandeling errors and not ...
get_user_id_byfpr (const byte *fpr, size_t *rn) { user_id_db_t r; char *p; int pass = 0; /* Try it two times; second pass reads from key resources. */ do { for (r = user_id_db; r; r = r->next) { keyid_list_t a; for (a = r->keyids; a; a = a->next) { if (!memcmp (a->fpr, fpr, MAX_...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
10,389,560,770,062,267,000,000,000,000,000,000,000
32
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 ...
int ha_partition::loop_extra(enum ha_extra_function operation) { int result= 0, tmp; handler **file; bool is_select; DBUG_ENTER("ha_partition::loop_extra()"); is_select= (thd_sql_command(ha_thd()) == SQLCOM_SELECT); for (file= m_file; *file; file++) { if (!is_select || bitmap_is_set(&(m_par...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
262,946,244,262,019,200,000,000,000,000,000,000,000
19
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static int ZEND_FASTCALL ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 || (IS_CV != IS_UNUSED) zend_op *opline = EX(opline); if (IS_CV != IS_UNUSED) { zval *ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC); if (Z_TYPE_P(ptr) == IS_LONG) { EG(exit_status) = Z_LVAL_P(ptr); } el...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
125,379,582,601,268,760,000,000,000,000,000,000,000
19
- 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
int err_win_to_posix(DWORD winerr) { int error = ENOSYS; switch(winerr) { case ERROR_ACCESS_DENIED: error = EACCES; break; case ERROR_ACCOUNT_DISABLED: error = EACCES; break; case ERROR_ACCOUNT_RESTRICTION: error = EACCES; break; case ERROR_ALREADY_ASSIGNED: error = EBUSY; break; case ERROR_ALREADY_EXISTS: error...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
185,401,618,524,079,000,000,000,000,000,000,000,000
112
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
INTERNAL void vterm_screen_free(VTermScreen *screen) { vterm_allocator_free(screen->vt, screen->buffers[0]); if(screen->buffers[1]) vterm_allocator_free(screen->vt, screen->buffers[1]); vterm_allocator_free(screen->vt, screen->sb_buffer); vterm_allocator_free(screen->vt, screen); }
1
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
141,694,826,749,566,080,000,000,000,000,000,000,000
10
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output) { ZSTD_inBuffer input = { NULL, 0, 0 }; if (output->pos > output->size) return ERROR(GENERIC); CHECK_F( ZSTD_compressStream_generic(zcs, output, &input, ZSTD_e_end) ); { size_t const lastBlockSize = zcs->frameEnded ? 0 : ZSTD_BLOCKHEADER...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
303,779,462,865,797,000,000,000,000,000,000,000,000
12
fixed T36302429
TEST(EqOp, MatchesMaxKey) { BSONObj operand = BSON("a" << MaxKey); EqualityMatchExpression eq; ASSERT(eq.init("a", operand["a"]).isOK()); ASSERT(eq.matchesBSON(BSON("a" << MaxKey), NULL)); ASSERT(!eq.matchesBSON(BSON("a" << MinKey), NULL)); ASSERT(!eq.matchesBSON(BSON("a" << 4), NULL)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
122,339,620,588,854,830,000,000,000,000,000,000,000
8
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void initialize() override { config_helper_.addConfigModifier([this](envoy::config::bootstrap::v3::Bootstrap& bootstrap) { // add sds cluster first. auto* sds_cluster = bootstrap.mutable_static_resources()->add_clusters(); sds_cluster->MergeFrom(bootstrap.static_resources().clusters()[0]); ...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
107,015,711,254,570,820,000,000,000,000,000,000,000
23
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...
int cil_fill_integer(struct cil_tree_node *int_node, uint32_t *integer, int base) { int rc = SEPOL_ERR; char *endptr = NULL; unsigned long val; if (int_node == NULL || int_node->data == NULL || integer == NULL) { goto exit; } errno = 0; val = strtoul(int_node->data, &endptr, base); if (errno != 0 || endptr ...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
322,019,599,492,456,130,000,000,000,000,000,000,000
33
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
EXPORTED void annotate_state_set_auth(annotate_state_t *state, int isadmin, const char *userid, const struct auth_state *auth_state) { /* Note: lmtpd sometimes calls through the append code with * auth_state=NULL, so we cannot rely on it being non-NULL ...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
4,380,187,659,869,055,600,000,000,000,000,000,000
10
annotate: don't allow everyone to write shared server entries
int RGWSetAttrs::verify_permission() { // This looks to be part of the RGW-NFS machinery and has no S3 or // Swift equivalent. bool perm; if (!s->object.empty()) { perm = verify_object_permission_no_policy(s, RGW_PERM_WRITE); } else { perm = verify_bucket_permission_no_policy(s, RGW_PERM_WRITE); } ...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
110,295,214,014,515,150,000,000,000,000,000,000,000
15
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
explicit SparseSegmentGradOpBase(OpKernelConstruction* context, bool is_sqrtn) : OpKernel(context), is_sqrtn_(is_sqrtn) {}
0
[ "CWE-703", "CWE-681", "CWE-787" ]
tensorflow
db4f9717c41bccc3ce10099ab61996b246099892
189,993,800,075,044,840,000,000,000,000,000,000,000
2
Fix heap buffer overflow in UnsortedSegmentSum. When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory. Also: - Switches some indexing calculations to int64 to avoid signed intege...
static __be16 atalk_checksum(const struct sk_buff *skb, int len) { unsigned long sum; /* skip header 4 bytes */ sum = atalk_sum_skb(skb, 4, len-4, 0); /* Use 0xFFFF for 0. 0 itself means none */ return sum ? htons((unsigned short)sum) : htons(0xFFFF); }
0
[ "CWE-200" ]
linux-2.6
3d392475c873c10c10d6d96b94d092a34ebd4791
146,823,308,276,955,440,000,000,000,000,000,000,000
10
appletalk: fix atalk_getname() leak atalk_getname() can leak 8 bytes of kernel memory to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int fts3IncrmergeChomp( Fts3Table *p, /* FTS table handle */ sqlite3_int64 iAbsLevel, /* Absolute level containing segments */ Fts3MultiSegReader *pCsr, /* Chomp all segments opened by this cursor */ int *pnRem /* Number of segments not deleted */ ){ ...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
124,663,353,616,869,500,000,000,000,000,000,000,000
47
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
mapping_read(ImagingMapperObject* mapper, PyObject* args) { PyObject* buf; int size = -1; if (!PyArg_ParseTuple(args, "|i", &size)) return NULL; /* check size */ if (size < 0 || mapper->offset + size > mapper->size) size = mapper->size - mapper->offset; if (size < 0) si...
0
[ "CWE-190" ]
Pillow
c50ebe6459a131a1ea8ca531f10da616d3ceaa0f
54,648,558,122,354,160,000,000,000,000,000,000,000
25
Map.c overflow fixes
void memory_region_init_io(struct uc_struct *uc, MemoryRegion *mr, const MemoryRegionOps *ops, void *opaque, uint64_t size) { memory_region_init(uc, mr, size); mr->ops = ops ? ops : &unassigned_mem_ops; ...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
27,098,836,259,579,880,000,000,000,000,000,000,000
11
Fix crash when mapping a big memory and calling uc_close
static int rbd_dev_v1_header_info(struct rbd_device *rbd_dev) { struct rbd_image_header_ondisk *ondisk = NULL; u32 snap_count = 0; u64 names_size = 0; u32 want_count; int ret; /* * The complete header will include an array of its 64-bit * snapshot ids, followed by the names of those snapshots as * a contig...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
328,746,789,512,146,880,000,000,000,000,000,000,000
54
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static __inline__ void isdn_net_dec_frame_cnt(isdn_net_local *lp) { atomic_dec(&lp->frame_cnt); if (!(isdn_net_device_busy(lp))) { if (!skb_queue_empty(&lp->super_tx_queue)) { schedule_work(&lp->tqueue); } else { isdn_net_device_wake_queue(lp); } } }
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
49,152,638,204,242,130,000,000,000,000,000,000,000
12
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
const struct exception_table_entry *search_module_extables(unsigned long addr) { const struct exception_table_entry *e = NULL; struct module *mod; preempt_disable(); mod = __module_address(addr); if (!mod) goto out; if (!mod->num_exentries) goto out; e = search_extable(mod->extable, mod->num_exentri...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
45,432,418,919,069,690,000,000,000,000,000,000,000
25
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
TEST_F(QueryPlannerTest, ContainedOrMoveToElemMatchObjectMultiplePredicates) { addIndex(BSON("b.c" << 1 << "a" << 1 << "b.d" << 1)); addIndex(BSON("e" << 1 << "a" << 1)); runQuery(fromjson("{$and: [{a: 5}, {$or: [{b: {$elemMatch: {c: 6, d: 7}}}, {e: 8}]}]}")); assertNumSolutions(2); assertSolutionE...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
329,911,667,695,684,160,000,000,000,000,000,000,000
16
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
void CLASS parse_kodak_ifd (int base) { unsigned entries, tag, type, len, save; int i, c, wbi=-2, wbtemp=6500; float mul[3]={1,1,1}, num; static const int wbtag[] = { 64037,64040,64039,64041,-1,-1,64042 }; entries = get2(); if (entries > 1024) return; while (entries--) { tiff_get (base, &tag, &type, ...
0
[]
LibRaw
c4e374ea6c979a7d1d968f5082b7d0ea8cd27202
124,295,719,702,091,110,000,000,000,000,000,000,000
44
additional data checks backported from 0.15.4
int gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b) { int i; /* long rd, gd, bd; */ int ct = (-1); int first = 1; float mindist = 0; if (im->trueColor) { return gdTrueColor(r, g, b); } for (i = 0; i < im->colorsTotal; i++) { float dist; if (im->open[i]) { continue; } dist = HWB_Diff(im-...
0
[ "CWE-119" ]
php-src
e7f2356665c2569191a946b6fc35b437f0ae1384
286,423,259,348,331,400,000,000,000,000,000,000,000
24
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...
ASC_getAPTitles(T_ASC_Parameters * params, char* callingAPTitle, size_t callingAPTitleSize, char* calledAPTitle, size_t calledAPTitleSize, char* respondingAPTitle, size_t respondingAPTitleSize) { if (callingAPTitle) OFStandard::strlcpy(callingAPTitle, params->DULparams.callingAPTitle...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
71,443,479,323,788,590,000,000,000,000,000,000,000
17
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
compile_cclass_node(CClassNode* cc, regex_t* reg) { int r; if (IS_NCCLASS_SHARE(cc)) { add_opcode(reg, OP_CCLASS_NODE); r = add_pointer(reg, cc); return r; } if (IS_NULL(cc->mbuf)) { if (IS_NCCLASS_NOT(cc)) add_opcode(reg, OP_CCLASS_NOT); else add_opcode(reg, OP_CCLASS); r...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
239,012,400,330,769,970,000,000,000,000,000,000,000
41
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static const char *str_in6_addr(struct in6_addr *addr) { static char buf[INET6_ADDRSTRLEN]; return inet_ntop(AF_INET6, addr, buf, sizeof(buf)); }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
52,052,377,357,505,870,000,000,000,000,000,000,000
6
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff); check_snprintf_ret(t2p, buflen, buffer); written += t2pWriteFile(output, (tdata_t)...
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
149,176,574,040,413,400,000,000,000,000,000,000,000
15
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
static int __net_init xfrm_statistics_init(struct net *net) { int rv; net->mib.xfrm_statistics = alloc_percpu(struct linux_xfrm_mib); if (!net->mib.xfrm_statistics) return -ENOMEM; rv = xfrm_proc_init(net); if (rv < 0) free_percpu(net->mib.xfrm_statistics); return rv; }
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
301,650,725,479,645,400,000,000,000,000,000,000,000
11
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
compat_copy_entry_from_user(struct compat_ip6t_entry *e, void **dstptr, unsigned int *size, const char *name, struct xt_table_info *newinfo, unsigned char *base) { struct xt_entry_target *t; struct xt_target *target; struct ip6t_entry *de; unsigned int origsize; int ret, h; struct xt_entry_match *em...
0
[ "CWE-200" ]
linux-2.6
6a8ab060779779de8aea92ce3337ca348f973f54
294,721,699,063,708,600,000,000,000,000,000,000,000
39
ipv6: netfilter: ip6_tables: fix infoleak to userspace Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sen...
GF_Err fpar_box_read(GF_Box *s, GF_BitStream *bs) { u32 i; GF_Err e; FilePartitionBox *ptr = (FilePartitionBox *)s; ISOM_DECREASE_SIZE(ptr, ((ptr->version ? 4 : 2) + 12) ); ptr->itemID = gf_bs_read_int(bs, ptr->version ? 32 : 16); ptr->packet_payload_size = gf_bs_read_u16(bs); gf_bs_read_u8(bs); ptr->FEC_encod...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
337,158,750,364,551,100,000,000,000,000,000,000,000
34
fixed #2255
static int rb_allocate_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages) { LIST_HEAD(pages); WARN_ON(!nr_pages); if (__rb_allocate_pages(nr_pages, &pages, cpu_buffer->cpu)) return -ENOMEM; /* * The ring buffer page list is a circular list that does not * start and end with a lis...
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
276,270,818,418,527,030,000,000,000,000,000,000,000
24
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
MagickExport void MagickWarning(const ExceptionType warning,const char *reason, const char *description) { if (warning_handler != (WarningHandler) NULL) (*warning_handler)(warning,reason,description); }
0
[ "CWE-120", "CWE-787" ]
ImageMagick
e45e48b881038487d0bc94d92a16c1537616cc0a
943,127,275,993,074,800,000,000,000,000,000,000
6
Suspend exception processing if too many exceptions
GF_Err sbgp_Read(GF_Box *s, GF_BitStream *bs) { u32 i; GF_SampleGroupBox *ptr = (GF_SampleGroupBox *)s; ptr->grouping_type = gf_bs_read_u32(bs); ISOM_DECREASE_SIZE(ptr, 4); if (ptr->version==1) { ptr->grouping_type_parameter = gf_bs_read_u32(bs); ISOM_DECREASE_SIZE(ptr, 4); } ptr->entry_count = gf_bs_read...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
298,128,495,908,822,900,000,000,000,000,000,000,000
25
prevent dref memleak on invalid input (#1183)
start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) { tga_source_ptr source = (tga_source_ptr) sinfo; U_CHAR targaheader[18]; int idlen, cmaptype, subtype, flags, interlace_type, components; unsigned int width, height, maplen; boolean is_bottom_up; #define GET_2B(offset) ((unsigned int) UCH(targa...
0
[ "CWE-369" ]
libjpeg-turbo
82923eb93a2eacf4a593e00e3e672bbb86a8a3a0
274,327,514,885,867,530,000,000,000,000,000,000,000
134
Check image size when reading targa file Throw an error when image width or height is 0. Fixes mozilla/mozjpeg#140, closes #7.
int error_code() const { return error_code_; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
135,390,607,551,650,100,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
struct ev_loop *Http2Handler::get_loop() const { return sessions_->get_loop(); }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
174,846,491,615,493,500,000,000,000,000,000,000,000
3
Don't read too greedily
fast_blur (GdkPixbuf * in, GdkPixbuf * output, gfloat sx, gfloat sy, RsvgIRect boundarys, RsvgFilterPrimitiveOutput op) { gint kx, ky; guchar *intermediate; kx = floor (sx * 3 * sqrt (2 * M_PI) / 4 + 0.5); ky = floor (sy * 3 * sqrt (2 * M_PI) / 4 + 0.5); if (kx < 1 && ky < 1) re...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
194,366,565,876,892,420,000,000,000,000,000,000,000
20
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC) /* {{{ */ { cwd_state new_state; int ret; CWD_STATE_COPY(&new_state, &CWDG(cwd)); if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) { CWD_STATE_FREE(&new_state); return -1; } if (link) { #if ...
0
[ "CWE-190" ]
php-src
0218acb7e756a469099c4ccfb22bce6c2bd1ef87
244,645,352,107,868,770,000,000,000,000,000,000,000
24
Fix for bug #72513
PHP_FUNCTION(linkinfo) { char *link; size_t link_len; zend_stat_t sb; int ret; if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &link, &link_len) == FAILURE) { return; } ret = VCWD_STAT(link, &sb); if (ret == -1) { php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); RETURN_LONG(Z_L(-1)); } RETUR...
1
[ "CWE-200" ]
php-src
f151e048ed27f6f4eef729f3310d053ab5da71d4
230,706,909,045,028,950,000,000,000,000,000,000,000
19
Fixed bug #76459 windows linkinfo lacks openbasedir check
static void end_write(TsHashTable *ht) { #ifdef ZTS tsrm_mutex_unlock(ht->mx_writer); #endif }
0
[]
php-src
2bcf69d073190e4f032d883f3416dea1b027a39e
210,178,214,733,199,700,000,000,000,000,000,000,000
6
Fixed bug #68676 (Explicit Double Free)
static char *super_fgets(char **b, int *blen, Image *file) { int c, len; unsigned char *p, *q; len=*blen; p=(unsigned char *) (*b); for (q=p; ; q++) { c=ReadBlobByte(file); if (c == EOF || c == '\n') break; if ((q-p+1) >= (int) len) { int tlen; ...
0
[ "CWE-772" ]
ImageMagick
46382526a3f09cebf9f2af680fc55b2a668fcbef
99,486,068,151,884,050,000,000,000,000,000,000,000
46
https://github.com/ImageMagick/ImageMagick/issues/643
Curl_mbedtls_connect_nonblocking(struct connectdata *conn, int sockindex, bool *done) { return mbed_connect_common(conn, sockindex, TRUE, done); }
0
[ "CWE-20" ]
curl
6efd2fa529a189bf41736a610f6184cd8ad94b4d
173,749,497,414,577,980,000,000,000,000,000,000,000
6
mbedtls/polarssl: set "hostname" unconditionally ...as otherwise the TLS libs will skip the CN/SAN check and just allow connection to any server. curl previously skipped this function when SNI wasn't used or when connecting to an IP address specified host. CVE-2016-3739 Bug: https://curl.haxx.se/docs/adv_20160518A.h...
const CString& CIRCNetwork::GetName() const { return m_sName; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
227,650,148,376,414,600,000,000,000,000,000,000,000
1
Don't crash if user specified invalid encoding. This is CVE-2019-9917
ftp_chdir(ftpbuf_t *ftp, const char *dir) { if (ftp == NULL) { return 0; } if (ftp->pwd) { efree(ftp->pwd); ftp->pwd = NULL; } if (!ftp_putcmd(ftp, "CWD", dir)) { return 0; } if (!ftp_getresp(ftp) || ftp->resp != 250) { return 0; } return 1; }
0
[ "CWE-189" ]
php-src
ac2832935435556dc593784cd0087b5e576bbe4d
250,415,607,774,654,700,000,000,000,000,000,000,000
19
Fix bug #69545 - avoid overflow when reading list
static void ip4_frags_ctl_register(void) { register_net_sysctl(&init_net, "net/ipv4", ip4_frags_ctl_table); }
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
327,679,011,259,872,150,000,000,000,000,000,000,000
4
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
get_current_charset(struct archive *a) { const char *cur_charset; if (a == NULL) cur_charset = default_iconv_charset(""); else { cur_charset = default_iconv_charset(a->current_code); if (a->current_code == NULL) { a->current_code = strdup(cur_charset); a->current_codepage = get_current_codepage(); a-...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
247,386,193,757,359,900,000,000,000,000,000,000,000
16
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
static int cac_process_CCC(sc_card_t *card, cac_private_data_t *priv) { u8 *tl = NULL, *val = NULL; size_t tl_len, val_len; int r; r = cac_read_file(card, CAC_FILE_TAG, &tl, &tl_len); if (r < 0) goto done; r = cac_read_file(card, CAC_FILE_VALUE, &val, &val_len); if (r < 0) goto done; r = cac_parse_CCC(c...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
292,070,642,965,761,130,000,000,000,000,000,000,000
23
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
XML_GetSpecifiedAttributeCount(XML_Parser parser) { if (parser == NULL) return -1; return parser->m_nSpecifiedAtts; }
0
[ "CWE-611" ]
libexpat
11f8838bf99ea0a6f0b76f9760c43704d00c4ff6
38,859,987,341,626,653,000,000,000,000,000,000,000
6
xmlparse.c: Fix extraction of namespace prefix from XML name (#186)
CONNECTION* mutt_conn_find (const CONNECTION* start, const ACCOUNT* account) { CONNECTION* conn; ciss_url_t url; char hook[LONG_STRING]; /* account isn't actually modified, since url isn't either */ mutt_account_tourl ((ACCOUNT*) account, &url); url.path = NULL; url_ciss_tostring (&url, hook, sizeof (hoo...
0
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
270,636,315,268,632,240,000,000,000,000,000,000,000
55
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
inline bool is_cs_specified() const { return m_cs_specified; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
335,991,279,002,326,530,000,000,000,000,000,000,000
4
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
_prevA(int visited) { HmarkerList *hl = Currentbuf->hmarklist; BufferPoint *po; Anchor *an, *pan; int i, x, y, n = searchKeyNum(); ParsedURL url; if (Currentbuf->firstLine == NULL) return; if (!hl || hl->nmark == 0) return; an = retrieveCurrentAnchor(Currentbuf); if (visited != T...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
239,637,834,155,339,320,000,000,000,000,000,000,000
81
Make temporary directory safely when ~/.w3m is unwritable
static void mld_ifc_event(struct inet6_dev *idev) { if (mld_in_v1_mode(idev)) return; idev->mc_ifc_count = idev->mc_qrv; mld_ifc_start_work(idev, 1); }
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
305,286,068,747,188,450,000,000,000,000,000,000,000
8
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
static void mem_cgroup_charge_statistics(struct mem_cgroup *memcg, bool file, int nr_pages) { preempt_disable(); if (file) __this_cpu_add(memcg->stat->count[MEM_CGROUP_STAT_CACHE], nr_pages); else __this_cpu_add(memcg->stat->count[MEM_CGROUP_STAT_RSS], nr_pages); /* pagein of a big page is an ev...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
287,740,743,274,043,700,000,000,000,000,000,000,000
24
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void kdb_send_sig(struct task_struct *t, int sig) { static struct task_struct *kdb_prev_t; int new_t, ret; if (!spin_trylock(&t->sighand->siglock)) { kdb_printf("Can't do kill command now.\n" "The sigmask lock is held somewhere else in " "kernel, try again later\n"); return; } new_t = kdb_prev_t !=...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
41,931,629,993,591,723,000,000,000,000,000,000,000
30
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev) { struct nlattr *ieee, *app; struct dcb_app_type *itr; const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops; int dcbx; int err; if (nla_put_string(skb, DCB_ATTR_IFNAME, netdev->name)) return -EMSGSIZE; ieee = nla_nest_start(skb, DCB_A...
0
[ "CWE-399" ]
linux-2.6
29cd8ae0e1a39e239a3a7b67da1986add1199fc0
239,189,935,997,896,300,000,000,000,000,000,000,000
106
dcbnl: fix various netlink info leaks The dcb netlink interface leaks stack memory in various places: * perm_addr[] buffer is only filled at max with 12 of the 32 bytes but copied completely, * no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand, so we're leaking up to 58 bytes for ieee_ets structs...
struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, unsigned long *flags) { struct sighand_struct *sighand; rcu_read_lock(); for (;;) { sighand = rcu_dereference(tsk->sighand); if (unlikely(sighand == NULL)) break; /* * This sighand can be already freed and even reused, but *...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
104,712,798,194,366,150,000,000,000,000,000,000,000
31
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
R_API char *r_sys_getenv(const char *key) { #if __WINDOWS__ DWORD dwRet; LPTSTR envbuf = NULL, key_ = NULL, tmp_ptr; char *val = NULL; if (!key) { return NULL; } envbuf = (LPTSTR)malloc (sizeof (TCHAR) * TMP_BUFSIZE); if (!envbuf) { goto err_r_sys_get_env; } key_ = r_sys_conv_utf8_to_win (key); dwRet = G...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
31,044,195,807,973,428,000,000,000,000,000,000,000
44
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static __always_inline ssize_t __mcopy_atomic_hugetlb(struct mm_struct *dst_mm, struct vm_area_struct *dst_vma, unsigned long dst_start, unsigned long src_start, unsigned long len, bool zeropage) { int vm_alloc_shared = dst_vma->vm_flags & VM_SHARED; int vm_share...
0
[ "CWE-862", "CWE-863" ]
linux
29ec90660d68bbdd69507c1c8b4e33aa299278b1
325,772,773,157,852,800,000,000,000,000,000,000,000
211
userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas After the VMA to register the uffd onto is found, check that it has VM_MAYWRITE set before allowing registration. This way we inherit all common code checks before allowing to fill file holes in shmem and hugetlbfs with UFFDIO_COPY. The userfaultf...
format_SET_L4_DST_PORT(const struct ofpact_l4_port *a, const struct ofpact_format_params *fp) { ds_put_format(fp->s, "%smod_tp_dst:%s%d", colors.param, colors.end, a->port); }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
123,924,364,467,126,640,000,000,000,000,000,000,000
6
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
int pin_user_pages_fast(unsigned long start, int nr_pages, unsigned int gup_flags, struct page **pages) { /* FOLL_GET and FOLL_PIN are mutually exclusive. */ if (WARN_ON_ONCE(gup_flags & FOLL_GET)) return -EINVAL; gup_flags |= FOLL_PIN; return internal_get_user_pages_fast(start, nr_pages, gup_flags, pages); }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
239,975,584,504,229,150,000,000,000,000,000,000,000
10
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
bool Smb4KGlobal::modifyCursor() { return p->modifyCursor; }
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
309,493,205,798,786,000,000,000,000,000,000,000,000
4
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
void show_state_filter(unsigned long state_filter) { struct task_struct *g, *p; #if BITS_PER_LONG == 32 printk(KERN_INFO " task PC stack pid father\n"); #else printk(KERN_INFO " task PC stack pid father\n"); #endif rcu_read_lock(); do_each_thread(g, p) { /* * r...
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
18,736,595,977,418,837,000,000,000,000,000,000,000
34
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
static inline unsigned long *get_pageblock_bitmap(struct page *page, unsigned long pfn) { #ifdef CONFIG_SPARSEMEM return __pfn_to_section(pfn)->pageblock_flags; #else return page_zone(page)->pageblock_flags; #endif /* CONFIG_SPARSEMEM */ }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
212,969,132,248,966,240,000,000,000,000,000,000,000
9
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
bool ZrtpQueue::isMultiStreamAvailable() { if (zrtpEngine != NULL) return zrtpEngine->isMultiStreamAvailable(); return false; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
38,542,497,742,499,440,000,000,000,000,000,000,000
5
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
X509* SSL_SESSION::GetPeerX509() const { return peerX509_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
259,114,747,995,565,660,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entries TSRMLS_DC) { sapi_post_entry *p=post_entries; while (p->content_type) { if (sapi_register_post_entry(p TSRMLS_CC) == FAILURE) { return FAILURE; } p++; } return SUCCESS; }
0
[ "CWE-190", "CWE-79" ]
php-src
996faf964bba1aec06b153b370a7f20d3dd2bb8b
194,977,260,955,778,680,000,000,000,000,000,000,000
12
Update header handling to RFC 7230
find_by_thp(struct tang_keys_info* tki, const char* target) { if (!tki) { return NULL; } json_auto_t* keys = json_deep_copy(tki->m_keys); json_array_extend(keys, tki->m_rotated_keys); size_t idx; json_t* jwk; const char** hashes = supported_hashes(); json_array_foreach(keys, id...
1
[ "CWE-200" ]
tang
e82459fda10f0630c3414ed2afbc6320bb9ea7c9
331,859,525,073,142,440,000,000,000,000,000,000,000
36
keys: move signing part out of find_by_thp() and to find_jws() (#81) Handle just signing keys in find_jws(), to make sure we are responding only to proper queries. Tests were also failing to detect this issue and were updated accordingly. Issue discovered by Twitter Kernel and OS team during a source code aud...
static int spl_object_storage_compare_info(zval *e1, zval *e2) /* {{{ */ { spl_SplObjectStorageElement *s1 = (spl_SplObjectStorageElement*)Z_PTR_P(e1); spl_SplObjectStorageElement *s2 = (spl_SplObjectStorageElement*)Z_PTR_P(e2); zval result; if (compare_function(&result, &s1->inf, &s2->inf) == FAILURE) { return ...
0
[ "CWE-119", "CWE-787" ]
php-src
61cdd1255d5b9c8453be71aacbbf682796ac77d4
17,631,903,283,176,170,000,000,000,000,000,000,000
12
Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
static void be32_to_cpu_n(const u8 *_source, u8 *_target, u32 n) { const __be32 *source = (const __be32 *)_source; u32 *target = (u32 *)_target; u32 i; for (i = 0; i < n/4; i++) target[i] = be32_to_cpu(source[i]); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
43,515,225,422,899,570,000,000,000,000,000,000,000
9
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...
static int action_list(struct transaction_t *txn, int rights) { int ret = 0, precond; char mboxlist[MAX_MAILBOX_PATH+1]; struct stat sbuf; time_t lastmod; const char *etag; unsigned level = 0; struct buf *body = &txn->resp_body.payload; struct list_cal_rock lrock; /* Check rights */...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
104,582,359,411,336,130,000,000,000,000,000,000,000
164
HTTP: don't overrun buffer when parsing strings with sscanf()
int Field_longlong::store(double nr) { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; Converter_double_to_longlong conv(nr, unsigned_flag); if (unlikely(conv.error())) set_warning(ER_WARN_DATA_OUT_OF_RANGE, 1); int8store(ptr, conv.result()); return conv.error(); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
49,526,666,126,224,630,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...
static int l2cap_rx_state_recv(struct l2cap_chan *chan, struct l2cap_ctrl *control, struct sk_buff *skb, u8 event) { int err = 0; bool skb_in_use = false; BT_DBG("chan %p, control %p, skb %p, event %d", chan, control, skb, event); switch (event) { case L2CAP_EV_RECV_IFRAME: switch (...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
262,955,605,944,173,050,000,000,000,000,000,000,000
133
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...
STATIC void GC_CALLBACK GC_default_on_abort(const char *msg) { GC_find_leak = FALSE; /* disable at-exit GC_gcollect() */ if (msg != NULL) { # if defined(MSWIN32) GC_win32_MessageBoxA(msg, "Fatal error in GC", MB_ICONERROR | MB_OK); /* Also duplicate msg to GC log file. */ # endif...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
283,314,017,138,459,300,000,000,000,000,000,000,000
39
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static void cli_sesssetup_blob_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); struct cli_sesssetup_blob_state *state = tevent_req_data( req, struct cli_sesssetup_blob_state); struct cli_state *cli = state->cli; uint8_t wct; uint16_t *vwv; uint3...
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
231,788,133,120,001,700,000,000,000,000,000,000,000
107
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
inline Context::Context() : root_context_(this) {}
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
187,413,483,624,325,070,000,000,000,000,000,000,000
1
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
static RList * cpfind_str (RCore *core, RBinJavaObj *obj, const char *cmd) { if (!cmd) { return r_list_new (); } IFDBG r_cons_printf ("Looking for str: %s (%d)\n", cmd, strlen (cmd)); return r_bin_java_find_cp_const_by_val ( obj, (const ut8 *) cmd, strlen (cmd), R_BIN_JAVA_CP_UTF8); }
0
[ "CWE-703", "CWE-193" ]
radare2
ced0223c7a1b3b5344af315715cd28fe7c0d9ebc
304,806,909,561,286,400,000,000,000,000,000,000,000
7
Fix unmatched array length in core_java.c (issue #16304) (#16313)
struct sctp_chunk *sctp_make_ecne(const struct sctp_association *asoc, const __u32 lowest_tsn) { struct sctp_chunk *retval; sctp_ecnehdr_t ecne; ecne.lowest_tsn = htonl(lowest_tsn); retval = sctp_make_control(asoc, SCTP_CID_ECN_ECNE, 0, sizeof(sctp_ecnehdr_t)); if (!retval) goto nodata; retval->...
0
[ "CWE-20", "CWE-399" ]
linux
9de7922bc709eee2f609cd01d98aaedc4cf5ea74
138,671,285,478,418,970,000,000,000,000,000,000,000
17
net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for ASCONF chunk") added basic verification of ASCONF chunks, however, it is still possible to remotely crash a server by sending a special crafted ASCONF chunk, even up to pre 2.6.12 kernels: ...
static void vmcs_write16(unsigned long field, u16 value) { vmcs_writel(field, value); }
0
[ "CWE-20" ]
linux-2.6
16175a796d061833aacfbd9672235f2d2725df65
42,623,246,883,312,900,000,000,000,000,000,000,000
4
KVM: VMX: Don't allow uninhibited access to EFER on i386 vmx_set_msr() does not allow i386 guests to touch EFER, but they can still do so through the default: label in the switch. If they set EFER_LME, they can oops the host. Fix by having EFER access through the normal channel (which will check for EFER_LME) even o...
megasas_read_fw_status_reg_gen2(struct megasas_instance *instance) { return readl(&instance->reg_set->outbound_scratch_pad_0); }
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
235,885,193,788,451,400,000,000,000,000,000,000,000
4
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
void WebContents::DidFinishNavigation( content::NavigationHandle* navigation_handle) { if (owner_window_) { owner_window_->NotifyLayoutWindowControlsOverlay(); } if (!navigation_handle->HasCommitted()) return; bool is_main_frame = navigation_handle->IsInMainFrame(); content::RenderFrameHost* fram...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
280,236,753,115,909,970,000,000,000,000,000,000,000
70
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
_enforce_job_mem_limit(void) { List steps; ListIterator step_iter, job_limits_iter; job_mem_limits_t *job_limits_ptr; step_loc_t *stepd; int fd, i, job_inx, job_cnt; uint16_t vsize_factor; uint64_t step_rss, step_vsize; job_step_id_msg_t acct_req; job_step_stat_t *resp = NULL; struct job_mem_info { uint32_t...
0
[ "CWE-284" ]
slurm
92362a92fffe60187df61f99ab11c249d44120ee
60,195,972,167,104,560,000,000,000,000,000,000,000
152
Fix security issue in _prolog_error(). Fix security issue caused by insecure file path handling triggered by the failure of a Prolog script. To exploit this a user needs to anticipate or cause the Prolog to fail for their job. (This commit is slightly different from the fix to the 15.08 branch.) CVE-2016-10030.
static int jpc_sop_dumpparms(jpc_ms_t *ms, FILE *out) { jpc_sop_t *sop = &ms->parms.sop; fprintf(out, "seqno = %"PRIuFAST16";\n", sop->seqno); return 0; }
0
[ "CWE-20", "CWE-399" ]
jasper
ba2b9d000660313af7b692542afbd374c5685865
327,303,167,973,400,600,000,000,000,000,000,000,000
6
Ensure that not all tiles lie outside the image area.
*/ void re_yyset_column (int _column_no , yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* column is only valid if an input buffer exists. */ if (! YY_CURRENT_BUFFER ) YY_FATAL_ERROR( "re_yyset_column called with no buffer" ); yycolumn = _column_no...
0
[ "CWE-476", "CWE-703", "CWE-125" ]
yara
3119b232c9c453c98d8fa8b6ae4e37ba18117cd4
201,974,058,050,123,900,000,000,000,000,000,000,000
10
re_lexer: Make reading escape sequences more robust (#586) * Add test for issue #503 * re_lexer: Make reading escape sequences more robust This commit fixes parsing incomplete escape sequences at the end of a regular expression and parsing things like \xxy (invalid hex digits) which before were silently turned...
static int rbd_snap_size(struct rbd_device *rbd_dev, u64 snap_id, u64 *snap_size) { rbd_assert(rbd_image_format_valid(rbd_dev->image_format)); if (snap_id == CEPH_NOSNAP) { *snap_size = rbd_dev->header.image_size; } else if (rbd_dev->image_format == 1) { u32 which; which = rbd_dev_snap_index(rbd_dev, snap...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
103,285,576,031,505,440,000,000,000,000,000,000,000
26
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
Type_handler_hybrid_field_type::Type_handler_hybrid_field_type() :m_type_handler(&type_handler_double) { }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
13,565,074,438,335,992,000,000,000,000,000,000,000
4
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static inline int tcp_space(const struct sock *sk) { return tcp_win_from_space(sk->sk_rcvbuf - atomic_read(&sk->sk_rmem_alloc)); }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
53,620,239,552,915,250,000,000,000,000,000,000,000
5
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
_inplace_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans) { cairo_image_span_renderer_t *r = abstract_renderer; uint8_t *mask; int x0, x1; if (num_spans == 0) return CAIRO_STATUS_SUCCESS; if (num_spans == 2 && spans[0].coverage == 0xff) ...
1
[ "CWE-787" ]
cairo
c986a7310bb06582b7d8a566d5f007ba4e5e75bf
221,324,941,299,562,420,000,000,000,000,000,000,000
76
image: Enable inplace compositing with opacities for general routines On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ===...
const cmsDICTentry* CMSEXPORT cmsDictGetEntryList(cmsHANDLE hDict) { _cmsDICT* dict = (_cmsDICT*) hDict; if (dict == NULL) return NULL; return dict ->head; }
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
264,800,075,628,540,050,000,000,000,000,000,000,000
7
Fixes from coverity check
njs_vm_posted(njs_vm_t *vm) { return njs_posted_events(vm) || njs_promise_events(vm); }
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
166,421,567,436,725,040,000,000,000,000,000,000,000
4
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
RZ_API void rz_core_analysis_coderefs(RzCore *core, ut64 addr) { RzAnalysisFunction *fcn = rz_analysis_get_fcn_in(core->analysis, addr, -1); if (fcn) { const char *me = fcn->name; RzListIter *iter; RzAnalysisXRef *xref; RzList *xrefs = rz_analysis_function_get_xrefs_from(fcn); rz_cons_printf("agn %s\n", me)...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
56,581,472,128,390,860,000,000,000,000,000,000,000
19
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
void pgpCleanDig(pgpDig dig) { if (dig != NULL) { pgpDigParamsFree(dig->signature); pgpDigParamsFree(dig->pubkey); memset(dig, 0, sizeof(*dig)); } return; }
0
[ "CWE-347", "CWE-284" ]
rpm
bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8
159,694,892,649,456,780,000,000,000,000,000,000,000
9
Validate and require subkey binding signatures on PGP public keys All subkeys must be followed by a binding signature by the primary key as per the OpenPGP RFC, enforce the presence and validity in the parser. The implementation is as kludgey as they come to work around our simple-minded parser structure without touc...
DEFUN(svI, SAVE_IMAGE, "Save inline image") { CurrentKeyData = NULL; /* not allowed in w3m-control: */ do_download = TRUE; followI(); do_download = FALSE; }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
199,957,852,331,515,800,000,000,000,000,000,000,000
7
Make temporary directory safely when ~/.w3m is unwritable
void HGraphBuilder::VisitModulePath(ModulePath* module) { UNREACHABLE(); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
298,589,258,583,322,970,000,000,000,000,000,000,000
3
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...