func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static u32 ccp_gen_jobid(struct ccp_device *ccp) { return atomic_inc_return(&ccp->current_id) & CCP_JOBID_MASK; }
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
85,565,787,184,727,070,000,000,000,000,000,000,000
4
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
MagickExport MagickBooleanType DrawGradientImage(Image *image, const DrawInfo *draw_info) { CacheView *image_view; const GradientInfo *gradient; const SegmentInfo *gradient_vector; double length; ExceptionInfo *exception; MagickBooleanType status; MagickPixelPacket zero...
1
[]
ImageMagick6
4b5e026c704d777efe9c2ead5dd68ca4fe3b2aa1
66,456,930,049,184,230,000,000,000,000,000,000,000
238
https://github.com/ImageMagick/ImageMagick/issues/3338
int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, int purpose, int trust) { int idx; /* If purpose not set use default */ if (!purpose) purpose = def_purpose; /* If we have a purpose then check it is valid */ if (purpose) { X509_PURPOSE *ptmp; idx = X509_PURPOSE_get_by_id(purpose);...
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
148,420,811,155,427,000,000,000,000,000,000,000,000
47
Backport OCSP fixes.
uint64_t cli_bytecode_context_getresult_int(struct cli_bc_ctx *ctx) { return *(uint32_t*)ctx->values;/*XXX*/ }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
247,538,723,460,871,500,000,000,000,000,000,000,000
4
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
style_value_data_new (const gchar *value, gboolean important) { StyleValueData *ret; ret = g_new (StyleValueData, 1); ret->value = g_strdup (value); ret->important = important; return ret; }
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
90,410,985,008,476,500,000,000,000,000,000,000,000
10
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
ambsdtar_estimate( application_argument_t *argument) { char *incrname = NULL; GPtrArray *argv_ptr; char *cmd = NULL; int nullfd = -1; int pipefd = -1; FILE *dumpout = NULL; off_t size = -1; char line[32768]; char *errmsg = NULL; ch...
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
177,102,323,948,363,300,000,000,000,000,000,000,000
249
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
const std::string& QueryParams::param(const std::string& name, size_type n) const { for (size_type nn = 0; nn < _values.size(); ++nn) { if (_values[nn].name == name) { if (n == 0) return _values[nn].value; --n; } } static std::string emptyValue; return emptyValue; }
0
[ "CWE-399" ]
cxxtools
142bb2589dc184709857c08c1e10570947c444e3
69,895,671,019,783,310,000,000,000,000,000,000,000
15
fix parsing double % in query parameters
static int fastrpc_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) { struct fastrpc_buf *buf = dmabuf->priv; size_t size = vma->vm_end - vma->vm_start; return dma_mmap_coherent(buf->dev, vma, buf->virt, FASTRPC_PHYS(buf->phys), size); }
0
[ "CWE-400", "CWE-401" ]
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
125,270,870,200,086,130,000,000,000,000,000,000,000
9
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com Signed-off-by: Greg...
QPDF::pipeForeignStreamData( PointerHolder<ForeignStreamData> foreign, Pipeline* pipeline, unsigned long encode_flags, qpdf_stream_decode_level_e decode_level) { if (foreign->encp->encrypted) { QTC::TC("qpdf", "QPDF pipe foreign encrypted stream"); } return pipeStreamData( ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
77,543,988,018,663,960,000,000,000,000,000,000,000
17
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
oauth2_jwt_header_process(struct json_tree *tree, const char **alg_r, const char **kid_r, const char **error_r) { const char *typ = get_field(tree, "typ"); const char *alg = get_field(tree, "alg"); const char *kid = get_field(tree, "kid"); if (null_strcmp(typ, "JWT") != 0) { *error_r = "Cannot find 'typ' fi...
0
[ "CWE-22" ]
core
15682a20d5589ebf5496b31c55ecf9238ff2457b
186,946,200,502,450,980,000,000,000,000,000,000,000
23
lib-oauth2: Do not escape '.' This is not really needed and just makes things difficult.
njs_decode_base64_core(njs_str_t *dst, const njs_str_t *src, const u_char *basis) { size_t len; u_char *d, *s; s = src->start; d = dst->start; len = dst->length; while (len >= 3) { *d++ = (u_char) (basis[s[0]] << 2 | basis[s[1]] >> 4); *d++ = (u_char) (basis[s[1]] << 4 |...
0
[]
njs
36f04a3178fcb6da8513cc3dbf35215c2a581b3f
159,807,621,032,978,000,000,000,000,000,000,000,000
28
Fixed String.prototype.replace() with byte strings. This closes #522 issue on Github.
template<typename t> CImgList<t>& move_to(CImgList<t>& list, const unsigned int pos=~0U) { const unsigned int npos = pos>list._width?list._width:pos; move_to(list.insert(1,npos)[npos]); return list;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
294,038,221,478,336,550,000,000,000,000,000,000,000
5
Fix other issues in 'CImg<T>::load_bmp()'.
static bool HHVM_FUNCTION(zip_entry_close, const Resource& zip_entry) { auto zipEntry = cast<ZipEntry>(zip_entry); FAIL_IF_INVALID_ZIPENTRY(zip_entry_close, zipEntry); return zipEntry->close(); }
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
322,195,945,059,960,280,000,000,000,000,000,000,000
7
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
shmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx) { return alloc_page(gfp | __GFP_ZERO); }
1
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
40,898,721,436,560,150,000,000,000,000,000,000,000
4
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...
int is_inside_git_dir(void) { if (inside_git_dir < 0) inside_git_dir = is_inside_dir(get_git_dir()); return inside_git_dir; }
0
[ "CWE-787" ]
git
3c9d0414ed2db0167e6c828b547be8fc9f88fccc
68,752,283,161,530,160,000,000,000,000,000,000,000
6
Check size of path buffer before writing into it This prevents a buffer overrun that could otherwise be triggered by creating a file called '.git' with contents gitdir: (something really long) Signed-off-by: Greg Brockman <gdb@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
TEST(ComparisonsTest, NotEqualFloat) { ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_FLOAT32, BuiltinOperator_NOT_EQUAL); model.PopulateTensor<float>(model.input1(), {0.1, 0.9, 0.7, 0.3}); model.PopulateTensor<float>(model.input2(), {0.1, 0.2, 0.6, 0.5}); model.Invoke(...
0
[ "CWE-20", "CWE-703" ]
tensorflow
a989426ee1346693cc015792f11d715f6944f2b8
313,128,124,817,860,500,000,000,000,000,000,000,000
10
Improve to cover scale value greater than one PiperOrigin-RevId: 433050921
proto_tree_set_vines_tvb(field_info *fi, tvbuff_t *tvb, gint start) { proto_tree_set_vines(fi, tvb_get_ptr(tvb, start, FT_VINES_ADDR_LEN)); }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
278,333,221,416,426,540,000,000,000,000,000,000,000
4
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
CmdUsersInfo() : Command("usersInfo") {}
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
223,537,285,467,178,840,000,000,000,000,000,000,000
1
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq ) { struct net_local *nl; if( sbni_card_probe( ioaddr ) ) { release_region( ioaddr, SBNI_IO_EXTENT ); return NULL; } outb( 0, ioaddr + CSR0 ); if( irq < 2 ) { unsigned long irq_mask; irq_mask = probe_irq_on(); outb( EN_INT | TR_...
0
[ "CWE-264" ]
linux-2.6
f2455eb176ac87081bbfc9a44b21c7cd2bc1967e
180,723,875,653,621,320,000,000,000,000,000,000,000
88
wan: Missing capability checks in sbni_ioctl() There are missing capability checks in the following code: 1300 static int 1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd) 1302 { [...] 1319 case SIOCDEVRESINSTATS : 1320 if( current->euid != 0 ) /* root only */ 1321 ...
const char *am_cache_get_lasso_session(am_cache_entry_t *session) { return am_cache_entry_get_string(session, &session->lasso_session); }
0
[ "CWE-79" ]
mod_auth_mellon
7af21c53da7bb1de024274ee6da30bc22316a079
146,356,419,081,289,360,000,000,000,000,000,000,000
4
Fix Cross-Site Session Transfer vulnerability mod_auth_mellon did not verify that the site the session was created for was the same site as the site the user accessed. This allows an attacker with access to one web site on a server to use the same session to get access to a different site running on the same server. ...
static inline struct dentry *d_real(struct dentry *dentry) { if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) return dentry->d_op->d_real(dentry, NULL); else return dentry; }
0
[ "CWE-284" ]
linux
54d5ca871e72f2bb172ec9323497f01cd5091ec7
117,444,071,704,690,240,000,000,000,000,000,000,000
7
vfs: add vfs_select_inode() helper Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> # v4.2+
ft_bitmap_draw( FT_Bitmap* bitmap, int x, int y, FTDemo_Display* display, grColor color) { grBitmap gbit; gbit.width = bitmap->width; gbit.rows = bitmap->rows; gbit.pitch = bitmap->pitch; gbit.buffe...
0
[ "CWE-120" ]
freetype2-demos
b995299b73ba4cd259f221f500d4e63095508bec
5,736,568,569,191,048,000,000,000,000,000,000,000
40
Fix Savannah bug #30054. * src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c, src/ftview.c: Use precision for `%s' where appropriate to avoid buffer overflows.
aspath_put (struct stream *s, struct aspath *as, int use32bit ) { struct assegment *seg = as->segments; size_t bytes = 0; if (!seg || seg->length == 0) return 0; if (seg) { /* * Hey, what do we do when we have > STREAM_WRITABLE(s) here? * At the moment, we would write out a par...
1
[ "CWE-20" ]
quagga
7a42b78be9a4108d98833069a88e6fddb9285008
274,037,763,165,412,350,000,000,000,000,000,000,000
71
bgpd: Fix AS_PATH size calculation for long paths If you have an AS_PATH with more entries than what can be written into a single AS_SEGMENT_MAX it needs to be broken up. The code that noticed that the AS_PATH needs to be broken up was not correctly calculating the size of the resulting message. This patch addresses...
struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, const struct in6_addr *final_dst, bool can_sleep) { struct dst_entry *dst = sk_dst_check(sk, inet6_sk(sk)->dst_cookie); int err; dst = ip6_sk_dst_check(sk, dst, fl6); err = ip6_dst_lookup_tail(sk, &dst, fl6); if (err) ret...
0
[ "CWE-703" ]
linux
87c48fa3b4630905f98268dde838ee43626a060c
180,077,970,956,160,450,000,000,000,000,000,000,000
19
ipv6: make fragment identifications less predictable IPv6 fragment identification generation is way beyond what we use for IPv4 : It uses a single generator. Its not scalable and allows DOS attacks. Now inetpeer is IPv6 aware, we can use it to provide a more secure and scalable frag ident generator (per destination, ...
png_write_chunk_start(png_structrp png_ptr, png_const_bytep chunk_string, png_uint_32 length) { png_write_chunk_header(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), length); }
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
278,828,253,770,319,730,000,000,000,000,000,000,000
5
[libpng16] Reject attempt to write over-length PLTE chunk
njs_string_prototype_to_bytes(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t unused) { u_char *p; size_t length; uint32_t byte; njs_int_t ret; const u_char *s, *end; njs_slice_prop_t slice; njs_string_pr...
0
[]
njs
36f04a3178fcb6da8513cc3dbf35215c2a581b3f
280,729,215,165,985,880,000,000,000,000,000,000,000
65
Fixed String.prototype.replace() with byte strings. This closes #522 issue on Github.
static void wq_watchdog_set_thresh(unsigned long thresh) { wq_watchdog_thresh = 0; del_timer_sync(&wq_watchdog_timer); if (thresh) { wq_watchdog_thresh = thresh; wq_watchdog_reset_touched(); mod_timer(&wq_watchdog_timer, jiffies + thresh * HZ); } }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
9,238,670,972,094,906,000,000,000,000,000,000,000
11
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static void dump_monitored_desktop(wLog* log, const char* msg, const WINDOW_ORDER_INFO* orderInfo, const MONITORED_DESKTOP_ORDER* monitored) { char buffer[1000] = { 0 }; const size_t bufferSize = sizeof(buffer) - 1; DUMP_APPEND(buffer, bufferSize, "%s", msg); if (orderInfo->fiel...
0
[ "CWE-125" ]
FreeRDP
6b2bc41935e53b0034fe5948aeeab4f32e80f30f
165,621,419,555,848,500,000,000,000,000,000,000,000
24
Fix #6010: Check length in read_icon_info
sort_keyuse(KEYUSE *a,KEYUSE *b) { int res; if (a->table->tablenr != b->table->tablenr) return (int) (a->table->tablenr - b->table->tablenr); if (a->key != b->key) return (int) (a->key - b->key); if (a->key == MAX_KEY && b->key == MAX_KEY && a->used_tables != b->used_tables) return (int) ((ul...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
88,001,393,099,704,900,000,000,000,000,000,000,000
20
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
BN_ULONG bn_add_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int n) { BN_ULONG c,l,t; assert(n >= 0); if (n <= 0) return((BN_ULONG)0); c=0; #ifndef OPENSSL_SMALL_FOOTPRINT while (n&~3) { t=a[0]; t=(t+c)&BN_MASK2; c=(t < c); l=(t+b[0])&BN_MASK2; c+=(l < t); r[0]=l; t=a[1]; t=...
0
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
87,506,246,345,884,100,000,000,000,000,000,000,000
50
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
static bool isCharacterAlphanumeric(UChar32 testChar) { return iswalnum(testChar); }
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
339,479,065,556,871,400,000,000,000,000,000,000,000
3
SERVER-25335 avoid group and other permissions when creating .dbshell history file
struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig, const struct flowi *fl, const struct sock *sk, int flags) { struct dst_entry *dst = xfrm_lookup(net, dst_orig, fl, sk, flags | XFRM_LOOKUP_QUEUE | XFRM_LOOKUP_KEEP_DST_REF); if (PTR_ERR(dst) == -EREMOTE...
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
270,708,567,001,331,300,000,000,000,000,000,000,000
16
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
TRIO_PRIVATE BOOLEAN_T TrioReadDouble TRIO_ARGS4((self, target, flags, width), trio_class_t* self, trio_pointer_t target, trio_flags_t flags, int width) { int ch; char doubleString[512]; int offset = 0; int start; #if ...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
336,150,797,291,053,700,000,000,000,000,000,000,000
196
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *my_bind) { uint count=0; MYSQL_BIND *param, *end; DBUG_ENTER("mysql_stmt_bind_param"); if (!stmt->param_count) { if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE) { set_stmt_error(stmt, CR_NO_PREPARE_STMT, unknown_sqlstate...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
295,349,791,387,584,060,000,000,000,000,000,000,000
114
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
nfp_flower_spawn_vnic_reprs(struct nfp_app *app, enum nfp_flower_cmsg_port_vnic_type vnic_type, enum nfp_repr_type repr_type, unsigned int cnt) { u8 nfp_pcie = nfp_cppcore_pcie_unit(app->pf->cpp); struct nfp_flower_priv *priv = app->priv; atomic_t *replies = &priv->reify_replies; struct nfp_flower_rep...
0
[ "CWE-400", "CWE-401" ]
linux
8ce39eb5a67aee25d9f05b40b673c95b23502e3e
322,785,904,662,815,830,000,000,000,000,000,000,000
103
nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs In nfp_flower_spawn_vnic_reprs in the loop if initialization or the allocations fail memory is leaked. Appropriate releases are added. Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload") Signed-off-by: Navid Emamdoost <navid.emamdo...
http_register_tls_ca (const char *fname) { strlist_t sl; if (!fname) { free_strlist (tls_ca_certlist); tls_ca_certlist = NULL; } else { /* Warn if we can't access right now, but register it anyway in case it becomes accessible later */ if (access (fname, F_OK)) ...
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
240,557,108,440,873,500,000,000,000,000,000,000,000
21
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
enum_field_types real_type() const { return MYSQL_TYPE_BLOB; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
90,264,182,854,994,420,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static CURLcode ossl_connect_common(struct Curl_easy *data, struct connectdata *conn, int sockindex, bool nonblocking, bool *done) { CURLcode result; struct ssl_connect_dat...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
85,986,943,489,672,880,000,000,000,000,000,000,000
108
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
sec_sign(uint8 * signature, int siglen, uint8 * session_key, int keylen, uint8 * data, int datalen) { uint8 shasig[20]; uint8 md5sig[16]; uint8 lenhdr[4]; RDSSL_SHA1 sha1; RDSSL_MD5 md5; buf_out_uint32(lenhdr, datalen); rdssl_sha1_init(&sha1); rdssl_sha1_update(&sha1, session_key, keylen); rdssl_sha1_update(...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
123,014,158,731,098,580,000,000,000,000,000,000,000
25
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static int check_nonce(request_rec *r, digest_header_rec *resp, const digest_config_rec *conf) { apr_time_t dt; time_rec nonce_time; char tmp, hash[NONCE_HASH_LEN+1]; /* Since the time part of the nonce is a base64 encoding of an * apr_time_t (8 bytes), it should end with a ...
0
[ "CWE-787" ]
httpd
3b6431eb9c9dba603385f70a2131ab4a01bf0d3b
134,711,086,718,727,520,000,000,000,000,000,000,000
68
Merge r1885659 from trunk: mod_auth_digest: Fast validation of the nonce's base64 to fail early if the format can't match anyway. Submitted by: ylavic Reviewed by: ylavic, covener, jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885666 13f79535-47bb-0310-9956-ffa...
static ssize_t portio_porttype_show(struct uio_port *port, char *buf) { const char *porttypes[] = {"none", "x86", "gpio", "other"}; if ((port->porttype < 0) || (port->porttype > UIO_PORT_OTHER)) return -EINVAL; return sprintf(buf, "port_%s\n", porttypes[port->porttype]); }
0
[ "CWE-119", "CWE-189", "CWE-703" ]
linux
7314e613d5ff9f0934f7a0f74ed7973b903315d1
328,313,084,801,285,800,000,000,000,000,000,000,000
9
Fix a few incorrectly checked [io_]remap_pfn_range() calls Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that really should use the vm_iomap_memory() helper. This trivially converts two of them to the helper, and comments about why the third one really needs to continue to use remap_pfn_range(), ...
static inline void qeth_free_cq(struct qeth_card *card) { if (card->qdio.c_q) { --card->qdio.no_in_queues; kfree(card->qdio.c_q); card->qdio.c_q = NULL; } kfree(card->qdio.out_bufstates); card->qdio.out_bufstates = NULL; }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
27,947,761,380,738,040,000,000,000,000,000,000,000
10
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
BSONObj DocumentSourceMatch::getQuery() const { return _predicate; }
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
52,389,440,677,690,840,000,000,000,000,000,000,000
3
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
void EvalNamedColor(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe) { cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) mpe ->Data; cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0); cmsUInt32Number j; if (index >= NamedColorList-> nColors...
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
42,892,580,444,053,940,000,000,000,000,000,000,000
14
Fixes from coverity check
static void edge_break(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct edgeport_port *edge_port = usb_get_serial_port_data(port); int status; int bv = 0; /* Off */ /* chase the port close */ chase_port(edge_port, 0, 0); if (break_state == -1) bv = 1; /* On *...
0
[ "CWE-284", "CWE-264" ]
linux
1ee0a224bc9aad1de496c795f96bc6ba2c394811
14,661,386,442,898,411,000,000,000,000,000,000,000
17
USB: io_ti: Fix NULL dereference in chase_port() The tty is NULL when the port is hanging up. chase_port() needs to check for this. This patch is intended for stable series. The behavior was observed and tested in Linux 3.2 and 3.7.1. Johan Hovold submitted a more elaborate patch for the mainline kernel. [ 56.277...
static void do_utfreadnewline_invalid(compiler_common *common) { /* Slow decoding a UTF-8 character, specialized for newlines. TMP1 contains the first byte of the character (>= 0xc0). Return char value in TMP1. */ DEFINE_COMPILER; struct sljit_label *loop; struct sljit_label *skip_start; struct sljit_label *three_byte_...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
38,689,842,391,780,796,000,000,000,000,000,000,000
90
Fixed a unicode properrty matching issue in JIT
GF_Err video_sample_entry_AddBox(GF_Box *s, GF_Box *a) { GF_MPEGVisualSampleEntryBox *ptr = (GF_MPEGVisualSampleEntryBox *)s; switch (a->type) { case GF_ISOM_BOX_TYPE_ESDS: if (ptr->esd) ERROR_ON_DUPLICATED_BOX(a, ptr) ptr->esd = (GF_ESDBox *)a; break; case GF_ISOM_BOX_TYPE_SINF: gf_list_add(ptr->protectio...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
140,465,076,893,682,760,000,000,000,000,000,000,000
71
fixed 2 possible heap overflows (inc. #1088)
const Router::MetadataMatchCriteria* Filter::metadataMatchCriteria() { const Router::MetadataMatchCriteria* route_criteria = (route_ != nullptr) ? route_->metadataMatchCriteria() : nullptr; const auto& request_metadata = getStreamInfo().dynamicMetadata().filter_metadata(); const auto filter_it = request_me...
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
39,427,309,320,619,330,000,000,000,000,000,000,000
18
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
void *hashtable_get(hashtable_t *hashtable, const char *key) { pair_t *pair; size_t hash; bucket_t *bucket; hash = hash_str(key); bucket = &hashtable->buckets[hash & hashmask(hashtable->order)]; pair = hashtable_find_pair(hashtable, bucket, key, hash); if(!pair) return NULL; r...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
220,259,436,363,173,380,000,000,000,000,000,000,000
15
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
static int ath6kl_wmi_neighbor_report_event_rx(struct wmi *wmi, u8 *datap, int len, struct ath6kl_vif *vif) { struct wmi_neighbor_report_event *ev; u8 i; if (len < sizeof(*ev)) return -EINVAL; ev = (struct wmi_neighbor_report_event *) datap; if (struct_size(ev, neighbor, ev->num_neighbors) > len) { ...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
38,879,740,837,309,036,000,000,000,000,000,000,000
28
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
static Image *ReadPICTImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowPICTException(exception,message) \ { \ if (tile_image != (Image *) NULL) \ tile_image=DestroyImage(tile_image); \ if (read_info != (ImageInfo *) NULL) \ read_info=DestroyImageInfo(read_info); \ ThrowReaderE...
0
[ "CWE-20", "CWE-119", "CWE-787" ]
ImageMagick
afa878a689870c28b6994ecf3bb8dbfb2b76d135
25,945,577,455,323,313,000,000,000,000,000,000,000
743
https://github.com/ImageMagick/ImageMagick/issues/1269
varbit(PG_FUNCTION_ARGS) { VarBit *arg = PG_GETARG_VARBIT_P(0); int32 len = PG_GETARG_INT32(1); bool isExplicit = PG_GETARG_BOOL(2); VarBit *result; int rlen; int ipad; bits8 mask; /* No work if typmod is invalid or supplied data matches it already */ if (len <= 0 || len >= VARBITLEN(arg)) PG_R...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
240,210,251,284,357,750,000,000,000,000,000,000,000
37
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...
int X509_cmp_current_time(const ASN1_TIME *ctm) { return X509_cmp_time(ctm, NULL); }
0
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
112,263,603,901,882,720,000,000,000,000,000,000,000
4
Backport OCSP fixes.
int RGWSetBucketWebsite::verify_permission() { return verify_bucket_owner_or_policy(s, rgw::IAM::s3PutBucketWebsite); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
54,926,980,242,588,240,000,000,000,000,000,000,000
4
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 <...
parse_channel_cipher_suite_data(uint8_t *cipher_suite_data, size_t data_len, struct cipher_suite_info* suites, size_t nr_suites) { size_t count = 0; size_t offset = 0; /* Default everything to zeroes */ memset(suites, 0, sizeof(*suites) * nr_suites); ...
0
[ "CWE-120" ]
ipmitool
9452be87181a6e83cfcc768b3ed8321763db50e4
227,241,832,873,001,200,000,000,000,000,000,000,000
39
channel: Fix buffer overflow Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `ipmi_get_channel_cipher_suites` function does not properly check the final response’s `data_len`, which can lead to stack buffer overflow on the final copy.
TEST_F(RenameCollectionTest, RenameCollectionToItselfByUUIDForApplyOps) { auto dbName = _targetNss.db().toString(); auto uuid = _createCollectionWithUUID(_opCtx.get(), _targetNss); auto uuidDoc = BSON("ui" << uuid); auto cmd = BSON("renameCollection" << _sourceNss.ns() << "to" << _targetNss.ns() << "dro...
0
[ "CWE-20" ]
mongo
35c1b1f588f04926a958ad2fe4d9c59d79f81e8b
221,725,284,509,234,800,000,000,000,000,000,000,000
9
SERVER-35636 renameCollectionForApplyOps checks for complete namespace
explicit AssignVariableOp(OpKernelConstruction* c) : OpKernel(c) { OP_REQUIRES_OK(c, c->GetAttr("dtype", &dtype_)); if (!c->GetAttr("_grappler_relax_allocator_constraints", &relax_constraints_) .ok()) { relax_constraints_ = false; } }
0
[ "CWE-369" ]
tensorflow
ac117ee8a8ea57b73d34665cdf00ef3303bc0b11
49,423,704,111,448,450,000,000,000,000,000,000,000
8
Prevent division by 0 in `resource_variable_ops.cc` PiperOrigin-RevId: 387939939 Change-Id: Ib04902d63756633999959a70613f2eaa30c2c151
R_API int r_str_fmtargs(const char *fmt) { int n = 0; while (*fmt) { if (*fmt == '%') { if (fmt[1] == '*') { n++; } n++; } fmt++; } return n; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
175,519,833,997,243,100,000,000,000,000,000,000,000
13
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...
int security_node_sid(u16 domain, void *addrp, u32 addrlen, u32 *out_sid) { int rc; struct ocontext *c; read_lock(&policy_rwlock); switch (domain) { case AF_INET: { u32 addr; rc = -EINVAL; if (addrlen != sizeof(u32)) goto out; addr = *((u32 *)addrp); c = policydb.ocontexts...
0
[ "CWE-20" ]
linux
2172fa709ab32ca60e86179dc67d0857be8e2c98
117,191,182,882,899,980,000,000,000,000,000,000,000
66
SELinux: Fix kernel BUG on empty security contexts. Setting an empty security context (length=0) on a file will lead to incorrectly dereferencing the type and other fields of the security context structure, yielding a kernel BUG. As a zero-length security context is never valid, just reject all such security contexts...
static void *io_mem_alloc(size_t size) { gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP | __GFP_NORETRY; return (void *) __get_free_pages(gfp_flags, get_order(size)); }
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
184,687,629,998,230,630,000,000,000,000,000,000,000
7
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
ModuleSASL() : authExt("sasl_auth", this), cap(this, "sasl"), auth(this, authExt, cap), sasl(this, authExt) { }
0
[ "CWE-284", "CWE-264" ]
inspircd
74fafb7f11b06747f69f182ad5e3769b665eea7a
195,239,272,098,695,230,000,000,000,000,000,000,000
4
m_sasl: don't allow AUTHENTICATE with mechanisms with a space
MemTxResult address_space_read_full(AddressSpace *as, hwaddr addr, MemTxAttrs attrs, void *buf, hwaddr len) { MemTxResult result = MEMTX_OK; FlatView *fv; if (len > 0) { fv = address_space_to_flatview(as); result = flatview_read(as->uc, fv, addr, attrs, b...
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
199,057,265,524,990,530,000,000,000,000,000,000,000
13
Fix crash when mapping a big memory and calling uc_close
static void __update_reg64_bounds(struct bpf_reg_state *reg) { /* min signed is max(sign bit) | min(other bits) */ reg->smin_value = max_t(s64, reg->smin_value, reg->var_off.value | (reg->var_off.mask & S64_MIN)); /* max signed is min(sign bit) | max(other bits) */ reg->smax_value = min_t(s64, reg->smax_value, ...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
337,775,898,937,122,500,000,000,000,000,000,000,000
12
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static void commit_parameter(int snum, struct parm_struct *parm, const char *v) { int i; char *s; if (snum < 0 && parm->p_class == P_LOCAL) { /* this handles the case where we are changing a local variable globally. We need to change the parameter in all shares where it is currently set to the default ...
0
[]
samba
71225948a249f079120282740fcc39fd6faa880e
130,182,467,800,428,460,000,000,000,000,000,000,000
19
swat: Use X-Frame-Options header to avoid clickjacking Jann Horn reported a potential clickjacking vulnerability in SWAT where the SWAT page could be embedded into an attacker's page using a frame or iframe and then used to trick the user to change Samba settings. Avoid this by telling the browser to refuse the frame...
static int udf_do_extend_file(struct inode *inode, struct extent_position *last_pos, struct kernel_long_ad *last_ext, sector_t blocks) { sector_t add; int count = 0, fake = !(last_ext->extLength & UDF_EXTENT_LENGTH_MASK); struct super_block *sb = inode->i_sb; struct kernel_lb_addr preallo...
0
[ "CWE-703", "CWE-189" ]
linux
23b133bdc452aa441fcb9b82cbf6dd05cfd342d0
161,938,642,585,088,800,000,000,000,000,000,000,000
115
udf: Check length of extended attributes and allocation descriptors Check length of extended attributes and allocation descriptors when loading inodes from disk. Otherwise corrupted filesystems could confuse the code and make the kernel oops. Reported-by: Carl Henrik Lunde <chlunde@ping.uio.no> CC: stable@vger.kernel...
httpd_senddone(isc_nmhandle_t *handle, isc_result_t result, void *arg) { isc_httpd_t *httpd = (isc_httpd_t *)arg; REQUIRE(VALID_HTTPD(httpd)); REQUIRE(httpd->state == SEND); REQUIRE(httpd->handle == handle); isc_buffer_free(&httpd->sendbuffer); /* * We will always want to clean up our receive buffer, even if...
0
[]
bind9
d4c5d1c650ae0e97a083b0ce7a705c20fc001f07
284,044,051,125,735,000,000,000,000,000,000,000,000
52
Fix statistics channel multiple request processing with non-empty bodies When the HTTP request has a body part after the HTTP headers, it is not getting processed and is being prepended to the next request's data, which results in an error when trying to parse it. Improve the httpd.c:process_request() function with t...
int pop_open_connection(struct PopAccountData *adata) { char buf[1024]; int rc = pop_connect(adata); if (rc < 0) return rc; rc = pop_capabilities(adata, 0); if (rc == -1) goto err_conn; if (rc == -2) return -2; #ifdef USE_SSL /* Attempt STLS if available and desired. */ if (!adata->conn->...
1
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
300,648,256,177,216,950,000,000,000,000,000,000,000
100
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
encode_SET_IP_DSCP(const struct ofpact_dscp *dscp, enum ofp_version ofp_version, struct ofpbuf *out) { if (ofp_version < OFP12_VERSION) { put_OFPAT_SET_NW_TOS(out, ofp_version, dscp->dscp); } else { put_set_field(out, ofp_version, MFF_IP_DSCP_SHIFTED, dscp->dscp >> 2); } }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
196,497,806,200,750,800,000,000,000,000,000,000,000
9
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string) { return cJSON_GetObjectItem(object, string) ? 1 : 0; }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
244,383,015,253,924,930,000,000,000,000,000,000,000
4
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
explicit MapUnstageNoKeyOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
0
[ "CWE-20", "CWE-476" ]
tensorflow
d7de67733925de196ec8863a33445b73f9562d1d
9,388,086,664,650,383,000,000,000,000,000,000,000
1
Prevent a CHECK-fail due to empty tensor input in `map_stage_op.cc` PiperOrigin-RevId: 387737906 Change-Id: Idc52df0c71c7ed6e2dd633b651a581932f277c8a
InputFile::header () const { return _data->header; }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
114,037,204,105,134,820,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
GetFileDownloadReadDataErrMsg() { char reason[] = "Cannot open file, perhaps it is absent or is a directory"; int reasonLen = strlen(reason); return CreateFileDownloadErrMsg(reason, reasonLen); }
0
[ "CWE-416" ]
libvncserver
73cb96fec028a576a5a24417b57723b55854ad7b
66,493,404,250,621,620,000,000,000,000,000,000,000
8
tightvnc-filetransfer: wait for download thread end in CloseUndoneFileDownload() ...and use it when deregistering the file transfer extension. Closes #242
void ext4_evict_inode(struct inode *inode) { handle_t *handle; int err; int extra_credits = 3; struct ext4_xattr_inode_array *ea_inode_array = NULL; trace_ext4_evict_inode(inode); if (inode->i_nlink) { /* * When journalling data dirty buffers are tracked only in the * journal. So although mm thinks ever...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
109,941,492,093,316,570,000,000,000,000,000,000,000
146
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...
xmlSchemaTypeFixupOptimFacets(xmlSchemaTypePtr type) { int has = 0, needVal = 0, normVal = 0; has = (type->baseType->flags & XML_SCHEMAS_TYPE_HAS_FACETS) ? 1 : 0; if (has) { needVal = (type->baseType->flags & XML_SCHEMAS_TYPE_FACETSNEEDVALUE) ? 1 : 0; normVal = (type->baseType->flags & XML_SCHE...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
14,003,730,275,498,026,000,000,000,000,000,000,000
51
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static pdf_t *init_pdf(FILE *fp, const char *name) { pdf_t *pdf; pdf = pdf_new(name); pdf_get_version(fp, pdf); if (pdf_load_xrefs(fp, pdf) == -1) { pdf_delete(pdf); return NULL; } pdf_load_pages_kids(fp, pdf); return pdf; }
0
[ "CWE-787" ]
pdfresurrect
0c4120fffa3dffe97b95c486a120eded82afe8a6
194,887,771,471,651,800,000,000,000,000,000,000,000
14
Zero and sanity check all dynamic allocs. This addresses the memory issues in Issue #6 expressed in calloc_some.pdf and malloc_some.pdf
int ssl3_get_client_certificate(SSL *s) { int i,ok,al,ret= -1; X509 *x=NULL; unsigned long l,nc,llen,n; const unsigned char *p,*q; unsigned char *d; STACK_OF(X509) *sk=NULL; n=s->method->ssl_get_message(s, SSL3_ST_SR_CERT_A, SSL3_ST_SR_CERT_B, -1, s->max_cert_list, &ok); if (!ok) return((int)n); ...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
105,132,238,964,332,000,000,000,000,000,000,000,000
155
Add Next Protocol Negotiation.
static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant) { int diff,dc,k; int t; if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); t = stbi__jpeg_huff_decode(j, hdc); if (t < 0 || t > 15) return stbi__err(...
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
272,979,811,498,438,860,000,000,000,000,000,000,000
51
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
DataRcvd(ptcpsess_t *pThis, char *pData, size_t iLen) { struct syslogTime stTime; DEFiRet; pThis->pLstn->rcvdBytes += iLen; if(pThis->compressionMode >= COMPRESS_STREAM_ALWAYS) iRet = DataRcvdCompressed(pThis, pData, iLen); else iRet = DataRcvdUncompressed(pThis, pData, iLen, &stTime, 0); RETiRet; }
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
309,040,434,697,403,330,000,000,000,000,000,000,000
11
imptcp: fix Segmentation Fault when octet count is to high
static int rtrs_rdma_addr_resolved(struct rtrs_clt_con *con) { struct rtrs_path *s = con->c.path; int err; mutex_lock(&con->con_mutex); err = create_con_cq_qp(con); mutex_unlock(&con->con_mutex); if (err) { rtrs_err(s, "create_con_cq_qp(), err: %d\n", err); return err; } err = rdma_resolve_route(con->c.cm_...
0
[ "CWE-415" ]
linux
8700af2cc18c919b2a83e74e0479038fd113c15d
67,297,953,177,290,650,000,000,000,000,000,000,000
18
RDMA/rtrs-clt: Fix possible double free in error case Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt) to free memory. We shouldn't call kfree(clt) again, and we can't use the clt after kfree too. Replace device_register() with device_initialize() and device_add() so that dev_set_name can() ...
static int alloc_and_dissolve_huge_page(struct hstate *h, struct page *old_page, struct list_head *list) { gfp_t gfp_mask = htlb_alloc_mask(h) | __GFP_THISNODE; int nid = page_to_nid(old_page); bool alloc_retry = false; struct page *new_page; int ret = 0; /* * Before dissolving the page, we need to alloca...
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
267,956,162,040,242,800,000,000,000,000,000,000,000
102
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
static void sock_def_wakeup(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (skwq_has_sleeper(wq)) wake_up_interruptible_all(&wq->wait); rcu_read_unlock(); }
0
[ "CWE-119", "CWE-787" ]
linux
b98b0bc8c431e3ceb4b26b0dfc8db509518fb290
227,143,579,505,095,480,000,000,000,000,000,000,000
10
net: avoid signed overflows for SO_{SND|RCV}BUFFORCE CAP_NET_ADMIN users should not be allowed to set negative sk_sndbuf or sk_rcvbuf values, as it can lead to various memory corruptions, crashes, OOM... Note that before commit 82981930125a ("net: cleanups in sock_setsockopt()"), the bug was even more serious, since ...
_equalVariableShowStmt(const VariableShowStmt *a, const VariableShowStmt *b) { COMPARE_STRING_FIELD(name); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
252,954,693,772,989,300,000,000,000,000,000,000,000
6
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
add_account (GoaProvider *provider, GoaClient *client, GtkDialog *dialog, GtkBox *vbox, GError **error) { AddAccountData data; GVariantBuilder credentials; GVariantBuilder details; GoaHttpClient *http_client; GoaObject *ret; gbo...
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
110,852,330,694,890,670,000,000,000,000,000,000,000
179
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
static bool __f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); struct extent_tree *et; struct extent_node *en; struct extent_info ei; if (!f2fs_may_extent_tree(inode)) { /* drop largest extent */ if (i_ext && i_ext->len) { i_ext->len = 0; ...
0
[ "CWE-119", "CWE-787" ]
linux
dad48e73127ba10279ea33e6dbc8d3905c4d31c0
263,410,167,694,025,230,000,000,000,000,000,000,000
37
f2fs: fix a bug caused by NULL extent tree Thread A: Thread B: -f2fs_remount -sbi->mount_opt.opt = 0; <--- -f2fs_iget -do_read_inode -f2fs_init_extent_tree -F2FS_I(inode)->extent_tree is NULL -default_options && parse_options -remount return ...
const char* ExpressionTrunc::getOpName() const { return "$trunc"; }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
269,829,205,069,930,080,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
ivq_safelevel_handler(arg, ivq) VALUE arg; VALUE ivq; { struct invoke_queue *q; Data_Get_Struct(ivq, struct invoke_queue, q); DUMP2("(safe-level handler) $SAFE = %d", q->safe_level); rb_set_safe_level(q->safe_level); return ip_invoke_core(q->interp, q->argc, q->argv); }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
154,919,848,356,941,010,000,000,000,000,000,000,000
11
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static bool check_buffer(RBinFile *bf, RBuffer *b) { if (r_buf_size (b) >= 0x20) { ut8 magic[4] = {0}; if (r_buf_read_at (b, 0, magic, sizeof (magic)) != 4) { return false; } return !memcmp (magic, "XALZ", 4); } return false; }
0
[ "CWE-125" ]
radare2
fc285cecb8469f0262db0170bf6dd7c01d9b8ed5
312,197,566,493,198,900,000,000,000,000,000,000,000
10
Fix #20354
static void on_comment_changed(GtkTextBuffer *buffer, gpointer user_data) { toggle_eb_comment(); }
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
118,607,020,191,058,960,000,000,000,000,000,000,000
4
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...
errno_t sssctl_logs_remove(struct sss_cmdline *cmdline, struct sss_tool_ctx *tool_ctx, void *pvt) { struct sssctl_logs_opts opts = {0}; errno_t ret; glob_t globbuf; /* Parse command line. */ struct poptOption options[] = { {"delete", 'd'...
0
[ "CWE-78" ]
sssd
7ab83f97e1cbefb78ece17232185bdd2985f0bbe
336,220,768,478,019,200,000,000,000,000,000,000,000
52
TOOLS: replace system() with execvp() to avoid execution of user supplied command :relnote: A flaw was found in SSSD, where the sssctl command was vulnerable to shell command injection via the logs-fetch and cache-expire subcommands. This flaw allows an attacker to trick the root user into running a specially crafted ...
SYSCALL_DEFINE2(symlink, const char __user *, oldname, const char __user *, newname) { return sys_symlinkat(oldname, AT_FDCWD, newname); }
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
25,496,315,543,566,116,000,000,000,000,000,000,000
4
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int is_vp7) { VP8Context *s = avctx->priv_data; VP8ThreadData *td = &s->thread_data[jobnr]; VP8ThreadData *next_td = NULL, *prev_td = NULL; VP8Frame *curframe = s->curframe; int m...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef
172,994,371,872,271,020,000,000,000,000,000,000,000
33
avcodec/webp: Always set pix_fmt Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbult...
static void set_sock_ids(struct mdesc_handle *hp) { u64 mp; /** * Find the highest level of shared cache which pre-T7 is also * the socket. */ if (!set_max_cache_ids_by_cache(hp, 3)) set_max_cache_ids_by_cache(hp, 2); /* If machine description exposes sockets data use it.*/ mp = mdesc_node_by_name(hp, MD...
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
272,531,240,816,868,560,000,000,000,000,000,000,000
16
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
GF_Err odtt_box_read(GF_Box *s, GF_BitStream *bs) { GF_OMADRMTransactionTrackingBox *ptr = (GF_OMADRMTransactionTrackingBox *)s; gf_bs_read_data(bs, ptr->TransactionID, 16); ISOM_DECREASE_SIZE(ptr, 16); return GF_OK; }
0
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
323,729,880,326,953,060,000,000,000,000,000,000,000
8
fixed #1879
static void smack_sk_free_security(struct sock *sk) { #ifdef SMACK_IPV6_PORT_LABELING struct smk_port_label *spp; if (sk->sk_family == PF_INET6) { rcu_read_lock(); list_for_each_entry_rcu(spp, &smk_ipv6_port_list, list) { if (spp->smk_sock != sk) continue; spp->smk_can_reuse = 1; break; } rcu_re...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
170,632,512,738,199,870,000,000,000,000,000,000,000
18
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns, struct user_namespace *user_ns, struct fs_struct *new_fs) { struct mnt_namespace *new_ns; struct vfsmount *rootmnt = NULL, *pwdmnt = NULL; struct mount *p, *q; struct mount *old; struct mount *new; int copy_flags; BUG_ON(!ns); ...
0
[ "CWE-400", "CWE-703" ]
linux
d29216842a85c7970c536108e093963f02714498
145,691,244,862,461,800,000,000,000,000,000,000,000
73
mnt: Add a per mount namespace limit on the number of mounts CAI Qian <caiqian@redhat.com> pointed out that the semantics of shared subtrees make it possible to create an exponentially increasing number of mounts in a mount namespace. mkdir /tmp/1 /tmp/2 mount --make-rshared / for i in $(seq 1 20) ; do mo...
static int rar5_has_encrypted_entries(struct archive_read *_a) { (void) _a; /* Unsupported for now. */ return ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED; }
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
135,514,286,564,350,130,000,000,000,000,000,000,000
6
RAR5 reader: reject files that declare invalid header flags One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so...
static void buf_sent(int err, void *user_data) { if (atomic_test_and_clear_bit(link.flags, ADV_LINK_CLOSING)) { close_link(PROV_BEARER_LINK_STATUS_SUCCESS); return; } }
0
[ "CWE-787" ]
zephyr
6ec31c852049641095f2cdf25591f2e1bff86774
221,221,058,814,192,060,000,000,000,000,000,000,000
7
Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU When receiving Transaction Start PDU, assure that number of segments needed to send a Provisioning PDU with TotalLength size is equal to SegN value provided in the Transaction Start PDU. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no> (cher...
dwg_decode_xdata (Bit_Chain *restrict dat, Dwg_Object_XRECORD *restrict obj, BITCODE_BL size) { Dwg_Resbuf *rbuf, *root = NULL, *curr = NULL; unsigned char codepage; long unsigned int end_address, curr_address; BITCODE_BL i, num_xdata = 0; BITCODE_RS length; int error; static int cnt = ...
0
[ "CWE-703", "CWE-835" ]
libredwg
c6f6668b82bfe595899cc820279ac37bb9ef16f5
67,454,588,638,921,850,000,000,000,000,000,000,000
165
cleanup tio.unknown not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common entity_data. Fixes GH #178 heap_overflow2
cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset) { int rc = -EACCES; unsigned int bytes_read = 0; unsigned int total_read; unsigned int current_read_size; unsigned int rsize; struct cifs_sb_info *cifs_sb; struct cifs_tcon *tcon; struct TCP_Server_Info *server; unsigned int xid; ...
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
183,613,798,097,962,900,000,000,000,000,000,000,000
87
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
R_API void r_cmd_parsed_args_free(RCmdParsedArgs *a) { if (!a) { return; } int i; for (i = 0; i < a->argc; i++) { free (a->argv[i]); } free (a->argv); free (a); }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
329,987,707,844,998,660,000,000,000,000,000,000,000
12
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...