func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static char *get_timestamp(THEME_REC *theme, TEXT_DEST_REC *dest, time_t t) { char *format, str[256]; struct tm *tm; int diff; if ((timestamp_level & dest->level) == 0) return NULL; /* check for flags if we want to override defaults */ if (dest->flags & PRINT_FLAG_UNSET_TIMESTAMP) return NULL; if ((dest->...
0
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
170,287,846,911,019,350,000,000,000,000,000,000,000
33
Merge branch 'security' into 'master' See merge request !7
static CImg<T> row_vector(const T& a0, const T& a1) { CImg<T> r(2,1); r[0] = a0; r[1] = a1; return r; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
75,551,070,638,220,250,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bgp_route_refresh_send (struct peer *peer, afi_t afi, safi_t safi, u_char orf_type, u_char when_to_refresh, int remove) { struct stream *s; struct stream *packet; int length; struct bgp_filter *filter; int orf_refresh = 0; if (DISABLE_BGP_ANNOUNCE) return; filter = &peer->filter[afi][safi]; /*...
0
[ "CWE-119" ]
quagga
5861739f8c38bc36ea9955e5cb2be2bf2f482d70
64,906,300,441,561,230,000,000,000,000,000,000,000
94
bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS * bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are detected, and the code will stop processing the OPEN and return. However it does so without calling bgp_notify_send to send a NOTIFY - which means the peer FSM doesn't g...
WriteCompressedCellArrayField(mat_t *mat, matvar_t *matvar, z_streamp z) { mat_uint32_t comp_buf[512]; mat_uint32_t uncomp_buf[512]; int buf_size = 512; size_t byteswritten = 0, field_buf_size; if ( NULL == matvar || NULL == mat || NULL == z ) return 0; memset(&uncomp_buf, 0, sizeof(un...
0
[ "CWE-200", "CWE-401" ]
matio
b53b62b756920f4c1509f4ee06427f66c3b5c9c4
19,240,536,502,877,422,000,000,000,000,000,000,000
34
Fix memory leak As reported by https://github.com/tbeu/matio/issues/186
static ossl_inline int cert_req_allowed(SSL *s) { /* TLS does not like anon-DH with client cert */ if ((s->version > SSL3_VERSION && (s->s3->tmp.new_cipher->algorithm_auth & SSL_aNULL)) || (s->s3->tmp.new_cipher->algorithm_auth & (SSL_aSRP | SSL_aPSK))) return 0; return 1; }
0
[ "CWE-476" ]
openssl
efbe126e3ebb9123ac9d058aa2bb044261342aaa
110,145,175,649,895,390,000,000,000,000,000,000,000
10
Fix missing NULL checks in CKE processing Reviewed-by: Rich Salz <rsalz@openssl.org>
static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt, size_t len) { struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; u16 reason_code; sdata_assert_lock(sdata); if (len < 24 + 2) return; if (!ifmgd->associated || !ether_addr_equal(mgmt->bssi...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
242,153,868,536,049,530,000,000,000,000,000,000,000
30
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
_PUBLIC_ int strncasecmp_m(const char *s1, const char *s2, size_t n) { struct smb_iconv_handle *iconv_handle = get_iconv_handle(); return strncasecmp_m_handle(iconv_handle, s1, s2, n); }
0
[ "CWE-200" ]
samba
ba5dbda6d0174a59d221c45cca52ecd232820d48
234,496,996,467,649,030,000,000,000,000,000,000,000
5
CVE-2015-5330: Fix handling of unicode near string endings Until now next_codepoint_ext() and next_codepoint_handle_ext() were using strnlen(str, 5) to determine how much string they should try to decode. This ended up looking past the end of the string when it was not null terminated and the final character looked li...
int ber_write_contextual_tag(wStream* s, BYTE tag, int length, BOOL pc) { Stream_Write_UINT8(s, (BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag)); return ber_write_length(s, length) + 1; }
1
[ "CWE-476" ]
FreeRDP
0dc22d5a30a1c7d146b2a835b2032668127c33e9
98,616,984,541,058,920,000,000,000,000,000,000,000
5
Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically.
static void set_preempt_timeout(struct intel_engine_cs *engine) { if (!intel_engine_has_preempt_reset(engine)) return; set_timer_ms(&engine->execlists.preempt, active_preempt_timeout(engine)); }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
109,468,050,045,683,860,000,000,000,000,000,000,000
8
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
SECURITY_STATUS SEC_ENTRY FreeContextBuffer(void* pvContextBuffer) { if (!pvContextBuffer) return SEC_E_INVALID_HANDLE; sspi_ContextBufferFree(pvContextBuffer); return SEC_E_OK; }
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
44,486,971,722,585,630,000,000,000,000,000,000,000
9
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
PHP_FUNCTION(openssl_private_encrypt) { zval *key, *crypted; EVP_PKEY *pkey; int cryptedlen; zend_string *cryptedbuf = NULL; int successful = 0; zend_resource *keyresource = NULL; char * data; size_t data_len; zend_long padding = RSA_PKCS1_PADDING; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/z|l", &data, ...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
319,622,379,709,477,300,000,000,000,000,000,000,000
58
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
storageVolDownload(virStorageVolPtr vol, virStreamPtr stream, unsigned long long offset, unsigned long long length, unsigned int flags) { virStorageBackend *backend; virStoragePoolObj *obj = NULL; virStorageVolDef *voldef = NULL; ...
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
323,404,634,199,019,150,000,000,000,000,000,000,000
48
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
nv_screengo(oparg_T *oap, int dir, long dist) { int linelen = linetabsize(ml_get_curline()); int retval = OK; int atend = FALSE; int n; int col_off1; // margin offset for first screen line int col_off2; // margin offset for wrapped screen line int width1; // text width for first scre...
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
52,169,437,263,337,890,000,000,000,000,000,000,000
161
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
GC_malloc_explicitly_typed_ignore_off_page(size_t lb, GC_descr d) { ptr_t op; size_t lg; DCL_LOCK_STATE; GC_ASSERT(GC_explicit_typing_initialized); lb += TYPD_EXTRA_BYTES; if (SMALL_OBJ(lb)) { GC_DBG_COLLECT_AT_MALLOC(lb); lg = GC_size_map[lb]; LOCK(); op = G...
1
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
177,352,978,136,169,800,000,000,000,000,000,000,000
34
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
make_other_setup (GnomeRRScreen *screen) { /* Turn off all laptops, and make all external monitors clone * from (0, 0) */ GnomeRRConfig *result = gnome_rr_config_new_current (screen); int i; for (i = 0; result->outputs[i] != NULL; ++i) { GnomeOutputInf...
0
[]
gnome-settings-daemon
be513b3c7d80d0b7013d79ce46d7eeca929705cc
127,629,874,084,635,900,000,000,000,000,000,000,000
26
Implement autoconfiguration of the outputs This is similar in spirit to 'xrandr --auto', but we disfavor selecting clone modes. Instead, we lay out the outputs left-to-right. Signed-off-by: Federico Mena Quintero <federico@novell.com>
Tracing::Reason traceReason() const override { return trace_reason_; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
218,395,947,803,142,900,000,000,000,000,000,000,000
1
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
make_consensus_method_list(int low, int high, const char *separator) { char *list; int i; smartlist_t *lst; lst = smartlist_new(); for (i = low; i <= high; ++i) { if (!consensus_method_is_supported(i)) continue; smartlist_add_asprintf(lst, "%d", i); } list = smartlist_join_strings(lst, sepa...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
329,121,547,587,099,230,000,000,000,000,000,000,000
18
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
static int php_cli_server_client_read_request_on_path(php_http_parser *parser, const char *at, size_t length) { php_cli_server_client *client = parser->data; { char *vpath; size_t vpath_len; normalize_vpath(&vpath, &vpath_len, at, length, 1); client->request.vpath = vpath; client->request.vpath_len = vpath_...
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
167,801,948,655,506,550,000,000,000,000,000,000,000
12
slim post data
int message_parser_deinit_from_parts(struct message_parser_ctx **_ctx, struct message_part **parts_r, const char **error_r) { struct message_parser_ctx *ctx = *_ctx; int ret = ctx->broken_reason != NULL ? -1 : 0; *_ctx = NULL; *parts_r = ctx->parts; *error_r = ctx->broken_reason; if (ct...
0
[ "CWE-20" ]
core
fb97a1cddbda4019e327fa736972a1c7433fedaa
337,716,923,043,258,200,000,000,000,000,000,000,000
25
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit The limit could have been exceeded with message/rfc822 parts.
static struct kobject *md_probe(dev_t dev, int *part, void *data) { md_alloc(dev, NULL); return NULL; }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
286,383,196,846,218,150,000,000,000,000,000,000,000
5
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
void md_wait_for_blocked_rdev(struct md_rdev *rdev, struct mddev *mddev) { sysfs_notify_dirent_safe(rdev->sysfs_state); wait_event_timeout(rdev->blocked_wait, !test_bit(Blocked, &rdev->flags) && !test_bit(BlockedBadBlocks, &rdev->flags), msecs_to_jiffies(5000)); rdev_dec_pending(rdev, mddev); }
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
100,544,696,166,535,500,000,000,000,000,000,000,000
9
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static void cil_reset_validatetrans(struct cil_validatetrans *vt) { cil_list_destroy(&vt->datum_expr, CIL_FALSE); }
0
[ "CWE-416" ]
selinux
f34d3d30c8325e4847a6b696fe7a3936a8a361f3
897,533,012,045,927,700,000,000,000,000,000,000
4
libsepol/cil: Destroy classperms list when resetting classpermission Nicolas Iooss reports: A few months ago, OSS-Fuzz found a crash in the CIL compiler, which got reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title is misleading, or is caused by another issue that conflicts with...
p11_ascii_tolower (int c) { if (c >= 'A' && c <= 'Z') return 'a' + (c - 'A'); return c; }
0
[ "CWE-190" ]
p11-kit
bd670b1d4984b27d6a397b9ddafaf89ab26e4e7f
49,017,827,469,164,150,000,000,000,000,000,000,000
6
Follow-up to arithmetic overflow fix Check if nmemb is zero in p11_rpc_message_alloc_extra_array to avoid a division by zero trap. Additionally, change the reallocarray compatibility shim so that it won't assert when resizing an array to zero, and add the same nmemb != 0 check there.
static inline int next_slot(struct b43_dmaring *ring, int slot) { B43_WARN_ON(!(slot >= -1 && slot <= ring->nr_slots - 1)); if (slot == ring->nr_slots - 1) return 0; return slot + 1; }
0
[ "CWE-119", "CWE-787" ]
linux
c85ce65ecac078ab1a1835c87c4a6319cf74660a
318,652,406,830,460,360,000,000,000,000,000,000,000
7
b43: allocate receive buffers big enough for max frame len + offset Otherwise, skb_put inside of dma_rx can fail... https://bugzilla.kernel.org/show_bug.cgi?id=32042 Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable@kernel.org
int __connman_dnsproxy_init(void) { int err, index; DBG(""); listener_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free); partial_tcp_req_table = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, free_partial_reqs); index = connman_inet_ifindex("lo")...
0
[ "CWE-119" ]
connman
5c281d182ecdd0a424b64f7698f32467f8f67b71
129,437,253,787,266,070,000,000,000,000,000,000,000
32
dnsproxy: Fix crash on malformed DNS response If the response query string is malformed, we might access memory pass the end of "name" variable in parse_response().
int Http2Handler::read_tls() { std::array<uint8_t, 8_k> buf; ERR_clear_error(); for (;;) { auto rv = SSL_read(ssl_, buf.data(), buf.size()); if (rv <= 0) { auto err = SSL_get_error(ssl_, rv); switch (err) { case SSL_ERROR_WANT_READ: goto fin; case SSL_ERROR_WANT_WRITE: ...
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
208,699,542,966,843,550,000,000,000,000,000,000,000
41
Don't read too greedily
Item *in_longlong::create_item(THD *thd) { /* We're created a signed INT, this may not be correct in general case (see BUG#19342). */ return new (thd->mem_root) Item_int(thd, (longlong)0); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
17,111,755,679,418,500,000,000,000,000,000,000,000
8
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
CImg<T>& operator>>=(const t value) { if (is_empty()) return *this; cimg_openmp_for(*this,((longT)*ptr) >> (int)value,65536); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
311,234,431,671,503,260,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int ha_maria::preload_keys(THD * thd, HA_CHECK_OPT *check_opt) { ulonglong map; TABLE_LIST *table_list= table->pos_in_table_list; DBUG_ENTER("ha_maria::preload_keys"); table->keys_in_use_for_query.clear_all(); if (table_list->process_index_hints(table)) DBUG_RETURN(HA_ADMIN_FAILED); map= ~(ulonglong...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
316,332,671,242,485,900,000,000,000,000,000,000,000
56
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
run_error (CommonJob *job, char *primary_text, char *secondary_text, const char *details_text, gboolean show_all, ...) { va_list varargs; int res; va_start (varargs, show_all); res = run_simple_dialog_va (job, ...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
29,024,985,181,785,275,000,000,000,000,000,000,000
22
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...
int cli_scanpe(cli_ctx *ctx) { uint16_t e_magic; /* DOS signature ("MZ") */ uint16_t nsections; uint32_t e_lfanew; /* address of new exe header */ uint32_t ep, vep; /* entry point (raw, virtual) */ uint8_t polipos = 0; time_t timestamp; struct pe_image_file_hdr file_hdr; union { struct pe_image_optional_h...
0
[ "CWE-703", "CWE-189" ]
clamav-devel
270e368b99e93aa5447d46c797c92c3f9f39f375
220,002,766,581,160,140,000,000,000,000,000,000,000
1,809
libclamav: bb #7055
static void x25_destroy_timer(struct timer_list *t) { struct sock *sk = from_timer(sk, t, sk_timer); x25_destroy_socket_from_timer(sk); }
0
[]
net
7781607938c8371d4c2b243527430241c62e39c2
9,533,324,264,508,029,000,000,000,000,000,000,000
6
net/x25: Fix null-ptr-deref caused by x25_disconnect When the link layer is terminating, x25->neighbour will be set to NULL in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is shown below. (Thread 1) | (Thread 2...
device_added (GDBusObjectManager *manager, Device1 *device, BluetoothClient *client) { BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client); GDBusProxy *adapter; const char *adapter_path, *address, *alias, *name, *icon; char **uuids; gboolean paired, trusted, connec...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
200,901,313,910,279,460,000,000,000,000,000,000,000
66
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
static struct atalk_route *atrtr_find(struct atalk_addr *target) { /* * we must search through all routes unless we find a * host route, because some host routes might overlap * network routes */ struct atalk_route *net_route = NULL; struct atalk_route *r; read_lock_bh(&atalk_routes_lock); for (r = atal...
0
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
154,159,160,609,892,160,000,000,000,000,000,000,000
46
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
int test_add(BIO *bp) { BIGNUM a, b, c; int i; BN_init(&a); BN_init(&b); BN_init(&c); BN_bntest_rand(&a, 512, 0, 0); for (i = 0; i < num0; i++) { BN_bntest_rand(&b, 450 + i, 0, 0); a.neg = rand_neg(); b.neg = rand_neg(); BN_add(&c, &a, &b); if (bp !=...
0
[ "CWE-200" ]
openssl
d73cc256c8e256c32ed959456101b73ba9842f72
19,226,968,220,339,013,000,000,000,000,000,000,000
39
bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193). Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit e7c078db57908cbf16074c68034977565ffaf107)
static boolean point_inside(inside_t * inside_context, pointf p) { static node_t *lastn; /* last node argument */ static double radius; pointf P; node_t *n; if (!inside_context) { lastn = NULL; return FALSE; } n = inside_context->s.n; P = ccwrotatepf(p, 90 * GD_rankdir(agraphof(n)));...
0
[ "CWE-120" ]
graphviz
784411ca3655c80da0f6025ab20634b2a6ff696b
302,527,999,570,792,560,000,000,000,000,000,000,000
34
fix: out-of-bounds write on invalid label When the label for a node cannot be parsed (due to it being malformed), it falls back on the symbol name of the node itself. I.e. the default label the node would have had if it had no label attribute at all. However, this is applied by dynamically altering the node's label to...
frf15_print(netdissect_options *ndo, const u_char *p, u_int length) { uint16_t sequence_num, flags; if (length < 2) goto trunc; ND_TCHECK2(*p, 2); flags = p[0]&MFR_BEC_MASK; sequence_num = (p[0]&0x1e)<<7 | p[1]; ND_PRINT((ndo, "FRF.15, seq 0x%03x, Flags [%s],%s Fragmentati...
0
[ "CWE-125" ]
tcpdump
aa3e54f594385ce7e1e319b0c84999e51192578b
227,377,428,340,146,950,000,000,000,000,000,000,000
31
(for 4.9.3) CVE-2018-14468/FRF.16: Add a missing length check. The specification says in a well-formed Magic Number information element the data is exactly 4 bytes long. In mfr_print() check this before trying to read those 4 bytes. This fixes a buffer over-read discovered by Bhargava Shastry, SecT/TU Berlin. Add a ...
shift_event(ASS_Renderer *render_priv, EventImages *ei, int shift) { ASS_Image *cur = ei->imgs; while (cur) { cur->dst_y += shift; // clip top and bottom if (cur->dst_y < 0) { int clip = -cur->dst_y; cur->h -= clip; cur->bitmap += clip * cur->stride; ...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
166,654,570,225,864,110,000,000,000,000,000,000,000
24
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
write_out_binary_header (dev_t rdev, struct cpio_file_stat *file_hdr, int out_des) { struct old_cpio_header short_hdr; short_hdr.c_magic = 070707; short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min); if ((warn_option & CPIO_WARN_TRUNCATE) && (file_hdr->c_ino >> 16) != 0) error (0, 0, ...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
111,844,585,184,920,560,000,000,000,000,000,000,000
67
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
get_multipart_info(packet_info *pinfo, http_message_info_t *message_info) { char *start_boundary, *start_protocol = NULL; multipart_info_t *m_info = NULL; const char *type = pinfo->match_string; char *parameters; gint dummy; /* * We need both a content type AND parameters * for multip...
0
[]
wireshark
5803c7b87b3414cdb8bf502af50bb406ca774482
277,471,653,612,713,600,000,000,000,000,000,000,000
56
multipart: fix deallocation of invalid parts Fixes #16741 (cherry picked from commit 2411eae9edb562e80c45962c74945238a94e5d3b)
void Http2Settings::Update(Http2Session* session, get_setting fn) { AliasedUint32Array& buffer = session->http2_state()->settings_buffer; #define V(name) \ buffer[IDX_SETTINGS_ ## name] = \ fn(session-...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
25,371,244,644,655,387,000,000,000,000,000,000,000
9
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
SYSCALL_DEFINE1(sched_get_priority_min, int, policy) { int ret = -EINVAL; switch (policy) { case SCHED_FIFO: case SCHED_RR: ret = 1; break; case SCHED_DEADLINE: case SCHED_NORMAL: case SCHED_BATCH: case SCHED_IDLE: ret = 0; } return ret; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
75,880,207,811,569,000,000,000,000,000,000,000,000
17
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static int session_after_frame_sent1(nghttp2_session *session) { int rv; nghttp2_active_outbound_item *aob = &session->aob; nghttp2_outbound_item *item = aob->item; nghttp2_bufs *framebufs = &aob->framebufs; nghttp2_frame *frame; nghttp2_stream *stream; frame = &item->frame; if (frame->hd.type == NGHT...
0
[ "CWE-707" ]
nghttp2
f8da73bd042f810f34d19f9eae02b46d870af394
255,475,718,897,929,400,000,000,000,000,000,000,000
258
Earlier check for settings flood
rrinternal_get_delims(sldns_rdf_type rdftype, size_t r_cnt, size_t r_max) { switch(rdftype) { case LDNS_RDF_TYPE_B64 : case LDNS_RDF_TYPE_HEX : /* These rdf types may con- */ case LDNS_RDF_TYPE_LOC : /* tain whitespace, only if */ case LDNS_RDF_TYPE_WKS : /* it is the last rd field. */ ...
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
97,638,501,763,515,610,000,000,000,000,000,000,000
16
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
void HTTPSession::onCertificateRequest(uint16_t requestId, std::unique_ptr<IOBuf> authRequest) { DestructorGuard dg(this); VLOG(4) << "CERTIFICATE_REQUEST on" << *this << ", requestId=" << requestId; std::pair<uint16_t, std::unique_ptr<folly::IOBuf>> authenticator; auto f...
1
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
203,592,869,542,995,860,000,000,000,000,000,000,000
32
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
virDomainGetCPUStats(virDomainPtr domain, virTypedParameterPtr params, unsigned int nparams, int start_cpu, unsigned int ncpus, unsigned int flags) { virConnectPtr conn; VIR_DOMAIN_DEBUG(domain, ...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
178,913,412,039,028,500,000,000,000,000,000,000,000
65
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
SCM_DEFINE (scm_fsync, "fsync", 1, 0, 0, (SCM object), "Copies any unwritten data for the specified output file\n" "descriptor to disk. If @var{object} is a port, its buffer is\n" "flushed before the underlying file descriptor is fsync'd.\n" "The return value is unspecified.") #define ...
0
[]
guile
245608911698adb3472803856019bdd5670b6614
88,184,323,151,213,520,000,000,000,000,000,000,000
24
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
static int __io_remove_buffers(struct io_ring_ctx *ctx, struct io_buffer *buf, int bgid, unsigned nbufs) { unsigned i = 0; /* shouldn't happen */ if (!nbufs) return 0; /* the head kbuf is the list itself */ while (!list_empty(&buf->list)) { struct io_buffer *nxt; nxt = list_first_entry(&buf->lis...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
207,090,203,410,084,740,000,000,000,000,000,000,000
25
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...
static int unmap_mapping_range_vma(struct vm_area_struct *vma, unsigned long start_addr, unsigned long end_addr, struct zap_details *details) { unsigned long restart_addr; int need_break; /* * files that support invalidating or truncating portions of the * file from under mmaped areas must have their ->faul...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
13,117,407,751,022,973,000,000,000,000,000,000,000
46
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
static int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans) { int ret; int ret2; struct extent_io_tree *dirty_pages = &trans->transaction->dirty_pages; struct btrfs_fs_info *fs_info = trans->fs_info; struct blk_plug plug; blk_start_plug(&plug); ret = btrfs_write_marked_extents(fs_info, dirty_p...
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
38,961,060,261,467,450,000,000,000,000,000,000,000
22
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
fill_reduces_to_source (cairo_operator_t op, const cairo_color_t *color, cairo_image_surface_t *dst) { if (op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_CLEAR) return TRUE; if (op == CAIRO_OPERATOR_OVER && CAIRO_COLOR_IS_OPAQUE (color)) return TRUE; if (dst->base.is_clear) return op == CAIRO_...
0
[ "CWE-787" ]
cairo
c986a7310bb06582b7d8a566d5f007ba4e5e75bf
141,204,840,067,335,450,000,000,000,000,000,000,000
13
image: Enable inplace compositing with opacities for general routines On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ===...
void seq_parameter_set::set_CB_log2size_range(int mini,int maxi) { log2_min_luma_coding_block_size = mini; log2_diff_max_min_luma_coding_block_size = maxi-mini; }
0
[ "CWE-787" ]
libde265
8e89fe0e175d2870c39486fdd09250b230ec10b8
257,519,546,396,218,830,000,000,000,000,000,000,000
5
error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590)
echo_string_core( typval_T *tv, char_u **tofree, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val) { static int recurse = 0; char_u *r = NULL; if (recurse >= DICT_MAXNEST) { if (!did_echo_string_emsg) { // Only give this message on...
0
[ "CWE-786", "CWE-119", "CWE-787" ]
vim
fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d
332,233,827,844,500,100,000,000,000,000,000,000,000
212
patch 8.2.4206: condition with many "(" causes a crash Problem: Condition with many "(" causes a crash. Solution: Limit recursion to 1000.
static void xt_mttg_seq_stop(struct seq_file *seq, void *v) { uint8_t nfproto = (unsigned long)PDE_DATA(file_inode(seq->file)); struct nf_mttg_trav *trav = seq->private; switch (trav->class) { case MTTG_TRAV_NFP_UNSPEC: mutex_unlock(&xt[NFPROTO_UNSPEC].mutex); break; case MTTG_TRAV_NFP_SPEC: mutex_unlock(&x...
0
[]
linux
175e476b8cdf2a4de7432583b49c871345e4f8a1
214,085,131,020,022,130,000,000,000,000,000,000,000
14
netfilter: x_tables: Use correct memory barriers. When a new table value was assigned, it was followed by a write memory barrier. This ensured that all writes before this point would complete before any writes after this point. However, to determine whether the rules are unused, the sequence counter is read. To ensure...
static int nfs4_run_state_manager(void *ptr) { struct nfs_client *clp = ptr; allow_signal(SIGKILL); nfs4_state_manager(clp); nfs_put_client(clp); module_put_and_exit(0); return 0; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
192,198,410,681,741,700,000,000,000,000,000,000,000
10
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
rad_init_send_request(struct rad_handle *h, int *fd, struct timeval *tv) { int srv; /* Make sure we have a socket to use */ if (h->fd == -1) { struct sockaddr_in sin; if ((h->fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { #ifdef PHP_WIN32 generr(h, "Cannot create socket: %d", WSAGetLastError()); #e...
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
50,014,638,127,335,215,000,000,000,000,000,000,000
73
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
lzw_read_byte (GifContext *context) { int code, incode; gint retval; gint my_retval; register int i; if (context->lzw_code_pending != -1) { retval = context->lzw_code_pending; context->lzw_code_pending = -1; return retval; } if (context->lzw_fresh) { context->lzw_fresh = FALSE; do { retval = get_c...
0
[]
gdk-pixbuf
f8569bb13e2aa1584dde61ca545144750f7a7c98
265,006,694,818,654,500,000,000,000,000,000,000,000
122
GIF: Don't return a partially initialized pixbuf structure It was found that gdk-pixbuf GIF image loader gdk_pixbuf__gif_image_load() routine did not properly handle certain return values from their subroutines. A remote attacker could provide a specially-crafted GIF image, which once opened in an application, linked ...
uECC_VLI_API bitcount_t uECC_vli_numBits(const uECC_word_t *vli, const wordcount_t max_words) { uECC_word_t i; uECC_word_t digit; wordcount_t num_digits = vli_numDigits(vli, max_words); if (num_digits == 0) { return 0; } digit = vli[num_digits - 1]; for (i = 0; digit; ++i) { ...
0
[ "CWE-415" ]
micro-ecc
1b5f5cea5145c96dd8791b9b2c41424fc74c2172
237,069,022,380,880,800,000,000,000,000,000,000,000
16
Fix for #168
dict_stack_get_dict(void) { typval_T *tv; if (dict_stack.ga_len == 0) return NULL; tv = ((typval_T *)dict_stack.ga_data) + dict_stack.ga_len - 1; if (tv->v_type == VAR_DICT) return tv->vval.v_dict; return NULL; }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
16,564,842,508,803,550,000,000,000,000,000,000,000
11
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
MONGO_EXPORT const char* mongo_get_host(mongo* conn, int i) { mongo_replica_set* r = conn->replica_set; mongo_host_port* hp; int count = 0; if (!r) return 0; for (hp = r->hosts; hp; hp = hp->next) { if (count == i) return _get_host_port(hp); ++count; } return 0; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
96,888,953,320,044,780,000,000,000,000,000,000,000
12
don't mix up int and size_t (first pass to fix that)
int sas_discover_end_dev(struct domain_device *dev) { int res; res = sas_notify_lldd_dev_found(dev); if (res) return res; sas_discover_event(dev->port, DISCE_PROBE); return 0; }
1
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
279,687,695,279,528,770,000,000,000,000,000,000,000
11
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
static void __timerfd_remove_cancel(struct timerfd_ctx *ctx) { if (ctx->might_cancel) { ctx->might_cancel = false; spin_lock(&cancel_lock); list_del_rcu(&ctx->clist); spin_unlock(&cancel_lock); } }
0
[ "CWE-416" ]
linux
1e38da300e1e395a15048b0af1e5305bd91402f6
103,616,743,547,510,030,000,000,000,000,000,000,000
9
timerfd: Protect the might cancel mechanism proper The handling of the might_cancel queueing is not properly protected, so parallel operations on the file descriptor can race with each other and lead to list corruptions or use after free. Protect the context for these operations with a seperate lock. The wait queue ...
static void cdxl_decode_ham6(CDXLVideoContext *c, AVFrame *frame) { AVCodecContext *avctx = c->avctx; uint32_t new_palette[16], r, g, b; uint8_t *ptr, *out, index, op; int x, y; ptr = c->new_video; out = frame->data[0]; import_palette(c, new_palette); import_format(c, avctx->width, c->...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e1b60aad77c27ed5d4dfc11e5e6a05a38c70489d
117,458,095,813,106,500,000,000,000,000,000,000,000
42
avcodec/cdxl: Check format parameter Fixes out of array access Fixes: 1378/clusterfuzz-testcase-minimized-5715088008806400 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int fsck_tree(struct tree *item, struct fsck_options *options) { int retval = 0; int has_null_sha1 = 0; int has_full_path = 0; int has_empty_name = 0; int has_dot = 0; int has_dotdot = 0; int has_dotgit = 0; int has_zero_pad = 0; int has_bad_modes = 0; int has_dup_entries = 0; int not_properly_sorted ...
0
[ "CWE-20", "CWE-88", "CWE-522" ]
git
a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46
82,473,518,947,758,340,000,000,000,000,000,000,000
116
fsck: detect submodule urls starting with dash Urls with leading dashes can cause mischief on older versions of Git. We should detect them so that they can be rejected by receive.fsckObjects, preventing modern versions of git from being a vector by which attacks can spread. Signed-off-by: Jeff King <peff@peff.net> Si...
Alter_inplace_info::Alter_inplace_info(HA_CREATE_INFO *create_info_arg, Alter_info *alter_info_arg, KEY *key_info_arg, uint key_count_arg, partition_info *modified_part_info_arg, bool ignore_arg, bool error_non_empty) : create_info(...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
26,715,971,856,726,484,000,000,000,000,000,000,000
23
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
static void perf_output_read_group(struct perf_output_handle *handle, struct perf_event *event, u64 enabled, u64 running) { struct perf_event *leader = event->group_leader, *sub; u64 read_format = event->attr.read_format; u64 values[5]; int n = 0; values[n++] = 1 + leader->nr_siblings; if (read_fo...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
310,181,165,059,395,740,000,000,000,000,000,000,000
41
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
get_number_of_args(char *line) { int num = 0; /* The line is normalized, between arguments is just one space */ if (*line == ' ') line++; if (*line) num++; for (; *line; line++) { if (*line == ' ') num++; } return num; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
192,203,380,626,484,620,000,000,000,000,000,000,000
16
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static void *arm_coherent_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs) { pgprot_t prot = __get_dma_pgprot(attrs, PAGE_KERNEL); void *memory; if (dma_alloc_from_coherent(dev, size, handle, &memory)) return memory; return __dma_alloc(dev, size, handle, gfp, p...
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
159,665,873,150,077,540,000,000,000,000,000,000,000
12
ARM: dma-mapping: don't allow DMA mappings to be marked executable DMA mapping permissions were being derived from pgprot_kernel directly without using PAGE_KERNEL. This causes them to be marked with executable permission, which is not what we want. Fix this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk...
static void bnx2x_eq_int(struct bnx2x *bp) { u16 hw_cons, sw_cons, sw_prod; union event_ring_elem *elem; u8 echo; u32 cid; u8 opcode; int rc, spqe_cnt = 0; struct bnx2x_queue_sp_obj *q_obj; struct bnx2x_func_sp_obj *f_obj = &bp->func_obj; struct bnx2x_raw_obj *rss_raw = &bp->rss_conf_obj.raw; hw_cons = le16_...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
56,777,022,739,764,850,000,000,000,000,000,000,000
221
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...
new_interface( struct interface *interface ) { struct interface * iface; iface = emalloc(sizeof(*iface)); if (NULL == interface) init_interface(iface); else /* use the template */ memcpy(iface, interface, sizeof(*iface)); /* count every new instance of an interface in the system */ iface->ifnum = sys_...
0
[ "CWE-287" ]
ntp
71a962710bfe066f76da9679cf4cfdeffe34e95e
224,110,879,203,651,080,000,000,000,000,000,000,000
19
[Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
g_NPN_ForceRedraw(NPP instance) { D(bug("NPN_ForceRedraw instance=%p\n", instance)); NPW_UNIMPLEMENTED(); }
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
288,583,532,003,191,600,000,000,000,000,000,000,000
6
Support all the new variables added
merge_keysigs (KBNODE dst, KBNODE src, int *n_sigs, const char *fname, u32 *keyid) { KBNODE n, n2; int found=0; (void)fname; (void)keyid; assert( dst->pkt->pkttype == PKT_PUBLIC_SUBKEY || dst->pkt->pkttype == PKT_SECRET_SUBKEY ); for(n=src->next; n ; n = n->next ) { if( ...
0
[ "CWE-20" ]
gnupg
f0b33b6fb8e0586e9584a7a409dcc31263776a67
295,121,508,043,871,950,000,000,000,000,000,000,000
50
gpg: Import only packets which are allowed in a keyblock. * g10/import.c (valid_keyblock_packet): New. (read_block): Store only valid packets. -- A corrupted key, which for example included a mangled public key encrypted packet, used to corrupt the keyring. This change skips all packets which are not allowed in a ke...
static void stimer_expiration(struct kvm_vcpu_hv_stimer *stimer) { int r, direct = stimer->config.direct_mode; stimer->msg_pending = true; if (!direct) r = stimer_send_msg(stimer); else r = stimer_notify_direct(stimer); trace_kvm_hv_stimer_expiration(hv_stimer_to_vcpu(stimer)->vcpu_id, stimer->inde...
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
85,324,269,071,768,680,000,000,000,000,000,000,000
17
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
mptcp_add_duplicated_dsn(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, struct mptcp_subflow *subflow, guint64 rawdsn64low, guint64 rawdsn64high ) { wmem_list_t *results = NULL; wmem_list_frame_t *packet_it = NULL; mptcp_dsn2packet_mapping_t *packet = NULL; proto_item *item = NULL; result...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
127,527,249,627,370,370,000,000,000,000,000,000,000
34
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
TEST_F(RouterTest, RetryTimeoutDuringRetryDelay) { NiceMock<Http::MockRequestEncoder> encoder1; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::Connection...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
258,718,117,736,257,050,000,000,000,000,000,000,000
42
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
u_save_line(linenr_T lnum) { return vim_strsave(ml_get(lnum)); }
0
[ "CWE-190" ]
vim
3eb1637b1bba19519885dd6d377bd5596e91d22c
153,565,986,125,960,700,000,000,000,000,000,000,000
4
patch 8.0.0377: possible overflow when reading corrupted undo file Problem: Possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King)
void ClientHandler::direct_http2_upgrade() { upstream_ = std::make_unique<Http2Upstream>(this); alpn_ = StringRef::from_lit(NGHTTP2_CLEARTEXT_PROTO_VERSION_ID); on_read_ = &ClientHandler::upstream_read; write_ = &ClientHandler::write_clear; }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
40,852,695,049,031,980,000,000,000,000,000,000,000
6
Don't read too greedily
MDL_deadlock_handler(Open_table_context *ot_ctx_arg) : m_ot_ctx(ot_ctx_arg), m_is_active(FALSE) {}
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
293,918,458,746,112,600,000,000,000,000,000,000,000
3
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
unsigned int pgpDigParamsAlgo(pgpDigParams digp, unsigned int algotype) { unsigned int algo = 0; /* assume failure */ if (digp) { switch (algotype) { case PGPVAL_PUBKEYALGO: algo = digp->pubkey_algo; break; case PGPVAL_HASHALGO: algo = digp->hash_algo; break; } } return algo; }
0
[ "CWE-347", "CWE-284" ]
rpm
bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8
330,214,292,614,909,400,000,000,000,000,000,000,000
15
Validate and require subkey binding signatures on PGP public keys All subkeys must be followed by a binding signature by the primary key as per the OpenPGP RFC, enforce the presence and validity in the parser. The implementation is as kludgey as they come to work around our simple-minded parser structure without touc...
TEST_P(DownstreamProtocolIntegrationTest, MissingHeadersLocalReply) { useAccessLog("%RESPONSE_CODE_DETAILS%"); config_helper_.addFilter("{ name: invalid-header-filter, typed_config: { \"@type\": " "type.googleapis.com/google.protobuf.Empty } }"); initialize(); codec_client_ = makeHttp...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
277,120,673,992,423,950,000,000,000,000,000,000,000
20
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
irc_server_get_prefix_mode_index (struct t_irc_server *server, char mode) { const char *prefix_modes; char *pos; if (server) { prefix_modes = irc_server_get_prefix_modes (server); pos = strchr (prefix_modes, mode); if (pos) return pos - prefix_modes; } ...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
53,083,632,991,197,060,000,000,000,000,000,000,000
15
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
static bool is_validation_in_time( const Validity& validity) { #if _MSC_VER != 1800 bool returned_value = false; std::time_t current_time = std::time(nullptr); if (std::difftime(current_time, validity.not_before) >= 0) { if (std::difftime(validity.not_after, current_time) >= 0) ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
97,979,635,273,677,400,000,000,000,000,000,000,000
21
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
mime_db_changed_callback (GObject *ignore, NautilusDirectory *dir) { NautilusFileAttributes attrs; g_assert (dir != NULL); g_assert (dir->details != NULL); attrs = NAUTILUS_FILE_ATTRIBUTE_INFO | NAUTILUS_FILE_ATTRIBUTE_LINK_INFO | NAUTILUS_FILE_ATTRIBUTE_METADATA | NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIM...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
105,619,180,711,358,300,000,000,000,000,000,000,000
14
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static int log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) { struct iovec iov[64]; int i, ret; if (!vq->iotlb) return log_write(vq->log_base, vq->log_addr + used_offset, len); ret = translate_desc(vq, (uintptr_t)vq->used + used_offset, len, iov, 64, VHOST_ACCESS_WO); if (ret < 0) retur...
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
30,392,483,953,966,100,000,000,000,000,000,000,000
22
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
cJSON *cJSON_DetachItemFromObject( cJSON *object, const char *string ) { int i = 0; cJSON *c = object->child; while ( c && cJSON_strcasecmp( c->string, string ) ) { ++i; c = c->next; } if ( c ) return cJSON_DetachItemFromArray( object, i ); return 0; }
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
259,298,858,380,100,300,000,000,000,000,000,000,000
12
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
static void mmtimer_tasklet(unsigned long data) { int nodeid = data; struct mmtimer_node *mn = &timers[nodeid]; struct mmtimer *x = rb_entry(mn->next, struct mmtimer, list); struct k_itimer *t; unsigned long flags; /* Send signal and deal with periodic signals */ spin_lock_irqsave(&mn->lock, flags); if (!mn->n...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
230,136,172,086,352,500,000,000,000,000,000,000,000
43
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 ...
static Bool Ins_Goto_CodeRange( EXEC_OPS Int aRange, Int aIP ) { TCodeRange* WITH; if ( aRange < 1 || aRange > 3 ) { CUR.error = TT_Err_Bad_Argument; return FAILURE; } WITH = &CUR.codeRangeTable[aRange - 1]; if ( WITH->Base == NULL ) /* invalid coderange */ { ...
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
95,813,396,810,142,240,000,000,000,000,000,000,000
35
Bug 698024: bounds check zone pointer in Ins_MIRP()
static void ext4_wait_for_tail_page_commit(struct inode *inode) { struct page *page; unsigned offset; journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; tid_t commit_tid = 0; int ret; offset = inode->i_size & (PAGE_SIZE - 1); /* * All buffers in the last page remain valid? Then there's nothing to * do. W...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
20,592,917,900,322,338,000,000,000,000,000,000,000
36
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...
static void tight_send_compact_size(VncState *vs, size_t len) { int lpc = 0; int bytes = 0; char buf[3] = {0, 0, 0}; buf[bytes++] = len & 0x7F; if (len > 0x7F) { buf[bytes-1] |= 0x80; buf[bytes++] = (len >> 7) & 0x7F; if (len > 0x3FFF) { buf[bytes-1] |= 0x80; ...
0
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
260,294,743,331,053,450,000,000,000,000,000,000,000
19
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
numstr(int x) { static char buf[20]; snprintf(buf, sizeof(buf), "%#x", x); return buf; }
0
[ "CWE-125", "CWE-787" ]
tcpdump
8934a7d6307267d301182f19ed162563717e29e3
62,691,608,632,386,570,000,000,000,000,000,000,000
7
CVE-2017-12988/TELNET: Add a missing bounds check. This fixes a buffer over-read discovered by Forcepoint's security researchers Otto Airamo & Antti Levomäki. Add a test using the capture file supplied by the reporter(s).
usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) { struct usbnet *dev; struct net_device *net; struct usb_host_interface *interface; struct driver_info *info; struct usb_device *xdev; int status; const char *name; struct usb_driver *driver = to_usb_driver(udev->dev.driver);...
1
[ "CWE-703" ]
linux
1666984c8625b3db19a9abc298931d35ab7bc64b
251,748,022,453,007,200,000,000,000,000,000,000,000
178
usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of L...
static struct bpf_link *bpf_link_inc_not_zero(struct bpf_link *link) { return atomic64_fetch_add_unless(&link->refcnt, 1, 0) ? link : ERR_PTR(-ENOENT); }
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
223,015,489,864,836,060,000,000,000,000,000,000,000
4
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
wStream* license_send_stream_init(rdpLicense* license) { wStream* s; s = Stream_New(NULL, 4096); Stream_Seek(s, LICENSE_PACKET_HEADER_MAX_LENGTH); return s; }
0
[]
FreeRDP
f1d6afca6ae620f9855a33280bdc6f3ad9153be0
29,431,656,645,832,403,000,000,000,000,000,000,000
9
Fix CVE-2014-0791 This patch fixes CVE-2014-0791, the remaining length in the stream is checked before doing some malloc().
void Item_sum_num::reset_field() { double nr= args[0]->val_real(); uchar *res=result_field->ptr; if (maybe_null) { if (args[0]->null_value) { nr=0.0; result_field->set_null(); } else result_field->set_notnull(); } float8store(res,nr); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
42,039,107,206,887,570,000,000,000,000,000,000,000
17
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static void superblock_free_security(struct super_block *sb) { struct superblock_security_struct *sbsec = sb->s_security; spin_lock(&sb_security_lock); if (!list_empty(&sbsec->list)) list_del_init(&sbsec->list); spin_unlock(&sb_security_lock); sb->s_security = NULL; kfree(sbsec); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
59,205,619,633,454,340,000,000,000,000,000,000,000
12
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...
void SFD_GetFontMetaDataData_Init( SFD_GetFontMetaDataData* d ) { memset( d, 0, sizeof(SFD_GetFontMetaDataData)); }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
304,828,189,728,311,900,000,000,000,000,000,000,000
4
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 (...
explicit CollectiveOpV3Kernel(OpKernelConstruction* c) : AsyncOpKernel(c), name_(name()), device_type_(DEVICE_DEFAULT) { OP_REQUIRES_OK(c, c->GetAttr("T", &data_type_)); if (c->HasAttr("timeout_seconds")) { OP_REQUIRES_OK(c, c->GetAttr("timeout_seconds", &timeout_seconds_)); } else { tim...
0
[ "CWE-416" ]
tensorflow
ca38dab9d3ee66c5de06f11af9a4b1200da5ef75
253,926,073,355,144,240,000,000,000,000,000,000,000
10
Fix undefined behavior in CollectiveReduceV2 and others We should not call done after it's moved. PiperOrigin-RevId: 400838185 Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1
router_get_dirobj_signature(const char *digest, size_t digest_len, crypto_pk_t *private_key) { char *signature; size_t i, keysize; int siglen; char *buf = NULL; size_t buf_len; /* overestimate of BEGIN/END lines total len. */ #define BEGIN_END_OVERHEAD...
0
[ "CWE-119" ]
tor
d978216dea6b21ac38230a59d172139185a68dbd
161,828,684,508,837,230,000,000,000,000,000,000,000
47
Fix parsing bug with unecognized token at EOS In get_token(), we could read one byte past the end of the region. This is only a big problem in the case where the region itself is (a) potentially hostile, and (b) not explicitly nul-terminated. This patch fixes the underlying bug, and also makes sure that the one remai...
void HttpIntegrationTest::testLargeRequestHeaders(uint32_t size, uint32_t max_size) { // `size` parameter is the size of the header that will be added to the // request. The actual request byte size will exceed `size` due to keys // and other headers. config_helper_.addConfigModifier( [&](envoy::config::...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
113,975,996,308,722,940,000,000,000,000,000,000,000
36
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...
encoding_table_get_obj(table, enc) VALUE table; VALUE enc; { return encoding_table_get_obj_core(table, enc, Qtrue); }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
78,928,234,197,864,320,000,000,000,000,000,000,000
6
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e