func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
GuestFileWrite *qmp_guest_file_write(int64_t handle, const char *buf_b64, bool has_count, int64_t count, Error **errp) { GuestFileWrite *write_data = NULL; guchar *buf; gsize buf_len; int write_count; GuestFileHandle *gfh = gu...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
191,176,751,688,744,240,000,000,000,000,000,000,000
55
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
__vma_link(struct mm_struct *mm, struct vm_area_struct *vma, struct vm_area_struct *prev, struct rb_node **rb_link, struct rb_node *rb_parent) { __vma_link_list(mm, vma, prev, rb_parent); __vma_link_rb(mm, vma, rb_link, rb_parent); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
20,113,987,283,230,552,000,000,000,000,000,000,000
7
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
htmlCtxtReadFd(htmlParserCtxtPtr ctxt, int fd, const char *URL, const char *encoding, int options) { xmlParserInputBufferPtr input; xmlParserInputPtr stream; if (fd < 0) return (NULL); if (ctxt == NULL) return (NULL); xmlInitParser(); htmlCtxtReset(ctxt); in...
0
[ "CWE-119" ]
libxml2
e724879d964d774df9b7969fc846605aa1bac54c
204,193,843,939,935,580,000,000,000,000,000,000,000
26
Fix parsing short unclosed comment uninitialized access For https://bugzilla.gnome.org/show_bug.cgi?id=746048 The HTML parser was too optimistic when processing comments and didn't check for the end of the stream on the first 2 characters
ip6t_do_table(struct sk_buff *skb, const struct nf_hook_state *state, struct xt_table *table) { unsigned int hook = state->hook; static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long)))); /* Initializing verdict to NF_DROP keeps gcc happy. */ unsigned int verdict = NF_DROP; const...
1
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
148,808,271,292,760,140,000,000,000,000,000,000,000
128
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV, SPEC(COMMUTATIVE)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; zend_bool result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R); result = fast_is_identica...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
216,469,347,371,048,050,000,000,000,000,000,000,000
17
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
76,731,876,499,685,310,000,000,000,000,000,000,000
12
- 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
static int cac_read_binary(sc_card_t *card, unsigned int idx, unsigned char *buf, size_t count, unsigned long flags) { cac_private_data_t * priv = CAC_DATA(card); int r = 0; u8 *tl = NULL, *val = NULL; u8 *tl_ptr, *val_ptr, *tlv_ptr, *tl_start; u8 *cert_ptr; size_t tl_len, val_len, tlv_len; size_t len, tl_head...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
279,652,844,804,698,900,000,000,000,000,000,000,000
166
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
GF_Err tsro_box_size(GF_Box *s) { s->size += 4; return GF_OK; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
283,997,969,432,080,000,000,000,000,000,000,000,000
5
fixed #2255
static void SFDDumpTtfInstrsExplicit(FILE *sfd,uint8 *ttf_instrs, int16 ttf_instrs_len ) { char *instrs = _IVUnParseInstrs( ttf_instrs, ttf_instrs_len ); char *pt; fprintf( sfd, "TtInstrs:\n" ); for ( pt=instrs; *pt!='\0'; ++pt ) putc(*pt,sfd); if ( pt[-1]!='\n' ) putc('\n',sfd); free(instrs);...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
62,342,185,062,866,690,000,000,000,000,000,000,000
12
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
R_API bool r_buf_prepend_bytes(RBuffer *b, const ut8 *buf, ut64 length) { r_return_val_if_fail (b && buf && !b->readonly, false); return r_buf_insert_bytes (b, 0, buf, length) >= 0; }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
317,283,941,958,243,520,000,000,000,000,000,000,000
4
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
TEST_F(RenameCollectionTest, RenameCollectionForApplyOpsAcrossDatabaseWithTargetUuid) { _createCollection(_opCtx.get(), _sourceNss); auto dbName = _sourceNss.db().toString(); auto uuid = UUID::gen(); auto uuidDoc = BSON("ui" << uuid); auto cmd = BSON("renameCollection" << _sourceNss.ns() << "to" << ...
0
[ "CWE-20" ]
mongo
35c1b1f588f04926a958ad2fe4d9c59d79f81e8b
22,292,785,604,600,706,000,000,000,000,000,000,000
12
SERVER-35636 renameCollectionForApplyOps checks for complete namespace
static inline int complete_emulated_io(struct kvm_vcpu *vcpu) { int r; vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); r = kvm_emulate_instruction(vcpu, EMULTYPE_NO_DECODE); srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); if (r != EMULATE_DONE) return 0; return 1; }
0
[ "CWE-476" ]
linux
e97f852fd4561e77721bb9a4e0ea9d98305b1e93
17,507,847,468,353,647,000,000,000,000,000,000,000
10
KVM: X86: Fix scan ioapic use-before-initialization Reported by syzkaller: BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8 PGD 80000003ec4da067 P4D 80000003ec4da067 PUD 3f7bfa067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 7 PID: 5059 Comm: debug Tainted: G OE 4.19.0-rc5 #16...
static inline unsigned int shash_align_buffer_size(unsigned len, unsigned long mask) { typedef u8 __aligned_largest u8_aligned; return len + (mask & ~(__alignof__(u8_aligned) - 1)); }
0
[ "CWE-787" ]
linux
af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1
104,774,452,030,046,270,000,000,000,000,000,000,000
6
crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting ...
static int send_release(uint32_t server, uint32_t ciaddr) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr, random xid fields, * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPRELEASE); /* DHCPRELEASE uses ciaddr, not "requested ip", to store IP being re...
0
[ "CWE-119" ]
busybox
352f79acbd759c14399e39baef21fc4ffe180ac2
241,134,143,235,755,540,000,000,000,000,000,000,000
21
udhcpc: fix OPTION_6RD parsing (could overflow its malloced buffer) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
qemuProcessReadLog(qemuDomainLogContextPtr logCtxt, char **msg, size_t max) { char *buf; ssize_t got; char *eol; char *filter_next; size_t skip; if ((got = qemuDomainLogContextRead(logCtxt, &buf)) < 0) return -1; /* Filter out debug messages fr...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
311,589,794,573,956,700,000,000,000,000,000,000,000
51
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
int ssl3_get_client_certificate(SSL *s) { int i, ok, al, ret = -1; X509 *x = NULL; unsigned long l, nc, llen, n; const unsigned char *p, *q; unsigned char *d; STACK_OF(X509) *sk = NULL; n = s->method->ssl_get_message(s, SSL3_ST_SR_CERT_A, ...
0
[ "CWE-362" ]
openssl
3c66a669dfc7b3792f7af0758ea26fe8502ce70c
316,980,437,181,037,100,000,000,000,000,000,000,000
156
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org>
ber_parse_header(STREAM s, int tagval, uint32 *length) { int tag, len; if (tagval > 0xff) { in_uint16_be(s, tag); } else { in_uint8(s, tag); } if (tag != tagval) { error("expected tag %d, got %d\n", tagval, tag); return False; } in_uint8(s, len); if (len & 0x80) { len &= ~0x80; *length = 0;...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
192,307,064,125,810,200,000,000,000,000,000,000,000
33
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
bool operator==(const LowerCaseString& rhs) const { return string_ == rhs.string_; }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
305,453,085,153,286,300,000,000,000,000,000,000,000
1
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
void MainWindow::onMultitrackModified() { setWindowModified(true); // Reflect this playlist info onto the producer for keyframes dock. if (!m_timelineDock->selection().isEmpty()) { int trackIndex = m_timelineDock->selection().first().y(); int clipIndex = m_timelineDock->selection().first()....
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
328,472,306,940,687,070,000,000,000,000,000,000,000
40
fix upgrade check is not using TLS correctly
R_API int r_bin_java_load_bin(RBinJavaObj *bin, const ut8 *buf, ut64 buf_sz) { ut64 adv = 0; R_BIN_JAVA_GLOBAL_BIN = bin; if (!bin) { return false; } r_bin_java_reset_bin_info (bin); memcpy ((ut8 *) &bin->cf, buf, 10); if (memcmp (bin->cf.cafebabe, "\xCA\xFE\xBA\xBE", 4)) { eprintf ("r_bin_java_new_bin: Inva...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
185,958,795,959,761,040,000,000,000,000,000,000,000
59
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
static int uvc_register_terms(struct uvc_device *dev, struct uvc_video_chain *chain) { struct uvc_streaming *stream; struct uvc_entity *term; int ret; list_for_each_entry(term, &chain->entities, chain) { if (UVC_ENTITY_TYPE(term) != UVC_TT_STREAMING) continue; stream = uvc_stream_by_id(dev, term->id); i...
0
[ "CWE-269" ]
linux
68035c80e129c4cfec659aac4180354530b26527
172,000,632,023,694,200,000,000,000,000,000,000,000
33
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. | ----------...
static rpmRC rpmpkgRead(rpmKeyring keyring, rpmVSFlags vsflags, FD_t fd, Header * hdrp, unsigned int *keyidp, char **msg) { pgpDigParams sig = NULL; Header sigh = NULL; rpmTagVal sigtag; struct rpmtd_s sigtd; struct sigtInfo_s sinfo; Header h = NULL; rpmRC rc = RPMRC_FAIL; /* assume f...
0
[]
rpm
8e847d52c811e9a57239e18672d40f781e0ec48e
24,508,561,729,324,430,000,000,000,000,000,000,000
133
Sanity check that there is at least one tag in header region
static int add_memory_block(unsigned long base_section_nr) { int section_count = 0; unsigned long nr; for (nr = base_section_nr; nr < base_section_nr + sections_per_block; nr++) if (present_section_nr(nr)) section_count++; if (section_count == 0) return 0; return init_memory_block(memory_block_id(ba...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
51,674,717,449,115,355,000,000,000,000,000,000,000
15
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...
uint32_t smb2cli_conn_max_trans_size(struct smbXcli_conn *conn) { return conn->smb2.server.max_trans_size; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
111,874,072,251,336,100,000,000,000,000,000,000,000
4
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>
int sqlite3Fts3GetVarint(const char *pBuf, sqlite_int64 *v){ const unsigned char *p = (const unsigned char*)pBuf; const unsigned char *pStart = p; u32 a; u64 b; int shift; GETVARINT_INIT(a, p, 0, 0x00, 0x80, *v, 1); GETVARINT_STEP(a, p, 7, 0x7F, 0x4000, *v, 2); GETVARINT_STEP(a, p, 14, 0x3FFF...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
216,372,937,620,268,800,000,000,000,000,000,000,000
21
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static void parse_capture(dictionary *ubridge_config, const char *bridge_name, bridge_t *bridge) { const char *pcap_file = NULL; const char *pcap_linktype = "EN10MB"; getstr(ubridge_config, bridge_name, "pcap_protocol", &pcap_linktype); if (getstr(ubridge_config, bridge_name, "pcap_file", &pcap_file)) ...
0
[ "CWE-200", "CWE-269" ]
ubridge
2eb0d1dab6a6de76cf3556130a2d52af101077db
20,729,611,538,078,477,000,000,000,000,000,000,000
11
Hide errored line content during parsing configuration INI file on default
file_asynch_zero (struct rw *rw, struct command *command, nbd_completion_callback cb, bool allocate) { int dummy = 0; if (!file_synch_zero (rw, command->offset, command->slice.len, allocate)) return false; if (cb.callback (cb.user_data, &dummy) == -1) { perror (rw->name); exit (EXIT...
1
[ "CWE-252" ]
libnbd
8d444b41d09a700c7ee6f9182a649f3f2d325abb
93,632,573,361,955,670,000,000,000,000,000,000,000
13
copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails nbdcopy has a nasty bug when performing multi-threaded copies using asynchronous nbd calls - it was blindly treating the completion of an asynchronous command as successful, rather than checking the *error parameter. This can result in the silent creation o...
uint8_t* FAST_FUNC udhcp_get_option32(struct dhcp_packet *packet, int code) { uint8_t *r = udhcp_get_option(packet, code); if (r) { if (r[-1] != 4) r = NULL; } return r; }
1
[ "CWE-125" ]
busybox
74d9f1ba37010face4bd1449df4d60dd84450b06
241,600,937,410,668,120,000,000,000,000,000,000,000
9
udhcpc: when decoding DHCP_SUBNET, ensure it is 4 bytes long function old new delta udhcp_run_script 795 801 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
void qemu_chr_fe_take_focus(CharBackend *b) { if (!b->chr) { return; } if (b->chr->is_mux) { mux_set_focus(b->chr->opaque, b->tag); } }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
241,843,425,439,471,330,000,000,000,000,000,000,000
10
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static MagickBooleanType RenderPostscript(Image *image, const DrawInfo *draw_info,const PointInfo *offset,TypeMetric *metrics) { char filename[MaxTextExtent], geometry[MaxTextExtent], *text; FILE *file; Image *annotate_image; ImageInfo *annotate_info; int unique_file; Magi...
0
[ "CWE-125" ]
ImageMagick6
f6ffc702c6eecd963587273a429dcd608c648984
315,218,130,775,010,200,000,000,000,000,000,000,000
233
https://github.com/ImageMagick/ImageMagick/issues/1588
//! Fill pixel values along the Z-axis at a specified pixel position \overloading. CImg<T>& fillZ(const unsigned int x, const unsigned int y, const unsigned int c, const double a0, ...) { const ulongT wh = (ulongT)_width*_height; if (x<_width && y<_height && c<_spectrum) _cimg_fill1(x,y,0,c,wh,_dept...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
26,084,850,221,884,940,000,000,000,000,000,000,000
5
Fix other issues in 'CImg<T>::load_bmp()'.
static void fuse_do_prepare_interrupt(fuse_req_t req, struct fuse_intr_data *d) { d->id = pthread_self(); pthread_cond_init(&d->cond, NULL); d->finished = 0; fuse_req_interrupt_func(req, fuse_interrupt, d); }
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
3,828,533,961,322,445,500,000,000,000,000,000,000
7
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
void DNP3_Base::PrecomputeCRCTable() { for( unsigned int i = 0; i < 256; i++) { unsigned int crc = i; for ( unsigned int j = 0; j < 8; ++j ) { if ( crc & 0x0001 ) crc = (crc >> 1) ^ 0xA6BC; // Generating polynomial. else crc >>= 1; } crc_table[i] = crc; } }
0
[ "CWE-119", "CWE-787" ]
bro
6cedd67c381ff22fde653adf02ee31caf66c81a0
215,580,513,702,955,260,000,000,000,000,000,000,000
17
DNP3: fix reachable assertion and buffer over-read/overflow. A DNP3 packet using a link layer header that specifies a zero length can trigger an assertion failure if assertions are enabled. Assertions are enabled unless Bro is compiled with the NDEBUG preprocessor macro defined. The default configuration of Bro will...
static MagickBooleanType TIFFGetProfiles(TIFF *tiff,Image *image) { MagickBooleanType status; uint32 length = 0; unsigned char *profile = (unsigned char *) NULL; status=MagickTrue; #if defined(TIFFTAG_ICCPROFILE) if ((TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1) && (profil...
0
[ "CWE-401" ]
ImageMagick6
cd7f9fb7751b0d59d5a74b12d971155caad5a792
300,796,328,705,394,900,000,000,000,000,000,000,000
68
https://github.com/ImageMagick/ImageMagick/issues/3540
DLLIMPORT int cfg_opt_setnfloat(cfg_opt_t *opt, double value, unsigned int index) { cfg_value_t *val; if (!opt || opt->type != CFGT_FLOAT) { errno = EINVAL; return CFG_FAIL; } val = cfg_opt_getval(opt, index); if (!val) return CFG_FAIL; val->fpnumber = value; opt->flags |= CFGF_MODIFIED; return CFG_SU...
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
299,631,404,556,491,460,000,000,000,000,000,000,000
18
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
static int raw_enable_allfilters(struct net_device *dev, struct sock *sk) { struct raw_sock *ro = raw_sk(sk); int err; err = raw_enable_filters(dev, sk, ro->filter, ro->count); if (!err) { err = raw_enable_errfilter(dev, sk, ro->err_mask); if (err) raw_disable_filters(dev, sk, ro->filter, ro->count); } r...
0
[ "CWE-200" ]
linux-2.6
e84b90ae5eb3c112d1f208964df1d8156a538289
279,517,016,522,530,870,000,000,000,000,000,000,000
14
can: Fix raw_getname() leak raw_getname() can leak 10 bytes of kernel memory to user (two bytes hole between can_family and can_ifindex, 8 bytes at the end of sockaddr_can structure) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: David S. Miller <d...
static void dw210x_led_ctrl(struct dvb_frontend *fe, int offon) { static u8 led_off[] = { 0 }; static u8 led_on[] = { 1 }; struct i2c_msg msg = { .addr = DW2102_LED_CTRL, .flags = 0, .buf = led_off, .len = 1 }; struct dvb_usb_adapter *udev_adap = (struct dvb_usb_adapter *)(fe->dvb->priv); if (offon) ...
0
[ "CWE-476", "CWE-119" ]
linux
606142af57dad981b78707234cfbd15f9f7b7125
4,198,195,057,153,125,000,000,000,000,000,000,000
17
[media] dw2102: don't do DMA on stack On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with...
check_options( dle_t *dle) { if (GPOINTER_TO_INT(dle->estimatelist->data) == ES_CALCSIZE) { need_calcsize=1; } if (strcmp(dle->program,"GNUTAR") == 0) { need_gnutar=1; if(dle->device && dle->device[0] == '/' && dle->device[1] == '/') { if(dle->exclude_file && dle->exclude_file->nb_elemen...
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
91,701,197,371,226,640,000,000,000,000,000,000,000
136
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
ossl_cipher_initialize(VALUE self, VALUE str) { EVP_CIPHER_CTX *ctx; const EVP_CIPHER *cipher; char *name; unsigned char dummy_key[EVP_MAX_KEY_LENGTH] = { 0 }; name = StringValueCStr(str); GetCipherInit(self, ctx); if (ctx) { ossl_raise(rb_eRuntimeError, "Cipher already inititalized!"); ...
1
[ "CWE-326", "CWE-310", "CWE-703" ]
openssl
8108e0a6db133f3375608303fdd2083eb5115062
103,402,460,480,922,620,000,000,000,000,000,000,000
30
cipher: don't set dummy encryption key in Cipher#initialize Remove the encryption key initialization from Cipher#initialize. This is effectively a revert of r32723 ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28). r32723, which added the key initialization, was a workaround for Ruby Bug #2768. For s...
static void vmx_hwapic_irr_update(struct kvm_vcpu *vcpu, int max_irr) { if (!is_guest_mode(vcpu)) { vmx_set_rvi(max_irr); return; } if (max_irr == -1) return; /* * In guest mode. If a vmexit is needed, vmx_check_nested_events * handles it. */ if (nested_exit_on_intr(vcpu)) return; /* * Else, f...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
33,198,532,030,006,890,000,000,000,000,000,000,000
27
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
Header::pixelAspectRatio () { return static_cast <FloatAttribute &> ((*this)["pixelAspectRatio"]).value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
201,838,723,759,029,020,000,000,000,000,000,000,000
5
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void Monitor::_generate_command_map(map<string,cmd_vartype>& cmdmap, map<string,string> &param_str_map) { for (map<string,cmd_vartype>::const_iterator p = cmdmap.begin(); p != cmdmap.end(); ++p) { if (p->first == "prefix") continue; if (p->first == "caps") { ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
327,298,404,513,869,800,000,000,000,000,000,000,000
21
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int netlink_seq_show(struct seq_file *seq, void *v) { if (v == SEQ_START_TOKEN) seq_puts(seq, "sk Eth Pid Groups " "Rmem Wmem Dump Locks Drops Inode\n"); else { struct sock *s = v; struct netlink_sock *nlk = nlk_sk(s); seq_printf(seq, "%pK %-3d %-6d %08x %-8d %-8...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
178,364,504,466,687,100,000,000,000,000,000,000,000
26
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
int crypt_key_in_keyring(struct crypt_device *cd) { return cd ? cd->key_in_keyring : 0; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
121,607,408,849,556,120,000,000,000,000,000,000,000
4
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
for_samples_continue(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr ep = esp; int var = ep[-4].value.intval; float a = ep[-3].value.realval; int n = ep[-2].value.intval; float b = ep[-1].value.realval; if (var > n) { esp -= 6; /* pop everything */ return o_pop_estack; } ...
0
[ "CWE-200" ]
ghostpdl
34cc326eb2c5695833361887fe0b32e8d987741c
138,380,776,381,948,270,000,000,000,000,000,000,000
20
Bug 699927: don't include operator arrays in execstack output When we transfer the contents of the execution stack into the array, take the extra step of replacing any operator arrays on the stack with the operator that reference them. This prevents the contents of Postscript defined, internal only operators (those c...
GST_START_TEST (test_GstDateTime_iso8601) { GstDateTime *dt, *dt2; gchar *str, *str2; GDateTime *gdt, *gdt2; dt = gst_date_time_new_now_utc (); fail_unless (gst_date_time_has_year (dt)); fail_unless (gst_date_time_has_month (dt)); fail_unless (gst_date_time_has_day (dt)); fail_unless (gst_date_time_has...
1
[ "CWE-125" ]
gstreamer
9398b7f1a75b38844ae7050b5a7967e4cdebe24f
129,521,491,408,753,320,000,000,000,000,000,000,000
322
datetime: fix potential out-of-bound read on malformed datetime string https://bugzilla.gnome.org/show_bug.cgi?id=777263
static void jbd2_freeze_jh_data(struct journal_head *jh) { struct page *page; int offset; char *source; struct buffer_head *bh = jh2bh(jh); J_EXPECT_JH(jh, buffer_uptodate(bh), "Possible IO failure.\n"); page = bh->b_page; offset = offset_in_page(bh->b_data); source = kmap_atomic(page); /* Fire data frozen tr...
0
[ "CWE-787" ]
linux
e09463f220ca9a1a1ecfda84fcda658f99a1f12a
315,162,550,773,451,560,000,000,000,000,000,000,000
22
jbd2: don't mark block as modified if the handle is out of credits Do not set the b_modified flag in block's journal head should not until after we're sure that jbd2_journal_dirty_metadat() will not abort with an error due to there not being enough space reserved in the jbd2 handle. Otherwise, future attempts to modi...
static void jas_image_cmpt_destroy(jas_image_cmpt_t *cmpt) { if (cmpt->stream_) { jas_stream_close(cmpt->stream_); } jas_free(cmpt); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
308,261,290,152,105,640,000,000,000,000,000,000,000
7
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
void Http1ServerConnectionImplTest::expect400(Protocol p, bool allow_absolute_url, Buffer::OwnedImpl& buffer, absl::string_view details) { InSequence sequence; if (allow_absolute_url) { codec_settings_.allow_absolute_ur...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
117,035,684,661,478,890,000,000,000,000,000,000,000
28
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
basic_obj_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym id, int pub) { return mrb_respond_to(mrb, obj, id); }
0
[ "CWE-824" ]
mruby
b64ce17852b180dfeea81cf458660be41a78974d
194,736,205,902,274,150,000,000,000,000,000,000,000
4
Should not call `initialize_copy` for `TT_ICLASS`; fix #4027 Since `TT_ICLASS` is a internal object that should never be revealed to Ruby world.
acl_fetch_shdr_val(struct proxy *px, struct session *l4, void *l7, int dir, struct acl_expr *expr, struct acl_test *test) { struct http_txn *txn = l7; if (!txn) return 0; if (txn->rsp.msg_state < HTTP_MSG_BODY) return 0; return acl_fetch_hdr_val(px, l4, txn, txn->rsp.sol, expr, test); }
0
[]
haproxy-1.4
dc80672211e085c211f1fc47e15cfe57ab587d38
76,896,009,605,335,550,000,000,000,000,000,000,000
13
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
void Inspect::operator()(Custom_Error_Ptr e) { append_token(e->message(), e); }
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
201,017,811,934,433,740,000,000,000,000,000,000,000
4
Fix possible bug with handling empty reference combinators Fixes #2665
static inline void crypto_drop_ahash(struct crypto_ahash_spawn *spawn) { crypto_drop_spawn(&spawn->base); }
0
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
66,533,193,039,656,940,000,000,000,000,000,000,000
4
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
static int md5_import(struct shash_desc *desc, const void *in) { struct md5_state *ctx = shash_desc_ctx(desc); memcpy(ctx, in, sizeof(*ctx)); return 0; }
0
[ "CWE-703" ]
linux
bc0b96b54a21246e377122d54569eef71cec535f
272,369,897,977,253,500,000,000,000,000,000,000,000
7
crypto: Move md5_transform to lib/md5.c We are going to use this for TCP/IP sequence number and fragment ID generation. Signed-off-by: David S. Miller <davem@davemloft.net>
void cgi_load_variables(void) { static char *line; char *p, *s, *tok; int len, i; FILE *f = stdin; #ifdef DEBUG_COMMENTS char dummy[100]=""; print_title(dummy); d_printf("<!== Start dump in cgi_load_variables() %s ==>\n",__FILE__); #endif if (!content_length) { p = getenv("CONTENT_LENGTH"); len = p?atoi(p...
0
[]
samba
91f4275873ebeda8f57684f09df67162ae80515a
321,422,790,982,812,880,000,000,000,000,000,000,000
116
swat: Use additional nonce on XSRF protection If the user had a weak password on the root account of a machine running SWAT, there still was a chance of being targetted by an XSRF on a malicious web site targetting the SWAT setup. Use a random nonce stored in secrets.tdb to close this possible attack window. Thanks t...
TEST_F(HeaderToMetadataTest, BadProtobufValueTypeInBase64UrlTest) { const std::string response_config_yaml = R"EOF( response_rules: - header: x-authenticated on_header_present: key: auth type: PROTOBUF_VALUE encode: BASE64 )EOF"; initializeFilter(response_config_yaml); std::string data = "...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
268,223,430,636,782,580,000,000,000,000,000,000,000
18
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
dwg_free_object (Dwg_Object *obj) { int error = 0; long unsigned int j; Dwg_Data *dwg; Bit_Chain *dat = &pdat; if (obj && obj->parent) { dwg = obj->parent; dat->version = dwg->header.version; } else return; if (obj->type == DWG_TYPE_FREED || obj->tio.object == NULL) return; ...
1
[ "CWE-703", "CWE-835" ]
libredwg
c6f6668b82bfe595899cc820279ac37bb9ef16f5
152,824,459,625,928,600,000,000,000,000,000,000,000
317
cleanup tio.unknown not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common entity_data. Fixes GH #178 heap_overflow2
static inline bool is_supported_parser_charset(CHARSET_INFO *cs) { return MY_TEST(cs->mbminlen == 1 && cs->number != 17 /* filename */); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
49,443,100,334,604,240,000,000,000,000,000,000,000
4
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
convertToLinear (unsigned short s[16]) { for (int i = 0; i < 16; ++i) s[i] = logTable[s[i]]; }
0
[ "CWE-190" ]
openexr
eec0dba242bedd2778c973ae4af112107b33d9c9
302,670,966,695,398,600,000,000,000,000,000,000,000
5
fix undefined behavior: ignore unused bits in B44 mode detection (#832) Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int alloc_debug_processing(struct kmem_cache *s, struct page *page, void *object, void *addr) { if (!check_slab(s, page)) goto bad; if (!on_freelist(s, page, object)) { object_err(s, page, object, "Object already allocated"); goto bad; } if (!check_valid_pointer(s, page, object)) { object_err...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
226,878,867,428,597,900,000,000,000,000,000,000,000
39
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
flatpak_dir_set_active (FlatpakDir *self, FlatpakDecomposed *ref, const char *active_id, GCancellable *cancellable, GError **error) { gboolean ret = FALSE; g_autoptr(GFile) deploy_base = NULL...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
73,805,730,378,474,750,000,000,000,000,000,000,000
43
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
ecma_string_pad (ecma_value_t original_string_p, /**< Input ecma string */ ecma_value_t max_length, /**< Length to pad to, including original length */ ecma_value_t fill_string, /**< The string to pad with */ bool pad_on_start) /**< true - if we are padding to the sta...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
209,704,052,164,652,940,000,000,000,000,000,000,000
86
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static SQInteger array_insert(HSQUIRRELVM v) { SQObject &o=stack_get(v,1); SQObject &idx=stack_get(v,2); SQObject &val=stack_get(v,3); if(!_array(o)->Insert(tointeger(idx),val)) return sq_throwerror(v,_SC("index out of range")); sq_pop(v,2); return 1; }
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
122,788,159,013,536,350,000,000,000,000,000,000,000
10
fix in thread.call
static json_t * oidc_get_state_from_cookie(request_rec *r, oidc_cfg *c, const char *cookieValue) { json_t *result = NULL; oidc_util_jwt_verify(r, c->crypto_passphrase, cookieValue, &result); return result; }
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
216,959,981,298,358,700,000,000,000,000,000,000,000
6
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
static int php_stdiop_flush(php_stream *stream) { php_stdio_stream_data *data = (php_stdio_stream_data*)stream->abstract; assert(data != NULL); /* * stdio buffers data in user land. By calling fflush(3), this * data is send to the kernel using write(2). fsync'ing is * something completely different. */ if...
0
[ "CWE-264" ]
php-src
e3133e4db70476fb7adfdedb738483e2255ce0e1
261,124,643,189,467,000,000,000,000,000,000,000,000
16
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
bool Parser::peek_newline(const char* start) { return peek_linefeed(start ? start : position) && ! peek_css<exactly<'{'>>(start); }
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
260,768,409,840,141,600,000,000,000,000,000,000,000
5
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
static void __exit snd_msnd_exit(void) { #ifdef CONFIG_PNP if (pnp_registered) pnp_unregister_card_driver(&msnd_pnpc_driver); if (isa_registered) #endif isa_unregister_driver(&snd_msnd_driver); }
0
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
91,299,725,954,360,920,000,000,000,000,000,000,000
9
ALSA: msnd: Optimize / harden DSP and MIDI loops The ISA msnd drivers have loops fetching the ring-buffer head, tail and size values inside the loops. Such codes are inefficient and fragile. This patch optimizes it, and also adds the sanity check to avoid the endless loops. Bugzilla: https://bugzilla.kernel.org/sho...
hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n) { return vdev->vq[n].pa; }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
95,109,781,586,511,000,000,000,000,000,000,000,000
4
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
asn1_der_decoding (asn1_node * element, const void *ider, int len, char *errorDescription) { asn1_node node, p, p2, p3; char temp[128]; int counter, len2, len3, len4, move, ris, tlen; unsigned char class; unsigned long tag; int indefinite, result; const unsigned char *der = ider; node = *element; ...
1
[]
libtasn1
154909136c12cfa5c60732b7210827dfb1ec6aee
115,604,692,679,076,540,000,000,000,000,000,000,000
532
More precise tracking of data.
bool operator()(const CPUDevice& d, typename TTypes<float, 4>::ConstTensor grads, typename TTypes<T, 4>::ConstTensor image, typename TTypes<float, 2>::ConstTensor boxes, typename TTypes<int32, 1>::ConstTensor box_index, typename...
0
[ "CWE-190" ]
tensorflow
7c1692bd417eb4f9b33ead749a41166d6080af85
306,788,366,940,198,140,000,000,000,000,000,000,000
105
PR #51732: Fix crash of tf.image.crop_and_resize when input is large number Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/51732 This PR is part of the effort in #46890 where tf.image.crop_and_resize will crash if shape consists of large number. Signed-off-by: Yong Tang <yong.tang.github@outlo...
static PHP_INI_MH(OnTypeLibFileUpdate) { FILE *typelib_file; char *typelib_name_buffer; char *strtok_buf = NULL; int cached; if (NULL == new_value || !new_value->val[0] || (typelib_file = VCWD_FOPEN(new_value->val, "r"))==NULL) { return FAILURE; } typelib_name_buffer = (char *) emalloc(sizeof(char)*1024); ...
0
[ "CWE-502" ]
php-src
115ee49b0be12e3df7d2c7027609fbe1a1297e42
330,280,181,138,137,940,000,000,000,000,000,000,000
57
Fix #77177: Serializing or unserializing COM objects crashes Firstly, we avoid returning NULL from the get_property handler, but instead return an empty HashTable, which already prevents the crashes. Secondly, since (de-)serialization obviously makes no sense for COM, DOTNET and VARIANT objects (at least with the curr...
void * nedmalloc(size_t size) THROWSPEC { return nedpmalloc(0, size); }
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
237,200,272,537,773,120,000,000,000,000,000,000,000
1
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
deref_function_name( char_u **arg, char_u **tofree, evalarg_T *evalarg, int verbose) { typval_T ref; char_u *name = *arg; int save_flags = 0; ref.v_type = VAR_UNKNOWN; if (evalarg != NULL) { // need to evaluate this to get an import, like in "a.Func" save_flags = evalarg...
0
[ "CWE-476" ]
vim
69082916c8b5d321545d60b9f5facad0a2dd5a4e
220,351,947,254,618,130,000,000,000,000,000,000,000
70
patch 9.0.0552: crash when using NUL in buffer that uses :source Problem: Crash when using NUL in buffer that uses :source. Solution: Don't get a next line when skipping over NL.
size_t RemoteIo::size() const { return (long) p_->size_; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
78,992,547,486,235,440,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
size_t olm_pk_signature_length(void) { return olm::encode_base64_length(ED25519_SIGNATURE_LENGTH); }
0
[ "CWE-787" ]
olm
ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b
216,757,520,469,136,820,000,000,000,000,000,000,000
3
olm_pk_decrypt: Ensure inputs are of correct length.
BlockDriver *bdrv_find_format(const char *format_name) { BlockDriver *drv1; QLIST_FOREACH(drv1, &bdrv_drivers, list) { if (!strcmp(drv1->format_name, format_name)) { return drv1; } } return NULL; }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
177,212,086,327,015,330,000,000,000,000,000,000,000
10
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...
int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen) { int i; BN_ULONG l; bn_check_top(a); i = BN_num_bytes(a); if (tolen < i) return -1; /* Add trailing zeroes if necessary */ if (tolen > i) memset(to + i, 0, tolen - i); to += i; while (i--) { l ...
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
61,507,084,604,781,420,000,000,000,000,000,000,000
19
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int nonblock, int flags, int *addr_len) { const struct dccp_hdr *dh; long timeo; lock_sock(sk); if (sk->sk_state == DCCP_LISTEN) { len = -ENOTCONN; goto out; } timeo = sock_rcvtimeo(sk, nonblock); do { struct sk_bu...
1
[]
linux
7bced397510ab569d31de4c70b39e13355046387
222,684,846,263,845,800,000,000,000,000,000,000,000
105
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
dictionary * iniparser_load(const char * ininame) { FILE * in ; char line [ASCIILINESZ+1] ; char section [ASCIILINESZ+1] ; char key [ASCIILINESZ+1] ; char tmp [(ASCIILINESZ * 2) + 1] ; char val [ASCIILINESZ+1] ; int last=0 ; int len ; int lineno=0 ; int errs=...
0
[]
iniparser
4f870752abbb756911d7b11405d49e9769d082bd
121,284,349,865,156,460,000,000,000,000,000,000,000
105
Fix #68 when reading file with only \0 char
static int is_accepting_streams(h2_proxy_session *session) { switch (session->state) { case H2_PROXYS_ST_IDLE: case H2_PROXYS_ST_BUSY: case H2_PROXYS_ST_WAIT: return 1; default: return 0; } }
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
62,914,385,516,494,030,000,000,000,000,000,000,000
11
* 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...
static int StreamTcpTest16 (void) { Packet *p = SCMalloc(SIZE_OF_PACKET); if (unlikely(p == NULL)) return 0; Flow f; ThreadVars tv; StreamTcpThread stt; TCPHdr tcph; uint8_t payload[4]; struct in_addr addr; IPV4Hdr ipv4h; char os_policy_name[10] = "windows"; const cha...
0
[]
suricata
843d0b7a10bb45627f94764a6c5d468a24143345
2,103,765,273,083,562,300,000,000,000,000,000,000
161
stream: support RST getting lost/ignored In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'. However, the target of the RST may not have received it, or may not have accepted it. Also, the RST may have been injected, so the supposed sender may not actually be aware of the RST that was sent in it's ...
static int ntop_load_dump_prefs(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); ntop_interface->loadDumpPrefs(); return(CONST_LUA_OK); }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
93,155,109,667,392,370,000,000,000,000,000,000,000
8
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static const unsigned char *sha1_access(size_t pos, void *table) { struct pack_idx_entry **index = table; return index[pos]->sha1; }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
195,194,752,097,010,730,000,000,000,000,000,000,000
5
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static inline void update_cgrp_time_from_cpuctx(struct perf_cpu_context *cpuctx) { }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
70,913,845,147,926,730,000,000,000,000,000,000,000
3
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
get_compl_len(void) { int off = (int)curwin->w_cursor.col - (int)compl_col; if (off < 0) return 0; return off; }
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
29,735,961,103,781,857,000,000,000,000,000,000,000
8
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
static const char *cmd_audit_log_relevant_status(cmd_parms *cmd, void *_dcfg, const char *p1) { directory_config *dcfg = _dcfg; dcfg->auditlog_relevant_regex = msc_pregcomp(cmd->pool, p1, PCRE_DOTALL, NULL, NULL); if (dcfg->auditlog_relevant_regex == NULL) { return apr_psprintf(cmd->pool, "...
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
31,864,758,016,586,020,000,000,000,000,000,000,000
12
Added SecXmlExternalEntity
int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log) { int r; struct kvm_memory_slot *memslot; unsigned long n, nr_dirty_pages; mutex_lock(&kvm->slots_lock); r = -EINVAL; if (log->slot >= KVM_MEMORY_SLOTS) goto out; memslot = id_to_memslot(kvm->memslots, log->slot); r = -ENO...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
192,537,544,699,657,100,000,000,000,000,000,000,000
63
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, int new_below) { struct vm_area_struct *new; int err; if (is_vm_hugetlb_page(vma) && (addr & ~(huge_page_mask(hstate_vma(vma))))) return -EINVAL; new = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); if (!new) return -...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
170,903,807,571,604,930,000,000,000,000,000,000,000
62
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
ruby_glob0(const char *path, int fd, const char *base, int flags, const ruby_glob_funcs_t *funcs, VALUE arg, rb_encoding *enc) { struct glob_pattern *list; const char *root, *start; char *buf; size_t n, baselen = 0; int status, dirsep = FALSE; start = root = path; if (*root == '{')...
0
[]
ruby
a0a2640b398cffd351f87d3f6243103add66575b
75,933,004,547,874,000,000,000,000,000,000,000,000
54
Fix for wrong fnmatch patttern * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617
keystr_from_pk_with_sub (PKT_public_key *main_pk, PKT_public_key *sub_pk) { keyid_from_pk (main_pk, NULL); if (sub_pk) keyid_from_pk (sub_pk, NULL); return keystr_with_sub (main_pk->keyid, sub_pk? sub_pk->keyid:NULL); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
249,975,140,685,110,500,000,000,000,000,000,000,000
8
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 ...
static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages) { struct qstr this = QSTR_INIT("[aio]", 5); struct file *file; struct path path; struct inode *inode = alloc_anon_inode(aio_mnt->mnt_sb); if (IS_ERR(inode)) return ERR_CAST(inode); inode->i_mapping->a_ops = &aio_ctx_aops; inode->i_mappi...
0
[ "CWE-200" ]
linux
edfbbf388f293d70bf4b7c0bc38774d05e6f711a
206,510,938,226,349,300,000,000,000,000,000,000,000
31
aio: fix kernel memory disclosure in io_getevents() introduced in v3.10 A kernel memory disclosure was introduced in aio_read_events_ring() in v3.10 by commit a31ad380bed817aa25f8830ad23e1a0480fef797. The changes made to aio_read_events_ring() failed to correctly limit the index into ctx->ring_pages[], allowing an at...
static unsigned long segment_base(u16 selector) { struct desc_struct *table; unsigned long v; if (!(selector & ~SEGMENT_RPL_MASK)) return 0; table = get_current_gdt_ro(); if ((selector & SEGMENT_TI_MASK) == SEGMENT_LDT) { u16 ldt_selector = kvm_read_ldt(); if (!(ldt_selector & ~SEGMENT_RPL_MASK)) retu...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
263,497,604,163,547,270,000,000,000,000,000,000,000
21
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception) { #define EnhanceImageTag "Enhance/Image" #define EnhancePixel(weight) \ mean=QuantumScale*((double) GetPixelRed(image,r)+pixel.red)/2.0; \ distance=QuantumScale*((double) GetPixelRed(image,r)-pixel.red); \ distance_squared=(4.0+mean)*...
0
[ "CWE-399", "CWE-119", "CWE-787" ]
ImageMagick
d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
302,976,961,672,308,500,000,000,000,000,000,000,000
170
https://github.com/ImageMagick/ImageMagick/issues/1611
int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { struct net_device *dev = ctl->extra1; struct inet6_dev *idev; int ret; if ((strcmp(ctl->procname, "retrans_time") == 0) || (strcmp(ctl->procname, "base_reachable_time") == 0)) ndisc_warn_depre...
0
[ "CWE-17" ]
linux
6fd99094de2b83d1d4c8457f2c83483b2828e75a
4,023,364,495,039,905,500,000,000,000,000,000,000
34
ipv6: Don't reduce hop limit for an interface A local route may have a lower hop_limit set than global routes do. RFC 3756, Section 4.2.7, "Parameter Spoofing" > 1. The attacker includes a Current Hop Limit of one or another small > number which the attacker knows will cause legitimate packets to > be...
void get_whoami_test() { print_whoami("a/b/c/quack1"); print_whoami("a/b/c/quack2.exe"); print_whoami("a\\b\\c\\quack3"); print_whoami("a\\b\\c\\quack4.exe"); }
0
[ "CWE-125" ]
qpdf
6d46346eb93d5032c08cf1e39023b5d57260a766
189,028,178,539,225,400,000,000,000,000,000,000,000
7
Detect integer overflow/underflow
static int __io_sqe_files_update(struct io_ring_ctx *ctx, struct io_uring_files_update *up, unsigned nr_args) { struct fixed_file_data *data = ctx->file_data; struct fixed_file_ref_node *ref_node; struct file *file; __s32 __user *fds; int fd, i, err; __u32 done; bool needs_switch = false; if (check_a...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
23,563,316,250,476,817,000,000,000,000,000,000,000
87
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
copy_attr_error (struct error_context *ctx, char const *fmt, ...) { int err = errno; va_list ap; if (err != ENOSYS && err != ENOTSUP && err != EPERM) { /* use verror module to print error message */ va_start (ap, fmt); verror (0, err, fmt, ap); va_end (ap); } }
0
[ "CWE-59" ]
patch
dce4683cbbe107a95f1f0d45fabc304acfb5d71a
135,115,459,267,985,390,000,000,000,000,000,000,000
13
Don't follow symlinks unless --follow-symlinks is given * src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file, append_to_file): Unless the --follow-symlinks option is given, open files with the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing that consistently for input files. * src/u...
static void free_cgrp_cset_links(struct list_head *links_to_free) { struct cgrp_cset_link *link, *tmp_link; list_for_each_entry_safe(link, tmp_link, links_to_free, cset_link) { list_del(&link->cset_link); kfree(link); } }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
39,336,353,933,636,320,000,000,000,000,000,000,000
9
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
TEST_F(HttpConnectionManagerImplTest, TestAccessLog) { static constexpr char local_address[] = "0.0.0.0"; static constexpr char xff_address[] = "1.2.3.4"; // stream_info.downstreamRemoteAddress will infer the address from request // headers instead of the physical connection use_remote_address_ = false; se...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
159,101,042,868,530,670,000,000,000,000,000,000,000
55
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
rend_service_path(const rend_service_t *service, const char *file_name) { char *file_path = NULL; tor_assert(service->directory); /* Can never fail: asserts rather than leaving file_path NULL. */ tor_asprintf(&file_path, "%s%s%s", service->directory, PATH_SEPARATOR, file_name); return file_p...
0
[ "CWE-532" ]
tor
09ea89764a4d3a907808ed7d4fe42abfe64bd486
254,107,430,087,403,200,000,000,000,000,000,000,000
12
Fix log-uninitialized-stack bug in rend_service_intro_established. Fixes bug 23490; bugfix on 0.2.7.2-alpha. TROVE-2017-008 CVE-2017-0380