func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
DEFUN (ipv6_nd_homeagent_preference, ipv6_nd_homeagent_preference_cmd, "ipv6 nd home-agent-preference <0-65535>", "Interface IPv6 config commands\n" "Neighbor discovery\n" "Home Agent preference\n" "preference value (default is 0, least preferred)\n") { struct interface *ifp ...
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
213,256,019,158,910,750,000,000,000,000,000,000,000
13
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
static void long_filter_high_3800(int32_t *buffer, int order, int shift, int32_t *coeffs, int32_t *delay, int length) { int i, j; int32_t dotprod, sign; if (order >= length) return; memset(coeffs, 0, order * sizeof(*coeffs)); for (i = 0; i < order; i++) ...
0
[ "CWE-125" ]
FFmpeg
96349da5ec8eda9f0368446e557fe0c8ba0e66b7
91,504,440,748,081,750,000,000,000,000,000,000,000
25
avcodec/apedec: Fix integer overflow Fixes: out of array access Fixes: PoC.ape and others Found-by: Bingchang, Liu@VARAS of IIE Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit ba4beaf6149f7241c8bd85fe853318c2f6837ad0) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static const char** get_type_str_mapping(void) /* {{{ */ { static const char* str_mapping[TYPE_STR_MAP_SIZE]; static int first = 1; if (first) { /* warning. do not add/delete without changing size define */ str_mapping[xmlrpc_none] = "none"; str_mapping[xmlrpc_empty] = "empty"; str_mapping[xmlrpc_base...
0
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
224,967,010,423,514,660,000,000,000,000,000,000,000
23
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c
static double mp_matrix_eig(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const double *ptr1 = &_mp_arg(2) + 1; const unsigned int k = (unsigned int)mp.opcode[3]; CImg<doubleT> val, vec; CImg<doubleT>(ptr1,k,k,1,1,true).symmetric_eigen(val,vec); CImg<dou...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
335,040,256,883,046,000,000,000,000,000,000,000,000
10
Fix other issues in 'CImg<T>::load_bmp()'.
void Filter::onUpstreamComplete(UpstreamRequest& upstream_request) { if (!downstream_end_stream_) { upstream_request.resetStream(); } callbacks_->streamInfo().setUpstreamTiming(final_upstream_request_->upstreamTiming()); Event::Dispatcher& dispatcher = callbacks_->dispatcher(); std::chrono::milliseconds ...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
287,209,851,811,138,600,000,000,000,000,000,000,000
55
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static int f2fs_set_qf_name(struct super_block *sb, int qtype, substring_t *args) { struct f2fs_sb_info *sbi = F2FS_SB(sb); char *qname; int ret = -EINVAL; if (sb_any_quota_loaded(sb) && !sbi->s_qf_names[qtype]) { f2fs_msg(sb, KERN_ERR, "Cannot change journaled " "quota options when quota turned on"...
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
80,585,095,356,450,540,000,000,000,000,000,000,000
40
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
MaybeLocal<Object> GetPubKey(Environment* env, const RSAPointer& rsa) { int size = i2d_RSA_PUBKEY(rsa.get(), nullptr); CHECK_GE(size, 0); std::unique_ptr<BackingStore> bs; { NoArrayBufferZeroFillScope no_zero_fill_scope(env->isolate_data()); bs = ArrayBuffer::NewBackingStore(env->isolate(), size); } ...
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
171,989,711,491,449,640,000,000,000,000,000,000,000
16
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
SpoolssSetJob_r(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) { /* Parse packet */ offset = dissect_doserror( tvb, offset, pinfo, tree, di, drep, hf_rc, NULL); return offset; }
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
155,461,184,820,869,580,000,000,000,000,000,000,000
10
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
static inline bool cpu_has_vmx_eptp_uncacheable(void) { return vmx_capability.ept & VMX_EPTP_UC_BIT; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
188,613,779,204,003,270,000,000,000,000,000,000,000
4
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
int mp_is_bit_set (mp_int *a, mp_digit b) { return fp_is_bit_set(a, b); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
192,153,639,349,054,200,000,000,000,000,000,000,000
4
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport) { struct sock *sk = skb->sk; struct ipv6_pinfo *np = inet6_sk(sk); struct flowi6 *fl6 = &transport->fl.u.ip6; int res; pr_debug("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\n", __func__, skb, skb->len, &fl6->saddr, &fl6->daddr); IP6_ECN...
0
[ "CWE-241" ]
linux
fdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8
191,653,732,903,257,900,000,000,000,000,000,000,000
23
sctp: do not inherit ipv6_{mc|ac|fl}_list from parent SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit ipv6_mc_list from parent"), otherwise bad things can happen. Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Andrey Konovalov <andreyknvl@google.com> Tested-by: Andrey Konovalov <a...
void tty_ldisc_begin(void) { /* Setup the default TTY line discipline. */ (void) tty_register_ldisc(N_TTY, &tty_ldisc_N_TTY); }
0
[ "CWE-200" ]
linux-stable
dd42bf1197144ede075a9d4793123f7689e164bc
267,527,074,698,366,480,000,000,000,000,000,000,000
5
tty: Prevent ldisc drivers from re-using stale tty fields Line discipline drivers may mistakenly misuse ldisc-related fields when initializing. For example, a failure to initialize tty->receive_room in the N_GIGASET_M101 line discipline was recently found and fixed [1]. Now, the N_X25 line discipline has been discover...
int parse_cmdline_decoder(int argc, char **argv, opj_decompress_parameters *parameters, img_fol_t *img_fol) { /* parse the command line */ int totlen, c; opj_option_t long_option[] = { {"ImgDir", REQ_ARG, NULL, 'y'}, {"OutFor", REQ_ARG, NULL, 'O'}, {"f...
0
[ "CWE-824" ]
openjpeg
0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d
303,608,850,169,377,860,000,000,000,000,000,000,000
361
Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369)
CMSAPI cmsBool CMSEXPORT cmsMLUgetTranslation(const cmsMLU* mlu, const char LanguageCode[3], const char CountryCode[3], char ObtainedLanguage[3], char ObtainedCountry[3]) { const wchar_t *Wide; cmsUInt16Number Lang = _...
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
162,976,299,733,484,800,000,000,000,000,000,000,000
23
Fixes from coverity check
static netdev_tx_t peak_usb_ndo_start_xmit(struct sk_buff *skb, struct net_device *netdev) { struct peak_usb_device *dev = netdev_priv(netdev); struct peak_tx_urb_context *context = NULL; struct net_device_stats *stats = &netdev->stats; struct canfd_frame *cfd = (struct canfd_frame *)skb->data; struct urb ...
0
[ "CWE-909" ]
linux
f7a1337f0d29b98733c8824e165fca3371d7d4fd
94,926,496,368,918,620,000,000,000,000,000,000,000
82
can: peak_usb: fix slab info leak Fix a small slab info leak due to a failure to clear the command buffer at allocation. The first 16 bytes of the command buffer are always sent to the device in pcan_usb_send_cmd() even though only the first two may have been initialised in case no argument payload is provided (e.g. ...
static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) { const struct nf_conntrack_zone *zone; struct nlattr *nest_parms; zone = nf_ct_zone(ct); nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG); if (!nest_parms) goto nla_put_failure; if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
223,164,885,306,281,950,000,000,000,000,000,000,000
71
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
u64 AVI_bytes_remain(avi_t *AVI) { if(AVI->mode==AVI_MODE_READ) return 0; return ( AVI_MAX_LEN - (AVI->pos + 8 + 16*AVI->n_idx)); }
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
115,084,716,367,602,700,000,000,000,000,000,000,000
6
fixed #2159
struct ipv6_txoptions *ipv6_update_options(struct sock *sk, struct ipv6_txoptions *opt) { if (inet_sk(sk)->is_icsk) { if (opt && !((1 << sk->sk_state) & (TCPF_LISTEN | TCPF_CLOSE)) && inet_sk(sk)->inet_daddr != LOOPBACK4_IPV6) { struct inet_connection_sock *icsk = inet_csk(sk); icsk->icsk_e...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
232,611,071,931,164,270,000,000,000,000,000,000,000
18
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
k5_asn1_full_decode(const krb5_data *code, const struct atype_info *a, void **retrep) { krb5_error_code ret; const uint8_t *contents, *remainder; size_t clen, rlen; taginfo t; *retrep = NULL; ret = get_tag((uint8_t *)code->data, code->length, &t, &contents, ...
0
[ "CWE-674", "CWE-787" ]
krb5
57415dda6cf04e73ffc3723be518eddfae599bfd
266,285,253,784,166,770,000,000,000,000,000,000,000
19
Add recursion limit for ASN.1 indefinite lengths The libkrb5 ASN.1 decoder supports BER indefinite lengths. It computes the tag length using recursion; the lack of a recursion limit allows an attacker to overrun the stack and cause the process to crash. Reported by Demi Obenour. CVE-2020-28196: In MIT krb5 release...
off_t vfs_transfer_file(files_struct *in, files_struct *out, off_t n) { return transfer_file_internal((void *)in, (void *)out, n, vfs_pread_fn, vfs_pwrite_fn); }
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
153,675,061,639,425,480,000,000,000,000,000,000,000
5
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
} static void date_object_free_storage_timezone(void *object TSRMLS_DC) { php_timezone_obj *intern = (php_timezone_obj *)object; if (intern->type == TIMELIB_ZONETYPE_ABBR) { free(intern->tzi.z.abbr); } zend_object_std_dtor(&intern->std TSRMLS_CC);
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
50,781,182,622,549,845,000,000,000,000,000,000,000
10
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
static int cap_unix_may_send(struct socket *sock, struct socket *other) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
275,649,130,828,425,330,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int digi_open(struct tty_struct *tty, struct usb_serial_port *port) { int ret; unsigned char buf[32]; struct digi_port *priv = usb_get_serial_port_data(port); struct ktermios not_termios; /* be sure the device is started up */ if (digi_startup_device(port->serial) != 0) return -ENXIO; /* read modem si...
0
[ "CWE-703" ]
linux
5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f
34,637,691,666,103,646,000,000,000,000,000,000,000
35
USB: digi_acceleport: do sanity checking for the number of ports The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <ONeukum@suse.com> [johan: fix OOB endpoint check and add error messages ] Cc: stab...
static ssize_t mbed_send(struct connectdata *conn, int sockindex, const void *mem, size_t len, CURLcode *curlcode) { int ret = -1; ret = mbedtls_ssl_write(&conn->ssl[sockindex].ssl, (unsigned char *)mem, len); if(ret < 0) { *curlcod...
0
[ "CWE-20" ]
curl
6efd2fa529a189bf41736a610f6184cd8ad94b4d
157,473,584,791,631,730,000,000,000,000,000,000,000
17
mbedtls/polarssl: set "hostname" unconditionally ...as otherwise the TLS libs will skip the CN/SAN check and just allow connection to any server. curl previously skipped this function when SNI wasn't used or when connecting to an IP address specified host. CVE-2016-3739 Bug: https://curl.haxx.se/docs/adv_20160518A.h...
int mp_lcm(fp_int *a, fp_int *b, fp_int *c) { return fp_lcm(a, b, c); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
151,945,577,670,840,510,000,000,000,000,000,000,000
4
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
void decode_prediction_unit(base_context* ctx, const slice_segment_header* shdr, de265_image* img, const PBMotionCoding& motion, int xC,int yC, int xB,int yB, int nCS, int nPbW,int nPbH, int partIdx) { logt...
0
[ "CWE-787" ]
libde265
697aa4f7c774abd6374596e6707a6f4f54265355
108,737,342,417,743,940,000,000,000,000,000,000,000
24
fix MC with HDR chroma, but SDR luma (#301)
ex_join(exarg_T *eap) { curwin->w_cursor.lnum = eap->line1; if (eap->line1 == eap->line2) { if (eap->addr_count >= 2) /* :2,2join does nothing */ return; if (eap->line2 == curbuf->b_ml.ml_line_count) { beep_flush(); return; } ++eap->line2; } (void)do_join(eap->line2 - eap->line...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
90,555,993,409,430,670,000,000,000,000,000,000,000
18
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static int ims_pcu_send_command(struct ims_pcu *pcu, u8 command, const u8 *data, int len) { int count = 0; int chunk = 0; int delta; int i; int error; u8 csum = 0; u8 ack_id; pcu->urb_out_buf[count++] = IMS_PCU_PROTOCOL_STX; /* We know the command need not be escaped */ pcu->urb_out_buf[count++] = comma...
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
13,219,267,648,900,060,000,000,000,000,000,000,000
65
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
static int bnep_send(struct bnep_session *s, void *data, size_t len) { struct socket *sock = s->sock; struct kvec iv = { data, len }; return kernel_sendmsg(sock, &s->msg, &iv, 1, len); }
0
[ "CWE-20", "CWE-284" ]
linux
71bb99a02b32b4cc4265118e85f6035ca72923f0
296,549,727,055,285,000,000,000,000,000,000,000,000
7
Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket same story as cmtp Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
replace_termcodes( char_u *from, char_u **bufp, int flags, int *did_simplify) { int i; int slen; int key; size_t dlen = 0; char_u *src; int do_backslash; // backslash is a special character int do_special; // recognize <> key codes int do_key_code; // recognize ra...
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
321,377,897,997,564,530,000,000,000,000,000,000,000
248
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
static int add_push_report_sideband_pkt(git_push *push, git_pkt_data *data_pkt, git_buf *data_pkt_buf) { git_pkt *pkt; const char *line, *line_end = NULL; size_t line_len; int error; int reading_from_buf = data_pkt_buf->size > 0; if (reading_from_buf) { /* We had an existing partial packet, so add the new *...
0
[ "CWE-476", "CWE-119" ]
libgit2
2fdef641fd0dd2828bd948234ae86de75221a11a
16,158,530,877,760,216,000,000,000,000,000,000,000
53
smart_pkt: treat empty packet lines as error The Git protocol does not specify what should happen in the case of an empty packet line (that is a packet line "0004"). We currently indicate success, but do not return a packet in the case where we hit an empty line. The smart protocol was not prepared to handle such pack...
option_expand(int opt_idx, char_u *val) { // if option doesn't need expansion nothing to do if (!(options[opt_idx].flags & P_EXPAND) || options[opt_idx].var == NULL) return NULL; // If val is longer than MAXPATHL no meaningful expansion can be done, // expand_env() would truncate the string. if (v...
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
107,514,520,770,639,100,000,000,000,000,000,000,000
31
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc) { struct sctp_chunk *ack; struct sctp_chunk *tmp; list_for_each_entry_safe(ack, tmp, &asoc->asconf_ack_list, transmitted_list) { list_del_init(&ack->transmitted_list); sctp_chunk_free(ack); } }
0
[ "CWE-287" ]
linux-2.6
add52379dde2e5300e2d574b172e62c6cf43b3d3
273,096,744,480,168,020,000,000,000,000,000,000,000
11
sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH If INIT-ACK is received with SupportedExtensions parameter which indicates that the peer does not support AUTH, the packet will be silently ignore, and sctp_process_init() do cleanup all of the transports in the association. When T1-Init timer is ex...
sta_cleanup(struct ar6_softc *ar, u8 i) { struct sk_buff *skb; /* empty the queued pkts in the PS queue if any */ A_MUTEX_LOCK(&ar->sta_list[i].psqLock); while (!A_NETBUF_QUEUE_EMPTY(&ar->sta_list[i].psq)) { skb = A_NETBUF_DEQUEUE(&ar->sta_list[i].psq); A_NETBUF_FREE(skb); } A_M...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
154,769,960,930,431,700,000,000,000,000,000,000,000
22
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static void mark_reg_known_zero(struct bpf_verifier_env *env, struct bpf_reg_state *regs, u32 regno) { if (WARN_ON(regno >= MAX_BPF_REG)) { verbose(env, "mark_reg_known_zero(regs, %u)\n", regno); /* Something bad happened, let's kill all regs */ for (regno = 0; regno < MAX_BPF_REG; regno++) __mark_reg_not...
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
37,466,457,515,195,910,000,000,000,000,000,000,000
12
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
static int io_allocate_scq_urings(struct io_ring_ctx *ctx, struct io_uring_params *p) { struct io_rings *rings; size_t size, sq_array_offset; /* make sure these are sane, as we already accounted them */ ctx->sq_entries = p->sq_entries; ctx->cq_entries = p->cq_entries; size = rings_size(p->sq_entries, p->...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
286,739,134,914,414,900,000,000,000,000,000,000,000
43
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
nautilus_file_operations_trash_or_delete (GList *files, GtkWindow *parent_window, NautilusDeleteCallback done_callback, gpointer done_callback_data)...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
294,656,993,801,775,470,000,000,000,000,000,000,000
9
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
stringprep_find_character_in_table (uint32_t ucs4, const Stringprep_table_element * table) { ssize_t i; /* This is where typical uses of Libidn spends very close to all CPU time and causes most cache misses. One could easily do a binary search instead. Before rewriting this, I want hard evidenc...
0
[]
libidn
2e97c2796581c27213962c77f5a8571a598f9a2e
291,730,870,095,935,330,000,000,000,000,000,000,000
20
libidn: stringprep_utf8_to_ucs4 now rejects invalid UTF-8. CVE-2015-2059
int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb) { int error = 0; struct cxio_rdev *rdev; rdev = (struct cxio_rdev *)tdev->ulp; if (cxio_fatal_error(rdev)) { kfree_skb(skb); return -EIO; } error = cxgb3_ofld_send(tdev, skb); if (error < 0) kfree_skb(skb); return error < 0 ? error : 0; }
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
206,728,885,451,284,670,000,000,000,000,000,000,000
15
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
load_debug_sup_file (const char * main_filename, void * file) { if (! load_debug_section (debug_sup, file)) return; /* No .debug_sup section. */ struct dwarf_section * section; section = & debug_displays [debug_sup].section; assert (section != NULL); if (section->start == NULL || section->size < 5) ...
0
[ "CWE-703" ]
binutils-gdb
695c6dfe7e85006b98c8b746f3fd5f913c94ebff
151,279,199,102,567,140,000,000,000,000,000,000,000
68
PR29370, infinite loop in display_debug_abbrev The PR29370 testcase is a fuzzed object file with multiple .trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev sections are not a violation of the DWARF standard. The DWARF5 standard even gives an example of multiple .debug_abbrev sections contained in group...
Integer InvertibleRWFunction::CalculateInverse(RandomNumberGenerator &rng, const Integer &x) const { DoQuickSanityCheck(); ModularArithmetic modn(m_n); Integer r, rInv; do { // do this in a loop for people using small numbers for testing r.Randomize(rng, Integer::One(), m_n - Integer::One()); rInv = modn.Multip...
1
[ "CWE-200", "CWE-399" ]
cryptopp
9425e16437439e68c7d96abef922167d68fafaff
56,333,125,280,648,790,000,000,000,000,000,000,000
35
Fix for CVE-2015-2141. Thanks to Evgeny Sidorov for reporting. Squaring to satisfy Jacobi requirements suggested by JPM.
static void emulator_triple_fault(struct x86_emulate_ctxt *ctxt) { kvm_make_request(KVM_REQ_TRIPLE_FAULT, emul_to_vcpu(ctxt)); }
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
279,257,077,541,925,900,000,000,000,000,000,000,000
4
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
compute_O_rc4_key(std::string const& user_password, std::string const& owner_password, QPDF::EncryptionData const& data, unsigned char key[OU_key_bytes_V4]) { if (data.getV() >= 5) { throw std::logic_error( "compute_O_rc4_key called for file with V >= 5"); } std::string password = owne...
0
[ "CWE-125" ]
qpdf
dea704f0ab7f625e1e7b3f9a1110b45b63157317
73,847,335,834,573,540,000,000,000,000,000,000,000
22
Pad keys to avoid memory errors (fixes #147)
NO_INLINE JsVar *jspeStatementVar() { JsVar *lastDefined = 0; /* variable creation. TODO - we need a better way of parsing the left * hand side. Maybe just have a flag called can_create_var that we * set and then we parse as if we're doing a normal equals.*/ assert(lex->tk==LEX_R_VAR || lex->tk==LEX_R_LET |...
0
[ "CWE-119", "CWE-125" ]
Espruino
c36d30529118aa049797db43f111ddad468aad29
65,792,205,063,486,600,000,000,000,000,000,000,000
35
Fix stack overflow if void void void... is repeated many times (fix #1434)
d_lite_leap_p(VALUE self) { int rjd, ns, ry, rm, rd; get_d1(self); if (m_gregorian_p(dat)) return f_boolcast(c_gregorian_leap_p(m_year(dat))); c_civil_to_jd(m_year(dat), 3, 1, m_virtual_sg(dat), &rjd, &ns); c_jd_to_civil(rjd - 1, m_virtual_sg(dat), &ry, &rm, &rd); return f_boolcast(rd == ...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
77,383,672,505,391,100,000,000,000,000,000,000,000
13
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
int h2_make_htx_response(struct http_hdr *list, struct htx *htx, unsigned int *msgf, unsigned long long *body_len, char *upgrade_protocol) { struct ist phdr_val[H2_PHDR_NUM_ENTRIES]; uint32_t fields; /* bit mask of H2_PHDR_FND_* */ uint32_t idx; int phdr; int ret; int i; struct htx_sl *sl = NULL; unsigned int s...
0
[]
haproxy
a495e0d94876c9d39763db319f609351907a31e8
235,006,780,813,097,040,000,000,000,000,000,000,000
144
BUG/MAJOR: h2: verify early that non-http/https schemes match the valid syntax While we do explicitly check for strict character sets in the scheme, this is only done when extracting URL components from an assembled one, and we have special handling for "http" and "https" schemes directly in the H2-to-HTX conversion. ...
void rt_del_uncached_list(struct rtable *rt) { if (!list_empty(&rt->rt_uncached)) { struct uncached_list *ul = rt->rt_uncached_list; spin_lock_bh(&ul->lock); list_del(&rt->rt_uncached); spin_unlock_bh(&ul->lock); } }
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
166,730,411,389,976,900,000,000,000,000,000,000,000
10
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
CModule::EModRet CModule::OnPrivTextMessage(CTextMessage& Message) { CString sText = Message.GetText(); EModRet ret = OnPrivMsg(Message.GetNick(), sText); Message.SetText(sText); return ret; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
122,837,882,407,389,770,000,000,000,000,000,000,000
6
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
CertificateRequest::CertificateRequest() : typeTotal_(0) { memset(certificate_types_, 0, sizeof(certificate_types_)); }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
138,363,116,585,844,130,000,000,000,000,000,000,000
5
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static IOBuffer *io_buffer_new(GError **err) { IOBuffer *buffer; buffer = g_try_malloc(sizeof(IOBuffer)); if (!buffer) { g_set_error_literal(err, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, _("Cannot allocate memory for IOBuffer st...
0
[ "CWE-119" ]
gdk-pixbuf
edf6fb8d856574bc3bb3a703037f56533229267c
310,214,594,094,449,900,000,000,000,000,000,000,000
14
tga: Wrap TGAColormap struct in its own API Instead of poking into it directly.
static int rtl8xxxu_active_to_emu(struct rtl8xxxu_priv *priv) { u8 val8; int count, ret = 0; /* Start of rtl8723AU_card_enable_flow */ /* Act to Cardemu sequence*/ /* Turn off RF */ rtl8xxxu_write8(priv, REG_RF_CTRL, 0); /* 0x004E[7] = 0, switch DPDT_SEL_P output from register 0x0065[2] */ val8 = rtl8xxxu_rea...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
121,240,497,329,886,500,000,000,000,000,000,000,000
47
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
void __weak arch_setup_pdev_archdata(struct platform_device *pdev) { }
0
[ "CWE-362", "CWE-284" ]
linux
6265539776a0810b7ce6398c27866ddb9c6bd154
242,561,538,839,391,000,000,000,000,000,000,000,000
3
driver core: platform: fix race condition with driver_override The driver_override implementation is susceptible to race condition when different threads are reading vs storing a different driver override. Add locking to avoid race condition. Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive...
void SplashOutputDev::getMatteColor(SplashColorMode colorMode, GfxImageColorMap *colorMap, const GfxColor *matteColorIn, SplashColor matteColor) { GfxGray gray; GfxRGB rgb; #ifdef SPLASH_CMYK GfxCMYK cmyk; GfxColor deviceN; #endif switch (colorMode) { case splashModeMono1: case splashModeMono8: ...
0
[ "CWE-369" ]
poppler
b224e2f5739fe61de9fa69955d016725b2a4b78d
88,771,352,017,113,630,000,000,000,000,000,000,000
44
SplashOutputDev::tilingPatternFill: Fix crash on broken file Issue #802
static apr_status_t check_job(md_watchdog *wd, md_job_t *job, apr_pool_t *ptemp) { apr_status_t rv = APR_SUCCESS; apr_time_t valid_from, delay; int errored, renew, error_runs; char ts[APR_RFC822_DATE_LEN]; if (apr_time_now() < job->next_check) { /* Job needs to wait */ return AP...
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
169,377,166,805,021,330,000,000,000,000,000,000,000
82
v1.1.12, notifycmd improvements
static void bnx2x_get_fcoe_info(struct bnx2x *bp) { int port = BP_PORT(bp); int func = BP_ABS_FUNC(bp); u32 max_fcoe_conn = FW_ENCODE_32BIT_PATTERN ^ SHMEM_RD(bp, drv_lic_key[port].max_fcoe_conn); u8 num_fcoe_func = bnx2x_shared_fcoe_funcs(bp); if (!CNIC_SUPPORT(bp)) { bp->flags |= NO_FCOE_FLAG; return; ...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
16,817,414,787,472,842,000,000,000,000,000,000,000
66
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
BSONObj reverseSpec() { return BSON("$strcasecmp" << BSON_ARRAY(b() << a())); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
116,113,818,583,614,660,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
nwfilterObjFromNWFilter(const unsigned char *uuid) { virNWFilterObj *obj; char uuidstr[VIR_UUID_STRING_BUFLEN]; if (!(obj = virNWFilterObjListFindByUUID(driver->nwfilters, uuid))) { virUUIDFormat(uuid, uuidstr); virReportError(VIR_ERR_NO_NWFILTER, _("no nwfilter with ...
0
[ "CWE-667" ]
libvirt
a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36
299,414,261,258,341,600,000,000,000,000,000,000,000
12
nwfilter: fix crash when counting number of network filters The virNWFilterObjListNumOfNWFilters method iterates over the driver->nwfilters, accessing virNWFilterObj instances. As such it needs to be protected against concurrent modification of the driver->nwfilters object. This API allows unprivileged users to conne...
static int busytime_by_resource(void *rock, void *data) { struct propfind_ctx *fctx = (struct propfind_ctx *) rock; struct caldav_data *cdata = (struct caldav_data *) data; struct index_record record; int r; if (!cdata->dav.imap_uid) return 0; /* Fetch index record for the resource */ r = ...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
56,026,345,373,610,520,000,000,000,000,000,000,000
34
HTTP: don't overrun buffer when parsing strings with sscanf()
static void __vmx_load_host_state(struct vcpu_vmx *vmx) { unsigned long flags; if (!vmx->host_state.loaded) return; ++vmx->vcpu.stat.host_state_reload; vmx->host_state.loaded = 0; if (vmx->host_state.fs_reload_needed) kvm_load_fs(vmx->host_state.fs_sel); if (vmx->host_state.gs_ldt_reload_needed) { kvm_loa...
1
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
145,884,912,506,886,420,000,000,000,000,000,000,000
35
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
void Inspect::operator()(Warning_Ptr warning) { append_indentation(); append_token("@warn", warning); append_mandatory_space(); warning->message()->perform(this); append_delimiter(); }
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
82,677,930,790,416,640,000,000,000,000,000,000,000
8
Fix possible bug with handling empty reference combinators Fixes #2665
boost::intrusive_ptr<Expression> ExpressionRegexFindAll::parse(ExpressionContext* const expCtx, BSONElement expr, const VariablesParseState& vpsIn) { auto opName = "$regexFindAll"_sd; au...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
265,963,046,707,655,600,000,000,000,000,000,000,000
8
SERVER-49404 Enforce additional checks in $arrayToObject
int mwifiex_cmd_802_11_scan_ext(struct mwifiex_private *priv, struct host_cmd_ds_command *cmd, void *data_buf) { struct host_cmd_ds_802_11_scan_ext *ext_scan = &cmd->params.ext_scan; struct mwifiex_scan_cmd_config *scan_cfg = data_buf; memcpy(ext_scan->tlv_buffer, scan_cfg->tlv_buf, scan_cfg->tlv_buf_len); ...
0
[ "CWE-269", "CWE-787" ]
linux
b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d
89,071,888,583,700,100,000,000,000,000,000,000,000
17
mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length check befo...
TPMI_ST_ATTEST_Unmarshal(TPMI_ST_ATTEST *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPM_ST_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { switch (*target) { case TPM_ST_ATTEST_CERTIFY: case TPM_ST_ATTEST_CREATION: case T...
1
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
24,619,043,826,779,173,000,000,000,000,000,000,000
23
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
finish_viminfo_marks(void) { int i; if (vi_namedfm != NULL) { for (i = 0; i < NMARKS + EXTRA_MARKS; ++i) vim_free(vi_namedfm[i].fname); VIM_CLEAR(vi_namedfm); } if (vi_jumplist != NULL) { for (i = 0; i < vi_jumplist_len; ++i) vim_free(vi_jumplist[i].fname); VIM_CLEAR(vi_jumplist)...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
277,916,248,915,343,300,000,000,000,000,000,000,000
17
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
static int is_inode_writable(struct cifsInodeInfo *cifs_inode) { struct cifsFileInfo *open_file; spin_lock(&cifs_file_list_lock); list_for_each_entry(open_file, &cifs_inode->openFileList, flist) { if (OPEN_FMODE(open_file->f_flags) & FMODE_WRITE) { spin_unlock(&cifs_file_list_lock); return 1; } } spin_u...
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
171,909,747,569,266,530,000,000,000,000,000,000,000
14
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
pfm_copy_pmds(struct task_struct *task, pfm_context_t *ctx) { unsigned long ovfl_val = pmu_conf->ovfl_val; unsigned long mask = ctx->ctx_all_pmds[0]; unsigned long val; int i; DPRINT(("mask=0x%lx\n", mask)); for (i=0; mask; i++, mask>>=1) { val = ctx->ctx_pmds[i].val; /* * We break up the 64 bit value ...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
290,056,132,696,560,760,000,000,000,000,000,000,000
31
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
xmlXPathRegisterVariableNS(xmlXPathContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri, xmlXPathObjectPtr value) { if (ctxt == NULL) return(-1); if (name == NULL) return(-1); if (ctxt->varHash == NULL) ctxt->varHash = xmlHashCreate(0); if (ctxt->varHash == NULL) return(-1); ...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
89,491,290,568,600,240,000,000,000,000,000,000,000
19
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
DEFUN (no_bgp_confederation_peers, no_bgp_confederation_peers_cmd, "no bgp confederation peers .<1-65535>", NO_STR "BGP specific commands\n" "AS confederation parameters\n" "Peer ASs in BGP confederation\n" AS_STR) { struct bgp *bgp; as_t as; int i; bgp = vty->i...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
200,408,490,106,858,530,000,000,000,000,000,000,000
23
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) { const xmlChar *oldenc = NULL; const xmlChar *oldctxtenc = ctxt->encoding; const xmlChar *encoding = ctxt->encoding; xmlOutputBufferPtr buf = ctxt->buf; int switched_encoding = 0; xmlDocPtr doc; xmlInitParser(); doc = cur...
0
[ "CWE-502" ]
libxml2
c97750d11bb8b6f3303e7131fe526a61ac65bcfd
825,104,760,156,918,900,000,000,000,000,000,000
50
Avoid an out of bound access when serializing malformed strings For https://bugzilla.gnome.org/show_bug.cgi?id=766414 * xmlsave.c: xmlBufAttrSerializeTxtContent() if an attribute value is not UTF-8 be more careful when serializing it as we may do an out of bound access as a result.
nautilus_get_templates_directory_uri (void) { char *directory, *uri; directory = nautilus_get_templates_directory (); uri = g_filename_to_uri (directory, NULL, NULL); g_free (directory); return uri; }
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
51,628,518,335,629,760,000,000,000,000,000,000,000
9
Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop 2009-02-25 Alexander Larsson <alexl@redhat.com> * src/nautilus-application.c: Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop file trust operation. * libnautilus-private/nautilus-file-utilities.[ch]: Ad...
QueuedConnectionWrapper(Network::Connection& connection, bool allow_unexpected_disconnects) : shared_connection_(connection, allow_unexpected_disconnects), parented_(false), allow_unexpected_disconnects_(allow_unexpected_disconnects) { shared_connection_.addDisconnectCallback([this] { Thread::...
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
206,508,686,240,057,980,000,000,000,000,000,000,000
14
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
NO_INLINE JsVar *jspeFunctionDefinition(bool parseNamedFunction) { // actually parse a function... We assume that the LEX_FUNCTION and name // have already been parsed JsVar *funcVar = 0; bool actuallyCreateFunction = JSP_SHOULD_EXECUTE; if (actuallyCreateFunction) funcVar = jsvNewWithFlags(JSV_FUNCTION)...
0
[ "CWE-125", "CWE-674" ]
Espruino
51380baf17241728b6d48cdb84140b931e3e3cc5
20,416,216,757,577,404,000,000,000,000,000,000,000
33
Fix stack overflow if interpreting a file full of '{' (fix #1448)
static int ldb_msg_add_winsdb_addr(struct ldb_message *msg, struct winsdb_record *rec, const char *attr_name, struct winsdb_addr *addr) { const char *str; if (rec->is_static) { str = talloc_strdup(msg, addr->address); if (!str) return LDB_ERR_OPERATIONS_ERROR; } else { char *expire_time; expire_time ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
228,148,723,082,576,800,000,000,000,000,000,000,000
21
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
gather_time_entropy(void) { #ifdef COMPILING_FOR_WINDOWS FILETIME ft; GetSystemTimeAsFileTime(&ft); /* never fails */ return ft.dwHighDateTime ^ ft.dwLowDateTime; #else struct timeval tv; int gettimeofday_res; gettimeofday_res = gettimeofday(&tv, NULL); assert (gettimeofday_res == 0); /* Microseconds ...
0
[ "CWE-119" ]
libexpat
f0bec73b018caa07d3e75ec8dd967f3785d71bde
270,809,931,396,186,940,000,000,000,000,000,000,000
17
Avoid relying on undefined behavior in CVE-2015-1283 fix. It does not really work: https://godbolt.org/g/Zl8gdF
TEST(MessageCompressorManager, NormalCompressionRequested) { auto input = BSON("isMaster" << 1 << "compression" << BSON_ARRAY("noop")); checkServerNegotiation(input, {"noop"}); }
0
[]
mongo
5ad69b851801edadbfde8fdf271f4ba7c21170b5
248,380,994,228,279,440,000,000,000,000,000,000,000
4
SERVER-31273 Use Source/Sink version of snappy functions (cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99)
mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int elistsz, int strict) { int i, n, num, bad; unsigned char *p; mbfl_identify_filter *flist, *filter; const mbfl_encoding *encoding; /* flist is an array of mbfl_identify_filter instances */ flist = (mbfl_identify_filter *)mbfl_calloc(eli...
0
[ "CWE-119" ]
php-src
64f42c73efc58e88671ad76b6b6bc8e2b62713e1
3,635,836,109,842,919,000,000,000,000,000,000,000
81
Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
execute_null_command (redirects, pipe_in, pipe_out, async) REDIRECT *redirects; int pipe_in, pipe_out, async; { int r; int forcefork; REDIRECT *rd; for (forcefork = 0, rd = redirects; rd; rd = rd->next) forcefork += rd->rflags & REDIR_VARASSIGN; if (forcefork || pipe_in != NO_PIPE || pipe_out ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
177,915,897,511,065,300,000,000,000,000,000,000,000
68
bash-4.4-rc2 release
calc_load_n(unsigned long load, unsigned long exp, unsigned long active, unsigned int n) { return calc_load(load, fixed_power_int(exp, FSHIFT, n), active); }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
207,008,227,441,615,200,000,000,000,000,000,000,000
6
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
void Downstream::reset_response() { resp_.http_status = 0; resp_.http_major = 1; resp_.http_minor = 1; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
183,392,692,556,256,970,000,000,000,000,000,000,000
5
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
void AOClient::pktHpBar(AreaData* area, int argc, QStringList argv, AOPacket packet) { if (is_wtce_blocked) { sendServerMessage("You are blocked from using the judge controls."); return; } int l_newValue = argv.at(1).toInt(); if (argv[0] == "1") { area->changeHP(AreaData::Side::...
0
[ "CWE-703", "CWE-129" ]
akashi
5566cdfedddef1f219aee33477d9c9690bf2f78b
34,338,335,388,692,800,000,000,000,000,000,000,000
20
Fix out of bounds crash on evidence
static CURLcode pop3_quit(struct connectdata *conn) { CURLcode result = CURLE_OK; result = Curl_pp_sendf(&conn->proto.pop3c.pp, "QUIT", NULL); if(result) return result; state(conn, POP3_QUIT); result = pop3_easy_statemach(conn); return result; }
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
120,323,772,710,847,160,000,000,000,000,000,000,000
13
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
TEST(IndexBoundsBuilderTest, TranslateGteMinKey) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = BSON("a" << BSON("$gte" << MINKEY)); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::BoundsTightness tightness; ...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
295,394,753,573,287,740,000,000,000,000,000,000,000
15
SERVER-44377 generate correct plan for indexed inequalities to null
DataLocId CiffComponent::dataLocation(uint16_t tag) { switch (tag & 0xc000) { case 0x0000: return valueData; case 0x4000: return directoryData; default: throw Error(kerCorruptedMetadata); } } // CiffComponent::dataLocation
0
[ "CWE-617" ]
exiv2
6212806b7637be683a56c769a8d905153996d933
145,653,152,168,131,680,000,000,000,000,000,000,000
8
Throw an exception if the data location is invalid. (#842) (cherry picked from commit 7798ae25574425271305fffe85de77bec8df03f1)
fr_window_destroy_with_error_dialog (FrWindow *window) { window->priv->destroy_with_error_dialog = TRUE; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
288,107,884,984,908,260,000,000,000,000,000,000,000
4
libarchive: sanitize filenames before extracting
ssize_t elv_iosched_store(struct request_queue *q, const char *name, size_t count) { int ret; if (!queue_is_mq(q) || !elv_support_iosched(q)) return count; ret = __elevator_change(q, name); if (!ret) return count; return ret; }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
220,395,871,569,723,440,000,000,000,000,000,000,000
14
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size, size_t *packet_size, struct ecryptfs_mount_crypt_stat *mount_crypt_stat, char *data, size_t max_packet_size) { struct ecryptfs_parse_tag_70_packet_silly_stack *s; int rc = 0; (*packet_size) = 0; (*filename_size) = 0; (*fi...
0
[ "CWE-119" ]
linux-2.6
6352a29305373ae6196491e6d4669f301e26492e
24,919,887,815,834,790,000,000,000,000,000,000,000
191
eCryptfs: Check Tag 11 literal data buffer size Tag 11 packets are stored in the metadata section of an eCryptfs file to store the key signature(s) used to encrypt the file encryption key. After extracting the packet length field to determine the key signature length, a check is not performed to see if the length woul...
qemuProcessPrepareHostHostdevs(virDomainObjPtr vm) { size_t i; for (i = 0; i < vm->def->nhostdevs; i++) { virDomainHostdevDefPtr hostdev = vm->def->hostdevs[i]; if (qemuProcessPrepareHostHostdev(hostdev) < 0) return -1; } return 0; }
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
237,505,573,333,508,200,000,000,000,000,000,000,000
13
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...
cifs_getlk(struct file *file, struct file_lock *flock, __u32 type, bool wait_flag, bool posix_lck, unsigned int xid) { int rc = 0; __u64 length = 1 + flock->fl_end - flock->fl_start; struct cifsFileInfo *cfile = (struct cifsFileInfo *)file->private_data; struct cifs_tcon *tcon = tlink_tcon(cfile->tlink); struc...
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
6,558,096,030,906,832,000,000,000,000,000,000,000
66
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
void PopulateLookupTable(struct OpData* data, const TfLiteTensor* input, TfLiteTensor* output, const std::function<float(float)>& transform) { static_assert(sizeof(T) == 1, "Lookup table valid only for 8bit"); const float inverse_scale = 1 / output->params.scale; ...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
252,227,475,586,164,680,000,000,000,000,000,000,000
19
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static spl_ptr_llist_element *spl_ptr_llist_offset(spl_ptr_llist *llist, long offset, int backward) /* {{{ */ { spl_ptr_llist_element *current; int pos = 0; if (backward) { current = llist->tail; } else { current = llist->head; } while (current && pos < offset) { pos++; if (backward) { current = cur...
0
[]
php-src
df78c48354f376cf419d7a97f88ca07d572f00fb
195,491,215,572,567,060,000,000,000,000,000,000,000
23
Fixed Bug #67538 (SPL Iterators use-after-free)
static int build_dirty_segmap(struct f2fs_sb_info *sbi) { struct dirty_seglist_info *dirty_i; unsigned int bitmap_size, i; /* allocate memory for dirty segments list information */ dirty_i = kzalloc(sizeof(struct dirty_seglist_info), GFP_KERNEL); if (!dirty_i) return -ENOMEM; SM_I(sbi)->dirty_info = dirty_i; ...
0
[ "CWE-200", "CWE-476" ]
linux
d4fdf8ba0e5808ba9ad6b44337783bd9935e0982
73,301,282,034,632,580,000,000,000,000,000,000,000
24
f2fs: fix a panic caused by NULL flush_cmd_control Mount fs with option noflush_merge, boot failed for illegal address fcc in function f2fs_issue_flush: if (!test_opt(sbi, FLUSH_MERGE)) { ret = submit_flush_wait(sbi); atomic_inc(&fcc->issued_flush); -> Here, fcc illegal ...
fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) { int flags = info->flags; int ret = 0; if (var->activate & FB_ACTIVATE_INV_MODE) { struct fb_videomode mode1, mode2; fb_var_to_videomode(&mode1, var); fb_var_to_videomode(&mode2, &info->var); /* make sure we don't delete the videomode of curr...
0
[ "CWE-703", "CWE-189" ]
linux
fc9bbca8f650e5f738af8806317c0a041a48ae4a
182,948,125,786,580,700,000,000,000,000,000,000,000
108
vm: convert fb_mmap to vm_iomap_memory() helper This is my example conversion of a few existing mmap users. The fb_mmap() case is a good example because it is a bit more complicated than some: fb_mmap() mmaps one of two different memory areas depending on the page offset of the mmap (but happily there is never any mi...
static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) { struct ip_tunnel *tunnel = netdev_priv(dev); struct net_device_stats *stats = &tunnel->stat; struct iphdr *tiph = &tunnel->parms.iph; struct ipv6hdr *iph6 = ipv6_hdr(skb); u8 tos = tunnel->parms.iph.tos; struct rtable *rt; /* ...
0
[ "CWE-399" ]
linux-2.6
36ca34cc3b8335eb1fe8bd9a1d0a2592980c3f02
200,019,712,049,746,320,000,000,000,000,000,000,000
194
sit: Add missing kfree_skb() on pskb_may_pull() failure. Noticed by Paul Marks <paul@pmarks.net>. Signed-off-by: David S. Miller <davem@davemloft.net>
float MSG_ReadAngle16( msg_t *msg ) { return SHORT2ANGLE(MSG_ReadShort(msg)); }
0
[ "CWE-119" ]
ioq3
d2b1d124d4055c2fcbe5126863487c52fd58cca1
268,086,484,599,188,570,000,000,000,000,000,000,000
3
Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits Prevent reading past end of message in MSG_ReadBits. If read past end of msg->data buffer (16348 bytes) the engine could SEGFAULT. Make MSG_WriteBits use an exact buffer overflow check instead of possibly failing with a few bytes left.
static int fe_send_command(struct dvb_frontend* fe, const u8 command, int param_length, const u8 params[], int *result_length, u8 cmd_result[]) { struct ttusb_dec* dec = fe->dvb->priv; return ttusb_dec_send_command(dec, command, param_length, params, result_length, cmd_result); }
0
[ "CWE-772" ]
linux
a10feaf8c464c3f9cfdd3a8a7ce17e1c0d498da1
80,382,391,301,735,380,000,000,000,000,000,000,000
7
media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() The function at issue does not always initialize each byte allocated for 'b' and can therefore leak uninitialized memory to a USB device in the call to usb_bulk_msg() Use kzalloc() instead of kmalloc() Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> R...
**/ double variance(const unsigned int variance_method=1) const { double foo; return variance_mean(variance_method,foo);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
203,095,373,522,788,200,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
bool dot_or_dotdot(const char *filename) { if (filename[0] != '.') return false; if (filename[1] == '\0') return true; if (filename[1] != '.') return false; if (filename[2] == '\0') return true; return false; }
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
293,108,370,274,038,650,000,000,000,000,000,000,000
8
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
flow_random_hash_fields(struct flow *flow) { uint16_t rnd = random_uint16(); int i; /* Initialize to all zeros. */ memset(flow, 0, sizeof *flow); eth_addr_random(&flow->dl_src); eth_addr_random(&flow->dl_dst); for (i = 0; i < FLOW_MAX_VLAN_HEADERS; i++) { uint16_t vlan = random_ui...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
250,959,297,235,947,620,000,000,000,000,000,000,000
42
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 enum att_op_type get_op_type(uint8_t opcode) { int i; for (i = 0; att_opcode_type_table[i].opcode; i++) { if (att_opcode_type_table[i].opcode == opcode) return att_opcode_type_table[i].type; } if (opcode & ATT_OP_CMD_MASK) return ATT_OP_TYPE_CMD; return ATT_OP_TYPE_UNKNOWN; }
0
[ "CWE-415" ]
bluez
1cd644db8c23a2f530ddb93cebed7dacc5f5721a
134,263,444,426,090,360,000,000,000,000,000,000,000
14
shared/att: Fix possible crash on disconnect If there are pending request while disconnecting they would be notified but clients may endup being freed in the proccess which will then be calling bt_att_cancel to cancal its requests causing the following trace: Invalid read of size 4 at 0x1D894C: enable_ccc_callback...
ephy_embed_single_open_window (EphyEmbedSingle *single, EphyEmbed *parent, const char *address, const char *name, const char *features) { return NULL; }
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
58,706,464,233,277,050,000,000,000,000,000,000,000
8
Report broken certs through the padlock icon This uses a new feature in libsoup that reports through a SoupMessageFlag whether the message is talking to a server that has a trusted server. Bug #600663