func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
MagickExport Image *MeanShiftImage(const Image *image,const size_t width, const size_t height,const double color_distance,ExceptionInfo *exception) { #define MaxMeanShiftIterations 100 #define MeanShiftImageTag "MeanShift/Image" CacheView *image_view, *mean_view, *pixel_view; Image *mean_image...
0
[ "CWE-369" ]
ImageMagick
a77d8d97f5a7bced0468f0b08798c83fb67427bc
103,684,703,199,316,320,000,000,000,000,000,000,000
185
https://github.com/ImageMagick/ImageMagick/issues/1552
static void __io_poll_flush(struct io_ring_ctx *ctx, struct llist_node *nodes) { struct io_kiocb *req, *tmp; struct req_batch rb; rb.to_free = rb.need_iter = 0; spin_lock_irq(&ctx->completion_lock); llist_for_each_entry_safe(req, tmp, nodes, llist_node) { hash_del(&req->hash_node); io_poll_complete(req, req->...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
119,246,865,643,362,070,000,000,000,000,000,000,000
22
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
static int add_chunked_item_iovs(conn *c, item *it, int len) { assert(it->it_flags & ITEM_CHUNKED); item_chunk *ch = (item_chunk *) ITEM_data(it); while (ch) { int todo = (len > ch->used) ? ch->used : len; if (add_iov(c, ch->data, todo) != 0) { return -1; } ch = c...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
266,669,294,433,695,240,000,000,000,000,000,000,000
13
CVE reported by cisco talos
int report(request_rec *r) { r->status = 500; ap_set_content_type(r, "text/html; charset=UTF-8"); ap_rputs("<h1>Passenger error #1</h1>\n", r); ap_rputs("Cannot determine the document root for the current request.", r); P_ERROR("Cannot determine the document root for the current request.\n" << " B...
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
186,117,978,732,189,330,000,000,000,000,000,000,000
9
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
host_and_ident(BOOL useflag) { if (!sender_fullhost) string_format_nt(big_buffer, big_buffer_size, "%s%s", useflag ? "U=" : "", sender_ident ? sender_ident : US"unknown"); else { uschar * flag = useflag ? US"H=" : US""; uschar * iface = US""; if (LOGGING(incoming_interface) && interface_address) ifac...
0
[ "CWE-787" ]
exim
d4bc023436e4cce7c23c5f8bb5199e178b4cc743
280,998,953,974,313,700,000,000,000,000,000,000,000
20
Fix host_name_lookup (Close 2747) Thanks to Nico R for providing a reproducing configuration. host_lookup = * message_size_limit = ${if def:sender_host_name {32M}{32M}} acl_smtp_connect = acl_smtp_connect acl_smtp_rcpt = acl_smtp_rcpt begin ac...
void ssl_excert_free(SSL_EXCERT *exc) { SSL_EXCERT *curr; while (exc) { if (exc->cert) X509_free(exc->cert); if (exc->key) EVP_PKEY_free(exc->key); if (exc->chain) sk_X509_pop_free(exc->chain, X509_free); curr = exc; exc = exc->next; OPENSSL_free(curr); } }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
182,791,518,548,413,700,000,000,000,000,000,000,000
16
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, const int bgColor) { float _angle = ((float) (-degrees / 180.0f) * (float)M_PI); const int src_w = gdImageSX(src); const int src_h = gdImageSY(src); const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int...
0
[ "CWE-119" ]
php-src
4bb422343f29f06b7081323844d9b52e1a71e4a5
102,487,898,895,328,840,000,000,000,000,000,000,000
48
Fix bug #70976: fix boundary check on gdImageRotateInterpolated
TEST_F(RouterTest, UpstreamTimeoutWithAltResponse) { NiceMock<Http::MockRequestEncoder> encoder; Http::ResponseDecoder* response_decoder = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDecoder& decoder, Http::Connectio...
0
[ "CWE-703" ]
envoy
5bf9b0f1e7f247a4eee7180849cb0823926f7fff
98,985,102,463,349,280,000,000,000,000,000,000,000
41
[1.21] CVE-2022-21655 Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
_dbus_fd_set_close_on_exec (int fd) { int val; val = fcntl (fd, F_GETFD, 0); if (val < 0) return; val |= FD_CLOEXEC; fcntl (fd, F_SETFD, val); }
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
152,470,995,242,469,030,000,000,000,000,000,000,000
13
sysdeps-unix: On MSG_CTRUNC, close the fds we did receive MSG_CTRUNC indicates that we have received fewer fds that we should have done because the buffer was too small, but we were treating it as though it indicated that we received *no* fds. If we received any, we still have to make sure we close them, otherwise the...
static int tty_driver_install_tty(struct tty_driver *driver, struct tty_struct *tty) { int idx = tty->index; int ret; if (driver->ops->install) { ret = driver->ops->install(driver, tty); return ret; } if (tty_init_termios(tty) == 0) { tty_driver_kref_get(driver); tty->count++; driver->ttys[idx] =...
0
[ "CWE-703" ]
linux
c290f8358acaeffd8e0c551ddcc24d1206143376
140,180,690,528,031,930,000,000,000,000,000,000,000
19
TTY: drop driver reference in tty_open fail path When tty_driver_lookup_tty fails in tty_open, we forget to drop a reference to the tty driver. This was added by commit 4a2b5fddd5 (Move tty lookup/reopen to caller). Fix that by adding tty_driver_kref_put to the fail path. I will refactor the code later. This is for ...
int wc_ecc_sig_to_rs(const byte* sig, word32 sigLen, byte* r, word32* rLen, byte* s, word32* sLen) { int err; int tmp_valid = 0; word32 x = 0; #ifdef WOLFSSL_SMALL_STACK mp_int* rtmp = NULL; mp_int* stmp = NULL; #else mp_int rtmp[1]; mp_int stmp[1]; #endif if (sig...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
299,696,813,383,644,340,000,000,000,000,000,000,000
70
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static int set_bitmap_file(struct mddev *mddev, int fd) { int err = 0; if (mddev->pers) { if (!mddev->pers->quiesce || !mddev->thread) return -EBUSY; if (mddev->recovery || mddev->sync_thread) return -EBUSY; /* we should be able to change the bitmap.. */ } if (fd >= 0) { struct inode *inode; struc...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
10,790,908,818,831,010,000,000,000,000,000,000,000
79
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
proc_mchar(struct readbuffer *obuf, int pre_mode, int width, char **str, Lineprop mode) { check_breakpoint(obuf, pre_mode, *str); obuf->pos += width; Strcat_charp_n(obuf->line, *str, get_mclen(*str)); if (width > 0) { set_prevchar(obuf->prevchar, *str, 1); if (**str != ' ') obuf->prev_ctype =...
0
[ "CWE-476" ]
w3m
59b91cd8e30c86f23476fa81ae005cabff49ebb6
5,296,682,949,000,931,500,000,000,000,000,000,000
14
Prevent segfault with malformed input type Bug-Debian: https://github.com/tats/w3m/issues/7
int tls1_final_finish_mac(SSL *s, EVP_MD_CTX *in1_ctx, EVP_MD_CTX *in2_ctx, const char *str, int slen, unsigned char *out) { unsigned int i; EVP_MD_CTX ctx; unsigned char buf[TLS_MD_MAX_CONST_SIZE+MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH]; unsigned char *q,buf2[12]; q=buf; memcpy(q,str,slen); q+=slen; EVP_M...
0
[ "CWE-310" ]
openssl
35a65e814beb899fa1c69a7673a8956c6059dce7
146,736,839,769,520,180,000,000,000,000,000,000,000
27
Make CBC decoding constant time. This patch makes the decoding of SSLv3 and TLS CBC records constant time. Without this, a timing side-channel can be used to build a padding oracle and mount Vaudenay's attack. This patch also disables the stitched AESNI+SHA mode pending a similar fix to that code. In order to be eas...
int luaRedisReturnSingleFieldTable(lua_State *lua, char *field) { if (lua_gettop(lua) != 1 || lua_type(lua,-1) != LUA_TSTRING) { luaPushError(lua, "wrong number or type of arguments"); return 1; } lua_newtable(lua); lua_pushstring(lua, field); lua_pushvalue(lua, -3); lua_settabl...
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
155,298,662,983,565,680,000,000,000,000,000,000,000
12
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
_asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len, char *str, int str_size) { int len_len, len, k; int leading; char temp[20]; unsigned long val, val1; *ret_len = 0; if (str && str_size > 0) str[0] = 0; /* no oid */ if (str == NULL || der_len <= 0) return ASN1_GENE...
1
[]
libtasn1
51612fca32dda445056ca9a7533bae258acd3ecb
171,055,086,052,398,100,000,000,000,000,000,000,000
60
check for zero size in time and object ids.
static bool is_legal_file(const std::string &filename) { DBG_FS << "Looking for '" << filename << "'.\n"; if (filename.empty()) { LOG_FS << " invalid filename\n"; return false; } if (filename.find("..") != std::string::npos) { ERR_FS << "Illegal path '" << filename << "' (\"..\" not allowed).\n"; return ...
0
[ "CWE-200" ]
wesnoth
b2738ffb2fdd2550ececb74f76f75583c43c8b59
100,160,590,471,059,740,000,000,000,000,000,000,000
21
Use looks_like_pbl() to disallow .pbl file inclusion (bug #23504) This function is implemented using case-insensitive pattern matching, unlike filesystem::ends_with(). I missed this when writing my original fix, so the vulnerability still applied to .pbl files on a case-insensitive filesystem (e.g. NTFS and FAT* on Wi...
rfbPowM64(uint64_t b, uint64_t e, uint64_t m) { uint64_t r; for(r=1;e>0;e>>=1) { if(e&1) r=rfbMulM64(r,b,m); b=rfbMulM64(b,b,m); } return r; }
0
[ "CWE-20" ]
libvncserver
85a778c0e45e87e35ee7199f1f25020648e8b812
168,204,770,848,359,470,000,000,000,000,000,000,000
10
Check for MallocFrameBuffer() return value If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to NULL. Subsequent writes into that buffer could lead to memory corruption, or even arbitrary code execution.
static int clone_finish_inode_update(struct btrfs_trans_handle *trans, struct inode *inode, u64 endoff, const u64 destoff, const u64 olen, int no_time_update) { struct btrfs_root *root = BTRFS_I(inode)->root; int ret; inode_inc_iversion(inode); if (!no_time_update) in...
0
[ "CWE-200" ]
linux
8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9
288,717,717,606,019,770,000,000,000,000,000,000,000
32
Btrfs: fix file corruption and data loss after cloning inline extents Currently the clone ioctl allows to clone an inline extent from one file to another that already has other (non-inlined) extents. This is a problem because btrfs is not designed to deal with files having inline and regular extents, if a file has an ...
TfLiteStatus LessEval(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input1 = GetInput(context, node, kInputTensor1); const TfLiteTensor* input2 = GetInput(context, node, kInputTensor2); TfLiteTensor* output = GetOutput(context, node, kOutputTensor); bool requires_broadcast = !HaveSameShapes(in...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
329,793,860,856,596,420,000,000,000,000,000,000,000
34
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
spell_suggest_intern(suginfo_T *su, int interactive) { // Load the .sug file(s) that are available and not done yet. suggest_load_files(); // 1. Try special cases, such as repeating a word: "the the" -> "the". // // Set a maximum score to limit the combination of operations that is // tried. ...
0
[ "CWE-457" ]
vim
15d9890eee53afc61eb0a03b878a19cb5672f732
62,820,485,948,959,560,000,000,000,000,000,000,000
77
patch 8.2.3582: reading uninitialized memory when giving spell suggestions Problem: Reading uninitialized memory when giving spell suggestions. Solution: Check that preword is not empty.
int ip_cmsg_send(struct sock *sk, struct msghdr *msg, struct ipcm_cookie *ipc, bool allow_ipv6) { int err, val; struct cmsghdr *cmsg; struct net *net = sock_net(sk); for_each_cmsghdr(cmsg, msg) { if (!CMSG_OK(msg, cmsg)) return -EINVAL; #if IS_ENABLED(CONFIG_IPV6) if (allow_ipv6 && cmsg->cmsg_level...
0
[ "CWE-476", "CWE-284" ]
linux
34b2cef20f19c87999fff3da4071e66937db9644
43,497,829,565,703,040,000,000,000,000,000,000,000
82
ipv4: keep skb->dst around in presence of IP options Andrey Konovalov got crashes in __ip_options_echo() when a NULL skb->dst is accessed. ipv4_pktinfo_prepare() should not drop the dst if (evil) IP options are present. We could refine the test to the presence of ts_needtime or srr, but IP options are not often used...
ENTROPY_DEBUG(const char * label, unsigned long entropy) { const char * const EXPAT_ENTROPY_DEBUG = getenv("EXPAT_ENTROPY_DEBUG"); if (EXPAT_ENTROPY_DEBUG && ! strcmp(EXPAT_ENTROPY_DEBUG, "1")) { fprintf(stderr, "Entropy: %s --> 0x%0*lx (%lu bytes)\n", label, (int)sizeof(entropy) * 2, entropy, ...
0
[ "CWE-611" ]
libexpat
c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f
66,175,004,862,964,870,000,000,000,000,000,000,000
10
xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233)
MagickExport MagickBooleanType SetQuantumFormat(const Image *image, QuantumInfo *quantum_info,const QuantumFormatType format) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->fi...
0
[ "CWE-369" ]
ImageMagick
c4e63ad30bc42da691f2b5f82a24516dd6b4dc70
142,137,092,792,084,200,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/105
static void convert_key_from_CPU(struct brcmf_wsec_key *key, struct brcmf_wsec_key_le *key_le) { key_le->index = cpu_to_le32(key->index); key_le->len = cpu_to_le32(key->len); key_le->algo = cpu_to_le32(key->algo); key_le->flags = cpu_to_le32(key->flags); key_le->rxiv.hi = cpu_to_le32(key->rxiv.hi); key_le->r...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
304,688,178,377,717,320,000,000,000,000,000,000,000
13
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
rfbClientConnectionGone(rfbClientPtr cl) { int i; LOCK(rfbClientListMutex); if (cl->prev) cl->prev->next = cl->next; else cl->screen->rfbClientHead = cl->next; if (cl->next) cl->next->prev = cl->prev; if(cl->sock>0) close(cl->sock); #ifdef VINO_HAVE_ZLIB F...
0
[ "CWE-119" ]
vino
456dadbb5c5971d3448763a44c05b9ad033e522f
290,077,150,897,046,730,000,000,000,000,000,000,000
58
Avoid out-of-bounds memory accesses This fixes two critical security vulnerabilities that lead to an out-of-bounds memory access with a crafted client framebuffer update request packet. The dimensions of the update from the packet are checked to ensure that they are within the screen dimensions. Thanks to Kevin Chen ...
char *QuotedString::extractFrom(char *input, char **endPtr) { char firstChar = *input; if (!isQuote(firstChar)) { // must start with a quote return NULL; } char stopChar = firstChar; // closing quote is the same as opening quote char *startPtr = input + 1; // skip the quote char *readPtr = star...
1
[ "CWE-415", "CWE-119" ]
ArduinoJson
5e7b9ec688d79e7b16ec7064e1d37e8481a31e72
307,003,983,279,515,230,000,000,000,000,000,000,000
44
Fix buffer overflow (pull request #81)
static int netlink_getname(struct socket *sock, struct sockaddr *addr, int *addr_len, int peer) { struct sock *sk = sock->sk; struct netlink_sock *nlk = nlk_sk(sk); DECLARE_SOCKADDR(struct sockaddr_nl *, nladdr, addr); nladdr->nl_family = AF_NETLINK; nladdr->nl_pad = 0; *addr_len = sizeof(*nladdr); if (p...
0
[ "CWE-362", "CWE-415" ]
linux
92964c79b357efd980812c4de5c1fd2ec8bb5520
58,596,152,893,792,770,000,000,000,000,000,000,000
20
netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16...
int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle, struct files_struct *fsp, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob) { VFS_FIND(sys_acl_blob_get_fd); return handle->fns->sys_acl_blob_get_fd_fn(handle, fsp, mem_ctx, blob_description, blob)...
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
115,622,984,127,452,140,000,000,000,000,000,000,000
9
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>
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { auth::RolesInfoArgs args; Status status = auth::parseRolesInfoCommand(cmdObj, dbname, &args); uassertStatusOK(status); AuthorizationManager...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
272,638,678,296,493,760,000,000,000,000,000,000,000
48
SERVER-38984 Validate unique User ID on UserCache hit
free_unmarked (struct MHD_PostProcessor *pp) { if ( (NULL != pp->content_name) && (0 == (pp->have & NE_content_name)) ) { free (pp->content_name); pp->content_name = NULL; } if ( (NULL != pp->content_type) && (0 == (pp->have & NE_content_type)) ) { free (pp->content_type); pp->co...
0
[ "CWE-120" ]
libmicrohttpd
a110ae6276660bee3caab30e9ff3f12f85cf3241
20,114,509,723,088,841,000,000,000,000,000,000,000
27
fix buffer overflow and add test
normalize_cookie_domain (const char *domain) { /* Trim any leading dot if present to transform the cookie * domain into a valid hostname. */ if (domain != NULL && domain[0] == '.') return domain + 1; return domain; }
0
[ "CWE-125" ]
libsoup
db2b0d5809d5f8226d47312b40992cadbcde439f
292,527,202,335,107,540,000,000,000,000,000,000,000
9
cookie-jar: bail if hostname is an empty string There are several other ways to fix the problem with this function, but skipping over all of the code is probably the simplest. Fixes #3
*/ PHP_MINFO_FUNCTION(wddx) { php_info_print_table_start(); #if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION) php_info_print_table_header(2, "WDDX Support", "enabled" ); php_info_print_table_row(2, "WDDX Session Serializer", "enabled" ); #else php_info_print_table_row(2, "WDDX Support", "enabled" ); #endif php...
0
[]
php-src
366f9505a4aae98ef2f4ca39a838f628a324b746
268,956,375,282,641,980,000,000,000,000,000,000,000
11
Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization) Conflicts: ext/wddx/wddx.c
synthesize_class_def (PangoOTInfo *info) { GArray *glyph_infos; hb_codepoint_t *glyph_indices; unsigned char *classes; gunichar charcode; FT_UInt glyph; unsigned int i, j; FT_CharMap old_charmap; old_charmap = info->face->charmap; if (!old_charmap || !old_charmap->encoding != ft_encoding_unicode) ...
0
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
40,667,189,878,238,217,000,000,000,000,000,000,000
67
[HB] Remove all references to the old code!
unsigned short gr_face_n_languages(const gr_face* pFace) { assert(pFace); return pFace->theSill().numLanguages(); }
0
[ "CWE-476" ]
graphite
db132b4731a9b4c9534144ba3a18e65b390e9ff6
332,157,630,091,545,250,000,000,000,000,000,000,000
5
Deprecate and make ineffective gr_face_dumbRendering
convert_language_name(text *languagename) { char *langname = text_to_cstring(languagename); return get_language_oid(langname, false); }
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
215,831,005,412,628,350,000,000,000,000,000,000,000
6
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
custom_basename_skip (va_list *va) { (void) va_arg (*va, GFile *); }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
54,768,382,426,854,880,000,000,000,000,000,000,000
4
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
cockpit_auth_empty_cookie_value (const gchar *path, gboolean secure) { gchar *application = cockpit_auth_parse_application (path, NULL); gchar *cookie = application_cookie_name (application); /* this is completely security irrelevant, but security scanners complain * about the lack of Secure (rhbz#1677767) */...
1
[ "CWE-1021" ]
cockpit
46f6839d1af4e662648a85f3e54bba2d57f39f0e
145,710,859,580,599,410,000,000,000,000,000,000,000
16
ws: Restrict our cookie to the login host only Mark our cookie as `SameSite: Strict` [1]. The current `None` default will soon be moved to `Lax` by Firefox and Chromium, and recent versions started to throw a warning about it. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite https://...
TEST_F(QueryPlannerTest, MinBadHint) { addIndex(BSON("b" << 1)); runInvalidQueryHintMinMax(BSONObj(), fromjson("{b: 1}"), fromjson("{a: 1}"), BSONObj()); }
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
190,896,516,882,203,830,000,000,000,000,000,000,000
4
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static RDyldRebaseInfos *get_rebase_infos(RBinFile *bf, RDyldCache *cache) { RDyldRebaseInfos *result = R_NEW0 (RDyldRebaseInfos); if (!result) { return NULL; } if (!cache->hdr->slideInfoOffset || !cache->hdr->slideInfoSize) { ut32 total_slide_infos = 0; ut32 n_slide_infos[MAX_N_HDR]; ut32 i; for (i = 0...
0
[ "CWE-787" ]
radare2
c84b7232626badd075caf3ae29661b609164bac6
323,149,863,825,030,300,000,000,000,000,000,000,000
104
Fix heap buffer overflow in dyldcache parser ##crash * Reported by: Lazymio via huntr.dev * Reproducer: dyldovf
static void *mcryptd_alloc_instance(struct crypto_alg *alg, unsigned int head, unsigned int tail) { char *p; struct crypto_instance *inst; int err; p = kzalloc(head + sizeof(*inst) + tail, GFP_KERNEL); if (!p) return ERR_PTR(-ENOMEM); inst = (void *)(p + head); err = -ENAMETOOLONG; if (snprintf(inst...
0
[ "CWE-476", "CWE-284" ]
linux
48a992727d82cb7db076fa15d372178743b1f4cd
290,433,386,508,496,420,000,000,000,000,000,000,000
32
crypto: mcryptd - Check mcryptd algorithm compatibility Algorithms not compatible with mcryptd could be spawned by mcryptd with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name construct. This causes mcryptd to crash the kernel if an arbitrary "alg" is incompatible and not intended to be used with mcr...
static inline struct dst_entry *xfrm_dst_lookup(struct xfrm_state *x, int tos, int oif, xfrm_address_t *prev_saddr, xfrm_address_t *prev_daddr, int family) { struct net *net = xs_net(x); xfrm_address_t *saddr = &x->props.saddr; xfrm_address_t *daddr = &x->id.daddr; struct dst_entry *dst; i...
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
268,450,368,479,360,830,000,000,000,000,000,000,000
31
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { AuthorizationManager* authzManager = getGlobalAuthorizationManager(); authzManager->invalidateUserCache(); return true; }
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
24,735,935,237,327,966,000,000,000,000,000,000,000
8
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static auto HasProxy(Local<Object> object) -> bool { if (object->IsProxy()) { return true; } else { auto proto = object->GetPrototype(); if (proto->IsNullOrUndefined()) { return false; } else { return HasProxy(proto.As<Object>()); } } }
0
[ "CWE-913" ]
isolated-vm
2646e6c1558bac66285daeab54c7d490ed332b15
251,814,947,870,994,130,000,000,000,000,000,000,000
12
Don't invoke accessors or proxies via Reference functions
LineBufferTask::LineBufferTask (TaskGroup *group, DeepScanLineInputFile::Data *ifd, LineBuffer *lineBuffer, int scanLineMin, int scanLineMax) : Task (group), _ifd (ifd), _lineBuffer (lineBuffer), _scanLineMin (scanLineMin), _scanLineMax (scanLineMax) { // empty }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
336,807,734,230,222,520,000,000,000,000,000,000,000
15
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
inline int Offset(const RuntimeShape& shape, int i0, int i1, int i2, int i3) { TFLITE_DCHECK_EQ(shape.DimensionsCount(), 4); const int* dims_data = reinterpret_cast<const int*>(shape.DimsDataUpTo5D()); TFLITE_DCHECK(i0 >= 0 && i0 < dims_data[0]); TFLITE_DCHECK(i1 >= 0 && i1 < dims_data[1]); TFLITE_DCHECK(i2 >...
0
[ "CWE-125", "CWE-787" ]
tensorflow
8ee24e7949a203d234489f9da2c5bf45a7d5157d
43,978,641,213,846,830,000,000,000,000,000,000,000
9
[tflite] Ensure `MatchingDim` does not allow buffer overflow. We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ...
inline int web_client_api_request_v1_registry(RRDHOST *host, struct web_client *w, char *url) { static uint32_t hash_action = 0, hash_access = 0, hash_hello = 0, hash_delete = 0, hash_search = 0, hash_switch = 0, hash_machine = 0, hash_url = 0, hash_name = 0, hash_delete_url = 0, hash_for = 0, ...
0
[ "CWE-113", "CWE-200", "CWE-94", "CWE-74" ]
netdata
92327c9ec211bd1616315abcb255861b130b97ca
333,485,228,359,098,570,000,000,000,000,000,000,000
171
fixed vulnerabilities identified by red4sec.com (#4521)
array_param_enumerate(iparam_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key, ref_type * type) { int index = penum->intval; ref *bot = ((array_param_list *) plist)->bot; ref *ptr = bot + index; ref *top = ((array_param_list *) plist)->top; for (; ptr < top; p...
0
[]
ghostpdl
bfa6b2ecbe48edc69a7d9d22a12419aed25960b8
79,319,050,370,758,320,000,000,000,000,000,000,000
21
Bug 697548: use the correct param list enumerator When we encountered dictionary in a ref_param_list, we were using the enumerator for the "parent" param_list, rather than the enumerator for the param_list we just created for the dictionary. That parent was usually the stack list enumerator, and caused a segfault. Us...
bool GetDouble(const json &o, double &val) { if (o.IsDouble()) { val = o.GetDouble(); return true; } return false; }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
204,957,506,159,124,400,000,000,000,000,000,000,000
8
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
BGD_DECLARE(int) gdTransformAffineBoundingBox(gdRectPtr src, const double affine[6], gdRectPtr bbox) { gdPointF extent[4], min, max, point; int i; extent[0].x=0.0; extent[0].y=0.0; extent[1].x=(double) src->width; extent[1].y=0.0; extent[2].x=(double) src->width; extent[2].y=(double) src->height; extent[3].x=...
0
[ "CWE-125", "CWE-191" ]
libgd
60bfb401ad5a4a8ae995dcd36372fe15c71e1a35
277,044,981,811,378,340,000,000,000,000,000,000,000
40
Fix potential unsigned underflow No need to decrease `u`, so we don't do it. While we're at it, we also factor out the overflow check of the loop, what improves performance and readability. This issue has been reported by Stefan Esser to security@libgd.org.
QVariantMap PostgreSqlStorage::setupDefaults() const { QVariantMap map; map["Username"] = QVariant(QString("quassel")); map["Hostname"] = QVariant(QString("localhost")); map["Port"] = QVariant(5432); map["Database"] = QVariant(QString("quassel")); return map; }
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
41,108,517,889,995,080,000,000,000,000,000,000,000
9
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
bool is_object3d(const CImgList<tp>& primitives, const CImgList<tc>& colors, const to& opacities, const bool full_check=true, char *const error_message=0) const { if (error_message) *error_message = 0; // Check consiste...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
174,210,837,273,718,560,000,000,000,000,000,000,000
140
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
explicit operator std::basic_string_view<Char>() const FMT_NOEXCEPT { return std::basic_string_view<Char>(data_, size_); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
108,229,696,443,656,100,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
do_writekey (app_t app, ctrl_t ctrl, const char *keyid, unsigned int flags, gpg_error_t (*pincb)(void*, const char *, char **), void *pincb_arg, const unsigned char *keydata, size_t keydatalen) { gpg_error_t err; int force = (flags & 1); int keyno; const unsig...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
64,012,351,864,837,760,000,000,000,000,000,000,000
70
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static __cold void io_rsrc_node_ref_zero(struct percpu_ref *ref) { struct io_rsrc_node *node = container_of(ref, struct io_rsrc_node, refs); struct io_ring_ctx *ctx = node->rsrc_data->ctx; unsigned long flags; bool first_add = false; unsigned long delay = HZ; spin_lock_irqsave(&ctx->rsrc_ref_lock, flags); node...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
326,471,359,714,580,500,000,000,000,000,000,000,000
29
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static int server_verify(SSL *s) { unsigned char *p; if (s->state == SSL2_ST_SEND_SERVER_VERIFY_A) { p = (unsigned char *)s->init_buf->data; *(p++) = SSL2_MT_SERVER_VERIFY; if (s->s2->challenge_length > sizeof s->s2->challenge) { SSLerr(SSL_F_SERVER_VERIFY, ERR_R_INTERNAL_ER...
0
[ "CWE-20" ]
openssl
86f8fb0e344d62454f8daf3e15236b2b59210756
160,114,509,024,936,650,000,000,000,000,000,000,000
20
Fix reachable assert in SSLv2 servers. This assert is reachable for servers that support SSLv2 and export ciphers. Therefore, such servers can be DoSed by sending a specially crafted SSLv2 CLIENT-MASTER-KEY. Also fix s2_srvr.c to error out early if the key lengths are malformed. These lengths are sent unencrypted, so...
static int hidg_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct usb_composite_dev *cdev = f->config->cdev; struct f_hidg *hidg = func_to_hidg(f); struct usb_request *req_in = NULL; unsigned long flags; int i, status = 0; VDBG(cdev, "hidg_set_alt intf:%d alt:%d\n", intf, alt); if ...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
072684e8c58d17e853f8e8b9f6d9ce2e58d2b036
248,033,249,179,123,200,000,000,000,000,000,000,000
98
USB: gadget: f_hid: fix deadlock in f_hidg_write() In f_hidg_write() the write_spinlock is acquired before calling usb_ep_queue() which causes a deadlock when dummy_hcd is being used. This is because dummy_queue() callbacks into f_hidg_req_complete() which tries to acquire the same spinlock. This is (part of) the back...
void set_peername_from_env(address_t *p, const char *env) { struct addrinfo hints = { .ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM, .ai_flags = AI_NUMERICHOST | AI_NUMERICSERV, }; struct addrinfo *result; char *c; int s; char *val = getenv(env); csync_debug(3, "getenv(%s): >>%s<<\n", env, val ?: "")...
0
[ "CWE-703" ]
csync2
416f1de878ef97e27e27508914f7ba8599a0be22
21,550,688,669,947,400,000,000,000,000,000,000,000
36
fail HELLO command when SSL is required
int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node, struct kernfs_root *kf_root) { int len = 0; char *buf = NULL; struct cgroup_root *kf_cgroot = cgroup_root_from_kf(kf_root); struct cgroup *ns_cgroup; buf = kmalloc(PATH_MAX, GFP_KERNEL); if (!buf) return -ENOMEM; spin_lock_irq(&css...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
129,731,635,190,061,660,000,000,000,000,000,000,000
26
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
u32 gf_filter_get_max_extra_input_pids(GF_Filter *filter) { if (filter) return filter->max_extra_pids; return 0; }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
189,061,151,764,658,300,000,000,000,000,000,000,000
5
fixed crashes for very long path - cf #1908
char closing_bracket_for(char opening_bracket) { switch (opening_bracket) { case '(': return ')'; case '[': return ']'; case '{': return '}'; default: return '\0'; } }
0
[ "CWE-674" ]
libsass
f2db04883e5fff4e03777dcc1eb60d4373c45be1
316,493,626,908,357,470,000,000,000,000,000,000,000
8
Make `parse_css_variable_value` non-recursive Fixes #2658 stack overflow
struct section_t *MACH0_(get_sections)(struct MACH0_(obj_t) *bin) { r_return_val_if_fail (bin, NULL); struct section_t *sections; char sectname[64], raw_segname[17]; size_t i, j, to; /* for core files */ if (bin->nsects < 1 && bin->nsegs > 0) { struct MACH0_(segment_command) *seg; if (!(sections = calloc ((b...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
318,376,465,022,977,000,000,000,000,000,000,000,000
65
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...
parser_emit_unary_lvalue_opcode (parser_context_t *context_p, /**< context */ cbc_opcode_t opcode) /**< opcode */ { if (PARSER_IS_PUSH_LITERALS_WITH_THIS (context_p->last_cbc_opcode) && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL) { parser_check_invalid_assign ...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
291,707,890,636,327,440,000,000,000,000,000,000,000
86
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static sds getDotfilePath(char *envoverride, char *dotfilename) { char *path = NULL; sds dotPath = NULL; /* Check the env for a dotfile override. */ path = getenv(envoverride); if (path != NULL && *path != '\0') { if (!strcmp("/dev/null", path)) { return NULL; } ...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
181,689,025,627,478,650,000,000,000,000,000,000,000
22
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
static void sig_print_starting(TEXT_DEST_REC *dest) { GSList *tmp; if (printing_splits) return; for (tmp = servers; tmp != NULL; tmp = tmp->next) { IRC_SERVER_REC *rec = tmp->data; if (IS_IRC_SERVER(rec) && rec->split_servers != NULL) print_splits(rec, NULL); } }
0
[ "CWE-416" ]
irssi
38ba3ca2c40fc8ccccec8dc3f360c4087e7dd498
244,226,466,868,386,680,000,000,000,000,000,000,000
14
Merge pull request #824 from dequis/more-netsplit-revert Revert more of the netsplit print optimisation to fix crashes (cherry picked from commit cfcc021c81eea84bd982a64764f62e163128acf3)
xfrm_init_tempstate(struct xfrm_state *x, const struct flowi *fl, const struct xfrm_tmpl *tmpl, const xfrm_address_t *daddr, const xfrm_address_t *saddr, unsigned short family) { struct xfrm_state_afinfo *afinfo = xfrm_state_afinfo_get_rcu(family); if (!afinfo) return; afinfo->init_tempsel(&x->...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
291,562,276,539,108,860,000,000,000,000,000,000,000
19
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
rl_dump_variables (count, key) int count, key; { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); rl_variable_dumper (rl_explicit_arg); rl_on_new_line (); return (0); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
198,007,944,884,442,380,000,000,000,000,000,000,000
9
bash-4.4-rc2 release
term_pipeline_destination(j_compress_ptr cinfo) { QTC::TC("libtests", "Pl_DCT term_pipeline_destination"); dct_pipeline_dest* dest = reinterpret_cast<dct_pipeline_dest*>(cinfo->dest); dest->next->write(dest->buffer, dest->size - dest->pub.free_in_buffer); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
147,949,179,554,189,760,000,000,000,000,000,000,000
7
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 ...
static Status BuildDenseFeatureReader(const Tensor& values, FeatureReaders* features) { if (values.dtype() == DT_INT64) { features->emplace_back(new DenseFeatureReader<int64>(values)); } else if (values.dtype() == DT_STRING) { features->emplace_back(new Dens...
0
[ "CWE-125", "CWE-369" ]
tensorflow
44b7f486c0143f68b56c34e2d01e146ee445134a
338,820,867,445,986,470,000,000,000,000,000,000,000
13
Fix out of bounds read in `ragged_cross_op.cc`. PiperOrigin-RevId: 369757702 Change-Id: Ie6e5d2c21513a8d56bf41fcf35960caf76e890f9
static_runner() { // Boost uses the current locale to generate a UTF-8 one std::locale utf8_loc = boost::locale::generator().generate(""); // use a custom locale becasue we want to use out log.hpp functions in case of an invalid string. utf8_loc = std::locale(utf8_loc, new customcodecvt()); boost::file...
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
88,564,048,742,028,850,000,000,000,000,000,000,000
7
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
static int multi_getsock(struct Curl_easy *data, curl_socket_t *socks, /* points to numsocks number of sockets */ int numsocks) { /* If the pipe broke, or if there's no connection left for this easy handle, then w...
0
[ "CWE-416" ]
curl
75dc096e01ef1e21b6c57690d99371dedb2c0b80
121,395,772,026,207,340,000,000,000,000,000,000,000
65
curl_multi_cleanup: clear connection pointer for easy handles CVE-2016-5421 Bug: https://curl.haxx.se/docs/adv_20160803C.html Reported-by: Marcelo Echeverria and Fernando Muñoz
void StreamEncoderImpl::endEncode() { if (chunk_encoding_) { connection_.buffer().add(LAST_CHUNK); connection_.buffer().add(CRLF); } connection_.flushOutput(true); connection_.onEncodeComplete(); }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
72,325,814,536,476,370,000,000,000,000,000,000,000
9
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
void sock_pfree(struct sk_buff *skb) { if (sk_is_refcounted(skb->sk)) sock_gen_put(skb->sk); }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
148,813,987,816,136,580,000,000,000,000,000,000,000
5
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association **assoc) { const char *knownAbstractSyntaxes[] = { UID_VerificationSOPClass }; const char *transferSyntaxes[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; int numTransferSyntaxes; O...
0
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
58,953,864,742,492,300,000,000,000,000,000,000,000
222
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
networkstatus_compute_consensus(smartlist_t *votes, int total_authorities, crypto_pk_t *identity_key, crypto_pk_t *signing_key, const char *legacy_id_key_digest, ...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
128,960,987,997,211,830,000,000,000,000,000,000,000
964
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
static void call_nt_transact_notify_change(connection_struct *conn, struct smb_request *req, uint16 **ppsetup, uint32 setup_count, char **ppparams, uint32 parameter_count, char **ppdata, uint32 data_count, uint32 max_data_count, uint32 max_param_count) { ...
0
[ "CWE-189" ]
samba
6ef0e33fe8afa0ebb81652b9d42b42d20efadf04
275,004,001,290,770,500,000,000,000,000,000,000,000
102
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS. Ensure we never wrap whilst adding client provided input. CVE-2013-4124 Signed-off-by: Jeremy Allison <jra@samba.org>
R_API RBinJavaObj *r_bin_java_new(const char *file, ut64 loadaddr, Sdb *kv) { ut8 *buf; RBinJavaObj *bin = R_NEW0 (RBinJavaObj); if (!bin) { return NULL; } bin->file = strdup (file); if (!(buf = (ut8 *) r_file_slurp (file, &bin->size))) { return r_bin_java_free (bin); } if (!r_bin_java_new_bin (bin, loadadd...
0
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
218,547,227,490,786,100,000,000,000,000,000,000,000
17
Fix #10498 - Fix crash in fuzzed java files (#10511)
int md_in_flight(struct mapped_device *md) { return atomic_read(&md->pending[READ]) + atomic_read(&md->pending[WRITE]); }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
161,795,161,310,269,800,000,000,000,000,000,000,000
5
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
static int ql_wait_for_mii_ready(struct ql3_adapter *qdev) { struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; u32 temp; int count = 1000; while (count) { temp = ql_read_page0_reg(qdev, &port_regs->macMIIStatusReg); if (!(temp & MAC_MII_STATUS_BSY)) return 0; udelay(10); coun...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
288,777,588,473,489,000,000,000,000,000,000,000,000
16
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static int __init pktsched_init(void) { register_qdisc(&pfifo_qdisc_ops); register_qdisc(&bfifo_qdisc_ops); proc_net_fops_create(&init_net, "psched", 0, &psched_fops); rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL); rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL); rtnl_register(PF_UNSPE...
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
301,037,648,989,507,800,000,000,000,000,000,000,000
15
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ves_icall_MonoField_SetValueInternal (MonoReflectionField *field, MonoObject *obj, MonoObject *value) { MonoClassField *cf = field->field; gchar *v; MONO_ARCH_SAVE_REGS; if (field->klass->image->assembly->ref_only) mono_raise_exception (mono_get_exception_invalid_operation ( "It is illegal to set the value...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
143,330,207,182,095,980,000,000,000,000,000,000,000
82
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
bit_read_B (Bit_Chain *dat) { unsigned char result; unsigned char byte; if (dat->byte >= dat->size) { loglevel = dat->opts & DWG_OPTS_LOGLEVEL; LOG_ERROR ("%s buffer overflow at %lu", __FUNCTION__, dat->byte) #ifdef DWG_ABORT if (++errors > DWG_ABORT_LIMIT) abort(); #endif ret...
0
[ "CWE-703", "CWE-125" ]
libredwg
95cc9300430d35feb05b06a9badf678419463dbe
138,574,278,503,869,060,000,000,000,000,000,000,000
21
encode: protect from stack under-flow From GH #178 fuzzing
follow_tcp_tap_listener(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const void *data) { follow_record_t *follow_record; follow_info_t *follow_info = (follow_info_t *)tapdata; const tcp_follow_tap_data_t *follow_data = (const tcp_follow_tap_data_t *)data; gboolean is...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
151,098,024,371,342,820,000,000,000,000,000,000,000
91
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
static int ctnetlink_get_conntrack(struct net *net, struct sock *ctnl, struct sk_buff *skb, const struct nlmsghdr *nlh, const struct nlattr * const cda[], struct netlink_ext_ack *extack) { struct nf_conntrack_tuple_hash *h; struct nf_conntrack_tuple tuple; struct nf_conn *ct; struct sk_b...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
47,887,554,003,424,730,000,000,000,000,000,000,000
73
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
static ssize_t set_ignore_ce(struct device *s, struct device_attribute *attr, const char *buf, size_t size) { u64 new; if (kstrtou64(buf, 0, &new) < 0) return -EINVAL; if (mca_cfg.ignore_ce ^ !!new) { if (new) { /* disable ce features */ mce_timer_delete_all(); on_each_cpu(mce_disable_...
1
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
115,321,783,154,327,250,000,000,000,000,000,000,000
23
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
static int req_ssl_var_lookup(lua_State *L) { request_rec *r = ap_lua_check_request_rec(L, 1); const char *s = luaL_checkstring(L, 2); const char *res = ap_lua_ssl_val(r->pool, r->server, r->connection, r, (char *)s); lua_pushstring(L, res); return 1; }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
182,630,685,532,245,500,000,000,000,000,000,000,000
9
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
archive_write_disk_set_acls(struct archive *a, int fd, const char *name, struct archive_acl *abstract_acl, __LA_MODE_T mode) { int ret = ARCHIVE_OK; (void)mode; /* UNUSED */ if ((archive_acl_types(abstract_acl) & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { if ((archive_acl_types(abstract_acl) & ARCHI...
1
[ "CWE-59", "CWE-61" ]
libarchive
fba4f123cc456d2b2538f811bb831483bf336bad
5,215,138,025,683,637,000,000,000,000,000,000,000
33
Fix handling of symbolic link ACLs On Linux ACLs on symbolic links are not supported. We must avoid calling acl_set_file() on symbolic links as their targets are modified instead. While here, do not try to set default ACLs on non-directories. Fixes #1565
SPL_METHOD(SplFileInfo, getRealPath) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char buff[MAXPATHLEN]; char *filename; zend_error_handling error_handling; if (zend_parse_parameters_none() == FAILURE) { return; } zend_replace_error_handling(EH_...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
192,926,533,122,512,960,000,000,000,000,000,000,000
37
Fix bug #72262 - do not overflow int
Item_ref(THD *thd, Name_resolution_context *context_arg, const char *db_arg, const char *table_name_arg, const char *field_name_arg): Item_ident(thd, context_arg, db_arg, table_name_arg, field_name_arg), set_properties_only(0), ref(0), reference_trough_name(1) {}
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
338,116,049,923,313,030,000,000,000,000,000,000,000
5
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
format_cb_window_layout(struct format_tree *ft, struct format_entry *fe) { struct window *w = ft->w; if (w == NULL) return; if (w->saved_layout_root != NULL) fe->value = layout_dump(w->saved_layout_root); else fe->value = layout_dump(w->layout_root); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
122,672,744,401,711,770,000,000,000,000,000,000,000
12
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
void CWebServer::RType_Notifications(WebEmSession & session, const request& req, Json::Value &root) { root["status"] = "OK"; root["title"] = "Notifications"; int ii = 0; //Add known notification systems for (const auto & ittNotifiers : m_notifications.m_notifiers) { root["notifiers"][ii]["na...
0
[ "CWE-89" ]
domoticz
ee70db46f81afa582c96b887b73bcd2a86feda00
226,574,471,154,961,560,000,000,000,000,000,000,000
40
Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!)
cdf_read_short_sector_chain(const cdf_header_t *h, const cdf_sat_t *ssat, const cdf_stream_t *sst, cdf_secid_t sid, size_t len, cdf_stream_t *scn) { size_t ss = CDF_SHORT_SEC_SIZE(h), i, j; scn->sst_len = cdf_count_chain(ssat, sid, CDF_SEC_SIZE(h)); scn->sst_dirlen = len; if (sst->sst_tab == NULL || scn->s...
0
[ "CWE-119" ]
file
1aec04dbf8a24b8a6ba64c4f74efa0628e36db0b
52,133,080,832,702,300,000,000,000,000,000,000,000
40
Fix bounds checks again.
static void tg3_switch_clocks(struct tg3 *tp) { u32 clock_ctrl; u32 orig_clock_ctrl; if (tg3_flag(tp, CPMU_PRESENT) || tg3_flag(tp, 5780_CLASS)) return; clock_ctrl = tr32(TG3PCI_CLOCK_CTRL); orig_clock_ctrl = clock_ctrl; clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE | 0...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
34,557,761,779,857,195,000,000,000,000,000,000,000
32
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
call_ready_callbacks (NautilusDirectory *directory) { gboolean found_any; GList *node, *next; ReadyCallback *callback; found_any = FALSE; /* Check if any callbacks are satisifed and mark them for call them if they are. */ for (node = directory->details->call_when_ready_list; node != N...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
152,192,856,812,512,430,000,000,000,000,000,000,000
29
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
add_pack_dir_to_rtp(char_u *fname) { char_u *p4, *p3, *p2, *p1, *p; char_u *entry; char_u *insp = NULL; int c; char_u *new_rtp; int keep; size_t oldlen; size_t addlen; size_t new_rtp_len; char_u *afterdir = NULL; size_t afterlen = 0; char_u *after_insp =...
0
[ "CWE-122" ]
vim
2bdad6126778f907c0b98002bfebf0e611a3f5db
105,862,650,287,140,460,000,000,000,000,000,000,000
143
patch 8.2.4647: "source" can read past end of copied line Problem: "source" can read past end of copied line. Solution: Add a terminating NUL.
do_newobj (VerifyContext *ctx, int token) { ILStackDesc *value; int i; MonoMethodSignature *sig; MonoMethod *method; gboolean is_delegate = FALSE; if (!(method = verifier_load_method (ctx, token, "newobj"))) return; if (!mono_method_is_constructor (method)) { ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Metho...
0
[ "CWE-20" ]
mono
cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
195,019,816,319,653,400,000,000,000,000,000,000,000
74
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
int main(int argc, char **argv) { char *password = ""; fz_document *doc = NULL; int c; fz_context *ctx; trace_info info = { 0, 0, 0 }; fz_alloc_context alloc_ctx = { &info, trace_malloc, trace_realloc, trace_free }; fz_locks_context *locks = NULL; fz_var(doc); bgprint.active = 0; /* set by -P */ min_band_...
0
[ "CWE-369", "CWE-22" ]
mupdf
22c47acbd52949421f8c7cb46ea1556827d0fcbf
172,023,027,517,535,200,000,000,000,000,000,000,000
334
Bug 704834: Fix division by zero for zero width pages in muraster.
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) { int ret = 0; AVDictionary *tmp = NULL; if (avcodec_is_open(avctx)) return 0; if ((!codec && !avctx->codec)) { av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2()\n...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
110,423,017,138,766,180,000,000,000,000,000,000,000
352
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
int perf_proc_update_handler(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); if (ret || !write) return ret; max_samples_per_tick = DIV_ROUND_UP(sysctl_perf_event_sample_rate, HZ); perf_sample_period_ns =...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
83,074,217,356,222,720,000,000,000,000,000,000,000
15
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
int mg_base64_encode(const unsigned char *p, int n, char *to) { int i, len = 0; for (i = 0; i < n; i++) len = mg_base64_update(p[i], to, len); len = mg_base64_final(to, len); return len; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
330,658,133,853,040,920,000,000,000,000,000,000,000
6
Protect against the directory traversal in mg_upload()