func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
rad_request_authenticator(struct rad_handle *h, char *buf, size_t len) { if (len < LEN_AUTH) return (-1); memcpy(buf, h->request + POS_AUTH, LEN_AUTH); if (len > LEN_AUTH) buf[LEN_AUTH] = '\0'; return (LEN_AUTH); }
0
[ "CWE-119", "CWE-787" ]
php-radius
13c149b051f82b709e8d7cc32111e84b49d57234
332,193,528,052,721,800,000,000,000,000,000,000,000
9
Fix a security issue in radius_get_vendor_attr(). The underlying rad_get_vendor_attr() function assumed that it would always be given valid VSA data. Indeed, the buffer length wasn't even passed in; the assumption was that the length field within the VSA structure would be valid. This could result in denial of servic...
BSONTool::BSONTool( const char * name, DBAccess access , bool objcheck ) : Tool( name , access , "" , "" , false ) , _objcheck( objcheck ) { add_options() ("objcheck" , "validate object before inserting" ) ("noobjcheck" , "validate object before inserting" ) ("filter" , po::...
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
206,874,939,534,026,830,000,000,000,000,000,000,000
9
SERVER-7769 - turn objcheck on by default and use new fast bson validate
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-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
200,380,098,399,209,450,000,000,000,000,000,000,000
78
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
get_indent_lnum(linenr_T lnum) { #ifdef FEAT_VARTABS return get_indent_str_vtab(ml_get(lnum), (int)curbuf->b_p_ts, curbuf->b_p_vts_array, FALSE); #else return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts, FALSE); #endif }
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
274,391,972,724,414,530,000,000,000,000,000,000,000
9
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
int zmq::curve_server_t::produce_welcome (msg_t *msg_) { uint8_t cookie_nonce [crypto_secretbox_NONCEBYTES]; uint8_t cookie_plaintext [crypto_secretbox_ZEROBYTES + 64]; uint8_t cookie_ciphertext [crypto_secretbox_BOXZEROBYTES + 80]; // Create full nonce for encryption // 8-byte prefix plus 16-byt...
0
[]
libzmq
0900a489213d74feb86fc0b343308fe7884a2a3c
252,087,745,433,078,700,000,000,000,000,000,000,000
59
Problem: curve messages can be replayed Solution: ensure message short nonces are strictly increasing and validate them
inline void lowercase(char *const str) { if (str) for (char *ptr = str; *ptr; ++ptr) *ptr = lowercase(*ptr); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
198,318,718,675,918,740,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.
GF_Box *fiin_box_new() { ISOM_DECL_BOX_ALLOC(FDItemInformationBox, GF_ISOM_BOX_TYPE_FIIN); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
12,465,383,859,445,270,000,000,000,000,000,000,000
5
fixed #2255
add_layers (const gint32 image_id, PSDimage *img_a, PSDlayer **lyr_a, FILE *f, GError **error) { PSDchannel **lyr_chn; guchar *pixels; guint16 alpha_chn; guint16 user_mask_chn; guint16 ...
1
[ "CWE-190" ]
gimp
88eccea84aa375197cc04a2a0e2e29debb56bfa5
100,548,926,281,788,440,000,000,000,000,000,000,000
418
Harden the PSD plugin against integer overflows. Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232 and CVE identifier CVE-2009-3909. Fixes bug #600741. (cherry picked from commit 9cc8d78ff33b7a36852b74e64b427489cad44d0e)
static void MSLStartDocument(void *context) { MSLInfo *msl_info; xmlParserCtxtPtr parser; /* Called when the document start being processed. */ (void) LogMagickEvent(CoderEvent,GetMagickModule(), " SAX.startDocument()"); msl_info=(MSLInfo *) context; parser=msl_info->parser; msl_info-...
0
[ "CWE-772", "CWE-787" ]
ImageMagick
e793eb203e5e0f91f5037aed6585e81b1e27395b
175,402,066,913,202,320,000,000,000,000,000,000,000
24
https://github.com/ImageMagick/ImageMagick/issues/636
ldbm_config_exclude_from_export_get(void *arg) { struct ldbminfo *li = (struct ldbminfo *)arg; char *p, *retstr = NULL; size_t len = 0; if (NULL != li->li_attrs_to_exclude_from_export && NULL != li->li_attrs_to_exclude_from_export[0]) { int i; for (i = 0; li->li_attrs_to_exclud...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
227,332,190,069,829,800,000,000,000,000,000,000,000
28
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
static Image *ReadMIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define BZipMaxExtent(x) ((x)+((x)/100)+600) #define LZMAMaxExtent(x) ((x)+((x)/3)+128) #define ThrowMIFFException(exception,message) \ { \ if (quantum_info != (QuantumInfo *) NULL) \ quantum_info=DestroyQuantumInfo(quantum_i...
1
[ "CWE-401" ]
ImageMagick
bb3acad195de95db86c7509d8072db01890470e0
7,056,332,940,896,908,000,000,000,000,000,000,000
1,312
https://github.com/ImageMagick/ImageMagick/issues/1757
QPDFWriter::copyEncryptionParameters(QPDF& qpdf) { this->m->preserve_encryption = false; QPDFObjectHandle trailer = qpdf.getTrailer(); if (trailer.hasKey("/Encrypt")) { generateID(); this->m->id1 = trailer.getKey("/ID").getArrayItem(0).getStringValue(); QPDFObjectHandle encr...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
224,086,248,642,964,300,000,000,000,000,000,000,000
64
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 ...
build_off_end_msg(Dwarf_Unsigned offval, Dwarf_Unsigned withincr, Dwarf_Unsigned secsize, dwarfstring *m) { const char *msg = "past"; if (offval < secsize){ msg = "too near"; } dwarfstring_append_printf_u(m,"DW_DLE_OFFSET_BAD: " "The CU header offset of %u in a pubnames-like ...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
8151575a6ace77d005ca5bb5d71c1bfdba3f7069
316,145,803,637,547,000,000,000,000,000,000,000,000
18
Fixes vulnerability DW202205-001 Reports error instead of crashing the when reading a specially crafted (corrupted) .debug_pubnames or .debug_pubtypes section. modified: src/lib/libdwarf/dwarf_global.c
void KrecipesView::printRequested() { QWidget * vis_panel = rightPanel->visiblePanel(); if ( vis_panel == viewPanel ) { //Create the temporary directory. m_tempdir = new KTempDir(KStandardDirs::locateLocal("tmp", "krecipes-data-print")); QString tmp_filename = m_tempdir->name() + "krecipes_recipe_view.html"; ...
0
[]
krecipes
cd1490fb5fe82cbe9172a43be13298001b446ecd
247,251,478,293,874,030,000,000,000,000,000,000,000
24
Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and #2960140. svn path=/trunk/extragear/utils/krecipes/; revision=1137824
static int destroy(RBinFile *arch) { r_bin_bflt_free ((struct r_bin_bflt_obj*)arch->o->bin_obj); return true; }
0
[ "CWE-119", "CWE-787" ]
radare2
72794dc3523bbd5bb370de3c5857cb736c387e18
11,737,324,800,350,776,000,000,000,000,000,000,000
4
Fix #6829 oob write because of using wrong struct
static inline unsigned short drbg_sec_strength(drbg_flag_t flags) { switch (flags & DRBG_STRENGTH_MASK) { case DRBG_STRENGTH128: return 16; case DRBG_STRENGTH192: return 24; case DRBG_STRENGTH256: return 32; default: return 32; } }
0
[ "CWE-476" ]
linux
8fded5925d0a733c46f8d0b5edd1c9b315882b1d
21,878,969,220,714,725,000,000,000,000,000,000,000
13
crypto: drbg - Convert to new rng interface This patch converts the DRBG implementation to the new low-level rng interface. This allows us to get rid of struct drbg_gen by using the new RNG API instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Stephan Mueller <smueller@chronox.de>
folly::SSLContext::ServerNameCallbackResult serverNameCallback(SSL* ssl) { const char* sn = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name); if (sniCtx_ && sn && !strcasecmp(expectedServerName_.c_str(), sn)) { AsyncSSLSocket* sslSocket = AsyncSSLSocket::getFromSSL(ssl); sslSocket->switchServerS...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
309,118,855,974,347,000,000,000,000,000,000,000,000
12
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
symbol_class_set (symbol *sym, symbol_class class, location loc, bool declaring) { aver (class != unknown_sym); sym_content *s = sym->content; if (class == pct_type_sym) { if (s->class == token_sym) complain_pct_type_on_token (&loc); else if (s->class == unknown_sym) s->class = cla...
1
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
46,344,146,420,975,370,000,000,000,000,000,000,000
42
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
static void freeobj (lua_State *L, GCObject *o) { switch (o->tt) { case LUA_VPROTO: luaF_freeproto(L, gco2p(o)); break; case LUA_VUPVAL: freeupval(L, gco2upv(o)); break; case LUA_VLCL: luaM_freemem(L, o, sizeLclosure(gco2lcl(o)->nupvalues)); break; case LUA_VCCL: ...
0
[ "CWE-125" ]
lua
127e7a6c8942b362aa3c6627f44d660a4fb75312
301,941,077,338,930,380,000,000,000,000,000,000,000
35
Fixed bug of old finalized objects in the GC When an object aged OLD1 is finalized, it is moved from the list 'finobj' to the *beginning* of the list 'allgc'. So, this part of the list (and not only the survival list) must be visited by 'markold'.
void ConnectionManagerImpl::ActiveStreamEncoderFilter:: onEncoderFilterBelowWriteBufferLowWatermark() { ENVOY_STREAM_LOG(debug, "Enabling upstream stream due to filter callbacks.", parent_); parent_.callLowWatermarkCallbacks(); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
206,452,920,784,192,550,000,000,000,000,000,000,000
5
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
path_is_similar (const char *path1, const char *path2) { int i; for (i = 0; path1[i]; i++) { if (path2[i] == '\0') return FALSE; if (tolower (path1[i]) == tolower (path2[i])) continue; if ((path1[i] == '-' || path1[i] == '_') && (path2[i] == '-' || path2[i] == '_')...
0
[ "CWE-20" ]
flatpak
a9107feeb4b8275b78965b36bf21b92d5724699e
127,313,636,744,864,770,000,000,000,000,000,000,000
24
run: Only compare the lowest 32 ioctl arg bits for TIOCSTI Closes #2782. Closes: #2783 Approved by: alexlarsson
static struct btd_adapter *btd_adapter_lookup(uint16_t index) { GList *list; for (list = g_list_first(adapter_list); list; list = g_list_next(list)) { struct btd_adapter *adapter = list->data; if (adapter->dev_id == index) return adapter; } return NULL; }
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
316,553,909,565,813,900,000,000,000,000,000,000,000
14
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
format_DEBUG_SLOW(const struct ofpact_null *a OVS_UNUSED, const struct ofpact_format_params *fp) { ds_put_format(fp->s, "%sdebug_slow%s", colors.value, colors.end); }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
202,751,328,601,484,240,000,000,000,000,000,000,000
5
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
static bool gem_can_receive(NetClientState *nc) { CadenceGEMState *s; int i; s = qemu_get_nic_opaque(nc); /* Do nothing if receive is not enabled. */ if (!(s->regs[GEM_NWCTRL] & GEM_NWCTRL_RXENA)) { if (s->can_rx_state != 1) { s->can_rx_state = 1; DB_PRINT("can't re...
0
[ "CWE-835" ]
qemu
e73adfbeec9d4e008630c814759052ed945c3fed
125,366,056,933,129,020,000,000,000,000,000,000,000
36
cadence_gem: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redha...
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, u16 flags) { struct tcamsg *t; struct nlmsghdr *nlh; struct sk_buff *skb; struct rtattr *x; unsigned char *b; int err = 0; skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (!skb) return -ENOBUFS; b = (unsig...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
229,639,357,953,188,500,000,000,000,000,000,000,000
43
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
qmp_guest_set_memory_blocks(GuestMemoryBlockList *mem_blks, Error **errp) { error_setg(errp, QERR_UNSUPPORTED); return NULL; }
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
12,958,935,367,440,155,000,000,000,000,000,000,000
5
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
bool chunked() const { return has(Http::HdrType::TRANSFER_ENCODING); }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
15,916,918,782,205,597,000,000,000,000,000,000,000
1
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
GPMF_ERR GPMF_Validate(GPMF_stream *ms, GPMF_LEVELS recurse) { if (ms) { uint32_t currpos = ms->pos; int32_t nestsize = (int32_t)ms->nest_size[ms->nest_level]; if (nestsize == 0 && ms->nest_level == 0) nestsize = ms->buffer_size_longs; while (ms->pos+1 < ms->buffer_size_longs && nestsize > 0) { uin...
0
[ "CWE-125", "CWE-369", "CWE-787" ]
gpmf-parser
341f12cd5b97ab419e53853ca00176457c9f1681
180,422,950,465,530,660,000,000,000,000,000,000,000
113
fixed many security issues with the too crude mp4 reader
int invalid_channel(int chan) { int i=0; do { if (chan == abg_chans[i] && chan != 0 ) return 0; } while (abg_chans[++i]); return 1; }
0
[ "CWE-787" ]
aircrack-ng
ff70494dd389ba570dbdbf36f217c28d4381c6b5
214,661,766,360,943,350,000,000,000,000,000,000,000
11
Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab
static int handle_rdpmc(struct kvm_vcpu *vcpu) { int err; err = kvm_rdpmc(vcpu); return kvm_complete_insn_gp(vcpu, err); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
103,771,306,059,661,350,000,000,000,000,000,000,000
7
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
PreScanOutputDev::PreScanOutputDev(XRef *xrefA) { level = globalParams->getPSLevel(); xref = xrefA; clearStats(); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
176,862,326,137,501,270,000,000,000,000,000,000,000
5
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static bool mysql_drop_partitions(ALTER_PARTITION_PARAM_TYPE *lpt) { char path[FN_REFLEN+1]; partition_info *part_info= lpt->table->part_info; List_iterator<partition_element> part_it(part_info->partitions); int error; DBUG_ENTER("mysql_drop_partitions"); DBUG_ASSERT(lpt->thd->mdl_context.is_lock_owner(MDL...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
244,602,021,436,450,130,000,000,000,000,000,000,000
21
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
yang_fill_deviate_default(struct ly_ctx *ctx, struct lys_deviate *deviate, struct lys_node *dev_target, struct ly_set *dflt_check, const char *value) { struct lys_node *node; struct lys_node_choice *choice; struct lys_node_leaf *leaf; struct lys_node_leaflist *llist; int rc...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
94,460,247,190,278,860,000,000,000,000,000,000,000
121
yang parser BUGFIX double free Fixes #742
static int rar5_read_data_skip(struct archive_read *a) { struct rar5* rar = get_context(a); if(rar->main.solid) { /* In solid archives, instead of skipping the data, we need to * extract it, and dispose the result. The side effect of this * operation will be setting up the initial window buffer state * ne...
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
6,430,982,064,952,523,000,000,000,000,000,000,000
50
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 int ssl_parse_renegotiation_info( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) { #if defined(MBEDTLS_SSL_RENEGOTIATION) if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) { /* Check verify...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
140,172,738,334,619,730,000,000,000,000,000,000,000
35
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
static int ntop_getflowdevices(lua_State* vm) { NetworkInterface *ntop_interface = getCurrentInterface(vm); ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); if(!ntop_interface) return(CONST_LUA_ERROR); else { ntop_interface->getFlowDevices(vm); return(CONST_LUA_OK); } }
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
216,536,621,599,014,570,000,000,000,000,000,000,000
12
Security fix: prevents empty host from being used
TEST(IndexBoundsBuilderTest, TranslateIn) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$in: [8, 44, -1, -3]}}"); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::BoundsTightness tightness; In...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
61,274,844,740,327,100,000,000,000,000,000,000,000
20
SERVER-44377 generate correct plan for indexed inequalities to null
static void php_mcrypt_do_crypt(char* cipher, const char *key, int key_len, const char *data, int data_len, char *mode, const char *iv, int iv_len, int argc, int dencrypt, zval* return_value TSRMLS_DC) /* {{{ */ { char *cipher_dir_string; char *module_dir_string; int block_size, max_key_length, use_key_length, i, c...
1
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
213,379,214,412,544,180,000,000,000,000,000,000,000
105
Fix bug #72455: Heap Overflow due to integer overflows
static int __init l1tf_cmdline(char *str) { if (!boot_cpu_has_bug(X86_BUG_L1TF)) return 0; if (!str) return -EINVAL; if (!strcmp(str, "off")) l1tf_mitigation = L1TF_MITIGATION_OFF; else if (!strcmp(str, "flush,nowarn")) l1tf_mitigation = L1TF_MITIGATION_FLUSH_NOWARN; else if (!strcmp(str, "flush")) l1t...
0
[]
linux
a2059825986a1c8143fd6698774fa9d83733bb11
119,832,939,459,573,880,000,000,000,000,000,000,000
23
x86/speculation: Enable Spectre v1 swapgs mitigations The previous commit added macro calls in the entry code which mitigate the Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are enabled. Enable those features where applicable. The mitigations may be disabled with "nospectre_v1" or "mitigations...
static struct nft_table *nft_table_lookup(const struct net *net, const struct nlattr *nla, u8 family, u8 genmask, u32 nlpid) { struct nftables_pernet *nft_net; struct nft_table *table; if (nla == NULL) return ERR_PTR(-EINVAL); nft_net = nft_pernet(net); list_for_each_entry_rcu(table, &nft_net->ta...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
215,318,508,097,481,700,000,000,000,000,000,000,000
26
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception) { Image *image; MagickBooleanType status; MagickOffsetType offset; MagickSizeType number_pixels; register ssize_t i, y; register Quantum *q; register unsigned char *c1, *c2, *yy; ...
0
[ "CWE-772" ]
ImageMagick
12a43437fec6f9245327636dc2730863bb9fdd8b
247,690,385,308,964,440,000,000,000,000,000,000,000
383
https://github.com/ImageMagick/ImageMagick/issues/809
static int kvm_alloc_vmm_area(void) { if (!kvm_vmm_base && (kvm_vm_buffer_size < KVM_VM_BUFFER_SIZE)) { kvm_vmm_base = __get_free_pages(GFP_KERNEL, get_order(KVM_VMM_SIZE)); if (!kvm_vmm_base) return -ENOMEM; memset((void *)kvm_vmm_base, 0, KVM_VMM_SIZE); kvm_vm_buffer = kvm_vmm_base + VMM_SIZE; pri...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
124,166,901,167,221,940,000,000,000,000,000,000,000
17
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
tiffscaled4_print_page(gx_device_printer * pdev, gp_file * file) { gx_device_tiff *const tfdev = (gx_device_tiff *)pdev; int code; code = gdev_tiff_begin_page(tfdev, file); if (code < 0) return code; tiff_set_cmyk_fields(pdev, tfdev->tif, 1...
0
[ "CWE-476" ]
ghostpdl
aadb53eb834b3def3ef68d78865ff87a68901804
265,108,857,675,396,080,000,000,000,000,000,000,000
24
Tiffsep and Tiffsep1 - abort on multi-page input wtithout %d OutputFile Bug #701821 "Segmentation fault at tiff//libtiff/tif_dirinfo.c:513 in TIFFFindField" The tiffsep and tiffsep1 only set 'code' to an error when an attempt is made to write a second output file without using %d in the OutputFile specification. Thi...
static void free_groupnames(char **groupnames) { int i; if (!groupnames) return; for (i = 0; groupnames[i]; i++) free(groupnames[i]); free(groupnames); }
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
252,270,828,809,479,100,000,000,000,000,000,000,000
12
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
QXLCookie *qxl_cookie_new(int type, uint64_t io) { QXLCookie *cookie; cookie = g_malloc0(sizeof(*cookie)); cookie->type = type; cookie->io = io; return cookie; }
0
[ "CWE-200" ]
qemu
ab9509cceabef28071e41bdfa073083859c949a7
45,522,723,965,804,370,000,000,000,000,000,000,000
9
spice: make sure we don't overflow ssd->buf Related spice-only bug. We have a fixed 16 MB buffer here, being presented to the spice-server as qxl video memory in case spice is used with a non-qxl card. It's also used with qxl in vga mode. When using display resolutions requiring more than 16 MB of memory we are goi...
static inline bool userfaultfd_must_wait(struct userfaultfd_ctx *ctx, unsigned long address, unsigned long flags, unsigned long reason) { struct mm_struct *mm = ctx->mm; pgd_t *pgd; p4d_t *p4d; pud_t *pud; pmd_t *pmd, _pmd; pte_t *pte; bool ret = true; VM_BUG_ON(!rwsem_is_locked(&mm->mmap_sem...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
2,444,347,174,846,625,200,000,000,000,000,000,000
60
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
HTTPSession::onPushMessageBegin(HTTPCodec::StreamID streamID, HTTPCodec::StreamID assocStreamID, HTTPMessage* msg) { VLOG(4) << "processing new push promise streamID=" << streamID << " on assocStreamID=" << assocStreamID << " " << *this; if (...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
67,956,537,307,814,480,000,000,000,000,000,000,000
45
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
static int io_uring_install_fd(struct io_ring_ctx *ctx, struct file *file) { int ret, fd; fd = get_unused_fd_flags(O_RDWR | O_CLOEXEC); if (fd < 0) return fd; ret = io_uring_add_task_file(ctx); if (ret) { put_unused_fd(fd); return ret; } fd_install(fd, file); return fd;
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
309,147,653,659,986,600,000,000,000,000,000,000,000
16
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
process_hr(struct parsed_tag *tag, int width, int indent_width) { Str tmp = Strnew_charp("<nobr>"); int w = 0; int x = ALIGN_CENTER; #define HR_ATTR_WIDTH_MAX 65535 if (width > indent_width) width -= indent_width; if (parsedtag_get_value(tag, ATTR_WIDTH, &w)) { if (w > HR_ATTR_WIDTH_MAX) { w...
0
[ "CWE-476" ]
w3m
59b91cd8e30c86f23476fa81ae005cabff49ebb6
295,867,973,158,130,100,000,000,000,000,000,000,000
37
Prevent segfault with malformed input type Bug-Debian: https://github.com/tats/w3m/issues/7
static void php_sqlite_agg_step_function_callback(sqlite_func *func, int argc, const char **argv) { zval *retval = NULL; zval ***zargs; zval **context_p; int i, res, zargc; struct php_sqlite_agg_functions *funcs = sqlite_user_data(func); TSRMLS_FETCH(); if (!funcs->is_valid) { sqlite_set_result_error(func, "t...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
113,088,150,870,618,500,000,000,000,000,000,000,000
68
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
DataBuf packIfdId(const ExifData& exifData, IfdId ifdId, ByteOrder byteOrder) { const uint16_t size = 1024; DataBuf buf(size); std::memset(buf.pData_, 0x0, buf.size_); uint16_t len = 0; const ExifData::const_ite...
0
[ "CWE-400" ]
exiv2
b3d077dcaefb6747fff8204490f33eba5a144edb
233,544,975,335,093,500,000,000,000,000,000,000,000
22
Fix #460 by adding more checks in CiffDirectory::readDirectory
static int perf_event_idx_default(struct perf_event *event) { return event->hw.idx + 1; }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
293,325,961,736,379,830,000,000,000,000,000,000,000
4
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...
inline enum_binlog_format get_current_stmt_binlog_format() { return current_stmt_binlog_format; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
86,051,297,796,957,660,000,000,000,000,000,000,000
4
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
explicit WriteCheckTimestampCallback(SendMsgParamsCallbackBase* mcb = nullptr) : WriteCallbackBase(mcb) {}
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
102,489,315,788,080,680,000,000,000,000,000,000,000
2
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static void _slurm_rpc_dump_partitions(slurm_msg_t * msg) { DEF_TIMERS; char *dump; int dump_size; slurm_msg_t response_msg; part_info_request_msg_t *part_req_msg; /* Locks: Read configuration and partition */ slurmctld_lock_t part_read_lock = { READ_LOCK, NO_LOCK, NO_LOCK, READ_LOCK, NO_LOCK }; uid_t uid =...
0
[ "CWE-20" ]
slurm
033dc0d1d28b8d2ba1a5187f564a01c15187eb4e
130,937,739,831,879,800,000,000,000,000,000,000,000
52
Fix insecure handling of job requested gid. Only trust MUNGE signed values, unless the RPC was signed by SlurmUser or root. CVE-2018-10995.
JVM_LoadSystemLibrary(const char *libName) { JNIEnv *env; char errMsg[512]; #ifdef WIN32 UDATA dllHandle; size_t libNameLen = strlen(libName); UDATA flags = 0; Trc_SC_LoadSystemLibrary_Entry(libName); if ((libNameLen <= 4) || ('.' != libName[libNameLen - 4]) || ('d' != j9_cmdla_tolower(libName[libNameLe...
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
127,884,093,903,078,900,000,000,000,000,000,000,000
70
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
void PSOutputDev::writePSChar(char c) { if (t3String) { t3String->append(c); } else { (*outputFunc)(outputStream, &c, 1); } }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
81,082,343,334,506,960,000,000,000,000,000,000,000
7
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
pdf_filter_SC_shade(fz_context *ctx, pdf_processor *proc, const char *name, fz_shade *shade) { pdf_filter_processor *p = (pdf_filter_processor*)proc; filter_gstate *gstate = gstate_to_update(ctx, p); fz_strlcpy(gstate->pending.SC.name, name, sizeof gstate->pending.SC.name); gstate->pending.SC.pat = NULL; gstate->p...
0
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
26,355,591,088,719,207,000,000,000,000,000,000,000
10
Bug 701292: Fix test for missing/empty string.
static int brcmf_msgbuf_tx_queue_data(struct brcmf_pub *drvr, int ifidx, struct sk_buff *skb) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct brcmf_flowring *flow = msgbuf->flow; struct ethhdr *eh = (struct ethhdr *)(skb->data); u32 flowid; u32 queue_count; bool force; f...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
206,011,882,648,631,100,000,000,000,000,000,000,000
22
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...
connection_valid_for_cdma (NMConnection *connection, NMSettingConnection *s_con, NMDevice *device, gpointer specific_object) { NMSettingCdma *s_cdma; if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_CDMA_SETTIN...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
194,228,070,341,431,450,000,000,000,000,000,000,000
15
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
static SQInteger array_pop(HSQUIRRELVM v) { return SQ_SUCCEEDED(sq_arraypop(v,1,SQTrue))?1:SQ_ERROR; }
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
25,224,142,659,071,655,000,000,000,000,000,000,000
4
fix in thread.call
XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) { if (parser == NULL) return XML_ERROR_INVALID_ARGUMENT; #ifdef XML_DTD /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (parser->m_parsingStatus.parsing == XML_PARSING || parser->m_parsingStatus.parsing == XML_SUSPENDED) return...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
226,318,128,285,492,150,000,000,000,000,000,000,000
14
xmlparse.c: Deny internal entities closing the doctype
TRIO_PUBLIC_STRING int trio_string_copy TRIO_ARGS2((self, other), trio_string_t* self, trio_string_t* other) { assert(self); assert(other); self->length = 0; return trio_string_append(self, other); }
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
201,267,810,500,550,900,000,000,000,000,000,000,000
9
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
static int userfaultfd_release(struct inode *inode, struct file *file) { struct userfaultfd_ctx *ctx = file->private_data; struct mm_struct *mm = ctx->mm; struct vm_area_struct *vma, *prev; /* len == 0 means wake all */ struct userfaultfd_wake_range range = { .len = 0, }; unsigned long new_flags; WRITE_ONCE(ctx...
0
[ "CWE-416" ]
linux
0cbb4b4f4c44f54af268969b18d8deda63aded59
61,041,387,189,877,950,000,000,000,000,000,000,000
65
userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails The previous fix in commit 384632e67e08 ("userfaultfd: non-cooperative: fix fork use after free") corrected the refcounting in case of UFFD_EVENT_FORK failure for the fork userfault paths. That still didn't clear the vma->vm_userfaultfd_ctx of th...
process_symlink(u_int32_t id) { char *oldpath, *newpath; int r, status; if ((r = sshbuf_get_cstring(iqueue, &oldpath, NULL)) != 0 || (r = sshbuf_get_cstring(iqueue, &newpath, NULL)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); debug3("request %u: symlink", id); logit("symlink old \"%s\" new ...
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
9,273,793,002,953,443,000,000,000,000,000,000,000
18
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
FILE *write_mount_file(struct lxc_list *mount) { FILE *file; struct lxc_list *iterator; char *mount_entry; file = tmpfile(); if (!file) { ERROR("tmpfile error: %m"); return NULL; } lxc_list_for_each(iterator, mount) { mount_entry = iterator->elem; fprintf(file, "%s\n", mount_entry); } rewind(file); ...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
175,966,569,331,250,700,000,000,000,000,000,000,000
20
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
TEST_F(ConnectionHandlerTest, TransportProtocolCustom) { TestListener* test_listener = addListener(1, true, false, "test_listener"); Network::MockListener* listener = new Network::MockListener(); Network::ListenerCallbacks* listener_callbacks; EXPECT_CALL(dispatcher_, createListener_(_, _, _)) .WillOnce( ...
0
[ "CWE-835" ]
envoy
c8de199e2971f79cbcbc6b5eadc8c566b28705d1
153,017,304,265,176,150,000,000,000,000,000,000,000
34
listener: clean up accept filter before creating connection (#8922) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
TEST_F(PlaintextRecordTest, TestSkipOversizedRecord) { read_.setSkipEncryptedRecords(true); addToQueue("170301fffb"); auto longBuf = IOBuf::create(0xfffb); longBuf->append(0xfffb); queue_.append(std::move(longBuf)); EXPECT_FALSE(read_.read(queue_).hasValue()); EXPECT_TRUE(queue_.empty()); }
0
[ "CWE-119", "CWE-835", "CWE-787" ]
fizz
40bbb161e72fb609608d53b9d64c56bb961a6ee2
251,633,789,537,991,440,000,000,000,000,000,000,000
9
Avoid arithmetic operation on uint16 read from the wire. Summary: This could overflow previously. CVE-2019-3560 Reviewed By: yfeldblum Differential Revision: D14152362 fbshipit-source-id: c0ebb3fc59b49c7c23e6bcb90458c19cd891be65
static int udf_writepage(struct page *page, struct writeback_control *wbc) { return block_write_full_page(page, udf_get_block, wbc); }
0
[ "CWE-476" ]
linux
7fc3b7c2981bbd1047916ade327beccb90994eee
284,845,382,528,914,180,000,000,000,000,000,000,000
4
udf: Fix NULL ptr deref when converting from inline format udf_expand_file_adinicb() calls directly ->writepage to write data expanded into a page. This however misses to setup inode for writeback properly and so we can crash on inode->i_wb dereference when submitting page for IO like: BUG: kernel NULL pointer dere...
static pyc_object *get_object(RzBuffer *buffer) { bool error = false; pyc_object *ret = NULL; ut8 code = get_ut8(buffer, &error); ut8 flag = code & FLAG_REF; RzListIter *ref_idx = NULL; ut8 type = code & ~FLAG_REF; if (error) { return NULL; } if (flag) { ret = get_none_object(); if (!ret) { return N...
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
252,722,082,099,286,300,000,000,000,000,000,000,000
128
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
static void cdc_ncm_set_dgram_size(struct usbnet *dev, int new_size) { struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; u8 iface_no = ctx->control->cur_altsetting->desc.bInterfaceNumber; __le16 max_datagram_size; u16 mbim_mtu; int err; /* set default based on descriptors */ ctx->max_datagram_size =...
0
[ "CWE-703" ]
linux
4d06dd537f95683aba3651098ae288b7cbff8274
212,301,869,360,545,300,000,000,000,000,000,000,000
47
cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind usbnet_link_change will call schedule_work and should be avoided if bind is failing. Otherwise we will end up with scheduled work referring to a netdev which has gone away. Instead of making the call conditional, we can just defer it to usbnet_probe, using the...
static bool pn533_acr122_is_rx_frame_valid(void *_frame, struct pn533 *dev) { struct pn533_acr122_rx_frame *frame = _frame; if (frame->ccid.type != 0x83) return false; if (!frame->ccid.datalen) return false; if (frame->data[frame->ccid.datalen - 2] == 0x63) return false; return true; }
0
[ "CWE-416" ]
linux
6af3aa57a0984e061f61308fe181a9a12359fecc
172,160,565,461,697,350,000,000,000,000,000,000,000
15
NFC: pn533: fix use-after-free and memleaks The driver would fail to deregister and its class device and free related resources on late probe errors. Reported-by: syzbot+cb035c75c03dbe34b796@syzkaller.appspotmail.com Fixes: 32ecc75ded72 ("NFC: pn533: change order operations in dev registation") Signed-off-by: Johan H...
hugetlb_install_page(struct vm_area_struct *vma, pte_t *ptep, unsigned long addr, struct page *new_page) { __SetPageUptodate(new_page); set_huge_pte_at(vma->vm_mm, addr, ptep, make_huge_pte(vma, new_page, 1)); hugepage_add_new_anon_rmap(new_page, vma, addr); hugetlb_count_add(pages_per_huge_page(hstate_vma(v...
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
27,502,355,904,957,950,000,000,000,000,000,000,000
10
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...
MagickExport Image *RotateImage(const Image *image,const double degrees, ExceptionInfo *exception) { Image *distort_image, *rotate_image; MagickRealType angle; PointInfo shear; size_t rotations; /* Adjust rotation angle. */ assert(image != (Image *) NULL); assert(image->sig...
0
[]
ImageMagick6
4eafab89a2742865d770857a9d7434993f65ae6b
220,134,451,449,587,480,000,000,000,000,000,000,000
44
https://github.com/ImageMagick/ImageMagick/issues/3331
dns_zone_detach(dns_zone_t **zonep) { REQUIRE(zonep != NULL && DNS_ZONE_VALID(*zonep)); dns_zone_t *zone = *zonep; *zonep = NULL; bool free_now = false; dns_zone_t *raw = NULL; dns_zone_t *secure = NULL; if (isc_refcount_decrement(&zone->erefs) == 1) { isc_refcount_destroy(&zone->erefs); LOCK_ZONE(zone); ...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
290,221,869,584,674,000,000,000,000,000,000,000,000
56
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
DisplaySurface *qemu_create_displaysurface_pixman(pixman_image_t *image) { DisplaySurface *surface = g_new0(DisplaySurface, 1); trace_displaysurface_create_pixman(surface); surface->format = pixman_image_get_format(image); surface->image = pixman_image_ref(image); return surface; }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
304,466,290,535,325,860,000,000,000,000,000,000,000
10
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
void SFD_AssignLookups(SplineFont1 *sf) { PST1 *pst, *pst2; int isv; KernPair1 *kp, *kp2; KernClass1 *kc, *kc2; FPST1 *fpst; ASM1 *sm; AnchorClass1 *ac, *ac2; int gid, gid2, cnt, i, k, isgpos; SplineFont1 *subsf; SplineChar *sc, *sc2; OTLookup *otl, **all; struct lookup_s...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
201,341,204,564,660,260,000,000,000,000,000,000,000
201
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
gss_wrap_aead (minor_status, context_handle, conf_req_flag, qop_req, input_assoc_buffer, input_payload_buffer, conf_state, output_message_buffer) OM_uint32 * minor_status; gss_ctx_id_t context_handle; int conf_req_flag; gss_q...
0
[ "CWE-415" ]
krb5
56f7b1bc95a2a3eeb420e069e7655fb181ade5cf
287,838,977,514,854,100,000,000,000,000,000,000,000
44
Preserve GSS context on init/accept failure After gss_init_sec_context() or gss_accept_sec_context() has created a context, don't delete the mechglue context on failures from subsequent calls, even if the mechanism deletes the mech-specific context (which is allowed by RFC 2744 but not preferred). Check for union con...
static void u32_bind_class(void *fh, u32 classid, unsigned long cl, void *q, unsigned long base) { struct tc_u_knode *n = fh; if (n && n->res.classid == classid) { if (cl) __tcf_bind_filter(q, &n->res, base); else __tcf_unbind_filter(q, &n->res); } }
0
[ "CWE-416" ]
linux
3db09e762dc79584a69c10d74a6b98f89a9979f8
74,430,849,289,496,695,000,000,000,000,000,000,000
12
net/sched: cls_u32: fix netns refcount changes in u32_change() We are now able to detect extra put_net() at the moment they happen, instead of much later in correct code paths. u32_init_knode() / tcf_exts_init() populates the ->exts.net pointer, but as mentioned in tcf_exts_init(), the refcount on netns has not been ...
static int aes_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len) { EVP_AES_KEY *dat = EVP_C_DATA(EVP_AES_KEY,ctx); int num = EVP_CIPHER_CTX_num(ctx); CRYPTO_cfb128_encrypt(in, out, len, &dat->ks, EVP_CIPHER_CTX_iv_no...
0
[ "CWE-125" ]
openssl
2198b3a55de681e1f3c23edb0586afe13f438051
44,517,810,798,628,960,000,000,000,000,000,000,000
12
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 void cmd_anal_aav(RCore *core, const char *input) { #define seti(x,y) r_config_set_i(core->config, x, y); #define geti(x) r_config_get_i(core->config, x); ut64 o_align = geti ("search.align"); bool asterisk = strchr (input, '*');; bool is_debug = r_config_get_i (core->config, "cfg.debug"); // pre int archA...
0
[ "CWE-416", "CWE-908" ]
radare2
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
179,438,807,659,872,500,000,000,000,000,000,000,000
66
Fix #9943 - Invalid free on RAnal.avr
crypto_policy_set_aes_cm_256_hmac_sha1_32(crypto_policy_t *p) { /* * corresponds to draft-ietf-avt-big-aes-03.txt * * note that this crypto policy is intended for SRTP, but not SRTCP */ p->cipher_type = AES_ICM; p->cipher_key_len = 46; p->auth_type = HMAC_SHA1; ...
0
[ "CWE-119" ]
libsrtp
704a31774db0dd941094fd2b47c21638b8dc3de2
263,291,011,549,156,050,000,000,000,000,000,000,000
15
Prevent potential DoS attack due to lack of bounds checking on RTP header CSRC count and extension header length. Credit goes to Randell Jesup and the Firefox team for reporting this issue.
void disable_file_path(const char *path, const char *file) { assert(file); assert(path); char *fname; if (asprintf(&fname, "%s/%s", path, file) == -1) errExit("asprintf"); disable_file_or_dir(fname); free(fname); }
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
237,563,832,460,727,300,000,000,000,000,000,000,000
11
fixing CVE-2022-31214
Statement *find_by_name(LEX_STRING *name) { Statement *stmt; stmt= (Statement*)my_hash_search(&names_hash, (uchar*)name->str, name->length); return stmt; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
286,959,810,915,797,900,000,000,000,000,000,000,000
7
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
void js_delregistry(js_State *J, const char *name) { jsR_delproperty(J, J->R, name); }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
119,399,056,111,989,950,000,000,000,000,000,000,000
4
Fix 697401: Error when dropping extra arguments to lightweight functions.
int jas_stream_ungetc(jas_stream_t *stream, int c) { if (!stream->ptr_ || stream->ptr_ == stream->bufbase_) { return -1; } /* Reset the EOF indicator (since we now have at least one character to read). */ stream->flags_ &= ~JAS_STREAM_EOF; --stream->rwcnt_; --stream->ptr_; ++stream->cnt_; *stream->ptr_ =...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
326,309,280,050,802,970,000,000,000,000,000,000,000
16
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) { CERT *cert; cert=ctx->cert; switch (cmd) { #ifndef OPENSSL_NO_RSA case SSL_CTRL_SET_TMP_RSA_CB: { cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp; } break; #endif #ifndef OPENSSL_NO_DH case SSL_CTRL_SET_TMP_DH_CB: { cert->dh_t...
0
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
335,026,596,156,996,270,000,000,000,000,000,000,000
39
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
exif_mnote_data_pentax_load (ExifMnoteData *en, const unsigned char *buf, unsigned int buf_size) { ExifMnoteDataPentax *n = (ExifMnoteDataPentax *) en; size_t i, tcount, o, datao, base = 0; ExifShort c; if (!n || !buf || !buf_size) { exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteDataPentax", "S...
0
[ "CWE-416", "CWE-908" ]
libexif
ec412aa4583ad71ecabb967d3c77162760169d1f
228,042,522,338,066,300,000,000,000,000,000,000,000
126
Ensure the MakerNote data pointers are initialized with NULL. This ensures that an uninitialized pointer isn't dereferenced later in the case where the number of components (and therefore size) is 0. This fixes the second issue reported at https://sourceforge.net/p/libexif/bugs/125/ CVE-2020-13113
void fx_ArrayBuffer_prototype_transfer(txMachine* the) { /* txSlot* instance = */ fxCheckArrayBufferInstance(the, mxThis); txSlot* arrayBuffer = fxCheckArrayBufferDetached(the, mxThis, XS_MUTABLE); txSlot* bufferInfo = arrayBuffer->next; txInteger oldByteLength = bufferInfo->value.bufferInfo.length; txInteger newB...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
331,651,778,626,302,900,000,000,000,000,000,000,000
16
XS: #896
static bool guest_cpuid_has_vmx(struct kvm_vcpu *vcpu) { struct kvm_cpuid_entry2 *best = kvm_find_cpuid_entry(vcpu, 1, 0); return best && (best->ecx & (1 << (X86_FEATURE_VMX & 31))); }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
165,813,524,290,240,880,000,000,000,000,000,000,000
5
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
bool vfs_init_custom(connection_struct *conn, const char *vfs_object) { char *module_path = NULL; char *module_name = NULL; char *module_param = NULL, *p; vfs_handle_struct *handle; const struct vfs_init_function_entry *entry; if (!conn||!vfs_object||!vfs_object[0]) { DEBUG(0, ("vfs_init_custom() called with N...
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
180,823,209,339,893,500,000,000,000,000,000,000,000
97
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, struct task_struct *task, perf_overflow_handler_t overflow_handler, void *context) { struct perf_event_context *ctx; struct perf_event *event; int err; /* * Get the target context (task or percpu): */ event = perf_event_al...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
311,308,961,188,638,730,000,000,000,000,000,000,000
52
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2) { register unsigned i; for (i = 0; i < PHT_SIZE; i++) pht1[i] |= pht2[i]; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
92,649,859,757,679,480,000,000,000,000,000,000,000
5
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
R_API RCmdDesc *r_cmd_desc_argv_new(RCmd *cmd, RCmdDesc *parent, const char *name, RCmdArgvCb cb, const RCmdDescHelp *help) { r_return_val_if_fail (cmd && parent && name, NULL); return argv_new (cmd, parent, name, cb, help, true); }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
216,608,770,604,974,540,000,000,000,000,000,000,000
4
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...
static inline void gen_string_movl_A0_EDI(DisasContext *s) { gen_lea_v_seg(s, s->aflag, cpu_regs[R_EDI], R_ES, -1); }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
117,688,036,339,085,200,000,000,000,000,000,000,000
4
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
template<typename T> CImgDisplay& display(const CImg<T>& img) { return assign(img);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
38,185,186,823,118,770,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static void *get_result_buffer(struct dm_ioctl *param, size_t param_size, size_t *len) { param->data_start = align_ptr(param + 1) - (void *) param; if (param->data_start < param_size) *len = param_size - param->data_start; else *len = 0; return ((void *) param) + param->data_start; }
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
137,095,161,872,259,020,000,000,000,000,000,000,000
12
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...
static int mcba_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct net_device *netdev; struct mcba_priv *priv; int err; struct usb_device *usbdev = interface_to_usbdev(intf); netdev = alloc_candev(sizeof(struct mcba_priv), MCBA_MAX_TX_URBS); if (!netdev) { dev_err(&intf->dev, "...
0
[ "CWE-415" ]
linux
04c9b00ba83594a29813d6b1fb8fdc93a3915174
15,796,337,913,845,866,000,000,000,000,000,000,000
77
can: mcba_usb: mcba_usb_start_xmit(): fix double dev_kfree_skb in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails because can_put_echo_skb() deletes original skb and can_free_echo_skb() deletes the cloned skb. Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analy...
static json_t *parse_json(lex_t *lex, size_t flags, json_error_t *error) { json_t *result; lex->depth = 0; lex_scan(lex, error); if(!(flags & JSON_DECODE_ANY)) { if(lex->token != '[' && lex->token != '{') { error_set(error, lex, "'[' or '{' expected"); return NULL; ...
0
[ "CWE-20" ]
jansson
64ce0ad3731ebd77e02897b07920eadd0e2cc318
190,802,337,443,420,620,000,000,000,000,000,000,000
34
Fix for issue #282 The fix limits recursion depths when parsing arrays and objects. The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting within `jansson_config.h` and is set by default to 2048. Update the RFC conformance document to note the limit; the RFC allows limits to be set by the implementation so...
static void _brcmf_set_multicast_list(struct work_struct *work) { struct brcmf_if *ifp; struct net_device *ndev; struct netdev_hw_addr *ha; u32 cmd_value, cnt; __le32 cnt_le; char *buf, *bufp; u32 buflen; s32 err; ifp = container_of(work, struct brcmf_if, multicast_work); brcmf_dbg(TRACE, "Enter, bsscfgidx=...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
55,273,626,755,488,630,000,000,000,000,000,000,000
65
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...