func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int cuse_channel_release(struct inode *inode, struct file *file) { struct fuse_dev *fud = file->private_data; struct cuse_conn *cc = fc_to_cc(fud->fc); int rc; /* remove from the conntbl, no more access from this point on */ mutex_lock(&cuse_lock); list_del_init(&cc->list); mutex_unlock(&cuse_lock); /*...
0
[ "CWE-399" ]
linux
2c5816b4beccc8ba709144539f6fdd764f8fa49c
133,335,029,805,109,830,000,000,000,000,000,000,000
25
cuse: fix memory leak The problem is that fuse_dev_alloc() acquires an extra reference to cc.fc, and the original ref count is never dropped. Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Fixes: cc080e9e9be1 ("fuse: introduce per-instance fuse_dev structure")...
int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){ Vdbe *v = pParse->pVdbe; /* The VM under construction */ int op; /* The opcode being coded */ int inReg = target; /* Results stored in register inReg */ int regFree1 = 0; /* If non-zero free this temporary regist...
1
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
103,274,332,561,532,090,000,000,000,000,000,000,000
739
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { mz_uint flags; mz_uint8 *pLZ_codes; mz_uint8 *pOutput_buf = d->m_pOutput_buf; mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; mz_uint64 bit_buffer = d->m_bit_buffer; mz_uint bits_in = d->m_bits_in; #define TDEFL_PUT_BITS_FAST(b, l) ...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
267,242,065,693,840,940,000,000,000,000,000,000,000
92
Make line_no with too large value(2**20) invalid. Fixes #124
static struct sctp_chunk *sctp_make_asconf(struct sctp_association *asoc, union sctp_addr *addr, int vparam_len) { sctp_addiphdr_t asconf; struct sctp_chunk *retval; int length = sizeof(asconf) + vparam_len; union sctp_addr_param addrparam; int addrlen; struct sctp_af *af = sctp_get_af_specific(ad...
0
[ "CWE-20", "CWE-399" ]
linux
9de7922bc709eee2f609cd01d98aaedc4cf5ea74
226,163,481,243,593,520,000,000,000,000,000,000,000
30
net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for ASCONF chunk") added basic verification of ASCONF chunks, however, it is still possible to remotely crash a server by sending a special crafted ASCONF chunk, even up to pre 2.6.12 kernels: ...
box_poly(PG_FUNCTION_ARGS) { BOX *box = PG_GETARG_BOX_P(0); POLYGON *poly; int size; /* map four corners of the box to a polygon */ size = offsetof(POLYGON, p[0]) +sizeof(poly->p[0]) * 4; poly = (POLYGON *) palloc(size); SET_VARSIZE(poly, size); poly->npts = 4; poly->p[0].x = box->low.x; poly->p[0...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
239,521,768,776,852,450,000,000,000,000,000,000,000
27
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
logger_start_buffer (struct t_gui_buffer *buffer, int write_info_line) { struct t_logger_buffer *ptr_logger_buffer; int log_level, log_enabled; if (!buffer) return; log_level = logger_get_level_for_buffer (buffer); log_enabled = weechat_config_boolean (logger_config_file_auto_log) ...
0
[ "CWE-119", "CWE-787" ]
weechat
f105c6f0b56fb5687b2d2aedf37cb1d1b434d556
114,042,339,569,812,520,000,000,000,000,000,000,000
46
logger: call strftime before replacing buffer local variables
option_was_set(char_u *name) { int idx; idx = findoption(name); if (idx < 0) // unknown option return FALSE; if (options[idx].flags & P_WAS_SET) return TRUE; return FALSE; }
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
241,576,788,501,647,620,000,000,000,000,000,000,000
11
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.
handle_sysmouse(int sig GCC_UNUSED) { sysmouse_server(CURRENT_SCREEN); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
226,393,251,484,162,500,000,000,000,000,000,000,000
4
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
pk_transaction_locked_changed_cb (PkBackendJob *job, gboolean locked, PkTransaction *transaction) { g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction->priv->tid != NULL); g_debug ("backend job lock status changed: %i", locked); /* if backend cache is locked at some time, th...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
260,364,231,728,047,920,000,000,000,000,000,000,000
13
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
static inline int shmem_parse_mpol(char *value, int *policy, nodemask_t *policy_nodes) { char *nodelist = strchr(value, ':'); int err = 1; if (nodelist) { /* NUL-terminate policy string */ *nodelist++ = '\0'; if (nodelist_parse(nodelist, *policy_nodes)) goto out; if (!nodes_subset(*policy_nodes, node_sta...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
155,493,777,917,846,000,000,000,000,000,000,000,000
48
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
static int session_call_on_header(nghttp2_session *session, const nghttp2_frame *frame, const nghttp2_hd_nv *nv) { int rv = 0; if (session->callbacks.on_header_callback2) { rv = session->callbacks.on_header_callback2( session, frame, nv...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
1,579,521,267,944,471,700,000,000,000,000,000,000
22
Add nghttp2_option_set_max_outbound_ack
WandExport double DrawGetTextKerning(DrawingWand *wand) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); return(CurrentContext->kerning); }
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
126,738,662,098,950,080,000,000,000,000,000,000,000
9
https://github.com/ImageMagick/ImageMagick/issues/716
UnicodeString::moveIndex32(int32_t index, int32_t delta) const { // pin index int32_t len = length(); if(index<0) { index=0; } else if(index>len) { index=len; } const UChar *array = getArrayStart(); if(delta>0) { U16_FWD_N(array, index, len, delta); } else { U16_BACK_N(array, 0, index, ...
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
339,409,841,241,313,700,000,000,000,000,000,000,000
18
ICU-20958 Prevent SEGV_MAPERR in append See #971
static struct scatterlist *alloc_sgtable(int size) { int alloc_size, nents, i; struct page *new_page; struct scatterlist *iter; struct scatterlist *table; nents = DIV_ROUND_UP(size, PAGE_SIZE); table = kcalloc(nents, sizeof(*table), GFP_KERNEL); if (!table) return NULL; sg_init_table(table, nents); iter = t...
1
[ "CWE-400", "CWE-401" ]
linux
b4b814fec1a5a849383f7b3886b654a13abbda7d
155,226,500,233,023,100,000,000,000,000,000,000,000
31
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
GC_API void GC_CALL GC_incr_bytes_allocd(size_t n) { GC_bytes_allocd += n; }
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
236,693,931,674,642,980,000,000,000,000,000,000,000
4
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
int ssl3_send_client_certificate(SSL *s) { X509 *x509 = NULL; EVP_PKEY *pkey = NULL; int i; if (s->state == SSL3_ST_CW_CERT_A) { /* Let cert callback update client certificates if required */ if (s->cert->cert_cb) { i = s->cert->cert_cb(s, s->cert->cert_cb_arg); ...
0
[ "CWE-310" ]
openssl
10a70da729948bb573d27cef4459077c49f3eb46
247,363,252,675,717,740,000,000,000,000,000,000,000
84
client: reject handshakes with DH parameters < 768 bits. Since the client has no way of communicating her supported parameter range to the server, connections to servers that choose weak DH will simply fail. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
void sctp_data_ready(struct sock *sk, int len) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (wq_has_sleeper(wq)) wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLRDNORM | POLLRDBAND); sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); rcu_read_unlock(); }
0
[ "CWE-20" ]
linux
726bc6b092da4c093eb74d13c07184b18c1af0f1
68,683,894,906,860,060,000,000,000,000,000,000,000
12
net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Building sctp may fail with: In function ‘copy_from_user’, inlined from ‘sctp_getsockopt_assoc_stats’ at net/sctp/socket.c:5656:20: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: c...
static int io_async_buf_func(struct wait_queue_entry *wait, unsigned mode, int sync, void *arg) { struct wait_page_queue *wpq; struct io_kiocb *req = wait->private; struct wait_page_key *key = arg; wpq = container_of(wait, struct wait_page_queue, wait); if (!wake_page_match(wpq, key)) return 0; req->...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
168,853,248,238,605,400,000,000,000,000,000,000,000
17
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static ssize_t print_cpu_modalias(struct device *dev, struct device_attribute *attr, char *buf) { ssize_t n; u32 i; n = sprintf(buf, "cpu:type:" CPU_FEATURE_TYPEFMT ":feature:", CPU_FEATURE_TYPEVAL); for (i = 0; i < MAX_CPU_FEATURES; i++) if (cpu_have_feature(i)) { if (PAGE_SIZE < n + sizeo...
1
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
133,532,921,148,595,370,000,000,000,000,000,000,000
21
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static PHP_MINFO_FUNCTION(session) /* {{{ */ { ps_module **mod; ps_serializer *ser; smart_str save_handlers = {0}; smart_str ser_handlers = {0}; int i; /* Get save handlers */ for (i = 0, mod = ps_modules; i < MAX_MODULES; i++, mod++) { if (*mod && (*mod)->s_name) { smart_str_appends(&save_handlers, (*mod)...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
88,650,798,117,099,140,000,000,000,000,000,000,000
47
Strict session
bool rtl_ps_disable_nic(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); /*<1> Stop all timer */ rtl_deinit_deferred_work(hw, true); /*<2> Disable Interrupt */ rtlpriv->cfg->ops->disable_interrupt(hw); tasklet_kill(&rtlpriv->works.irq_tasklet); /*<3> Disable Adapter */ rtlpriv->cfg->ops->h...
0
[ "CWE-120" ]
linux
8c55dedb795be8ec0cf488f98c03a1c2176f7fb1
55,467,660,144,033,680,000,000,000,000,000,000,000
16
rtlwifi: Fix potential overflow on P2P code Nicolas Waisman noticed that even though noa_len is checked for a compatible length it's still possible to overrun the buffers of p2pinfo since there's no check on the upper bound of noa_num. Bound noa_num against P2P_MAX_NOA_NUM. Reported-by: Nicolas Waisman <nico@semmle.c...
static void intel_fixup_er(struct perf_event *event, int idx) { event->hw.extra_reg.idx = idx; if (idx == EXTRA_REG_RSP_0) { event->hw.config &= ~INTEL_ARCH_EVENT_MASK; event->hw.config |= 0x01b7; event->hw.extra_reg.reg = MSR_OFFCORE_RSP_0; } else if (idx == EXTRA_REG_RSP_1) { event->hw.config &= ~INTEL_AR...
0
[ "CWE-20", "CWE-401" ]
linux
f1923820c447e986a9da0fc6bf60c1dccdf0408e
172,266,403,436,415,260,000,000,000,000,000,000,000
14
perf/x86: Fix offcore_rsp valid mask for SNB/IVB The valid mask for both offcore_response_0 and offcore_response_1 was wrong for SNB/SNB-EP, IVB/IVB-EP. It was possible to write to reserved bit and cause a GP fault crashing the kernel. This patch fixes the problem by correctly marking the reserved bits in the valid m...
Curl_ssl_connect(struct Curl_easy *data, struct connectdata *conn, int sockindex) { CURLcode result; #ifndef CURL_DISABLE_PROXY if(conn->bits.proxy_ssl_connected[sockindex]) { result = ssl_connect_init_proxy(conn, sockindex); if(result) return result; } #endif if(!ssl_prefs_chec...
0
[ "CWE-416", "CWE-295" ]
curl
7f4a9a9b2a49547eae24d2e19bc5c346e9026479
282,793,056,276,706,500,000,000,000,000,000,000,000
29
openssl: associate/detach the transfer from connection CVE-2021-22901 Bug: https://curl.se/docs/CVE-2021-22901.html
*/ int dev_pre_changeaddr_notify(struct net_device *dev, const char *addr, struct netlink_ext_ack *extack) { struct netdev_notifier_pre_changeaddr_info info = { .info.dev = dev, .info.extack = extack, .dev_addr = addr, }; int rc; rc = call_netdevice_notifiers_info(NETDEV_PRE_CHANGEADDR, &info.info)...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
165,874,016,821,493,470,000,000,000,000,000,000,000
13
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, struct kvm_io_device *dev) { struct kvm_io_bus *new_bus, *bus; bus = kvm->buses[bus_idx]; /* exclude ioeventfd which is limited by maximum fd */ if (bus->dev_count - bus->ioeventfd_count > NR_IOBUS_DEVS - 1) return -EN...
0
[ "CWE-20" ]
linux
338c7dbadd2671189cec7faf64c84d01071b3f96
190,180,695,594,500,200,000,000,000,000,000,000,000
23
KVM: Improve create VCPU parameter (CVE-2013-4587) In multiple functions the vcpu_id is used as an offset into a bitfield. Ag malicious user could specify a vcpu_id greater than 255 in order to set or clear bits in kernel memory. This could be used to elevate priveges in the kernel. This patch verifies that the vcp...
virtual ~JSONParser() {}
0
[ "CWE-787" ]
opencv
f42d5399aac80d371b17d689851406669c9b9111
144,027,317,756,948,520,000,000,000,000,000,000,000
1
core(persistence): add more checks for implementation limitations
SPL_METHOD(SplFileObject, next) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } spl_filesystem_file_free_line(intern); if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_AHEAD)) { spl_filesystem_file_read_line(getThis(), intern, 1); ...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
214,934,991,876,060,900,000,000,000,000,000,000,000
14
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
RZ_API void rz_analysis_function_delete_var(RzAnalysisFunction *fcn, RzAnalysisVar *var) { rz_return_if_fail(fcn && var); rz_pvector_remove_data(&fcn->vars, var); var_free(var); }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
800,820,762,370,370,800,000,000,000,000,000,000
5
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
float compute_error_of_weight_set_1plane( const endpoints_and_weights& eai, const decimation_info& di, const float* dec_weight_quant_uvalue ) { vfloat4 error_summav = vfloat4::zero(); float error_summa = 0.0f; unsigned int texel_count = di.texel_count; bool is_decimated = di.texel_count != di.weight_count; //...
0
[ "CWE-787" ]
astc-encoder
bdd385fe19bf2737bead4b5664acdfdeca7aab15
230,807,954,512,977,260,000,000,000,000,000,000,000
50
Only load based on texel index if undecimated
TEST(HeaderMapImplTest, HostHeader) { TestRequestHeaderMapImpl request_headers{{"host", "foo"}}; EXPECT_EQ(request_headers.size(), 1); EXPECT_EQ(request_headers.get_(":authority"), "foo"); TestRequestTrailerMapImpl request_trailers{{"host", "foo"}}; EXPECT_EQ(request_trailers.size(), 1); EXPECT_EQ(request_...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
69,463,685,538,444,465,000,000,000,000,000,000,000
17
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
bool ms_verify_authorizer(Connection *con, int peer_type, int protocol, bufferlist& authorizer, bufferlist& authorizer_reply, bool& isvalid, CryptoKey& session_key) override { isvalid = true; return true; }
1
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
89,914,117,185,406,400,000,000,000,000,000,000,000
6
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
int nft_parse_register_store(const struct nft_ctx *ctx, const struct nlattr *attr, u8 *dreg, const struct nft_data *data, enum nft_data_types type, unsigned int len) { int err; u32 reg; reg = nft_parse_register(attr); err = nft_validate_register_store(ctx, reg, data, type, len); if (err < ...
1
[ "CWE-787" ]
linux
6e1acfa387b9ff82cfc7db8cc3b6959221a95851
293,953,775,694,832,540,000,000,000,000,000,000,000
16
netfilter: nf_tables: validate registers coming from userspace. Bail out in case userspace uses unsupported registers. Fixes: 49499c3e6e18 ("netfilter: nf_tables: switch registers to 32 bit addressing") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static int aes_xts_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { EVP_AES_XTS_CTX *xctx = ctx->cipher_data; if (!iv && !key) return 1; if (key) do { # ifdef AES_XTS_ASM xctx->stream = enc ? AES_xts_encrypt ...
0
[]
openssl
1a3701f4fe0530a40ec073cd78d02cfcc26c0f8e
241,819,503,665,010,870,000,000,000,000,000,000,000
84
Sanity check EVP_CTRL_AEAD_TLS_AAD The various implementations of EVP_CTRL_AEAD_TLS_AAD expect a buffer of at least 13 bytes long. Add sanity checks to ensure that the length is at least that. Also add a new constant (EVP_AEAD_TLS1_AAD_LEN) to evp.h to represent this length. Thanks to Kevin Wojtysiak (Int3 Solutions) ...
compare_method_imap (const void *key, const void *elem) { const char** method_name = (const char**)elem; return strcmp (key, *method_name); }
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
55,113,535,490,446,280,000,000,000,000,000,000,000
5
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
static int nf_tables_dump_rules_start(struct netlink_callback *cb) { const struct nlattr * const *nla = cb->data; struct nft_rule_dump_ctx *ctx = NULL; if (nla[NFTA_RULE_TABLE] || nla[NFTA_RULE_CHAIN]) { ctx = kzalloc(sizeof(*ctx), GFP_ATOMIC); if (!ctx) return -ENOMEM; if (nla[NFTA_RULE_TABLE]) { ctx-...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
43,103,151,243,437,300,000,000,000,000,000,000,000
32
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static int idprime_get_token_name(sc_card_t* card, char** tname) { idprime_private_data_t * priv = card->drv_data; sc_path_t tinfo_path = {"\x00\x00", 2, 0, 0, SC_PATH_TYPE_PATH, {"", 0}}; sc_file_t *file = NULL; u8 buf[2]; int r; LOG_FUNC_CALLED(card->ctx); if (tname == NULL) { LOG_FUNC_RETURN(card->ctx, SC...
1
[]
OpenSC
f015746d22d249642c19674298a18ad824db0ed7
155,254,593,995,137,430,000,000,000,000,000,000,000
49
idprime: Use temporary variable instead of messing up the passed one Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28185
const char *pos() const { return str - is_quoted(); }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
159,226,243,880,677,320,000,000,000,000,000,000,000
1
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
void ConnectionManagerImpl::ActiveStream::decodeMetadata(MetadataMapPtr&& metadata_map) { resetIdleTimer(); // After going through filters, the ownership of metadata_map will be passed to terminal filter. // The terminal filter may encode metadata_map to the next hop immediately or store metadata_map // and enc...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
218,950,661,891,762,300,000,000,000,000,000,000,000
7
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
R_API void r_bin_java_reset_bin_info(RBinJavaObj *bin) { free (bin->cf2.flags_str); free (bin->cf2.this_class_name); r_list_free (bin->imports_list); r_list_free (bin->methods_list); r_list_free (bin->fields_list); r_list_free (bin->attrs_list); r_list_free (bin->cp_list); r_list_free (bin->interfaces_list); r...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
258,495,487,484,337,260,000,000,000,000,000,000,000
20
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
Status RoleGraph::getBSONForRole(RoleGraph* graph, const RoleName& roleName, mutablebson::Element result) try { if (!graph->roleExists(roleName)) { return Status(ErrorCodes::RoleNotFound, str::stream() << roleName.getFul...
1
[ "CWE-863" ]
mongo
521e56b407ac72bc69a97a24d1253f51a5b6e81b
101,898,441,253,732,920,000,000,000,000,000,000,000
37
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
static ssize_t xps_rxqs_show(struct netdev_queue *queue, char *buf) { struct net_device *dev = queue->dev; struct xps_dev_maps *dev_maps; unsigned long *mask, index; int j, len, num_tc = 1, tc = 0; index = get_netdev_queue_index(queue); if (dev->num_tc) { num_tc = dev->num_tc; tc = netdev_txq_to_tc(dev, in...
0
[]
linux
a3e23f719f5c4a38ffb3d30c8d7632a4ed8ccd9e
33,702,955,230,317,840,000,000,000,000,000,000,000
48
net-sysfs: call dev_hold if kobject_init_and_add success In netdev_queue_add_kobject and rx_queue_add_kobject, if sysfs_create_group failed, kobject_put will call netdev_queue_release to decrease dev refcont, however dev_hold has not be called. So we will see this while unregistering dev: unregister_netdevice: waitin...
void HGraphBuilder::GenerateObjectEquals(CallRuntime* call) { ASSERT(call->arguments()->length() == 2); CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); HValue* right = Pop(); HValue* left = Pop(); HCompareObjectEqAndBranch* result = new(zone(...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
178,791,493,607,217,650,000,000,000,000,000,000,000
10
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
int qcow2_check_refcounts(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix) { BDRVQcowState *s = bs->opaque; int64_t size, i, highest_cluster; int nb_clusters, refcount1, refcount2; QCowSnapshot *sn; uint16_t *refcount_table; int ret; size = bdrv_getle...
0
[ "CWE-190" ]
qemu
b106ad9185f35fc4ad669555ad0e79e276083bd7
109,416,027,895,734,650,000,000,000,000,000,000,000
171
qcow2: Don't rely on free_cluster_index in alloc_refcount_block() (CVE-2014-0147) free_cluster_index is only correct if update_refcount() was called from an allocation function, and even there it's brittle because it's used to protect unfinished allocations which still have a refcount of 0 - if it moves in the wrong p...
R_API int r_bin_select_by_ids(RBin *bin, ut32 binfile_id, ut32 binobj_id) { RBinFile *binfile = NULL; RBinObject *obj = NULL; if (binfile_id == UT32_MAX && binobj_id == UT32_MAX) { return false; } if (binfile_id == -1) { binfile = r_bin_file_find_by_object_id (bin, binobj_id); obj = binfile? r_bin_file_obje...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
257,760,331,058,532,470,000,000,000,000,000,000,000
22
Fix #8748 - Fix oobread on string search
getcoprocbyname (name) const char *name; { #if MULTIPLE_COPROCS struct cpelement *p; p = cpl_searchbyname (name); return (p ? p->coproc : 0); #else return ((sh_coproc.c_name && STREQ (sh_coproc.c_name, name)) ? &sh_coproc : 0); #endif }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
252,926,514,308,625,550,000,000,000,000,000,000,000
12
bash-4.4-rc2 release
void HGraphBuilder::GenerateValueOf(CallRuntime* call) { ASSERT(call->arguments()->length() == 1); CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); HValue* value = Pop(); HValueOf* result = new(zone()) HValueOf(value); return ast_context()->ReturnInstruction(result, call->id()); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
326,927,604,709,054,070,000,000,000,000,000,000,000
7
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
zfs_acl_znode_info(znode_t *zp, int *aclsize, int *aclcount, zfs_acl_phys_t *aclphys) { zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t acl_count; int size; int error; ASSERT(MUTEX_HELD(&zp->z_acl_lock)); if (zp->z_is_sa) { if ((error = sa_size(zp->z_sa_hdl, SA_ZPL_DACL_ACES(zfsvfs), &size)) != 0) retur...
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
298,500,099,154,479,830,000,000,000,000,000,000,000
33
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
~MatrixTriangularSolveOp() override {}
0
[ "CWE-125" ]
tensorflow
480641e3599775a8895254ffbc0fc45621334f68
290,064,607,005,731,340,000,000,000,000,000,000,000
1
Validate (and ensure validation sticks) inputs for `MatrixTriangularSolve`. PiperOrigin-RevId: 370282444 Change-Id: Iaed61a0b0727cc42c830658b72eb69f785f48dc5
void RGWREST::register_x_headers(const string& s_headers) { std::vector<std::string> hdrs = get_str_vec(s_headers); for (auto& hdr : hdrs) { boost::algorithm::to_upper(hdr); // XXX (void) x_headers.insert(hdr); } }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
28,878,482,996,058,495,000,000,000,000,000,000,000
8
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static u32 hgcm_call_buf_size_in_pages(void *buf, u32 len) { u32 size = PAGE_ALIGN(len + ((unsigned long)buf & ~PAGE_MASK)); return size >> PAGE_SHIFT; }
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
e0b0cb9388642c104838fac100a4af32745621e2
279,876,814,322,899,840,000,000,000,000,000,000,000
6
virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr In hgcm_call_preprocess_linaddr memory is allocated for bounce_buf but is not released if copy_form_user fails. In order to prevent memory leak in case of failure, the assignment to bounce_buf_ret is moved before the error check. This way the allocated bounce...
MagickExport void *ImagesToBlob(const ImageInfo *image_info,Image *images, size_t *length,ExceptionInfo *exception) { const MagickInfo *magick_info; ImageInfo *clone_info; MagickBooleanType status; void *blob; assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature...
0
[ "CWE-416", "CWE-399" ]
ImageMagick
c5d012a46ae22be9444326aa37969a3f75daa3ba
37,110,106,750,869,604,000,000,000,000,000,000,000
109
https://github.com/ImageMagick/ImageMagick6/issues/43
static void port_outb(const struct si_sm_io *io, unsigned int offset, unsigned char b) { unsigned int addr = io->addr_data; outb(b, addr + (offset * io->regspacing)); }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
229,198,820,348,641,350,000,000,000,000,000,000,000
7
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
GF_Err stsh_dump(GF_Box *a, FILE * trace) { GF_ShadowSyncBox *p; u32 i; GF_StshEntry *t; p = (GF_ShadowSyncBox *)a; gf_isom_box_dump_start(a, "SyncShadowBox", trace); fprintf(trace, "EntryCount=\"%d\">\n", gf_list_count(p->entries)); i=0; while ((t = (GF_StshEntry *)gf_list_enum(p->entries, &i))) { fprintf(t...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
266,022,548,251,987,950,000,000,000,000,000,000,000
19
fixed 2 possible heap overflows (inc. #1088)
usm_save_users(const char *token, const char *type) { usm_save_users_from_list(userList, token, type); }
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
335,775,187,812,769,200,000,000,000,000,000,000,000
4
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
static int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_connect *conn = &req->connect; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->ioprio || sqe->len || sqe->buf_index || sqe->rw_flags || sqe->splice_fd_in) return -EINVAL; conn->addr ...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
207,276,282,919,101,630,000,000,000,000,000,000,000
14
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
MagickExport MagickBooleanType XRemoteCommand(Display *display, const char *window,const char *filename) { Atom remote_atom; Window remote_window, root_window; assert(filename != (char *) NULL); (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",filename); if (display == (Display *) NULL)...
0
[ "CWE-401" ]
ImageMagick6
13801f5d0bd7a6fdb119682d34946636afdb2629
277,627,462,556,875,800,000,000,000,000,000,000,000
50
https://github.com/ImageMagick/ImageMagick/issues/1531
int bzrtp_packetUpdateSequenceNumber(bzrtpPacket_t *zrtpPacket, uint16_t sequenceNumber) { uint32_t CRC; uint8_t *CRCbuffer; if (zrtpPacket == NULL) { return BZRTP_BUILDER_ERROR_INVALIDPACKET; } if (zrtpPacket->packetString == NULL) { return BZRTP_BUILDER_ERROR_INVALIDPACKET; } /* update the sequence numbe...
0
[ "CWE-254", "CWE-787" ]
bzrtp
bbb1e6e2f467ee4bd7b9a8c800e4f07343d7d99b
213,483,419,061,573,100,000,000,000,000,000,000,000
32
Add ZRTP Commit packet hvi check on DHPart2 packet reception
get_cpo_flags(void) { reg_cpo_lit = vim_strchr(p_cpo, CPO_LITERAL) != NULL; reg_cpo_bsl = vim_strchr(p_cpo, CPO_BACKSL) != NULL; }
0
[ "CWE-416" ]
vim
4c13e5e6763c6eb36a343a2b8235ea227202e952
108,616,243,878,321,470,000,000,000,000,000,000,000
5
patch 8.2.3949: using freed memory with /\%V Problem: Using freed memory with /\%V. Solution: Get the line again after getvvcol().
void WebContents::MessageHost(const std::string& channel, blink::CloneableMessage arguments, content::RenderFrameHost* render_frame_host) { TRACE_EVENT1("electron", "WebContents::MessageHost", "channel", channel); // webContents.emit('ipc-message-host', ne...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
76,804,414,255,659,840,000,000,000,000,000,000,000
9
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip) { return 1; }
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
109,100,375,652,761,920,000,000,000,000,000,000,000
4
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
PHP_FUNCTION(mb_split) { char *arg_pattern; int arg_pattern_len; php_mb_regex_t *re; OnigRegion *regs = NULL; char *string; OnigUChar *pos, *chunk_pos; int string_len; int n, err; long count = -1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &arg_pattern, &arg_pattern_len, &string, &string_l...
0
[ "CWE-415" ]
php-src
5b597a2e5b28e2d5a52fc1be13f425f08f47cb62
209,251,787,211,105,630,000,000,000,000,000,000,000
75
Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
ALWAYS_INLINE void CopyAndMayBeInterleave(void* dst, const void* src, int num_elements) { if (std::is_same<T, float>::value || kNumOperands < 8) { memcpy(dst, src, num_elements * sizeof(T)); } else if (std::is_same<T, bfloat16>::value) { if (num_elements == N) { ...
0
[ "CWE-125" ]
tensorflow
e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
3,791,299,726,400,630,000,000,000,000,000,000,000
14
Validate that matrix dimension sizes in SparseMatMul are positive. PiperOrigin-RevId: 401149683 Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d
static void io_req_caches_free(struct io_ring_ctx *ctx) { struct io_submit_state *state = &ctx->submit_state; int nr = 0; mutex_lock(&ctx->uring_lock); io_flush_cached_locked_reqs(ctx, state); while (state->free_list.next) { struct io_wq_work_node *node; struct io_kiocb *req; node = wq_stack_extract(&sta...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
46,523,828,259,053,820,000,000,000,000,000,000,000
21
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, size_t errbuf_size) #endif { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the re...
0
[ "CWE-19" ]
gnulib
5513b40999149090987a0341c018d05d3eea1272
74,696,180,463,102,810,000,000,000,000,000,000,000
33
Diagnose ERE '()|\1' Problem reported by Hanno Böck in: http://bugs.gnu.org/21513 * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep track of the set of previously-completed subexpressions available before the first alternative, and restore this set just before parsing each subsequent alternative. This...
void ComputeAsync(OpKernelContext* c, DoneCallback done) override { auto col_params = new CollectiveParams(); auto done_with_cleanup = [col_params, done = std::move(done)]() { done(); col_params->Unref(); }; core::RefCountPtr<CollectiveGroupResource> resource; OP_REQUIRES_OK_ASYNC(c, L...
1
[ "CWE-416" ]
tensorflow
ca38dab9d3ee66c5de06f11af9a4b1200da5ef75
160,769,298,430,772,270,000,000,000,000,000,000,000
29
Fix undefined behavior in CollectiveReduceV2 and others We should not call done after it's moved. PiperOrigin-RevId: 400838185 Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1
static GIOFlags irssi_ssl_get_flags(GIOChannel *handle) { GIOSSLChannel *chan = (GIOSSLChannel *)handle; return chan->giochan->funcs->io_get_flags(handle); }
0
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
305,547,825,664,429,420,000,000,000,000,000,000,000
6
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
Item_result_field(THD *thd): Item_fixed_hybrid(thd), result_field(0) {}
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
230,463,401,046,297,340,000,000,000,000,000,000,000
1
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 ...
LIBOPENMPT_MODPLUG_API unsigned int ModPlug_SampleName(ModPlugFile* file, unsigned int qual, char* buff) { const char* str; unsigned int retval; size_t tmpretval; if(!file) return 0; str = openmpt_module_get_sample_name(file->mod,qual-1); if(!str){ if(buff){ *buff = '\0'; } return 0; } tmpretval = strl...
1
[ "CWE-120", "CWE-295" ]
openmpt
927688ddab43c2b203569de79407a899e734fabe
304,330,570,972,204,900,000,000,000,000,000,000,000
25
[Fix] libmodplug: C API: Limit the length of strings copied to the output buffer of ModPlug_InstrumentName() and ModPlug_SampleName() to 32 bytes (including terminating null) as is done by original libmodplug. This avoids potential buffer overflows in software relying on this limit instead of querying the required buff...
static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xmlNodePtr parent, int check_class_map TSRMLS_DC) { xmlNodePtr node = NULL; int add_type = 0; /* Special handling of class SoapVar */ if (data && Z_TYPE_P(data) == IS_OBJECT && Z_OBJCE_P(data) == soap_var_class_entry) { zval *...
0
[ "CWE-19" ]
php-src
75f40ae1f3a7ca837d230f099627d121f9b3a32f
252,233,743,729,302,600,000,000,000,000,000,000,000
142
Fixed bug #69293
static inline int ext4_journal_blocks_per_page(struct inode *inode) { if (EXT4_JOURNAL(inode) != NULL) return jbd2_journal_blocks_per_page(inode); return 0; }
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
92,376,974,635,352,080,000,000,000,000,000,000,000
6
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
**/ CImg<T>& noise(const double sigma, const unsigned int noise_type=0) { if (is_empty()) return *this; const Tfloat vmin = (Tfloat)cimg::type<T>::min(), vmax = (Tfloat)cimg::type<T>::max(); Tfloat nsigma = (Tfloat)sigma, m = 0, M = 0; if (nsigma==0 && noise_type!=3) return *this; ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
124,412,820,514,077,160,000,000,000,000,000,000,000
102
.
void whenInputIs(const char *json) { strcpy(_jsonString, json); _result = QuotedString::extractFrom(_jsonString, &_trailing); }
0
[ "CWE-415", "CWE-119" ]
ArduinoJson
5e7b9ec688d79e7b16ec7064e1d37e8481a31e72
72,690,751,321,299,230,000,000,000,000,000,000,000
4
Fix buffer overflow (pull request #81)
read_yin_rpc_action(struct lys_module *module, struct lys_node *parent, struct lyxml_elem *yin, int options, struct unres_schema *unres) { struct ly_ctx *ctx = module->ctx; struct lyxml_elem *sub, *next, root; struct lys_node *node = NULL; struct lys_node *retval; struct lys_node...
1
[ "CWE-617" ]
libyang
5ce30801f9ccc372bbe9b7c98bb5324b15fb010a
290,765,227,726,777,740,000,000,000,000,000,000,000
149
schema tree BUGFIX freeing nodes with no module set Context must be passed explicitly for these cases. Fixes #1452
*/ void netdev_run_todo(void) { struct list_head list; /* Snapshot list, allow later requests */ list_replace_init(&net_todo_list, &list); __rtnl_unlock(); /* Wait for rcu callbacks to finish before next phase */ if (!list_empty(&list)) rcu_barrier(); while (!list_empty(&list)) { struct net_device *dev...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
22,324,617,964,793,677,000,000,000,000,000,000,000
54
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
_rsvg_node_rect_draw (RsvgNode * self, RsvgDrawingCtx * ctx, int dominate) { double x, y, w, h, rx, ry; GString *d = NULL; RsvgNodeRect *rect = (RsvgNodeRect *) self; char buf[G_ASCII_DTOSTR_BUF_SIZE]; x = _rsvg_css_normalize_length (&rect->x, ctx, 'h'); y = _rsvg_css_normalize_length (&rect->y...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
333,641,024,300,082,000,000,000,000,000,000,000,000
120
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
int main( int argc, char *argv[] ) { ((void) argc); ((void) argv); printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_FS_IO " "and/or POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C " "not defined.\n"); return( 0 ); }
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
90,466,284,684,496,110,000,000,000,000,000,000,000
11
RSA blinding on CRT operations to counter timing attacks
static int h264_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt) { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; H264Context *h = avctx->priv_data; AVFrame *pict = data; int buf_index = 0; H264Pictur...
0
[ "CWE-703" ]
FFmpeg
e8714f6f93d1a32f4e4655209960afcf4c185214
50,742,525,884,772,620,000,000,000,000,000,000,000
111
avcodec/h264: Clear delayed_pic on deallocation Fixes use of freed memory Fixes: case5_av_frame_copy_props.mp4 Found-by: Michal Zalewski <lcamtuf@coredump.cx> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ephy_embed_constructed (GObject *object) { EphyEmbed *embed = (EphyEmbed*)object; GtkWidget *scrolled_window; WebKitWebView *web_view; WebKitWebInspector *inspector; GtkWidget *inspector_sw; embed->priv->top_widgets_vbox = GTK_BOX (gtk_vbox_new (FALSE, 0)); gtk_box_pack_start (GTK_BOX (embed), GTK_WIDGET...
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
330,917,332,220,432,850,000,000,000,000,000,000,000
63
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
static void label_wrapper(GtkWidget *widget, gpointer data_unused) { if (GTK_IS_CONTAINER(widget)) { gtk_container_foreach((GtkContainer*)widget, label_wrapper, NULL); return; } if (GTK_IS_LABEL(widget)) { GtkLabel *label = (GtkLabel*)widget; gtk_label_set_line_wrap(l...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
322,904,341,619,545,800,000,000,000,000,000,000,000
15
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
IntegrationCodecClient::makeHeaderOnlyRequest(const Http::HeaderMap& headers) { auto response = std::make_unique<IntegrationStreamDecoder>(dispatcher_); Http::StreamEncoder& encoder = newStream(*response); encoder.getStream().addCallbacks(*response); encoder.encodeHeaders(headers, true); flushWrite(); retur...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
166,477,898,120,565,630,000,000,000,000,000,000,000
8
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...
compare_field_marshal (const void *a, const void *b) { const guint32 *a_values = a; const guint32 *b_values = b; return a_values [MONO_FIELD_MARSHAL_PARENT] - b_values [MONO_FIELD_MARSHAL_PARENT]; }
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
228,137,666,534,560,170,000,000,000,000,000,000,000
7
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
rpc_C_DecryptUpdate (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_BYTE_PTR encrypted_part; CK_ULONG encrypted_part_len; CK_BYTE_PTR part; CK_ULONG part_len; BEGIN_CALL (DecryptUpdate); IN_ULONG (session); IN_BYTE_ARRAY (encrypted_part, encrypted_part_le...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
301,879,961,568,798,100,000,000,000,000,000,000,000
17
Check for arithmetic overflows before allocating
getsize_gnutar( dle_t *dle, int level, time_t dumpsince, char **errmsg) { int pipefd = -1, nullfd = -1; pid_t dumppid; off_t size = (off_t)-1; FILE *dumpout = NULL; char *incrname = NULL; char *basename = NULL; char *dirname = NULL; char *inputname = NULL; ...
1
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
280,849,713,252,082,280,000,000,000,000,000,000,000
303
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
static void remove_driver(gpointer data, gpointer user_data) { struct btd_adapter_driver *driver = data; struct btd_adapter *adapter = user_data; if (driver->remove) driver->remove(adapter); }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
90,547,164,310,594,600,000,000,000,000,000,000,000
8
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
void __audit_syscall_exit(int success, long return_code) { struct task_struct *tsk = current; struct audit_context *context; if (success) success = AUDITSC_SUCCESS; else success = AUDITSC_FAILURE; context = audit_take_context(tsk, success, return_code); if (!context) return; if (context->in_syscall && c...
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
48,568,783,940,998,030,000,000,000,000,000,000,000
39
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
static void burl_append_encode_psnde (buffer * const b, const char * const str, const size_t len) { /* percent-encodes everything except unreserved - . 0-9 A-Z _ a-z ~ plus / * unless already percent-encoded (does not double-encode) */ /* Note: not checking for invalid UTF-8 */ char * const p = buffer...
0
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
166,366,569,464,953,420,000,000,000,000,000,000,000
32
[core] fix abort in http-parseopts (fixes #2945) fix abort in server.http-parseopts with url-path-2f-decode enabled (thx stze) x-ref: "Security - SIGABRT during GET request handling with url-path-2f-decode enabled" https://redmine.lighttpd.net/issues/2945
connection_worker (void *data) { struct worker_data *worker = data; struct connection *conn = worker->conn; char *name = worker->name; debug ("starting worker thread %s", name); threadlocal_new_server_thread (); threadlocal_set_name (name); free (worker); while (!quit && connection_get_status (conn) >...
0
[ "CWE-406" ]
nbdkit
22b30adb796bb6dca264a38598f80b8a234ff978
23,646,936,490,584,070,000,000,000,000,000,000,000
17
server: Wait until handshake complete before calling .open callback Currently we call the plugin .open callback as soon as we receive a TCP connection: $ nbdkit -fv --tls=require --tls-certificates=tests/pki null \ --run "telnet localhost 10809" [...] Trying ::1... Connected to localhost. Escape ...
TPMI_RH_HIERARCHY_POLICY_Unmarshal(TPMI_RH_HIERARCHY_POLICY *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; TPMI_RH_HIERARCHY_POLICY orig_target = *target; // libtpms added if (rc == TPM_RC_SUCCESS) { rc = TPM_HANDLE_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCC...
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
179,377,473,036,452,500,000,000,000,000,000,000,000
27
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>
static int parse_events(ASS_Renderer *render_priv, ASS_Event *event) { TextInfo *text_info = &render_priv->text_info; ASS_Drawing *drawing = NULL; unsigned code; char *p, *q; int i; p = event->Text; // Event parsing. while (1) { // get next char, executing style override ...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
5,011,780,649,530,983,300,000,000,000,000,000,000
130
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...
int args_from_file(char *file, int *argc, char **argv[]) { FILE *fp; int num,i; unsigned int len; static char *buf=NULL; static char **arg=NULL; char *p; fp=fopen(file,"r"); if (fp == NULL) return(0); if (fseek(fp,0,SEEK_END)==0) len=ftell(fp), rewind(fp); else len=-1; if (len<=0) { fclose(fp); ...
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
123,889,054,148,728,440,000,000,000,000,000,000,000
81
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
GF_Err gf_seng_encode_from_string(GF_SceneEngine *seng, u16 ESID, Bool disable_aggregation, char *auString, gf_seng_callback callback) { GF_StreamContext *sc; u32 i; GF_Err e; i = 0; while ((sc = (GF_StreamContext*)gf_list_enum(seng->ctx->streams, &i))) { sc->current_au_count = gf_list_count(sc->AUs); sc->dis...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
204,152,504,287,730,500,000,000,000,000,000,000,000
31
fixed #2138
unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, LodePNGState* state, const unsigned char* in, size_t insize) { *out = 0; decodeGeneric(out, w, h, state, in, insize); if(state->error) return state->error; if(!state->decoder.color_convert || l...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
308,047,229,401,259,540,000,000,000,000,000,000,000
44
Fixed #5645: realloc return handling
theme_adium_append_message (EmpathyChatView *view, EmpathyMessage *msg) { EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view); EmpathyThemeAdiumPriv *priv = GET_PRIV (theme); EmpathyContact *sender; TpMessage *tp_msg; TpAccount *account; gchar *body_esc...
1
[ "CWE-79" ]
empathy
739aca418457de752be13721218aaebc74bd9d36
254,126,956,197,139,700,000,000,000,000,000,000,000
189
theme_adium_append_message: escape alias before displaying it Not doing so can lead to nasty HTML injection from hostile users. https://bugzilla.gnome.org/show_bug.cgi?id=662035
int jpc_mqenc_dump(jpc_mqenc_t *mqenc, FILE *out) { fprintf(out, "AREG = %08x, CREG = %08x, CTREG = %d\n", mqenc->areg, mqenc->creg, mqenc->ctreg); fprintf(out, "IND = %02d, MPS = %d, QEVAL = %04x\n", *mqenc->curctx - jpc_mqstates, (*mqenc->curctx)->mps, (*mqenc->curctx)->qeval); return 0; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
279,512,385,696,181,100,000,000,000,000,000,000,000
9
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
void gf_bs_get_content_no_truncate(GF_BitStream *bs, u8 **output, u32 *outSize, u32 *alloc_size) { /*only in WRITE MEM mode*/ if (!bs || bs->bsmode != GF_BITSTREAM_WRITE_DYN) return; if (bs->on_block_out && bs->position>bs->bytes_out) { bs->on_block_out(bs->usr_data, bs->original, (u32) (bs->position - bs->bytes_...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
59,916,282,446,479,570,000,000,000,000,000,000,000
38
fixed #2165
ConnectionImpl::Http2Options::~Http2Options() { nghttp2_option_del(options_); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
198,459,834,070,422,160,000,000,000,000,000,000,000
1
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...
HttpConnectionManagerFilterConfigFactory::createFilterFactoryFromProtoTyped( const envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& proto_config, Server::Configuration::FactoryContext& context) { Utility::Singletons singletons = Utility::createSingletons(context...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
104,434,376,709,652,400,000,000,000,000,000,000,000
22
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
bool Smb4KGlobal::removeHost( Smb4KHost *host ) { Q_ASSERT( host ); bool removed = false; mutex.lock(); int index = p->hostsList.indexOf( host ); if ( index != -1 ) { // The host was found. Remove it. delete p->hostsList.takeAt( index ); removed = true; } else { // Try harder to fi...
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
31,771,744,220,585,670,000,000,000,000,000,000,000
47
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev, const char *link) { int err; err = ovl_want_write(dentry); if (!err) { err = ovl_create_or_link(dentry, mode, rdev, link, NULL); ovl_drop_write(dentry); } return err; }
0
[ "CWE-20" ]
linux
11f3710417d026ea2f4fcf362d866342c5274185
318,524,285,698,415,850,000,000,000,000,000,000,000
13
ovl: verify upper dentry before unlink and rename Unlink and rename in overlayfs checked the upper dentry for staleness by verifying upper->d_parent against upperdir. However the dentry can go stale also by being unhashed, for example. Expand the verification to actually look up the name again (under parent lock) an...
static int __init gadget_cfs_init(void) { int ret; config_group_init(&gadget_subsys.su_group); ret = configfs_register_subsystem(&gadget_subsys); return ret; }
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
248,131,798,148,840,600,000,000,000,000,000,000,000
9
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...