func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int llhttp__internal__c_load_header_state( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { return state->header_state; }
0
[ "CWE-444" ]
node
641f786bb1a1f6eb1ff8750782ed939780f2b31a
134,439,597,955,749,120,000,000,000,000,000,000,000
6
http: unset `F_CHUNKED` on new `Transfer-Encoding` Duplicate `Transfer-Encoding` header should be a treated as a single, but with original header values concatenated with a comma separator. In the light of this, even if the past `Transfer-Encoding` ended with `chunked`, we should be not let the `F_CHUNKED` to leak int...
static int mov_read_wide(MOVContext *c, AVIOContext *pb, MOVAtom atom) { int err; if (atom.size < 8) return 0; /* continue */ if (avio_rb32(pb) != 0) { /* 0 sized mdat atom... use the 'wide' atom size */ avio_skip(pb, atom.size - 4); return 0; } atom.type = avio_rl32(pb); ...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
193,160,517,290,828,620,000,000,000,000,000,000,000
19
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int ssl_do_client_cert_cb(SSL *s, X509 **px509, EVP_PKEY **ppkey) { int i = 0; #ifndef OPENSSL_NO_ENGINE if (s->ctx->client_cert_engine) { i = ENGINE_load_ssl_client_cert(s->ctx->client_cert_engine, s, SSL_get_client_CA_list(s), ...
0
[ "CWE-310" ]
openssl
e1b568dd2462f7cacf98f3d117936c34e2849a6b
20,252,357,403,996,519,000,000,000,000,000,000,000
16
Prevent handshake with unseeded PRNG Fix security issue where under certain conditions a client can complete a handshake with an unseeded PRNG. The conditions are: - Client is on a platform where the PRNG has not been seeded, and the user has not seeded manually - A protocol specific client method version has been use...
static void nfs4_setup_readdir(u64 cookie, __be32 *verifier, struct dentry *dentry, struct nfs4_readdir_arg *readdir) { unsigned int attrs = FATTR4_WORD0_FILEID | FATTR4_WORD0_TYPE; __be32 *start, *p; if (cookie > 2) { readdir->cookie = cookie; memcpy(&readdir->verifier, verifier, sizeof(readdir->verifier)); ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
339,581,074,364,276,900,000,000,000,000,000,000,000
56
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
void pre_next_partition(ha_rows rownum) { /* TODO(cvicentiu) Sum functions get cleared on next partition anyway during the window function computation algorithm. Either perform this only in cursors, or remove it from pre_next_partition. */ curr_rownum= rownum; clear_sum_functions(); ...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
275,000,416,620,223,000,000,000,000,000,000,000,000
9
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
bool EbmlMaster::ProcessMandatory() { if (EBML_CTX_SIZE(Context) == 0) { return true; } assert(Context.GetSize() != 0); unsigned int EltIdx; for (EltIdx = 0; EltIdx < EBML_CTX_SIZE(Context); EltIdx++) { if (EBML_CTX_IDX(Context,EltIdx).IsMandatory() && EBML_CTX_IDX(Context,EltIdx).IsUnique()) { //...
0
[ "CWE-703" ]
libebml
88409e2a94dd3b40ff81d08bf6d92f486d036b24
65,626,962,073,310,510,000,000,000,000,000,000,000
18
EbmlMaster: propagate upper level element after infinite sized one correctly When the parser encountered a deeply nested element with an infinite size then a following element of an upper level was not propagated correctly. Instead the element with the infinite size was added into the EBML element tree a second time r...
void sctp_transport_reset(struct sctp_transport *t) { struct sctp_association *asoc = t->asoc; /* RFC 2960 (bis), Section 5.2.4 * All the congestion control parameters (e.g., cwnd, ssthresh) * related to this peer MUST be reset to their initial values * (see Section 6.2.1) */ t->cwnd = min(4*asoc->pathmtu, ...
0
[]
linux
196d67593439b03088913227093e374235596e33
187,743,909,706,475,230,000,000,000,000,000,000,000
33
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
static int io_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync, void *key) { struct io_kiocb *req = wait->private; struct io_poll_iocb *poll = &req->poll; return __io_async_wake(req, poll, key_to_poll(key), io_poll_task_func); }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
325,502,949,177,363,520,000,000,000,000,000,000,000
8
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 inline void atl2_irq_disable(struct atl2_adapter *adapter) { ATL2_WRITE_REG(&adapter->hw, REG_IMR, 0); ATL2_WRITE_FLUSH(&adapter->hw); synchronize_irq(adapter->pdev->irq); }
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
5,963,859,314,447,093,000,000,000,000,000,000,000
6
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
static int rtnl_net_dumpid_one(int id, void *peer, void *data) { struct rtnl_net_dump_cb *net_cb = (struct rtnl_net_dump_cb *)data; int ret; if (net_cb->idx < net_cb->s_idx) goto cont; ret = rtnl_net_fill(net_cb->skb, NETLINK_CB(net_cb->cb->skb).portid, net_cb->cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM...
0
[ "CWE-416" ]
linux
21b5944350052d2583e82dd59b19a9ba94a007f0
53,591,846,799,498,000,000,000,000,000,000,000,000
18
net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a...
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set, struct pt_regs * regs) { void __user *restorer; struct rt_sigframe __user *frame; int err = 0; int usig; frame = get_sigframe(ka, regs, sizeof(*frame)); if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) goto gi...
0
[ "CWE-399" ]
linux-2.6
e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
297,145,141,663,809,650,000,000,000,000,000,000,000
92
x86: clear DF before calling signal handler The Linux kernel currently does not clear the direction flag before calling a signal handler, whereas the x86/x86-64 ABI requires that. Linux had this behavior/bug forever, but this becomes a real problem with gcc version 4.3, which assumes that the direction flag is correc...
int is_subdir(struct dentry *new_dentry, struct dentry *old_dentry) { int result; unsigned seq; if (new_dentry == old_dentry) return 1; do { /* for restarting inner loop in case of seq retry */ seq = read_seqbegin(&rename_lock); /* * Need rcu_readlock to protect against the d_parent trashing * due t...
0
[ "CWE-401", "CWE-254" ]
linux
cde93be45a8a90d8c264c776fab63487b5038a65
164,084,491,348,252,900,000,000,000,000,000,000,000
25
dcache: Handle escaped paths in prepend_path A rename can result in a dentry that by walking up d_parent will never reach it's mnt_root. For lack of a better term I call this an escaped path. prepend_path is called by four different functions __d_path, d_absolute_path, d_path, and getcwd. __d_path only wants to see...
Error Box_iref::parse(BitstreamRange& range) { parse_full_box_header(range); while (!range.eof()) { Reference ref; Error err = ref.header.parse(range); if (err != Error::Ok) { return err; } if (get_version()==0) { ref.from_item_ID = range.read16(); int nRefs = range.read16()...
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
280,046,026,889,794,100,000,000,000,000,000,000,000
38
force fraction to a limited resolution to finally solve those pesky numerical edge cases
static float _CanonConvertAperture(ushort in) { if ((in == (ushort)0xffe0) || (in == (ushort)0x7fff)) return 0.0f; return libraw_powf64l(2.0, in / 64.0); }
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
106,631,620,456,991,180,000,000,000,000,000,000,000
6
parse_qt: possible integer overflow
get_entries(struct net *net, struct ipt_get_entries __user *uptr, const int *len) { int ret; struct ipt_get_entries get; struct xt_table *t; if (*len < sizeof(get)) { duprintf("get_entries: %u < %zu\n", *len, sizeof(get)); return -EINVAL; } if (copy_from_user(&get, uptr, sizeof(get)) != 0) return -EFA...
0
[ "CWE-200" ]
linux-2.6
78b79876761b86653df89c48a7010b5cbd41a84a
130,670,489,000,840,990,000,000,000,000,000,000,000
38
netfilter: ip_tables: fix infoleak to userspace Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive in...
COMPAT_SYSCALL_DEFINE4(rt_sigaction, int, sig, const struct compat_sigaction __user *, act, struct compat_sigaction __user *, oact, compat_size_t, sigsetsize) { struct k_sigaction new_ka, old_ka; #ifdef __ARCH_HAS_SA_RESTORER compat_uptr_t restorer; #endif int ret; /* XXX: Don't preclude handling different s...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
40,467,646,924,822,500,000,000,000,000,000,000,000
43
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
static void vrend_scale_depth(void *ptr, int size, float scale_val) { GLuint *ival = ptr; const GLfloat myscale = 1.0f / 0xffffff; int i; for (i = 0; i < size / 4; i++) { GLuint value = ival[i]; GLfloat d = ((float)(value >> 8) * myscale) * scale_val; d = CLAMP(d, 0.0F, 1.0F); ival[i...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
256,854,481,740,677,700,000,000,000,000,000,000,000
12
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
static int aes_ocb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { EVP_AES_OCB_CTX *octx = EVP_C_DATA(EVP_AES_OCB_CTX,ctx); if (!iv && !key) return 1; if (key) { do { /* * We set both the encrypt...
0
[ "CWE-125" ]
openssl
2198b3a55de681e1f3c23edb0586afe13f438051
203,786,877,512,722,200,000,000,000,000,000,000,000
79
crypto/evp: harden AEAD ciphers. Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory. Since hash operation is read-only it is not considered to be exploitable beyond a DoS condition. Oth...
static ssize_t sindex(int c,const char *string) { register const char *p; for (p=string; *p != '\0'; p++) if (c == (int) (*p)) return((ssize_t) (p-string)); return(-1); }
0
[ "CWE-125" ]
ImageMagick
787f9dc99c8d186ae26ed53ddec54bd0a6f90852
2,860,056,451,901,495,000,000,000,000,000,000,000
10
https://github.com/ImageMagick/ImageMagick/issues/539
static av_cold int dfa_decode_end(AVCodecContext *avctx) { DfaContext *s = avctx->priv_data; av_freep(&s->frame_buf); return 0; }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
f52fbf4f3ed02a7d872d8a102006f29b4421f360
263,308,021,803,847,030,000,000,000,000,000,000,000
8
avcodec/dfa: Fix off by 1 error Fixes out of array access Fixes: 1345/clusterfuzz-testcase-minimized-6062963045695488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static inline void update_hiwater_rss(struct mm_struct *mm) { unsigned long _rss = get_mm_rss(mm); if ((mm)->hiwater_rss < _rss) (mm)->hiwater_rss = _rss; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
72,086,127,946,468,400,000,000,000,000,000,000,000
7
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static int ntop_delete_user(lua_State* vm) { char *username; ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(!Utils::isUserAdministrator(vm)) return(CONST_LUA_ERROR); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_PARAM_ERROR); if((username = (char*)lua_tost...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
279,108,848,702,214,300,000,000,000,000,000,000,000
12
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
GF_Err kind_Read(GF_Box *s,GF_BitStream *bs) { GF_KindBox *ptr = (GF_KindBox *)s; if (ptr->size) { u32 bytesToRead = (u32) ptr->size; char *data; u32 schemeURIlen; data = (char*)gf_malloc(bytesToRead * sizeof(char)); if (data == NULL) return GF_OUT_OF_MEM; gf_bs_read_data(bs, data, bytesToRead); /*safe...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
67,619,454,817,897,680,000,000,000,000,000,000,000
31
prevent dref memleak on invalid input (#1183)
static int parse_CFullPropSpec(tvbuff_t *tvb, int offset, proto_tree *parent_tree, proto_tree *pad_tree, struct CFullPropSpec *v, const char *fmt, ...) { struct GuidPropertySet *pset; const char *id_str, *guid_str, *txt; proto_item *item; proto_tree *tree; va_list ap; va_start(ap, fmt); txt = wmem_strdup_vprin...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
263,436,211,430,516,180,000,000,000,000,000,000,000
56
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
void restore_iobuf_size(xbuf *out) { if (IOBUF_WAS_REDUCED(out->size)) { size_t new_size = IOBUF_RESTORE_SIZE(out->size); /* Avoid weird buffer interactions by only outputting this to stderr. */ if (msgs2stderr && DEBUG_GTE(IO, 4)) { const char *name = out == &iobuf.out ? "iobuf.out" : out == &iobuf.msg...
0
[ "CWE-59" ]
rsync
962f8b90045ab331fc04c9e65f80f1a53e68243b
262,855,043,119,281,170,000,000,000,000,000,000,000
17
Complain if an inc-recursive path is not right for its dir. This ensures that a malicious sender can't use a just-sent symlink as a trasnfer path.
create_sconv_object(const char *fc, const char *tc, unsigned current_codepage, int flag) { struct archive_string_conv *sc; sc = calloc(1, sizeof(*sc)); if (sc == NULL) return (NULL); sc->next = NULL; sc->from_charset = strdup(fc); if (sc->from_charset == NULL) { free(sc); return (NULL); } sc->to_cha...
0
[ "CWE-125" ]
libarchive
22b1db9d46654afc6f0c28f90af8cdc84a199f41
146,457,818,464,057,130,000,000,000,000,000,000,000
180
Bugfix and optimize archive_wstring_append_from_mbs() The cal to mbrtowc() or mbtowc() should read up to mbs_length bytes and not wcs_length. This avoids out-of-bounds reads. mbrtowc() and mbtowc() return (size_t)-1 wit errno EILSEQ when they encounter an invalid multibyte character and (size_t)-2 when they they enco...
int OSD::shutdown() { if (!service.prepare_to_stop()) return 0; // already shutting down osd_lock.Lock(); if (is_stopping()) { osd_lock.Unlock(); return 0; } derr << "shutdown" << dendl; set_state(STATE_STOPPING); // Debugging if (cct->_conf->get_val<bool>("osd_debug_shutdown")) { cct-...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
228,947,659,434,623,500,000,000,000,000,000,000,000
217
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 ...
unsigned long perf_instruction_pointer(struct pt_regs *regs) { if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) return perf_guest_cbs->get_guest_ip(); return instruction_pointer(regs); }
0
[ "CWE-20" ]
linux
c95eb3184ea1a3a2551df57190c81da695e2144b
226,072,681,583,132,920,000,000,000,000,000,000,000
7
ARM: 7809/1: perf: fix event validation for software group leaders It is possible to construct an event group with a software event as a group leader and then subsequently add a hardware event to the group. This results in the event group being validated by adding all members of the group to a fake PMU and attempting ...
static struct ipddp_route* __ipddp_find_route(struct ipddp_route *rt) { struct ipddp_route *f; for(f = ipddp_route_list; f != NULL; f = f->next) { if(f->ip == rt->ip && f->at.s_net == rt->at.s_net && f->at.s_node == rt->at.s_node) return f; ...
0
[ "CWE-200" ]
linux
9824dfae5741275473a23a7ed5756c7b6efacc9d
55,862,574,598,119,950,000,000,000,000,000,000,000
14
net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT Fields ->dev and ->next of struct ipddp_route may be copied to userspace on the SIOCFINDIPDDPRT ioctl. This is only accessible to CAP_NET_ADMIN though. Let's manually copy the relevant fields instead of using memcpy(). BugLink: http://blog.infosect...
MOBI_RET mobi_decompress_huffman(unsigned char *out, const unsigned char *in, size_t *len_out, size_t len_in, const MOBIHuffCdic *huffcdic) { MOBIBuffer *buf_in = mobi_buffer_init_null((unsigned char *) in, len_in); if (buf_in == NULL) { debug_print("%s\n", "Memory allocation failed"); return MO...
0
[ "CWE-119", "CWE-125" ]
libmobi
bec783e6212439a335ba6e8df7ab8ed610ca9a21
73,450,896,237,328,080,000,000,000,000,000,000,000
18
Fix potential out-of-buffer read while parsing corrupt file, closes #35, #36
_gnutls_x509_verify_certificate (const gnutls_x509_crt_t * certificate_list, int clist_size, const gnutls_x509_crt_t * trusted_cas, int tcas_size, const gnutls_x509_crl_t * CRLs, int crls_size, unsigned int flags) { int i = 0, ret; unsigned int status = 0, output; if (clist_size > 1) ...
1
[ "CWE-17" ]
gnutls
897cbce62c0263a498088ac3e465aa5f05f8719c
248,617,876,810,683,640,000,000,000,000,000,000,000
143
Extended time verification to trusted certificate list as well. Introduced the flag GNUTLS_VERIFY_DISABLE_TRUSTED_TIME_CHECKS that will prevent the trusted certificate list verification.
bool test_r_str_rchr(void) { const char* test = "raddddare2d"; const char* out = r_str_rchr (test, NULL, '2'); mu_assert_streq (out, "2d", "pointer to last p in range in raddddare2d"); out = r_str_rchr (test, NULL, 'p'); if (out) { mu_assert ("non NULL value returned", 0); } out = test + 9; out = r_str_rchr (...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
141,027,550,203,753,430,000,000,000,000,000,000,000
18
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static string getRubberWhaleFrame1() { return getDataDir() + "optflow/RubberWhale1.png"; }
0
[ "CWE-125", "CWE-369" ]
opencv
d1615ba11a93062b1429fce9f0f638d1572d3418
310,674,201,462,383,560,000,000,000,000,000,000,000
1
video:fixed DISOpticalFlow segfault from small img
unsigned int blk_plug_queued_count(struct request_queue *q) { struct blk_plug *plug; struct request *rq; struct list_head *plug_list; unsigned int ret = 0; plug = current->plug; if (!plug) goto out; if (q->mq_ops) plug_list = &plug->mq_list; else plug_list = &plug->list; list_for_each_entry(rq, plug_l...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
207,512,120,122,450,950,000,000,000,000,000,000,000
23
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
bool getUseMeanNormalization() const CV_OVERRIDE { return use_mean_normalization; }
0
[ "CWE-125", "CWE-369" ]
opencv
d1615ba11a93062b1429fce9f0f638d1572d3418
130,052,583,688,045,010,000,000,000,000,000,000,000
1
video:fixed DISOpticalFlow segfault from small img
do_local_notify(xmlNode * notify_src, const char *client_id, gboolean sync_reply, gboolean from_peer) { /* send callback to originating child */ cib_client_t *client_obj = NULL; int local_rc = pcmk_ok; if (client_id != NULL) { client_obj = g_hash_table_lookup(client_list, client...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
188,734,294,865,133,240,000,000,000,000,000,000,000
56
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
gs_window_real_unrealize (GtkWidget *widget) { g_signal_handlers_disconnect_by_func (gtk_window_get_screen (GTK_WINDOW (widget)), screen_size_changed, widget); if (GTK_WIDGET_CLASS (gs_window_parent_class)->unre...
0
[]
gnome-screensaver
a5f66339be6719c2b8fc478a1d5fc6545297d950
177,053,483,422,125,640,000,000,000,000,000,000,000
10
Ensure keyboard grab and unlock dialog exist after monitor removal gnome-screensaver currently doesn't deal with monitors getting removed properly. If the unlock dialog is on the removed monitor then the unlock dialog and its associated keyboard grab are not moved to an existing monitor when the monitor removal is pr...
TfLiteRegistration* Register_LOCAL_RESPONSE_NORM_GENERIC_OPT() { static TfLiteRegistration r = { nullptr, nullptr, local_response_norm::Prepare, local_response_norm::Eval<local_response_norm::kGenericOptimized>}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
251,310,476,794,188,200,000,000,000,000,000,000,000
6
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
_row_status_state_single_value_cols(netsnmp_state_machine_input *input, netsnmp_state_machine_step *step) { rowcreate_state *ctx; netsnmp_variable_list *var, *tmp_next, *row_status; int rc = SNMPERR_GENERR; netsnmp_require_ptr_LRV( input, SNM...
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
72,880,255,611,140,500,000,000,000,000,000,000,000
41
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
\param fps Number of frames per second. \param codec Type of compression. \param bitrate Output bitrate **/ const CImgList<T>& save_ffmpeg_external(const char *const filename, const unsigned int fps=25, const char *const codec=0, const unsigned int b...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
248,731,470,800,031,870,000,000,000,000,000,000,000
48
Fix other issues in 'CImg<T>::load_bmp()'.
static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) { struct sockaddr_un *sunaddr=(struct sockaddr_un *)uaddr; struct sock *sk = sock->sk; struct unix_sock *u = unix_sk(sk), *newu, *otheru; struct sock *newsk = NULL; struct sock *other = NULL; struct sk_b...
0
[]
linux-2.6
1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9
282,953,059,578,954,750,000,000,000,000,000,000,000
175
[AF_UNIX]: Rewrite garbage collector, fixes race. Throw out the old mark & sweep garbage collector and put in a refcounting cycle detecting one. The old one had a race with recvmsg, that resulted in false positives and hence data loss. The old algorithm operated on all unix sockets in the system, so any additional l...
static inline int evbuffer_chains_all_empty(struct evbuffer_chain *chain) { return 1; }
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
242,324,110,561,560,880,000,000,000,000,000,000,000
3
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
VideoTrack::~VideoTrack() { delete colour_; delete projection_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
264,180,375,461,858,670,000,000,000,000,000,000,000
4
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
do_unprotect (const char *passphrase, int pkt_version, int pubkey_algo, int is_protected, const char *curve, gcry_mpi_t *skey, size_t skeysize, int protect_algo, void *protect_iv, size_t protect_ivlen, int s2k_mode, int s2k_algo, byte *s2k_salt, u32 s2k_count, ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
264,638,844,566,636,180,000,000,000,000,000,000,000
274
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int tracing_clock_show(struct seq_file *m, void *v) { struct trace_array *tr = m->private; int i; for (i = 0; i < ARRAY_SIZE(trace_clocks); i++) seq_printf(m, "%s%s%s%s", i ? " " : "", i == tr->clock_id ? "[" : "", trace_clocks[i].name, i == tr->clock_id ? "]" : ""); seq_putc(m, '\n'); return 0...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
52,462,620,455,985,550,000,000,000,000,000,000,000
14
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static int build_mapping(struct sk_buff *skb, struct xfrm_state *x, xfrm_address_t *new_saddr, __be16 new_sport) { struct xfrm_user_mapping *um; struct nlmsghdr *nlh; nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_MAPPING, sizeof(*um), 0); if (nlh == NULL) return -EMSGSIZE; um = nlmsg_data(nlh); memcpy(&um->id.dadd...
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
70,217,777,916,542,740,000,000,000,000,000,000,000
25
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
void NumberFormatTest::Test13850_EmptyStringCurrency() { IcuTestErrorCode status(*this, "Test13840_EmptyStringCurrency"); struct TestCase { const char16_t* currencyArg; UErrorCode expectedError; } cases[] = { {u"", U_ZERO_ERROR}, {u"U", U_ILLEGAL_ARGUMENT_ERROR}, {u"...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
338,840,480,217,066,200,000,000,000,000,000,000,000
38
ICU-20246 Fixing another integer overflow in number parsing.
static struct timing_generator *dce110_timing_generator_create( struct dc_context *ctx, uint32_t instance, const struct dce110_timing_generator_offsets *offsets) { struct dce110_timing_generator *tg110 = kzalloc(sizeof(struct dce110_timing_generator), GFP_KERNEL); if (!tg110) return NULL; dce110_timing_g...
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
268,371,035,730,191,700,000,000,000,000,000,000,000
14
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
PHP_FUNCTION(header_register_callback) { zval *callback_func; char *callback_name; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &callback_func) == FAILURE) { return; } if (!zend_is_callable(callback_func, 0, &callback_name TSRMLS_CC)) { efree(callback_name); RETURN_FALSE; } efree(callback_n...
1
[ "CWE-601" ]
php-src
98b9dfaec95e6f910f125ed172cdbd25abd006ec
188,135,647,627,454,870,000,000,000,000,000,000,000
26
Fix for HTTP_PROXY issue. The following changes are made: - _SERVER/_ENV only has HTTP_PROXY if the local environment has it, and only one from the environment. - getenv('HTTP_PROXY') only returns one from the local environment - getenv has optional second parameter, telling it to only consider local environment
testHuf (const std::string&) { try { cout << "Testing Huffman encoder" << endl; IMATH_NAMESPACE::Rand48 rand48 (0); const int N = 1000000; Array <unsigned short> raw (N); fill1 (raw, N, 1, rand48); // test various symbol distributions compressUncompress (raw, N); compressUncompressSubset (raw, N); ...
1
[ "CWE-190" ]
openexr
51a92d67f53c08230734e74564c807043cbfe41e
280,855,506,261,082,100,000,000,000,000,000,000,000
81
check for valid Huf code lengths (#849) * check for valid Huf code lengths * test non-fast huf decoder in testHuf Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static void perf_branch_stack_sched_in(struct task_struct *prev, struct task_struct *task) { struct perf_cpu_context *cpuctx; struct pmu *pmu; unsigned long flags; /* no need to flush branch stack if not changing task */ if (prev == task) return; local_irq_save(flags); rcu_read_lock(); list_for...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
199,743,996,645,806,500,000,000,000,000,000,000,000
41
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
ZEND_METHOD(Generator, next) { zend_generator *generator; if (zend_parse_parameters_none() == FAILURE) { return; } generator = (zend_generator *) Z_OBJ_P(getThis()); zend_generator_ensure_initialized(generator); zend_generator_resume(generator); }
0
[]
php-src
83e2b9e2202da6cc25bdaac67a58022b90be88e7
266,789,230,277,803,680,000,000,000,000,000,000,000
14
Fixed bug #76946
static double mp_sub(_cimg_math_parser& mp) { return _mp_arg(2) - _mp_arg(3); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
143,568,012,603,984,360,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
u16 gf_mp3_frame_size(u32 hdr) { u8 version = gf_mp3_version(hdr); u8 layer = gf_mp3_layer(hdr); u32 pad = ((hdr >> 9) & 0x1) ? 1 : 0; u32 bitrate = gf_mp3_bit_rate(hdr); u32 samplerate = gf_mp3_sampling_rate(hdr); u32 frameSize = 0; if (!samplerate || !bitrate) return 0; if (layer == 1) { frameSize = ((12 ...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
138,002,423,165,699,400,000,000,000,000,000,000,000
21
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static int mailimf_group_parse(const char * message, size_t length, size_t * indx, struct mailimf_group ** result) { size_t cur_token; char * display_name; struct mailimf_mailbox_list * mailbox_list; struct mailimf_group * group; int r; int res; clist * list; cur_token = * indx; ...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
115,060,688,191,912,900,000,000,000,000,000,000,000
81
Fixed crash #274
static int bond_set_dev_addr(struct net_device *bond_dev, struct net_device *slave_dev) { int err; slave_dbg(bond_dev, slave_dev, "bond_dev=%p slave_dev=%p slave_dev->addr_len=%d\n", bond_dev, slave_dev, slave_dev->addr_len); err = dev_pre_changeaddr_notify(bond_dev, slave_dev->dev_addr, NULL); if (err...
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
172,051,422,993,081,500,000,000,000,000,000,000,000
16
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
void HttpIntegrationTest::testAdminDrain(Http::CodecClient::Type admin_request_type) { initialize(); uint32_t http_port = lookupPort("http"); codec_client_ = makeHttpConnection(http_port); Http::TestRequestHeaderMapImpl request_headers{{":method", "HEAD"}, {":pa...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
9,561,610,224,359,883,000,000,000,000,000,000,000
45
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
lka_report_smtp_tx_envelope(const char *direction, struct timeval *tv, uint64_t reqid, uint32_t msgid, uint64_t evpid) { report_smtp_broadcast(reqid, direction, tv, "tx-envelope", "%08x|%016"PRIx64"\n", msgid, evpid); }
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
283,729,766,091,559,200,000,000,000,000,000,000,000
5
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
u_get_headentry(void) { if (curbuf->b_u_newhead == NULL || curbuf->b_u_newhead->uh_entry == NULL) { IEMSG(_("E439: undo list corrupt")); return NULL; } return curbuf->b_u_newhead->uh_entry; }
0
[ "CWE-190" ]
vim
3eb1637b1bba19519885dd6d377bd5596e91d22c
148,220,009,188,332,880,000,000,000,000,000,000,000
9
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)
bash_kill_shellword (count, key) int count, key; { int p; if (count < 0) return (bash_backward_kill_shellword (-count, key)); p = rl_point; bash_forward_shellword (count, key); if (rl_point != p) rl_kill_text (p, rl_point); rl_point = p; if (rl_editing_mode == 1) /* 1 == emacs_mode */ ...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
250,747,904,186,338,960,000,000,000,000,000,000,000
20
Bash-4.4 patch 7
static bool init_ehdr(ELFOBJ *bin) { ut8 e_ident[EI_NIDENT]; ut8 ehdr[sizeof (Elf_(Ehdr))] = {0}; int i, len; if (r_buf_read_at (bin->b, 0, e_ident, EI_NIDENT) == -1) { R_LOG_DEBUG ("read (magic)"); return false; } sdb_set (bin->kv, "elf_type.cparse", "enum elf_type { ET_NONE=0, ET_REL=1," " ET_EXEC=2, ET_...
0
[ "CWE-787" ]
radare2
3ecdbf8e21186a9c5a4d3cfa3b1e9fd27045340e
231,522,361,228,279,740,000,000,000,000,000,000,000
103
Fix 4 byte oobread in msp430 disassembler ##crash * Only crashes with asan builds * Add missing =SN register * Reported by cnitlrt via huntrdev * BountyID: 1c22055b-b015-47a8-a57b-4982978751d0
int ndpi_netbios_name_interpret(char *in, size_t in_len, char *out, u_int out_len) { u_int ret = 0, len, idx = in_len, out_idx = 0; len = (*in++)/2; out_len--; out[out_idx] = 0; if((len > out_len) || (len < 1) || ((2*len) > in_len)) return(-1); while((len--) && (out_idx < out_len)) { if((idx < 2)...
1
[ "CWE-787" ]
nDPI
1ec621c85b9411cc611652fd57a892cfef478af3
141,109,985,818,044,300,000,000,000,000,000,000,000
37
Added further checks
slap_schema_init( void ) { int res; int i; /* we should only be called once (from main) */ assert( schema_init_done == 0 ); for ( i=0; syntax_defs[i].sd_desc != NULL; i++ ) { res = register_syntax( &syntax_defs[i] ); if ( res ) { fprintf( stderr, "slap_schema_init: Error registering syntax %s\n", ...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
55,105,164,728,219,510,000,000,000,000,000,000,000
42
ITS#9383 remove assert in certificateListValidate
static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *dev = pci_get_drvdata(pdev); struct airo_info *ai = dev->ml_priv; Cmd cmd; Resp rsp; if (!ai->APList) ai->APList = kmalloc(sizeof(APListRid), GFP_KERNEL); if (!ai->APList) return -ENOMEM; if (!ai->SSID) ai->SSID = k...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
220,607,686,259,859,450,000,000,000,000,000,000,000
32
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static int read_ptoken(link_ctx *ctx, const char **ps) { if (skip_ws(ctx)) { size_t i; for (i = ctx->i; i < ctx->slen && ptoken_char(ctx->s[i]); ++i) { /* nop */ } if (i > ctx->i) { *ps = mk_str(ctx, i); ctx->i = i; return 1; } ...
0
[ "CWE-444" ]
mod_h2
b8a8c5061eada0ce3339b24ba1d587134552bc0c
302,601,777,857,710,130,000,000,000,000,000,000,000
15
* Removing support for abandoned draft of http-wg regarding cache-digests.
stream *streamNew(void) { stream *s = zmalloc(sizeof(*s)); s->rax = raxNew(); s->length = 0; s->first_id.ms = 0; s->first_id.seq = 0; s->last_id.ms = 0; s->last_id.seq = 0; s->max_deleted_entry_id.seq = 0; s->max_deleted_entry_id.ms = 0; s->entries_added = 0; s->cgroups = NUL...
0
[ "CWE-703", "CWE-401" ]
redis
4a7a4e42db8ff757cdf3f4a824f66426036034ef
286,223,919,691,644,950,000,000,000,000,000,000,000
14
Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0)
int ptrace_put_fpr(struct task_struct *child, int index, unsigned long data) { #ifdef CONFIG_PPC_FPU_REGS unsigned int fpidx = index - PT_FPR0; #endif if (index > PT_FPSCR) return -EIO; #ifdef CONFIG_PPC_FPU_REGS flush_fp_to_thread(child); if (fpidx < (PT_FPSCR - PT_FPR0)) { if (IS_ENABLED(CONFIG_PPC32)) /...
0
[ "CWE-284", "CWE-120" ]
linux
8e1278444446fc97778a5e5c99bca1ce0bbc5ec9
134,187,696,047,673,220,000,000,000,000,000,000,000
23
powerpc/32: Fix overread/overwrite of thread_struct via ptrace The ptrace PEEKUSR/POKEUSR (aka PEEKUSER/POKEUSER) API allows a process to read/write registers of another process. To get/set a register, the API takes an index into an imaginary address space called the "USER area", where the registers of the process ar...
HevcSpsUnit::HevcSpsUnit() : HevcUnitWithProfile(), vps_id(0), max_sub_layers(0), sps_id(0), chromaFormat(0), separate_colour_plane_flag(false), pic_width_in_luma_samples(0), pic_height_in_luma_samples(0), bit_depth_luma_minus8(0), bit_depth_chroma_minus8(0), ...
0
[ "CWE-22" ]
tsMuxer
3763dd34755a8944d903aa19578fa22cd3734165
13,988,746,252,543,900,000,000,000,000,000,000,000
27
Fix Buffer Overflow Fixes issue #509.
static int get_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *cert) { STACK_OF(X509) *saved_chain = ctx->chain; int ok; ctx->chain = NULL; ok = ctx->get_issuer(issuer, ctx, cert); ctx->chain = saved_chain; return ok; }
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
25,306,455,898,765,883,000,000,000,000,000,000,000
11
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
mp_sint32 LoaderXM::load(XMFileBase& f, XModule* module) { mp_ubyte insData[230]; mp_sint32 smpReloc[MP_MAXINSSAMPS]; mp_ubyte nbu[MP_MAXINSSAMPS]; mp_uint32 fileSize = 0; module->cleanUp(); // this will make code much easier to read TXMHeader* header = &module->header; TXMInstrument* instr = module->i...
1
[ "CWE-787" ]
MilkyTracker
3a5474f9102cbdc10fbd9e7b1b2c8d3f3f45d91b
83,192,180,280,574,840,000,000,000,000,000,000,000
790
Fix possible stack corruption with XM instrument headers claiming a size of less than 4 Closes #275
std::pair<FieldType, int16_t> readFieldHeader() { std::pair<FieldType, int16_t> rv; const uint8_t byte = readByte(); if (byte & 0xf0) { rv.first = static_cast<FieldType>(byte & 0x0f); rv.second = static_cast<int16_t>(byte >> 4) + lastFieldId_; } else { rv.first = static_cast<FieldTyp...
0
[ "CWE-400", "CWE-522", "CWE-674" ]
mcrouter
97e033b3bb0cb16b61bf49f0dc7f311a3e0edd1b
313,994,407,131,872,430,000,000,000,000,000,000,000
15
Attempt to make CarbonProtocolReader::skip tail recursive Reviewed By: edenzik Differential Revision: D17967570 fbshipit-source-id: fdc32e190a521349c7c8f4d6081902fa18eb0284
static int jpeg2000_read_main_headers(Jpeg2000DecoderContext *s) { Jpeg2000CodingStyle *codsty = s->codsty; Jpeg2000QuantStyle *qntsty = s->qntsty; uint8_t *properties = s->properties; for (;;) { int len, ret = 0; uint16_t marker; int oldpos; if (bytestream2_ge...
0
[ "CWE-20" ]
FFmpeg
a1b9004b768bef606ee98d417bceb9392ceb788d
155,580,331,796,000,370,000,000,000,000,000,000,000
99
avcodec/jpeg2000dec: fix context consistency with too large lowres Fixes out of array accesses Fixes Ticket2898 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
append_locations_from_config_file (GPtrArray *locations, const char *file_path, GCancellable *cancellable, GError **error) { g_autoptr(GKeyFile) keyfile = NULL; g_auto(GStrv) groups = NULL; g_autoptr...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
35,966,720,402,345,604,000,000,000,000,000,000,000
93
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static long ToL(unsigned char *puffer) { return (puffer[0] | puffer[1] << 8 | puffer[2] << 16 | puffer[3] << 24); }
0
[ "CWE-787" ]
autotrace
e96bffadc25ff0ba0e10745f8012efcc5f920ea9
298,469,110,445,426,570,000,000,000,000,000,000,000
4
input-bmp: Increase header buffer in some cases Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list); static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) { struct sk_buff *next, *prev; list->qlen--; next = skb->next; prev = skb->prev; skb->next = skb->prev = NULL; next->prev = prev; prev->next = next;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
35,738,502,295,050,267,000,000,000,000,000,000,000
11
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static void cmd_anal_esil(RCore *core, const char *input) { RAnalEsil *esil = core->anal->esil; ut64 addr = core->offset; ut64 adr ; char *n, *n1; int off; int stacksize = r_config_get_i (core->config, "esil.stack.depth"); int iotrap = r_config_get_i (core->config, "esil.iotrap"); int romem = r_config_get_i (co...
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
232,197,312,579,047,640,000,000,000,000,000,000,000
606
Fix segfault in adf (#16230)
type_show(struct device *dev, struct device_attribute *attr, char *page) { struct pmu *pmu = dev_get_drvdata(dev); return snprintf(page, PAGE_SIZE-1, "%d\n", pmu->type); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
201,589,063,584,781,960,000,000,000,000,000,000,000
6
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
xfs_do_writepage( struct page *page, struct writeback_control *wbc, void *data) { struct xfs_writepage_ctx *wpc = data; struct inode *inode = page->mapping->host; loff_t offset; __uint64_t end_offset; pgoff_t end_index; trace_xfs_writepage(inode, page, 0, 0); ASSERT(page_h...
0
[ "CWE-362" ]
linux
04197b341f23b908193308b8d63d17ff23232598
324,473,721,197,004,760,000,000,000,000,000,000,000
109
xfs: don't BUG() on mixed direct and mapped I/O We've had reports of generic/095 causing XFS to BUG() in __xfs_get_blocks() due to the existence of delalloc blocks on a direct I/O read. generic/095 issues a mix of various types of I/O, including direct and memory mapped I/O to a single file. This is clearly not suppor...
try_resource_fork (SF_PRIVATE * psf) { int old_error = psf->error ; /* Set READ mode now, to see if resource fork exists. */ psf->rsrc.mode = SFM_READ ; if (psf_open_rsrc (psf) != 0) { psf->error = old_error ; return 0 ; } ; /* More checking here. */ psf_log_printf (psf, "Resource fork : %s\n", psf->rsrc.pa...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
329,004,291,395,090,170,000,000,000,000,000,000,000
15
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
ClientHttpRequest::~ClientHttpRequest() { debugs(33, 3, "httpRequestFree: " << uri); PROF_start(httpRequestFree); // Even though freeResources() below may destroy the request, // we no longer set request->body_pipe to NULL here // because we did not initiate that pipe (ConnStateData did) /* th...
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
92,689,667,840,822,440,000,000,000,000,000,000,000
42
Handle more Range requests (#790) Also removed some effectively unused code.
get_document(cupsd_client_t *con, /* I - Client connection */ ipp_attribute_t *uri) /* I - Job URI */ { http_status_t status; /* Policy status */ ipp_attribute_t *attr; /* Current attribute */ int jobid; /* Job ID */ int docnum; /* Document number */ cupsd_job_t *job; /* Current job *...
0
[ "CWE-20" ]
cups
49fa4983f25b64ec29d548ffa3b9782426007df3
259,409,460,263,136,400,000,000,000,000,000,000,000
139
DBUS notifications could crash the scheduler (Issue #5143) - scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
processMSEARCH(int s, const char * st, size_t st_len, const struct sockaddr * addr) { struct service * serv; #ifdef ENABLE_IPV6 char buf[64]; #endif /* ENABLE_IPV6 */ if(!st || st_len==0) return; #ifdef ENABLE_IPV6 sockaddr_to_string(addr, buf, sizeof(buf)); syslog(LOG_INFO, "SSDP M-SEARCH from %...
0
[ "CWE-416" ]
miniupnp
cd506a67e174a45c6a202eff182a712955ed6d6f
311,556,862,334,998,540,000,000,000,000,000,000,000
79
updateDevice() remove element from the list when realloc fails
void dcn20_clock_source_destroy(struct clock_source **clk_src) { kfree(TO_DCE110_CLK_SRC(*clk_src)); *clk_src = NULL; }
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
82,468,075,684,541,610,000,000,000,000,000,000,000
5
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
print_l2_routes(netdissect_options *ndo, const char *rp, u_int len) { int count; int area; int info; /* The last short is a checksum */ while (len > (3 * sizeof(short))) { ND_TCHECK2(*rp, 3 * sizeof(short)); count = EXTRACT_LE_16BITS(rp); if (count > 1024) return (1); /* seems to ...
0
[ "CWE-125" ]
tcpdump
c6e0531b5def26ecf912e8de6ade86cbdaed3751
114,179,142,646,261,200,000,000,000,000,000,000,000
29
CVE-2017-12899/DECnet: Fix bounds checking. If we're skipping over padding before the *real* flags, check whether the real flags are in the captured data before fetching it. This fixes a buffer over-read discovered by Kamil Frankowicz. Note one place where we don't need to do bounds checking as it's already been don...
Value ExpressionReverseArray::evaluate(const Document& root, Variables* variables) const { Value input(_children[0]->evaluate(root, variables)); if (input.nullish()) { return Value(BSONNULL); } uassert(34435, str::stream() << "The argument to $reverseArray must be an array, but was...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
7,165,123,864,618,881,000,000,000,000,000,000,000
20
SERVER-49404 Enforce additional checks in $arrayToObject
static inline struct sdma_txreq *get_txhead(struct sdma_engine *sde) { return sde->tx_ring[sde->tx_head & sde->sdma_mask]; }
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
90,211,000,833,220,320,000,000,000,000,000,000,000
4
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
static int esp_output_tcp_encap_cb(struct net *net, struct sock *sk, struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); struct xfrm_state *x = dst->xfrm; return esp_output_tcp_finish(x, skb); }
0
[ "CWE-787" ]
linux
ebe48d368e97d007bfeb76fcb065d6cfc4c96645
48,244,430,882,234,390,000,000,000,000,000,000,000
8
esp: Fix possible buffer overflow in ESP transformation The maximum message size that can be send is bigger than the maximum site that skb_page_frag_refill can allocate. So it is possible to write beyond the allocated buffer. Fix this by doing a fallback to COW in that case. v2: Avoid get get_order() costs as sugg...
static int uvesafb_set_par(struct fb_info *info) { struct uvesafb_par *par = info->par; struct uvesafb_ktask *task = NULL; struct vbe_crtc_ib *crtc = NULL; struct vbe_mode_ib *mode = NULL; int i, err = 0, depth = info->var.bits_per_pixel; if (depth > 8 && depth != 32) depth = info->var.red.length + info->var.g...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
171,251,954,713,684,900,000,000,000,000,000,000,000
112
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
void SELECT_LEX::mark_as_belong_to_derived(TABLE_LIST *derived) { /* Mark tables as belonging to this DT */ TABLE_LIST *tl; List_iterator<TABLE_LIST> ti(leaf_tables); while ((tl= ti++)) tl->belong_to_derived= derived; }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
235,324,354,587,050,450,000,000,000,000,000,000,000
8
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
static void rb_free_rcu(struct rcu_head *rcu_head) { struct ring_buffer *rb; rb = container_of(rcu_head, struct ring_buffer, rcu_head); rb_free(rb); }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
310,961,854,453,187,200,000,000,000,000,000,000,000
7
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
static int fts3EvalSelectDeferred( Fts3Cursor *pCsr, /* FTS Cursor handle */ Fts3Expr *pRoot, /* Consider tokens with this root node */ Fts3TokenAndCost *aTC, /* Array of expression tokens and costs */ int nTC /* Number of entries in aTC[] */ ){ Ft...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
68,899,870,058,988,130,000,000,000,000,000,000,000
120
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
static INLINE BOOL update_read_2byte_signed(wStream* s, INT32* value) { BYTE byte; BOOL negative; if (Stream_GetRemainingLength(s) < 1) return FALSE; Stream_Read_UINT8(s, byte); negative = (byte & 0x40) ? TRUE : FALSE; *value = (byte & 0x3F); if (byte & 0x80) { if (Stream_GetRemainingLength(s) < 1) re...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
185,665,793,755,930,080,000,000,000,000,000,000,000
26
Fixed #6013: Check new length is > 0
static bool bt_att_disc_cancel(struct bt_att *att, unsigned int id) { struct att_send_op *op; op = queue_find(att->req_queue, match_op_id, UINT_TO_PTR(id)); if (op) goto done; op = queue_find(att->ind_queue, match_op_id, UINT_TO_PTR(id)); if (op) goto done; op = queue_find(att->write_queue, match_op_id, UI...
0
[ "CWE-415" ]
bluez
1cd644db8c23a2f530ddb93cebed7dacc5f5721a
105,000,624,618,945,400,000,000,000,000,000,000,000
23
shared/att: Fix possible crash on disconnect If there are pending request while disconnecting they would be notified but clients may endup being freed in the proccess which will then be calling bt_att_cancel to cancal its requests causing the following trace: Invalid read of size 4 at 0x1D894C: enable_ccc_callback...
static void net_rx_action(struct softirq_action *h) { struct softnet_data *queue = &__get_cpu_var(softnet_data); unsigned long start_time = jiffies; int budget = netdev_budget; void *have; local_irq_disable(); while (!list_empty(&queue->poll_list)) { struct net_device *dev; if (budget <= 0 || jiffies - sta...
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
231,091,433,823,556,370,000,000,000,000,000,000,000
45
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
static int nla_put_via(struct sk_buff *skb, u8 table, const void *addr, int alen) { static const int table_to_family[NEIGH_NR_TABLES + 1] = { AF_INET, AF_INET6, AF_DECnet, AF_PACKET, }; struct nlattr *nla; struct rtvia *via; int family = AF_UNSPEC; nla = nla_reserve(skb, RTA_VIA, alen + 2); if (!nla)...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
172,822,525,394,966,500,000,000,000,000,000,000,000
22
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
void PSOutputDev::updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32) { writePSFmt("[{0:.6gs} {1:.6gs} {2:.6gs} {3:.6gs} {4:.6gs} {5:.6gs}] cm\n", m11, m12, m21, m22, m31, m32); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
282,009,985,610,290,250,000,000,000,000,000,000,000
5
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
do_note_netbsd_version(struct magic_set *ms, int swap, void *v) { uint32_t desc; memcpy(&desc, v, sizeof(desc)); desc = elf_getu32(swap, desc); if (file_printf(ms, ", for NetBSD") == -1) return; /* * The version number used to be stuck as 199905, and was thus * basically content-free. Newer versions of Net...
0
[ "CWE-125" ]
file
a642587a9c9e2dd7feacdf513c3643ce26ad3c22
110,782,265,483,019,390,000,000,000,000,000,000,000
43
Avoid reading past the end of buffer (Rui Reis)
static int global_template_search(const char *key, void *data, void *privdata) { template_iter_t *iter = privdata; default_template_t *def_t = data; if (def_t->flags == iter->level) iter->res = key; return 0; }
0
[ "CWE-284" ]
atheme
c597156adc60a45b5f827793cd420945f47bc03b
93,850,113,268,102,040,000,000,000,000,000,000,000
10
chanserv/flags: make Anope FLAGS compatibility an option Previously, ChanServ FLAGS behavior could be modified by registering or dropping the keyword nicks "LIST", "CLEAR", and "MODIFY". Now, a configuration option is available that when turned on (default), disables registration of these keyword nicks and enables thi...
static struct bpf_blk *_gen_bpf_node(struct bpf_state *state, const struct db_arg_chain_tree *node, struct acc_state *a_state) { int32_t acc_offset; uint32_t acc_mask; uint64_t act_t_hash = 0, act_f_hash = 0; struct bpf_blk *blk, *b_act; struct bpf_instr instr; blk = _blk_alloc(); if (blk == N...
0
[]
libseccomp
cf5d1538d243fb6f1839db70b69469d3d7e9e077
334,900,497,471,697,500,000,000,000,000,000,000,000
116
bpf: pass the correct accumulator state to the next level We were mistakenly passing the wrong accumulator state (the state at the start of the instruction block, not at the end) which was causing us to generate unnecessary load instructions. Signed-off-by: Paul Moore <paul@paul-moore.com>
int MYSQL_BIN_LOG::raw_get_current_log(LOG_INFO* linfo) { strmake(linfo->log_file_name, log_file_name, sizeof(linfo->log_file_name)-1); linfo->pos = my_b_tell(&log_file); return 0; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
221,158,088,306,569,400,000,000,000,000,000,000,000
6
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...