func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
getTiledChunkOffsetTableSize(const Header& header) { // // Save the dataWindow information // const Box2i &dataWindow = header.dataWindow(); // // Precompute level and tile information. // int* numXTiles; int* numYTiles; int numXLevels; int numYLevels; precalculate...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
291,936,858,853,616,500,000,000,000,000,000,000,000
73
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
QPDFObjectHandle::isOperator() { dereference(); return QPDFObjectTypeAccessor<QPDF_Operator>::check(m->obj.getPointer()); }
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
7,070,664,546,696,604,000,000,000,000,000,000,000
5
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
gerbv_image_t *merge_images (int type) { gint i, filecount, img; gerbv_image_t *out; gerbv_layertype_t layertype; struct l_image_info { gerbv_image_t *image; gerbv_user_transformation_t *transform; } *images; images=(struct l_image_info *)g_new0(struct l_image_info,1); out = NULL; switch(type) { case CAL...
0
[ "CWE-200" ]
gerbv
319a8af890e4d0a5c38e6d08f510da8eefc42537
113,386,624,532,312,950,000,000,000,000,000,000,000
54
Remove local alias to parameter array Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402
void CLASS canon_sraw_load_raw() { struct jhead jh; short *rp = 0, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow = 0, jcol = 0, pix[3], c; int v[3] = {0, 0, 0}, ver, hue; #ifdef LIBRAW_LIBRARY_BUILD int saved_w = width, saved_h = height; #endif char *cp; if (!ljpeg_start(&jh, 0) || jh.clrs < 4) ...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
290,999,514,024,657,960,000,000,000,000,000,000,000
170
parse_qt: possible integer overflow
BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs, const char *backing_file) { char *filename_full = NULL; char *backing_file_full = NULL; char *filename_tmp = NULL; int is_protocol = 0; BlockDriverState *curr_bs = NULL; BlockDriverState *retval = NULL; if (!bs || !bs->...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
193,354,849,919,072,100,000,000,000,000,000,000,000
61
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...
hook_process_run (struct t_hook *hook_process) { int pipe_stdout[2], pipe_stderr[2], timeout, max_calls; long interval; pid_t pid; /* create pipe for child process (stdout) */ if (pipe (pipe_stdout) < 0) { (void) (HOOK_PROCESS(hook_process, callback)) (hook_process->call...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
262,859,996,130,924,500,000,000,000,000,000,000,000
99
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
dissect_kafka_find_coordinator_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { if (api_version >= 1) { offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset); } /* error_code */ offset ...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
94,053,221,021,222,210,000,000,000,000,000,000,000
24
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
inline uint8_t* WireFormatLite::WriteDoubleNoTagToArray( const RepeatedField<double>& value, uint8_t* target) { return WriteFixedNoTagToArray(value, WriteDoubleNoTagToArray, target); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
70,070,047,662,021,140,000,000,000,000,000,000,000
4
Apply patch
grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock) { struct grub_ext2_data *data = node->data; struct grub_ext2_inode *inode = &node->inode; grub_disk_addr_t blknr = -1; unsigned int blksz = EXT2_BLOCK_SIZE (data); int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data); if (inode->flags & gru...
0
[ "CWE-119" ]
grub
ac8cac1dac50daaf1c390d701cca3b55e16ee768
186,699,969,398,851,100,000,000,000,000,000,000,000
146
* grub-core/fs/ext2.c: Remove variable length arrays.
static void set_sock_ids_by_socket(struct mdesc_handle *hp, u64 mp) { int idx = 1; mdesc_for_each_node_by_name(hp, mp, "socket") { u64 a; mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) { u64 t = mdesc_arc_target(hp, a); const char *name; const u64 *id; name = mdesc_node_name(hp, t); if (strcm...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
252,148,346,207,256,030,000,000,000,000,000,000,000
23
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
static int opfsub(RAsm *a, ut8 *data, const Opcode *op) { int l = 0; switch (op->operands_count) { case 1: if ( op->operands[0].type & OT_MEMORY ) { if ( op->operands[0].type & OT_DWORD ) { data[l++] = 0xd8; data[l++] = 0x20 | op->operands[0].regs[0]; } else if ( op->operands[0].type & OT_QWORD ) { ...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
radare2
9b46d38dd3c4de6048a488b655c7319f845af185
20,424,910,614,023,955,000,000,000,000,000,000,000
36
Fix #12372 and #12373 - Crash in x86 assembler (#12380) 0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL- leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL- mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
load_float(UnpicklerObject *self) { PyObject *value; char *endptr, *s; Py_ssize_t len; double d; if ((len = _Unpickler_Readline(self, &s)) < 0) return -1; if (len < 2) return bad_readline(); errno = 0; d = PyOS_string_to_double(s, &endptr, PyExc_OverflowError); if (...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
209,836,927,595,343,060,000,000,000,000,000,000,000
27
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
CtPtr ProtocolV1::send_client_banner() { ldout(cct, 20) << __func__ << dendl; state = CONNECTING; bufferlist bl; bl.append(CEPH_BANNER, strlen(CEPH_BANNER)); return WRITE(bl, handle_client_banner_write); }
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
176,272,789,274,412,140,000,000,000,000,000,000,000
8
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
*/ static inline zval *add_next_index_object(zval *arg, zval *tmp) { HashTable *symtable; if (Z_TYPE_P(arg) == IS_OBJECT) { symtable = Z_OBJPROP_P(arg); } else { symtable = Z_ARRVAL_P(arg); } return zend_hash_next_index_insert(symtable, tmp);
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
62,716,101,854,653,990,000,000,000,000,000,000,000
12
Disable rsh/ssh functionality in imap by default (bug #77153)
static int nf_tables_newchain(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { struct nftables_pernet *nft_net = nft_pernet(info->net); struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_next(info->net); u8 family = info->nfmsg->nfgen_family; str...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
212,616,937,543,036,340,000,000,000,000,000,000,000
100
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static inline zend_long parse_iv2(const unsigned char *p, const unsigned char **q) { char cursor; zend_long result = 0; int neg = 0; switch (*p) { case '-': neg++; /* fall-through */ case '+': p++; } while (1) { cursor = (char)*p; if (cursor >= '0' && cursor <= '9') { result = result * 10 + ...
0
[]
php-src
d76b293ac71aa5bd4e9a433192afef6e0dd5a4ee
87,591,803,614,288,360,000,000,000,000,000,000,000
27
forgot to commit this one
static inline int UT64_MUL(ut64 *r, ut64 a, ut64 b) { if (a && UT64_MAX / a < b) { return 0; } if (r) { *r = a * b; } return 1; }
0
[ "CWE-476" ]
radare2
1ea23bd6040441a21fbcfba69dce9a01af03f989
36,863,582,031,753,505,000,000,000,000,000,000,000
9
Fix #6816 - null deref in r_read_*
static int x25_listen(struct socket *sock, int backlog) { struct sock *sk = sock->sk; int rc = -EOPNOTSUPP; lock_sock(sk); if (sk->sk_state != TCP_LISTEN) { memset(&x25_sk(sk)->dest_addr, 0, X25_ADDR_LEN); sk->sk_max_ack_backlog = backlog; sk->sk_state = TCP_LISTEN; rc = 0; } release_sock(sk); ...
0
[]
net
7781607938c8371d4c2b243527430241c62e39c2
104,818,320,974,163,540,000,000,000,000,000,000,000
16
net/x25: Fix null-ptr-deref caused by x25_disconnect When the link layer is terminating, x25->neighbour will be set to NULL in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is shown below. (Thread 1) | (Thread 2...
static CImg<T> get_load_off(CImgList<tf>& primitives, CImgList<tc>& colors, std::FILE *const file) { return CImg<T>().load_off(primitives,colors,file); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
72,297,872,032,346,980,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bool ring_buffer_record_is_set_on(struct trace_buffer *buffer) { return !(atomic_read(&buffer->record_disabled) & RB_BUFFER_OFF); }
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
242,187,469,984,044,050,000,000,000,000,000,000,000
4
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
xmlSchemaPIllegalAttrErr(xmlSchemaParserCtxtPtr ctxt, xmlParserErrors error, xmlSchemaBasicItemPtr ownerComp ATTRIBUTE_UNUSED, xmlAttrPtr attr) { xmlChar *strA = NULL, *strB = NULL; xmlSchemaFormatNodeForError(&strA, ACTXT_CAST ctxt, attr->parent); xmlSchemaErr4(ACTXT_CAST ctxt, error, (xmlNode...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
119,800,371,213,025,650,000,000,000,000,000,000,000
15
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) { tga_source_ptr source = (tga_source_ptr) sinfo; JDIMENSION source_row; /* Compute row of source that maps to current_row of normal order */ /* For now, assume image is bottom-up and not interlaced. */ /* NEEDS WORK to support interlaced images! ...
0
[ "CWE-369" ]
libjpeg-turbo
82923eb93a2eacf4a593e00e3e672bbb86a8a3a0
191,559,552,519,026,160,000,000,000,000,000,000,000
18
Check image size when reading targa file Throw an error when image width or height is 0. Fixes mozilla/mozjpeg#140, closes #7.
static bool is_chained_work(struct workqueue_struct *wq) { struct worker *worker; worker = current_wq_worker(); /* * Return %true iff I'm a worker execuing a work item on @wq. If * I'm @worker, it's safe to dereference it without locking. */ return worker && worker->current_pwq->wq == wq; }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
164,758,727,284,359,150,000,000,000,000,000,000,000
11
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
GF_Err rloc_box_dump(GF_Box *a, FILE * trace) { GF_RelativeLocationPropertyBox *ptr = (GF_RelativeLocationPropertyBox *)a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "RelativeLocationPropertyBox", trace); gf_fprintf(trace, "horizontal_offset=\"%d\" vertical_offset=\"%d\">\n", ptr->horizontal_offset, ptr...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
91,834,792,648,725,680,000,000,000,000,000,000,000
9
fixed #2138
static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb) { struct sock *sk = skb->sk; int queue_index = sk_tx_queue_get(sk); if (queue_index < 0 || skb->ooo_okay || queue_index >= dev->real_num_tx_queues) { int new_index = get_xps_queue(dev, skb); if (new_index < 0) new_index = skb_tx_h...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
37,003,899,928,258,974,000,000,000,000,000,000,000
21
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
gdm_session_settings_set_language_name (GdmSessionSettings *settings, const char *language_name) { g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings)); if (settings->priv->language_name == NULL || strcmp (settings->priv->language_name, langu...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
8,574,028,068,381,290,000,000,000,000,000,000,000
11
Store the face and dmrc files in a cache. Refer to bug #565151.
tiff_save_read (thandle_t handle, tdata_t buf, tsize_t size) { return -1; }
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
86,171,603,792,095,480,000,000,000,000,000,000,000
4
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
static inline bool check_attr(const struct MFT_REC *rec, const struct ATTRIB *attr, struct ntfs_sb_info *sbi) { u32 asize = le32_to_cpu(attr->size); u32 rsize = 0; u64 dsize, svcn, evcn; u16 run_off; /* Check the fixed part of the attribute record header. */ if (asize >= sbi->record_size || ...
0
[ "CWE-416" ]
linux
f26967b9f7a830e228bb13fb41bd516ddd9d789d
44,095,414,079,299,450,000,000,000,000,000,000,000
90
fs/ntfs3: Fix invalid free in log_replay log_read_rst() returns ENOMEM error when there is not enough memory. In this case, if info is returned without initialization, it attempts to kfree the uninitialized info->r_page pointer. This patch moves the memset initialization code to before log_read_rst() is called. Repor...
qf_fill_buffer(qf_list_T *qfl, buf_T *buf, qfline_T *old_last, int qf_winid) { linenr_T lnum; qfline_T *qfp; int old_KeyTyped = KeyTyped; list_T *qftf_list = NULL; listitem_T *qftf_li = NULL; if (old_last == NULL) { if (buf != curbuf) { internal_error("qf_fill_buffer()"); retur...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
43,788,346,025,072,200,000,000,000,000,000,000,000
111
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
static int uvc_suspend(struct usb_interface *intf, pm_message_t message) { struct uvc_device *dev = usb_get_intfdata(intf); struct uvc_streaming *stream; uvc_trace(UVC_TRACE_SUSPEND, "Suspending interface %u\n", intf->cur_altsetting->desc.bInterfaceNumber); /* Controls are cached on the fly so they don't need t...
0
[ "CWE-269" ]
linux
68035c80e129c4cfec659aac4180354530b26527
187,761,291,567,228,980,000,000,000,000,000,000,000
27
media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked up the following WARNING from the UVC chain scanning code: | list_add double add: new=ffff880069084010, prev=ffff880069084010, | next=ffff880067d22298. | ----------...
escape_toggle_multipart_type (int argc, char **argv, compose_env_t *env) { env->alt = !env->alt; report_multipart_type (env); return 0; }
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
73,952,266,783,794,120,000,000,000,000,000,000,000
6
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, ParamListInfo params, char *completionTag) { Oid matviewOid; Relation matviewRel; RewriteRule *rule; List *actions; Query *dataQuery; Oid tableSpace; Oid relowner; Oid OIDNewHeap; DestReceiver *dest; bool concurrent; ...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
111,281,582,879,376,820,000,000,000,000,000,000,000
178
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
static int handle_emulation_failure(struct kvm_vcpu *vcpu) { int r = EMULATE_DONE; ++vcpu->stat.insn_emulation_fail; trace_kvm_emulate_insn_failed(vcpu); if (!is_guest_mode(vcpu)) { vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR; vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION; vcpu->run->inter...
1
[ "CWE-362" ]
linux
a2b9e6c1a35afcc0973acb72e591c714e78885ff
124,815,011,205,506,080,000,000,000,000,000,000,000
16
KVM: x86: Don't report guest userspace emulation error to userspace Commit fc3a9157d314 ("KVM: X86: Don't report L2 emulation failures to user-space") disabled the reporting of L2 (nested guest) emulation failures to userspace due to race-condition between a vmexit and the instruction emulator. The same rational appli...
rb_f_sub_bang(argc, argv) int argc; VALUE *argv; { return rb_str_sub_bang(argc, argv, uscore_get()); }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
68,487,463,756,428,590,000,000,000,000,000,000,000
6
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
evdev_init_calibration(struct evdev_device *device, struct libinput_device_config_calibration *calibration) { device->base.config.calibration = calibration; calibration->has_matrix = evdev_calibration_has_matrix; calibration->set_matrix = evdev_calibration_set_matrix; calibration->get_matrix = evdev_calib...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
196,576,359,049,753,900,000,000,000,000,000,000,000
10
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
int service_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **envp __attribute__((unused))) { int opt; const char *prefix; initialize_nntp_error_table(); if (geteuid() == 0) fatal("must run as the Cyrus user", EC_USAGE); setproctitle_init(argc, argv, envp); ...
0
[ "CWE-287" ]
cyrus-imapd
77903669e04c9788460561dd0560b9c916519594
163,162,101,134,857,900,000,000,000,000,000,000,000
88
Secunia SA46093 - make sure nntp authentication completes Discovered by Stefan Cornelius, Secunia Research The vulnerability is caused due to the access restriction for certain commands only checking whether or not variable "nntp_userid" is non-NULL, without performing additional checks to verify that a complete, suc...
void populate (byte* source, size_t num) { size_ = num; data_ = (byte*)std::malloc(size_); type_ = bMemory; std::memcpy(data_, source, size_); }
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
29,212,620,682,195,925,000,000,000,000,000,000,000
7
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
void Database::setBlob(const QByteArray &hash, const QByteArray &data) { if (hash.isEmpty() || data.isEmpty()) return; QSqlQuery query; query.prepare(QLatin1String("REPLACE INTO `blobs` (`hash`, `data`, `seen`) VALUES (?, ?, datetime('now'))")); query.addBindValue(hash); query.addBindValue(data); query.exec()...
0
[ "CWE-310" ]
mumble
5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e
267,290,355,884,637,770,000,000,000,000,000,000,000
11
Explicitly remove file permissions for settings and DB
add_bitset(regex_t* reg, BitSetRef bs) { BB_ADD(reg, bs, SIZE_BITSET); return 0; }
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
219,773,000,028,204,100,000,000,000,000,000,000,000
5
fix #87: Read unknown address in onig_error_code_to_str()
void __init ipc_init_proc_interface(const char *path, const char *header, int ids, int (*show)(struct seq_file *, void *)) { struct proc_dir_entry *pde; struct ipc_proc_iface *iface; iface = kmalloc(sizeof(*iface), GFP_KERNEL); if (!iface) return; iface->path = path; iface->header = header; iface->ids = ids...
0
[ "CWE-362", "CWE-401" ]
linux
b9a532277938798b53178d5a66af6e2915cb27cf
219,256,185,901,768,460,000,000,000,000,000,000,000
22
Initialize msg/shm IPC objects before doing ipc_addid() As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before having initialized the IPC object state. Yes, we initialize the IPC object in a locked state, but with all the lockless RCU lookup work, that IPC object lock no longer means that the state c...
static unsigned int fanout_demux_rnd(struct packet_fanout *f, struct sk_buff *skb, unsigned int num) { return reciprocal_divide(prandom_u32(), num); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
76,209,529,459,924,370,000,000,000,000,000,000,000
6
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static inline int skb_try_make_writable(struct sk_buff *skb, unsigned int write_len) { return skb_cloned(skb) && !skb_clone_writable(skb, write_len) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
279,033,632,002,589,430,000,000,000,000,000,000,000
6
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static void add_timer_randomness(struct timer_rand_state *state, unsigned num) { struct { cycles_t cycles; long jiffies; unsigned num; } sample; long delta, delta2, delta3; preempt_disable(); /* if over the trickle threshold, use only 1 in 4096 samples */ if (input_pool.entropy_count > trickle_thresh && ...
0
[ "CWE-703" ]
linux
87c48fa3b4630905f98268dde838ee43626a060c
303,935,827,370,787,000,000,000,000,000,000,000,000
58
ipv6: make fragment identifications less predictable IPv6 fragment identification generation is way beyond what we use for IPv4 : It uses a single generator. Its not scalable and allows DOS attacks. Now inetpeer is IPv6 aware, we can use it to provide a more secure and scalable frag ident generator (per destination, ...
inline void* ZoneAllocationPolicy::New(size_t size) { ASSERT(zone_); return zone_->New(static_cast<int>(size)); }
0
[ "CWE-119" ]
node
fcb9145e291e8cb82164bc1fe3db1c1dae219b55
200,214,135,959,813,040,000,000,000,000,000,000,000
4
deps: backport 3a9bfec from v8 upstream Some of the logic from `zone.cc` is found in `zone-inl.h` in this release stream. Original commit message: Fix overflow issue in Zone::New When requesting a large allocation near the end of the address space, the computation could overflow and erroneously *not* grow the...
setup_look_behind(Node* node, regex_t* reg, ScanEnv* env) { int r, len; AnchorNode* an = NANCHOR(node); r = get_char_length_tree(an->target, reg, &len); if (r == 0) an->char_len = len; else if (r == GET_CHAR_LEN_VARLEN) r = ONIGERR_INVALID_LOOK_BEHIND_PATTERN; else if (r == GET_CHAR_LEN_TOP_ALT_VAR...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
164,541,419,897,283,240,000,000,000,000,000,000,000
19
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
BSONObj expectedResult() { return BSON("" << 1); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
134,073,187,128,394,400,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
restart_timeout(NCR_Instance inst, double delay) { /* Check if we can transmit */ if (inst->tx_suspended) { assert(!inst->timer_running); return; } /* Stop old timer if running */ if (inst->timer_running) SCH_RemoveTimeout(inst->timeout_id); /* Start new timer for transmission */ inst->timeo...
0
[]
chrony
a78bf9725a7b481ebff0e0c321294ba767f2c1d8
194,933,738,884,114,000,000,000,000,000,000,000,000
19
ntp: restrict authentication of server/peer to specified key When a server/peer was specified with a key number to enable authentication with a symmetric key, packets received from the server/peer were accepted if they were authenticated with any of the keys contained in the key file and not just the specified key. T...
struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause, unsigned char *diagnostic, int route_frame) { struct rose_neigh *res = NULL; struct rose_node *node; int failed = 0; int i; if (!route_frame) spin_lock_bh(&rose_node_list_lock); for (node = rose_node_list; node != NULL; node = node->nex...
0
[ "CWE-20" ]
linux
e0bccd315db0c2f919e7fcf9cb60db21d9986f52
315,728,688,407,977,430,000,000,000,000,000,000,000
46
rose: Add length checks to CALL_REQUEST parsing Define some constant offsets for CALL_REQUEST based on the description at <http://www.techfest.com/networking/wan/x25plp.htm> and the definition of ROSE as using 10-digit (5-byte) addresses. Use them consistently. Validate all implicit and explicit facilities lengths. ...
decode_bundle(bool load, const struct nx_action_bundle *nab, const struct vl_mff_map *vl_mff_map, uint64_t *tlv_bitmap, struct ofpbuf *ofpacts) { static struct vlog_rate_limit rll = VLOG_RATE_LIMIT_INIT(1, 5); struct ofpact_bundle *bundle; uint32_t slave_type; size_t slaves_s...
0
[ "CWE-416" ]
ovs
65c61b0c23a0d474696d7b1cea522a5016a8aeb3
7,828,711,697,479,253,000,000,000,000,000,000,000
81
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...
static int bad_file_release(struct inode *inode, struct file *filp) { return -EIO; }
0
[]
linux-2.6
be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8
217,452,278,576,450,840,000,000,000,000,000,000,000
4
[PATCH] fix memory corruption from misinterpreted bad_inode_ops return values CVE-2006-5753 is for a case where an inode can be marked bad, switching the ops to bad_inode_ops, which are all connected as: static int return_EIO(void) { return -EIO; } #define EIO_ERROR ((void *) (return_EIO)) static struct ino...
int filter_assign_type(const char *type) { if (strstr(type, "__data_loc") && strstr(type, "char")) return FILTER_DYN_STRING; if (strchr(type, '[') && strstr(type, "char")) return FILTER_STATIC_STRING; if (strcmp(type, "char *") == 0 || strcmp(type, "const char *") == 0) return FILTER_PTR_STRING; return FIL...
0
[ "CWE-400", "CWE-284", "CWE-401" ]
linux
96c5c6e6a5b6db592acae039fed54b5c8844cd35
184,761,767,286,812,820,000,000,000,000,000,000,000
13
tracing: Have error path in predicate_parse() free its allocated memory In predicate_parse, there is an error path that is not going to out_free instead it returns directly which leads to a memory leak. Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <nav...
void Statement::Work_Get(napi_env e, void* data) { STATEMENT_INIT(RowBaton); if (stmt->status != SQLITE_DONE || baton->parameters.size()) { STATEMENT_MUTEX(mtx); sqlite3_mutex_enter(mtx); if (stmt->Bind(baton->parameters)) { stmt->status = sqlite3_step(stmt->_handle); ...
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
37,369,169,267,696,510,000,000,000,000,000,000,000
23
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
static inline MemoryRegion *address_space_translate_cached( MemoryRegionCache *cache, hwaddr addr, hwaddr *xlat, hwaddr *plen, bool is_write, MemTxAttrs attrs) { MemoryRegionSection section; MemoryRegion *mr; IOMMUMemoryRegion *iommu_mr; AddressSpace *target_as; assert(!cache->ptr); *xl...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
310,832,236,583,202,100,000,000,000,000,000,000,000
24
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
int user_update(struct key *key, const void *data, size_t datalen) { struct user_key_payload *upayload, *zap; int ret; ret = -EINVAL; if (datalen <= 0 || datalen > 32767 || !data) goto error; /* construct a replacement payload */ ret = -ENOMEM; upayload = kmalloc(sizeof(*upayload) + datalen, GFP_KERNEL); if...
0
[ "CWE-264" ]
linux-2.6
9f35a33b8d06263a165efe3541d9aa0cdbd70b3b
134,198,992,424,797,760,000,000,000,000,000,000,000
36
KEYS: Fix a NULL pointer deref in the user-defined key type Fix a NULL pointer deref in the user-defined key type whereby updating a negative key into a fully instantiated key will cause an oops to occur when the code attempts to free the non-existent old payload. This results in an oops that looks something like the...
g_NPN_SetException(NPObject *npobj, const NPUTF8 *message) { if (!thread_check()) { npw_printf("WARNING: NPN_SetException not called from the main thread\n"); return; } D(bugiI("NPN_SetException npobj=%p, message='%s'\n", npobj, message)); invoke_NPN_SetException(npobj, message); D(bugiD("NPN_SetException ...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
108,621,206,376,609,150,000,000,000,000,000,000,000
11
Support all the new variables added
TEST(ExistsMatchExpression, ElemMatchKey) { ExistsMatchExpression exists; ASSERT(exists.init("a.b").isOK()); MatchDetails details; details.requestElemMatchKey(); ASSERT(!exists.matchesBSON(BSON("a" << 1), &details)); ASSERT(!details.hasElemMatchKey()); ASSERT(exists.matchesBSON(BSON("a" << B...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
70,216,098,289,467,110,000,000,000,000,000,000,000
13
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static ssize_t _hostfs_write(oe_fd_t* desc, const void* buf, size_t count) { ssize_t ret = -1; file_t* file = _cast_file(desc); /* Check parameters. */ if (!file || (count && !buf)) OE_RAISE_ERRNO(OE_EINVAL); /* Call the host. */ if (oe_syscall_write_ocall(&ret, file->host_fd, buf, cou...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
27,850,029,145,922,330,000,000,000,000,000,000,000
16
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx) { return ctx->verify; }
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
242,790,702,337,136,420,000,000,000,000,000,000,000
4
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
NTSTATUS smb1cli_session_set_session_key(struct smbXcli_session *session, const DATA_BLOB _session_key) { struct smbXcli_conn *conn = session->conn; uint8_t session_key[16]; if (conn == NULL) { return NT_STATUS_INVALID_PARAMETER_MIX; } if (session->smb1.application_key.length != 0) { /* * TODO: do n...
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
21,646,780,254,284,970,000,000,000,000,000,000,000
40
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
CURLcode Curl_protocol_doing(struct connectdata *conn, bool *done) { CURLcode result = CURLE_OK; if(conn && conn->handler->doing) { *done = FALSE; result = conn->handler->doing(conn, done); } else *done = TRUE; return result; }
0
[ "CWE-119" ]
curl
9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400
168,115,336,122,059,500,000,000,000,000,000,000,000
13
url: fix alignment of ssl_backend_data struct - Align the array of ssl_backend_data on a max 32 byte boundary. 8 is likely to be ok but I went with 32 for posterity should one of the ssl_backend_data structs change to contain a larger sized variable in the future. Prior to this change (since dev 70f1db3, release 7.5...
monitor_openfds(struct monitor *mon, int do_logfds) { int pair[2]; if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) fatal("%s: socketpair: %s", __func__, strerror(errno)); FD_CLOSEONEXEC(pair[0]); FD_CLOSEONEXEC(pair[1]); mon->m_recvfd = pair[0]; mon->m_sendfd = pair[1]; if (do_logfds) { if (pipe(pair)...
0
[ "CWE-20", "CWE-200" ]
openssh-portable
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
265,855,899,367,043,300,000,000,000,000,000,000,000
21
Don't resend username to PAM; it already has it. Pointed out by Moritz Jodeit; ok dtucker@
readconf_print(uschar *name, uschar *type, BOOL no_labels) { BOOL names_only = FALSE; optionlist *ol; optionlist *ol2 = NULL; driver_instance *d = NULL; macro_item *m; int size = 0; if (type == NULL) { if (*name == '+') { int i; tree_node *t; BOOL found = FALSE; static uschar *types[] = { US"ad...
0
[ "CWE-264" ]
exim
dd90c19962a63fe966e17c75b4a36639302d1e67
305,514,951,836,938,000,000,000,000,000,000,000,000
235
Fix portability issues on *BSD and MacOS (cherry picked from commit 2478dbdfba7cf729ddee43a5a77bde8c25ccdede) (cherry picked from commit 84bbb4d8164aae21a8e5418250359637d8aabc29) (cherry picked from commit cdbe36e825ffdeb88da83148a866db0c9c2806e7) (cherry picked from commit de5ba17561e686e5a05c9cc88288c82b563987de) (c...
BGD_DECLARE(int) gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a) { int i; int ct = (-1); if (im->trueColor) { return gdTrueColorAlpha (r, g, b, a); } for (i = 0; (i < (im->colorsTotal)); i++) { if (im->open[i]) { ct = i; break; } } if (ct == (-1)) ...
0
[ "CWE-190" ]
libgd
cfee163a5e848fc3e3fb1d05a30d7557cdd36457
240,557,846,626,641,340,000,000,000,000,000,000,000
32
- #18, Removed invalid gdFree call when overflow2 fails - #17, Free im->pixels as well on error
void BroadcastAdd(const T* input1_data, const Dims<4>& input1_dims, const T* input2_data, const Dims<4>& input2_dims, T* output_data, const Dims<4>& output_dims) { T output_activation_min, output_activation_max; GetActivationMinMax(Ac, &output_activation_min, &output_activation_m...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
11,090,888,588,270,517,000,000,000,000,000,000,000
10
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
tls_version_report(FILE *f) { fprintf(f, "Library version: OpenSSL: Compile: %s\n" " Runtime: %s\n", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); }
0
[]
exim
7be682ca5ebd9571a01b762195b11c34cd231830
215,682,576,094,515,100,000,000,000,000,000,000,000
7
TLS SNI support for OpenSSL ($tls_sni)
int dma_supported(struct device *dev, u64 mask) { if (mask < (u64)arm_dma_limit) return 0; return 1; }
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
72,557,959,305,225,490,000,000,000,000,000,000,000
6
ARM: dma-mapping: don't allow DMA mappings to be marked executable DMA mapping permissions were being derived from pgprot_kernel directly without using PAGE_KERNEL. This causes them to be marked with executable permission, which is not what we want. Fix this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk...
static bool checkreturn buf_read(pb_istream_t *stream, uint8_t *buf, size_t count) { uint8_t *source = (uint8_t*)stream->state; stream->state = source + count; if (buf != NULL) { while (count--) *buf++ = *source++; } return true; }
0
[ "CWE-125" ]
nanopb
7b396821ddd06df8e39143f16e1dc0a4645b89a3
146,751,680,354,705,440,000,000,000,000,000,000,000
13
Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p)
virtual void Tick(time_t) { dns->PruneCache(); }
0
[]
inspircd
58c893e834ff20495d007709220881a3ff13f423
127,659,444,765,218,560,000,000,000,000,000,000,000
4
Fixed infinite loop cauesd by invalid dns packets
add_watchdog_timer (GSWindow *window, glong timeout) { window->priv->watchdog_timer_id = g_timeout_add (timeout, (GSourceFunc)watchdog_timer, window); }
0
[]
gnome-screensaver
a5f66339be6719c2b8fc478a1d5fc6545297d950
64,320,713,609,736,630,000,000,000,000,000,000,000
7
Ensure keyboard grab and unlock dialog exist after monitor removal gnome-screensaver currently doesn't deal with monitors getting removed properly. If the unlock dialog is on the removed monitor then the unlock dialog and its associated keyboard grab are not moved to an existing monitor when the monitor removal is pr...
static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32 tx_ridx) { struct Vmxnet3_TxCompDesc txcq_descr; VMXNET3_RING_DUMP(VMW_RIPRN, "TXC", qidx, &s->txq_descr[qidx].comp_ring); txcq_descr.txdIdx = tx_ridx; txcq_descr.gen = vmxnet3_ring_curr_gen(&s->txq_descr[qidx].comp_ring); vmxn...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
271,841,742,160,384,840,000,000,000,000,000,000,000
17
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
HttpHeader::putTime(Http::HdrType id, time_t htime) { assert(any_registered_header(id)); assert(Http::HeaderLookupTable.lookup(id).type == Http::HdrFieldType::ftDate_1123); /* must be of an appropriate type */ assert(htime >= 0); addEntry(new HttpHeaderEntry(id, NULL, mkrfc1123(htime))); }
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
332,713,865,914,894,720,000,000,000,000,000,000,000
7
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
static void vhost_scsi_deregister_configfs(void) { if (!vhost_scsi_fabric_configfs) return; target_fabric_configfs_deregister(vhost_scsi_fabric_configfs); vhost_scsi_fabric_configfs = NULL; pr_debug("TCM_VHOST[0] - Cleared vhost_scsi_fabric_configfs\n"); };
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
182,846,991,805,914,340,000,000,000,000,000,000,000
9
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
void SplashOutputDev::saveState(GfxState *state) { splash->saveState(); if (t3GlyphStack && !t3GlyphStack->haveDx) { t3GlyphStack->doNotCache = true; error(errSyntaxWarning, -1, "Save (q) operator before d0/d1 in Type 3 glyph"); } }
0
[ "CWE-369" ]
poppler
b224e2f5739fe61de9fa69955d016725b2a4b78d
178,825,836,225,137,140,000,000,000,000,000,000,000
8
SplashOutputDev::tilingPatternFill: Fix crash on broken file Issue #802
static void block_update_checksum (unsigned char *buffer_start) { WavpackHeader *wphdr = (WavpackHeader *) buffer_start; unsigned char *dp, meta_id, c1, c2; uint32_t bcount, meta_bc; if (!(wphdr->flags & HAS_CHECKSUM)) return; bcount = wphdr->ckSize - sizeof (WavpackHeader) + 8; dp = (...
0
[ "CWE-703", "CWE-835" ]
WavPack
070ef6f138956d9ea9612e69586152339dbefe51
338,082,767,909,285,100,000,000,000,000,000,000,000
77
issue #53: error out on zero sample rate
QPDF::EncryptionData::getPerms() const { return this->Perms; }
0
[ "CWE-125" ]
qpdf
dea704f0ab7f625e1e7b3f9a1110b45b63157317
83,042,505,938,149,780,000,000,000,000,000,000,000
4
Pad keys to avoid memory errors (fixes #147)
static enum try_read_result try_read_udp(conn *c) { int res; assert(c != NULL); c->request_addr_size = sizeof(c->request_addr); res = recvfrom(c->sfd, c->rbuf, c->rsize, 0, &c->request_addr, &c->request_addr_size); if (res > 8) { unsigned char *buf = (unsigned char *)c->...
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
62,164,981,378,502,980,000,000,000,000,000,000,000
33
Fix segfault on specially crafted packet.
bool Field_year::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate) { int tmp= (int) ptr[0]; if (tmp || field_length != 4) tmp+= 1900; return int_to_datetime_with_warn(false, tmp * 10000, ltime, fuzzydate, table->s, field_name); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
322,737,026,676,671,470,000,000,000,000,000,000,000
8
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...
fm_mgr_get_error_str ( IN fm_mgr_config_errno_t err ) { switch(err){ case FM_CONF_ERR_LEN: return "Response data legth invalid"; case FM_CONF_ERR_VERSION: return "Client/Server version mismatch"; case FM_CONF_ERR_DISC: return "Not connected"; case FM_CONF_TEST: return "Test message";...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
115,301,247,581,788,860,000,000,000,000,000,000,000
48
Fix scripts and code that use well-known tmp files.
static void *create_session_dir_config(apr_pool_t * p, char *dummy) { session_dir_conf *new = (session_dir_conf *) apr_pcalloc(p, sizeof(session_dir_conf)); new->includes = apr_array_make(p, 10, sizeof(const char **)); new->excludes = apr_array_make(p, 10, sizeof(const char **)); return (void *) n...
0
[ "CWE-476" ]
httpd
67bd9bfe6c38831e14fe7122f1d84391472498f8
58,277,485,657,772,450,000,000,000,000,000,000,000
10
mod_session: save one apr_strtok() in session_identity_decode(). When the encoding is invalid (missing '='), no need to parse further. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887050 13f79535-47bb-0310-9956-ffa450edef68
void t_go_generator::generate_serialize_list_element(ofstream& out, t_list* tlist, string prefix) { t_field efield(tlist->get_elem_type(), ""); efield.set_req(t_field::T_OPT_IN_REQ_OUT); generate_serialize_field(out, &efield, prefix); }
0
[ "CWE-77" ]
thrift
2007783e874d524a46b818598a45078448ecc53e
53,665,214,677,476,850,000,000,000,000,000,000,000
5
THRIFT-3893 Command injection in format_go_output Client: Go Patch: Jens Geyer
dp_packet_has_flow_mark(struct dp_packet *p, uint32_t *mark) { if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) { *mark = p->mbuf.hash.fdir.hi; return true; } return false; }
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
327,671,107,524,306,350,000,000,000,000,000,000,000
9
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static int read_probe(const AVProbeData *p) { int cnt = 0; for (int i = 0; i < p->buf_size; i++) cnt += !!isansicode(p->buf[i]); return (cnt * 100LL / p->buf_size) * (cnt > 400) * !!av_match_ext(p->filename, tty_extensions); }
0
[]
FFmpeg
3bce9e9b3ea35c54bacccc793d7da99ea5157532
73,264,527,233,557,000,000,000,000,000,000,000,000
10
avformat/tty: add probe function
GF_Err ccst_box_size(GF_Box *s) { GF_CodingConstraintsBox *ptr = (GF_CodingConstraintsBox *)s; ptr->size += 4; return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
323,321,111,859,533,920,000,000,000,000,000,000,000
6
fixed #1587
void gf_utc_time_since_1970(u32 *sec, u32 *msec) { #if defined (WIN32) && !defined(_WIN32_WCE) struct _timeb tb; _ftime( &tb ); *sec = (u32) tb.time; *msec = tb.millitm; #else struct timeval tv; gettimeofday(&tv, NULL); *sec = (u32) tv.tv_sec; *msec = tv.tv_usec/1000; #endif }
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
296,815,333,537,050,960,000,000,000,000,000,000,000
14
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
bool check_string_byte_length(LEX_STRING *str, uint err_msg, uint max_byte_length) { if (str->length <= max_byte_length) return FALSE; my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg ? ER(err_msg) : "", max_byte_length); return TRUE; }
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
68,739,352,278,754,290,000,000,000,000,000,000,000
11
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
f2flac16_clip_array (const float *src, int32_t *dest, int count, int normalize) { float normfact, scaled_value ; normfact = normalize ? (8.0 * 0x1000) : 1.0 ; while (--count >= 0) { scaled_value = src [count] * normfact ; if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= (1.0 * 0x7FFF)) { dest [count] = 0x7FFF ; ...
0
[ "CWE-119", "CWE-369" ]
libsndfile
60b234301adf258786d8b90be5c1d437fc8799e0
300,658,266,165,166,600,000,000,000,000,000,000,000
18
src/flac.c: Improve error handling Especially when dealing with corrupt or malicious files.
static void help(void) { int i; static const char * const helptext[]={ "Usage: curl [options...] <url>", "Options: (H) means HTTP/HTTPS only, (F) means FTP only", " -a/--append Append to target file when uploading (F)", " -A/--user-agent <string> User-Agent to send to server (H)", " --...
0
[ "CWE-125" ]
curl
70b1900dd13d16f2e83f571407a614541d5ac9ba
182,766,434,945,511,720,000,000,000,000,000,000,000
143
'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194) pointed out that the warnf() function in the curl tool didn't properly deal with the cases when excessively long words were used in the string to chop up.
static void stellaris_enet_unrealize(DeviceState *dev, Error **errp) { stellaris_enet_state *s = STELLARIS_ENET(dev); unregister_savevm(DEVICE(s), "stellaris_enet", s); memory_region_destroy(&s->mmio); }
1
[ "CWE-119", "CWE-787" ]
qemu
2e1198672759eda6e122ff38fcf6df06f27e0fe2
235,387,029,872,398,150,000,000,000,000,000,000,000
8
hw/net/stellaris_enet: Convert to vmstate Convert this device to use vmstate for its save/load, including providing a post_load function that sanitizes inbound data to avoid possible buffer overflows if it is malicious. The sanitizing fixes CVE-2013-4532 (though nobody should be relying on the security properties of ...
static inline int illegal_highdma(struct net_device *dev, struct sk_buff *skb) { int i; if (dev->features & NETIF_F_HIGHDMA) return 0; for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) if (PageHighMem(skb_shinfo(skb)->frags[i].page)) return 1; return 0; }
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
197,907,433,390,242,900,000,000,000,000,000,000,000
13
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
static int crypto_ccm_create_common(struct crypto_template *tmpl, struct rtattr **tb, const char *full_name, const char *ctr_name, const char *mac_name) { struct crypto_attr_type *algt; struct aead_instance *inst; struct skcipher_alg *ctr; struct crypto_alg *mac_alg; struct hash_alg...
0
[ "CWE-119", "CWE-787" ]
linux
3b30460c5b0ed762be75a004e924ec3f8711e032
6,442,412,758,455,789,000,000,000,000,000,000,000
105
crypto: ccm - move cbcmac input off the stack Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver") refactored the CCM driver to allow separate implementations of the underlying MAC to be provided by a platform. However, in doing so, it moved some data from the linear region to the stack, which violat...
PNG_FUNCTION(png_infop,PNGAPI png_create_info_struct,(png_const_structrp png_ptr),PNG_ALLOCATED) { png_inforp info_ptr; png_debug(1, "in png_create_info_struct"); if (png_ptr == NULL) return NULL; /* Use the internal API that does not (or at least should not) error out, so * that this call alwa...
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
33,412,318,004,878,850,000,000,000,000,000,000,000
23
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
static __init void intel_nehalem_quirk(void) { union cpuid10_ebx ebx; ebx.full = x86_pmu.events_maskl; if (ebx.split.no_branch_misses_retired) { /* * Erratum AAJ80 detected, we work it around by using * the BR_MISP_EXEC.ANY event. This will over-count * branch-misses, but it's still much better than the ...
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
4,786,000,029,662,747,000,000,000,000,000,000,000
18
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...
int ff_unlock_avcodec(const AVCodec *codec) { if (codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE || !codec->init) return 0; av_assert0(ff_avcodec_locked); ff_avcodec_locked = 0; avpriv_atomic_int_add_and_fetch(&entangled_thread_counter, -1); if (lockmgr_cb) { if ((*lockmgr_cb)(...
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
67,057,969,331,663,430,000,000,000,000,000,000,000
15
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void setup_ret_unlink_pdu(struct usbip_header *rpdu, struct stub_unlink *unlink) { setup_base_pdu(&rpdu->base, USBIP_RET_UNLINK, unlink->seqnum); rpdu->u.ret_unlink.status = unlink->status; }
0
[ "CWE-476" ]
linux
be6123df1ea8f01ee2f896a16c2b7be3e4557a5a
168,546,757,674,050,820,000,000,000,000,000,000,000
6
usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer stub_send_ret_submit() handles urb with a potential null transfer_buffer, when it replays a packet with potential malicious data that could contain a null buffer. Add a check for the condition when actual_length > 0 and transfer_buffer is null. R...
PHPAPI php_stream *_php_stream_fopen_from_pipe(FILE *file, const char *mode STREAMS_DC) { php_stdio_stream_data *self; php_stream *stream; self = emalloc_rel_orig(sizeof(*self)); memset(self, 0, sizeof(*self)); self->file = file; self->is_pipe = 1; self->lock_flag = LOCK_UN; self->is_process_pipe = 1; self->f...
0
[ "CWE-264" ]
php-src
e3133e4db70476fb7adfdedb738483e2255ce0e1
222,766,511,036,925,850,000,000,000,000,000,000,000
21
Fix bug #77630 - safer rename() procedure In order to rename safer, we do the following: - set umask to 077 (unfortunately, not TS, so excluding ZTS) - chown() first, to set proper group before allowing group access - chmod() after, even if chown() fails
static BROTLI_INLINE uint32_t GetInsertBase(uint16_t inscode) { return kInsBase[inscode]; }
1
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
58,428,141,200,702,475,000,000,000,000,000,000,000
3
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
ldns_rdf2buffer_str_aaaa(ldns_buffer *output, const ldns_rdf *rdf) { char str[INET6_ADDRSTRLEN]; if (inet_ntop(AF_INET6, ldns_rdf_data(rdf), str, INET6_ADDRSTRLEN)) { ldns_buffer_printf(output, "%s", str); } return ldns_buffer_status(output); }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
133,547,545,080,800,360,000,000,000,000,000,000,000
10
CAA and URI
ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) { struct sk_buff *skb; int ac = -1; if (!tx->sta) return TX_CONTINUE; skb_queue_walk(&tx->skbs, skb) { ac = skb_get_queue_mapping(skb); tx->sta->tx_stats.bytes[ac] += skb->len; } if (ac >= 0) tx->sta->tx_stats.packets[ac]++; return TX_CONTINUE; }
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
155,666,963,810,568,330,000,000,000,000,000,000,000
17
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
static int cxusb_nano2_frontend_attach(struct dvb_usb_adapter *adap) { if (usb_set_interface(adap->dev->udev, 0, 1) < 0) err("set interface failed"); cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); /* reset the tuner and demodulator */ cxusb_bluebird_gpio_rw(adap->dev, 0x04, 0); cxusb_bluebird_gpio_p...
0
[ "CWE-119", "CWE-787" ]
linux
3f190e3aec212fc8c61e202c51400afa7384d4bc
284,587,907,874,826,650,000,000,000,000,000,000,000
26
[media] cxusb: Use a dma capable buffer also for reading Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack") added a kmalloc'ed bounce buffer for writes, but missed to do the same for reads. As the read only happens after the write is finished, we can reuse the same buffer. As dvb_usb_generic_rw handles a re...
void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t& frompos, string& ret, int recurs) { if(recurs > 100) // the forward reference-check below should make this test 100% obsolete throw MOADNSException("Loop"); int pos = frompos; // it is tempting to call reserve on ret, but it tu...
1
[ "CWE-399" ]
pdns
881b5b03a590198d03008e4200dd00cc537712f3
160,427,818,172,681,170,000,000,000,000,000,000,000
45
Reject qname's wirelength > 255, `chopOff()` handle dot inside labels