func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
CImg<T> get_unroll(const char axis) const { return (+*this).unroll(axis); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
186,360,518,191,253,100,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.
//! Fill image with a linear sequence of values \newinstance. CImg<T> get_sequence(const T& a0, const T& a1) const { return (+*this).sequence(a0,a1);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
152,838,229,693,186,890,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
back_to_breakpoint(struct readbuffer *obuf) { obuf->flag = obuf->bp.flag; bcopy((void *)&obuf->bp.anchor, (void *)&obuf->anchor, sizeof(obuf->anchor)); obuf->img_alt = obuf->bp.img_alt; obuf->input_alt = obuf->bp.input_alt; obuf->in_bold = obuf->bp.in_bold; obuf->in_italic = obuf->bp.in_itali...
0
[ "CWE-476" ]
w3m
59b91cd8e30c86f23476fa81ae005cabff49ebb6
263,721,934,889,150,040,000,000,000,000,000,000,000
19
Prevent segfault with malformed input type Bug-Debian: https://github.com/tats/w3m/issues/7
move_file_to_extension_queue (NautilusDirectory *directory, NautilusFile *file) { /* Must add before removing to avoid ref underflow */ nautilus_file_queue_enqueue (directory->details->extension_queue, file); nautilus_file_queue_remove (directory->details->low_priority_queue, file); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
131,860,405,389,441,640,000,000,000,000,000,000,000
9
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
_dbus_append_keyring_directory_for_credentials (DBusString *directory, DBusCredentials *credentials) { DBusString homedir; DBusString dotdir; dbus_uid_t uid; _dbus_assert (credentials != NULL); _dbus_assert (!_dbus_credentials_are_anonymous (credentials));...
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
81,775,785,799,783,410,000,000,000,000,000,000,000
65
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...
TEST(WriterTest, WriteInt) { CHECK_WRITE(42); CHECK_WRITE(-42); CHECK_WRITE(static_cast<short>(12)); CHECK_WRITE(34u); CHECK_WRITE(std::numeric_limits<int>::min()); CHECK_WRITE(std::numeric_limits<int>::max()); CHECK_WRITE(std::numeric_limits<unsigned>::max()); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
39,177,382,295,594,184,000,000,000,000,000,000,000
9
Fix segfault on complex pointer formatting (#642)
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); concat_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
105,218,109,040,388,020,000,000,000,000,000,000,000
12
- 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
uint64_t streamDelConsumer(streamCG *cg, sds name) { streamConsumer *consumer = streamLookupConsumer(cg,name,SLC_NOCREAT|SLC_NOREFRESH); if (consumer == NULL) return 0; uint64_t retval = raxSize(consumer->pel); /* Iterate all the consumer pending messages, deleting every corresponding * e...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
131,740,318,295,568,820,000,000,000,000,000,000,000
24
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
FLAC_API uint32_t FLAC__stream_encoder_get_max_lpc_order(const FLAC__StreamEncoder *encoder) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); return encoder->protected_->max_lpc_order; }
0
[ "CWE-787" ]
flac
e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be
298,177,023,764,761,180,000,000,000,000,000,000,000
7
libFlac: Exit at EOS in verify mode When verify mode is enabled, once decoder flags end of stream, encode processing is considered complete. CVE-2021-0561 Signed-off-by: Ralph Giles <giles@thaumas.net>
header_cache_t *imap_hcache_open(struct ImapData *idata, const char *path) { struct ImapMbox mx; struct Url url; char cachepath[PATH_MAX]; char mbox[PATH_MAX]; if (path) imap_cachepath(idata, path, mbox, sizeof(mbox)); else { if (!idata->ctx || imap_parse_path(idata->ctx->path, &mx) < 0) re...
0
[ "CWE-119", "CWE-787" ]
neomutt
e27b65b3bf8defa34db58919496056caf3850cd4
140,265,241,007,824,770,000,000,000,000,000,000,000
30
imap_quote_string make room for quotes
static int selinux_msg_queue_associate(struct msg_queue *msq, int msqflg) { struct ipc_security_struct *isec; struct common_audit_data ad; u32 sid = current_sid(); isec = msq->q_perm.security; COMMON_AUDIT_DATA_INIT(&ad, IPC); ad.u.ipc_id = msq->q_perm.key; return avc_has_perm(sid, isec->sid, SECCLASS_MSGQ, ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
336,803,157,784,463,250,000,000,000,000,000,000,000
14
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int ntop_is_pro(lua_State *vm) { ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); lua_pushboolean(vm, ntop->getPrefs()->is_pro_edition()); return(CONST_LUA_OK); }
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
29,332,556,003,893,465,000,000,000,000,000,000,000
5
Security fix: prevents empty host from being used
int Lex_input_stream::scan_ident_delimited(THD *thd, Lex_ident_cli_st *str, uchar quote_char) { CHARSET_INFO *const cs= thd->charset(); uchar c; DBUG_ASSERT(m_ptr == m_tok_start + 1); for ( ; ; ) { if (!(c= yyGet())) ...
0
[ "CWE-703" ]
server
f439cfdf93691d451a2efe075a90526bd67b8278
310,687,513,776,461,430,000,000,000,000,000,000,000
52
MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP Running some statements that use IN subqueries outside context of a regular query could result in server abnormal termination. The reason for failure is that internal structures SELECT_LEX/SELECT_LEX_UNIT created on behalf of parsed ...
static int packet_do_bind(struct sock *sk, const char *name, int ifindex, __be16 proto) { struct packet_sock *po = pkt_sk(sk); struct net_device *dev_curr; __be16 proto_curr; bool need_rehook; struct net_device *dev = NULL; int ret = 0; bool unlisted = false; lock_sock(sk); spin_lock(&po->bind_lock); rc...
0
[ "CWE-362" ]
linux
15fe076edea787807a7cdc168df832544b58eba6
165,864,981,779,554,050,000,000,000,000,000,000,000
92
net/packet: fix a race in packet_bind() and packet_notifier() syzbot reported crashes [1] and provided a C repro easing bug hunting. When/if packet_do_bind() calls __unregister_prot_hook() and releases po->bind_lock, another thread can run packet_notifier() and process an NETDEV_UP event. This calls register_prot_ho...
http1_body_status(const struct http *hp, struct http_conn *htc, int request) { ssize_t cl; const char *b; CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC); CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); htc->content_length = -1; cl = http_GetContentLength(hp); if (cl == -2) return (BS_ERROR); if (http_GetHdr(hp, H_Transfer_Enc...
0
[ "CWE-617" ]
varnish-cache
406b583fe54634afd029e7a41e35b3cf9ccac28a
171,198,680,829,744,930,000,000,000,000,000,000,000
46
Avoid some code duplication Apply some adjustments to recent patches based off of review by Nils Goroll at UPLEX (@nigoroll)
dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, struct fp_info *p_fp_info, void *data) { gboolean is_control_frame; guint header_length = 0; guint16 header_crc = 0; proto_item * header_crc_pi = NULL; /* Header CRC */ heade...
0
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
298,614,149,247,489,950,000,000,000,000,000,000,000
186
UMTS_FP: fix handling reserved C/T value The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed...
void CLASS initdata() { tiff_flip = flip = filters = UINT_MAX; /* unknown */ raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0; maximum = height = width = top_margin = left_margin = 0; cdesc[0] = desc[0] = artist[0] = make[0] = model[0] = model2[0] = 0; iso_speed = shutter = aperture = foca...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
306,249,315,927,742,300,000,000,000,000,000,000,000
31
parse_qt: possible integer overflow
static void ndpi_search_tls_wrapper(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; #ifdef DEBUG_TLS printf("==>> %s() %u [len: %u][version: %u]\n", __FUNCTION__, flow->guessed_host_protocol_id, packet->payload_pack...
0
[ "CWE-787" ]
nDPI
1ec621c85b9411cc611652fd57a892cfef478af3
218,075,527,463,785,030,000,000,000,000,000,000,000
17
Added further checks
convert_table_name(text *tablename) { RangeVar *relrv; relrv = makeRangeVarFromNameList(textToQualifiedNameList(tablename)); /* We might not even have permissions on this relation; don't lock it. */ return RangeVarGetRelid(relrv, NoLock, false); }
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
248,535,331,144,526,940,000,000,000,000,000,000,000
9
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...
void cma_dev_get(struct cma_device *cma_dev) { refcount_inc(&cma_dev->refcount); }
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
272,810,405,917,620,500,000,000,000,000,000,000,000
4
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
ldns_rdf_free(ldns_rdf *rd) { if (rd) { LDNS_FREE(rd); } }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
72,891,578,703,359,040,000,000,000,000,000,000,000
6
CAA and URI
disp_readev_fn(ev, data) struct event *ev; char *data; { /* We have to intercept mouse sequences in order to translate them * properly, and an incoming sequence could be spread over multiple * I/O reads. When this occurs, we buffer intermediate state in * D_mouse_params, and then use the reservation at the f...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
293,504,268,890,427,200,000,000,000,000,000,000,000
334
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
static inline int fb_show_extra_logos(struct fb_info *info, int y, int rotate) { return y; }
0
[ "CWE-703", "CWE-189" ]
linux
fc9bbca8f650e5f738af8806317c0a041a48ae4a
243,531,163,753,580,460,000,000,000,000,000,000,000
4
vm: convert fb_mmap to vm_iomap_memory() helper This is my example conversion of a few existing mmap users. The fb_mmap() case is a good example because it is a bit more complicated than some: fb_mmap() mmaps one of two different memory areas depending on the page offset of the mmap (but happily there is never any mi...
static bool rootdir_empty(struct super_block *sb, unsigned long block) { int offset = 0, files = 0, de_len; struct iso_directory_record *de; struct buffer_head *bh; bh = sb_bread(sb, block); if (!bh) return true; while (files < 3) { de = (struct iso_directory_record *) (bh->b_data + offset); de_len = *(uns...
0
[ "CWE-20", "CWE-399" ]
linux
410dd3cf4c9b36f27ed4542ee18b1af5e68645a4
195,489,090,795,331,570,000,000,000,000,000,000,000
20
isofs: Fix unbounded recursion when processing relocated directories We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow...
tor_tls_used_v1_handshake(tor_tls_t *tls) { if (tls->isServer) { #ifdef V2_HANDSHAKE_SERVER return ! tls->wasV2Handshake; #endif } else { #ifdef V2_HANDSHAKE_CLIENT return ! tls->wasV2Handshake; #endif } return 1; }
0
[ "CWE-264" ]
tor
638fdedcf16cf7d6f7c586d36f7ef335c1c9714f
152,973,401,435,966,120,000,000,000,000,000,000,000
13
Don't send a certificate chain on outgoing TLS connections from non-relays
static int __net_init ipv4_frags_init_net(struct net *net) { int res; /* Fragment cache limits. * * The fragment memory accounting code, (tries to) account for * the real memory usage, by measuring both the size of frag * queue struct (inet_frag_queue (ipv4:ipq/ipv6:frag_queue)) * and the SKB's truesize. ...
0
[ "CWE-20" ]
linux
5d407b071dc369c26a38398326ee2be53651cfe4
163,956,620,116,974,370,000,000,000,000,000,000,000
38
ip: frags: fix crash in ip_do_fragment() A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union member. so that frag->sk is not NULL. Hence crash occurrs in s...
virtual void updateAlphaIsShape(GfxState * /*state*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
161,758,224,634,513,990,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
parse_file(void) { char lin[MAXBUF]; SERVICE *svc; LISTENER *lstn; int i; #if HAVE_OPENSSL_ENGINE_H ENGINE *e; #endif while(conf_fgets(lin, MAXBUF)) { if(strlen(lin) > 0 && lin[strlen(lin) - 1] == '\n') lin[strlen(lin) - 1] = '\0'; if(!rege...
0
[]
pound
a0c52c542ca9620a96750f9877b26bf4c84aef1b
251,347,071,319,753,520,000,000,000,000,000,000,000
118
SSL Compression Disable patch for 2.6f This patch disables SSL/TLS compression entirely. There is no config option. This prevents CRIME attacks against SSL. Note that HTTP compression is still an option. Test your server at https://www.ssllabs.com/ssldb/ Original patch by Hereward Cooper <coops@fawk.eu> Openssl 0...
int SSL_get_ex_data_X509_STORE_CTX_idx(void) { static volatile int ssl_x509_store_ctx_idx= -1; int got_write_lock = 0; CRYPTO_r_lock(CRYPTO_LOCK_SSL_CTX); if (ssl_x509_store_ctx_idx < 0) { CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX); CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); got_write_lock = 1; if (ssl_x509_stor...
0
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
328,126,760,660,722,030,000,000,000,000,000,000,000
27
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
static inline int bitrev8(int p) { p = ((p & 0x0F) << 4) | ((p >> 4) & 0x0F); p = ((p & 0x33) << 2) | ((p >> 2) & 0x33); p = ((p & 0x55) << 1) | ((p >> 1) & 0x55); return p; }
0
[ "CWE-787" ]
astc-encoder
6ffb3058bfbcc836108c25274e955e399481e2b4
79,319,218,645,392,100,000,000,000,000,000,000,000
7
Provide a fallback for blocks which find no valid encoding
int snd_card_new(struct device *parent, int idx, const char *xid, struct module *module, int extra_size, struct snd_card **card_ret) { struct snd_card *card; int err; if (snd_BUG_ON(!card_ret)) return -EINVAL; *card_ret = NULL; if (extra_size < 0) extra_size = 0; card = kzalloc(sizeof(*card) + e...
1
[ "CWE-362", "CWE-399" ]
linux
07f4d9d74a04aa7c72c5dae0ef97565f28f17b92
143,165,064,004,086,280,000,000,000,000,000,000,000
89
ALSA: control: Protect user controls against concurrent access The user-control put and get handlers as well as the tlv do not protect against concurrent access from multiple threads. Since the state of the control is not updated atomically it is possible that either two write operations or a write and a read operatio...
MagickExport Image *UniqueImageColors(const Image *image, ExceptionInfo *exception) { CacheView *unique_view; CubeInfo *cube_info; Image *unique_image; cube_info=ClassifyImageColors(image,exception); if (cube_info == (CubeInfo *) NULL) return((Image *) NULL); unique_image=CloneImage(ima...
0
[ "CWE-190" ]
ImageMagick
94691f00839dbdf43edb1508af945ab19b388573
117,759,218,803,189,260,000,000,000,000,000,000,000
30
https://github.com/ImageMagick/ImageMagick/issues/1750
static inline void set_extent_info(struct extent_info *ei, unsigned int fofs, u32 blk, unsigned int len) { ei->fofs = fofs; ei->blk = blk; ei->len = len; }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
120,344,949,532,224,400,000,000,000,000,000,000,000
7
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
addMultiArrayContentJSON(CtxJson *ctx, void* array, const UA_DataType *type, size_t *index, UA_UInt32 *arrayDimensions, size_t dimensionIndex, size_t dimensionSize) { /* Check the recursion limit */ if(ctx->depth > UA_JSON_ENCODING_MAX_RECURSION) retur...
1
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
196,718,317,200,661,750,000,000,000,000,000,000,000
29
fix(json): Check max recursion depth in more places
int sigsuspend(sigset_t *set) { current->saved_sigmask = current->blocked; set_current_blocked(set); current->state = TASK_INTERRUPTIBLE; schedule(); set_restore_sigmask(); return -ERESTARTNOHAND; }
0
[ "CWE-399" ]
linux
b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
13,969,298,614,657,223,000,000,000,000,000,000,000
10
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls This fixes a kernel memory contents leak via the tkill and tgkill syscalls for compat processes. This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field when handling signals delivered from tkill. The place of the infoleak: int ...
void sctp_data_ready(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (skwq_has_sleeper(wq)) wake_up_interruptible_sync_poll(&wq->wait, EPOLLIN | EPOLLRDNORM | EPOLLRDBAND); sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); rcu_read_unlock(); }
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
168,325,764,551,864,250,000,000,000,000,000,000,000
12
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
void RGWDeleteLC::execute() { map<string, bufferlist> attrs = s->bucket_attrs; attrs.erase(RGW_ATTR_LC); op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs, &s->bucket_info.objv_tracker); if (op_ret < 0) { ldout(s->cct, 0) << "RGWLC::RGWDeleteLC() failed to set attrs on bucket=" << s->bucket.nam...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
239,812,916,143,487,380,000,000,000,000,000,000,000
40
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static RtreeSearchPoint *rtreeSearchPointFirst(RtreeCursor *pCur){ return pCur->bPoint ? &pCur->sPoint : pCur->nPoint ? pCur->aPoint : 0; }
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
217,983,633,494,961,160,000,000,000,000,000,000,000
3
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
void getsetCommand(client *c) { if (getGenericCommand(c) == C_ERR) return; c->argv[2] = tryObjectEncoding(c->argv[2]); setKey(c,c->db,c->argv[1],c->argv[2]); notifyKeyspaceEvent(NOTIFY_STRING,"set",c->argv[1],c->db->id); server.dirty++; /* Propagate as SET command */ rewriteClientCommandArg...
0
[ "CWE-190" ]
redis
92e3b1802f72ca0c5b0bde97f01d9b57a758d85c
68,134,555,716,241,310,000,000,000,000,000,000,000
10
Fix integer overflow in STRALGO LCS (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. (cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9)
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; boolean_xor_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
189,486,932,597,816,960,000,000,000,000,000,000,000
12
- 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
inline uint8_t* WireFormatLite::WriteDoubleNoTagToArray(double value, uint8_t* target) { return io::CodedOutputStream::WriteLittleEndian64ToArray(EncodeDouble(value), target); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
159,268,442,875,259,690,000,000,000,000,000,000,000
5
Apply patch
int sldns_str2wire_b64_buf(const char* str, uint8_t* rd, size_t* len) { size_t sz = sldns_b64_pton_calculate_size(strlen(str)); int n; if(strcmp(str, "0") == 0) { *len = 0; return LDNS_WIREPARSE_ERR_OK; } if(*len < sz) return LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL; n = sldns_b64_pton(str, rd, *len); if(n < 0)...
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
5,500,988,956,438,803,000,000,000,000,000,000,000
16
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
ms_escher_clientanchor (GString *buf, SheetObjectAnchor const *anchor) { guint8 tmp[26] = { 0, 0, 0x10, 0xf0, 0xde, 0xad, 0xbe, 0xef, 0, 0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 }; guint8 *p = tmp + 10; GSF_LE_SET_GUINT32 (tmp + 4, sizeof (tmp) - 8); GSF_LE_SET_GUINT16 (p + 0, anchor->cell_bound.sta...
0
[ "CWE-119" ]
gnumeric
b5480b69345b3c6d56ee0ed9c9e9880bb2a08cdc
5,554,849,795,356,188,000,000,000,000,000,000,000
23
xls: fuzzed file crash.
long_help(void) { const char *prog; const char *p; prog = lafe_getprogname(); fflush(stderr); p = (strcmp(prog,"bsdcpio") != 0) ? "(bsdcpio)" : ""; printf("%s%s: manipulate archive files\n", prog, p); for (p = long_help_msg; *p != '\0'; p++) { if (*p == '%') { if (p[1] == 'p') { fputs(prog, stdout);...
0
[ "CWE-703", "CWE-22" ]
libarchive
59357157706d47c365b2227739e17daba3607526
320,050,434,358,409,200,000,000,000,000,000,000,000
24
Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option This fixes a directory traversal in the cpio tool.
static uint8_t *append_iaaddr(GDHCPClient *dhcp_client, uint8_t *buf, const char *address) { struct in6_addr addr; if (inet_pton(AF_INET6, address, &addr) != 1) return NULL; buf[0] = 0; buf[1] = G_DHCPV6_IAADDR; buf[2] = 0; buf[3] = 24; memcpy(&buf[4], &addr, 16); memset(&buf[20], 0, 4); /* preferred */ ...
0
[]
connman
a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1
25,121,005,707,764,740,000,000,000,000,000,000,000
17
gdhcp: Avoid leaking stack data via unitiialized variable Fixes: CVE-2021-26676
int http_remove_header2(struct http_msg *msg, struct hdr_idx *idx, struct hdr_ctx *ctx) { int cur_idx = ctx->idx; char *sol = ctx->line; struct hdr_idx_elem *hdr; int delta, skip_comma; if (!cur_idx) return 0; hdr = &idx->v[cur_idx]; if (sol[ctx->del] == ':' && ctx->val + ctx->vlen + ctx->tws == hdr->len) { ...
0
[]
haproxy
aae75e3279c6c9bd136413a72dafdcd4986bb89a
114,750,889,595,496,170,000,000,000,000,000,000,000
42
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
ZEND_API void zend_objects_store_destroy(zend_objects_store *objects) { efree(objects->object_buckets); objects->object_buckets = NULL; }
0
[ "CWE-119", "CWE-787" ]
php-src
6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43
296,231,287,283,865,600,000,000,000,000,000,000,000
5
Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction
onig_regset_search_with_param(OnigRegSet* set, const UChar* str, const UChar* end, const UChar* start, const UChar* range, OnigRegSetLead lead, OnigOptionType option, OnigMatchParam* mps[], int* rmatch_pos) { int r; int i; UChar *s, *prev; regex_t* reg; OnigEncoding...
0
[ "CWE-125" ]
oniguruma
0463e21432515631a9bc925ce5eb95b097c73719
177,124,330,981,101,530,000,000,000,000,000,000,000
180
fix #164: Integer overflow related to reg->dmax in search_in_range()
void set_column_definition(const Column_definition *def) { *this= *def; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
5,179,612,684,292,946,700,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int sockent_init_crypto(sockent_t *se) /* {{{ */ { #if HAVE_LIBGCRYPT /* {{{ */ if (se->type == SOCKENT_TYPE_CLIENT) { if (se->data.client.security_level > SECURITY_LEVEL_NONE) { if (network_init_gcrypt() < 0) { ERROR("network plugin: Cannot configure client socket with " "secur...
0
[ "CWE-835" ]
collectd
f6be4f9b49b949b379326c3d7002476e6ce4f211
147,829,582,161,761,730,000,000,000,000,000,000,000
49
network plugin: Fix endless loop DOS in parse_packet() When correct 'Signature part' is received by Collectd, configured without AuthFile option, condition for endless loop occurs due to missing increase of pointer to next unprocessed part. This is a forward-port of #2233. Fixes: CVE-2017-7401 Closes: #2174 Signed-o...
GF_Err clap_box_write(GF_Box *s, GF_BitStream *bs) { GF_CleanApertureBox *ptr = (GF_CleanApertureBox *)s; GF_Err e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->cleanApertureWidthN); gf_bs_write_u32(bs, ptr->cleanApertureWidthD); gf_bs_write_u32(bs, ptr->cleanApertureHeightN); gf_b...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
133,233,365,649,672,930,000,000,000,000,000,000,000
15
fixed #2255
int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct rpc_cred *cred) { long timeout = 0; int err; do { err = _nfs4_proc_setclientid_confirm(clp, cred); switch (err) { case 0: return err; case -NFS4ERR_RESOURCE: /* The IBM lawyers misread another document! */ case -NFS4ERR_DELAY: ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
100,604,444,458,797,070,000,000,000,000,000,000,000
17
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int cma_modify_qp_rtr(struct rdma_id_private *id_priv, struct rdma_conn_param *conn_param) { struct ib_qp_attr qp_attr; int qp_attr_mask, ret; mutex_lock(&id_priv->qp_mutex); if (!id_priv->id.qp) { ret = 0; goto out; } /* Need to update QP attributes from default values. */ qp_attr.qp_state ...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
752,682,706,650,955,700,000,000,000,000,000,000
36
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
f_empty(typval_T *argvars, typval_T *rettv) { int n = FALSE; switch (argvars[0].v_type) { case VAR_STRING: case VAR_FUNC: n = argvars[0].vval.v_string == NULL || *argvars[0].vval.v_string == NUL; break; case VAR_PARTIAL: n = FALSE; break; case VAR_NUMBER: n = argvars[0]...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
292,878,579,092,945,300,000,000,000,000,000,000,000
59
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
formatfloat(PyObject *v, int flags, int prec, int type) { char *p; PyObject *result; double x; x = PyFloat_AsDouble(v); if (x == -1.0 && PyErr_Occurred()) { PyErr_Format(PyExc_TypeError, "float argument required, " "not %.200s", Py_TYPE(v)->tp_name); return NULL...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
103,056,751,795,717,460,000,000,000,000,000,000,000
25
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
Bool gf_isom_has_sample_dependency(GF_ISOFile *the_file, u32 trackNumber) { GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return GF_FALSE; if (!trak->Media->information->sampleTable->SampleDep) return GF_FALSE; return GF_TRUE; }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
205,335,555,794,028,200,000,000,000,000,000,000,000
7
fixed #1706
is_anychar_infinite_greedy(QuantNode* qn) { if (qn->greedy && IS_REPEAT_INFINITE(qn->upper) && NODE_IS_ANYCHAR(NODE_QUANT_BODY(qn))) return 1; else return 0; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
185,226,119,331,060,500,000,000,000,000,000,000,000
8
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static bool nested_has_guest_tlb_tag(struct kvm_vcpu *vcpu) { struct vmcs12 *vmcs12 = get_vmcs12(vcpu); return nested_cpu_has_ept(vmcs12) || (nested_cpu_has_vpid(vmcs12) && to_vmx(vcpu)->nested.vpid02); }
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
215,713,153,321,631,680,000,000,000,000,000,000,000
7
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
static void auth_request_save_cache(struct auth_request *request, enum passdb_result result) { struct auth_passdb *passdb = request->passdb; const char *encoded_password; string_t *str; struct password_generate_params gen_params = { .user = request->fields.user, .rounds = 0 }; switch (result) { case...
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
35,189,958,359,931,746,000,000,000,000,000,000,000
85
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
void clearReadDisableCallsForTests() { read_disable_calls_ = 0; }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
269,254,892,720,482,280,000,000,000,000,000,000,000
1
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
put_u32(void *vp, u_int32_t v) { u_char *p = (u_char *)vp; p[0] = (u_char)(v >> 24) & 0xff; p[1] = (u_char)(v >> 16) & 0xff; p[2] = (u_char)(v >> 8) & 0xff; p[3] = (u_char)v & 0xff; }
0
[]
openssh-portable
f3cbe43e28fe71427d41cfe3a17125b972710455
83,607,505,449,919,870,000,000,000,000,000,000,000
9
upstream: need initgroups() before setresgid(); reported by anton@, ok deraadt@ OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce
ConnectionHandlerImpl::ActiveTcpConnection::ActiveTcpConnection( ActiveTcpListener& listener, Network::ConnectionPtr&& new_connection, TimeSource& time_source) : listener_(listener), connection_(std::move(new_connection)), conn_length_(new Stats::HistogramCompletableTimespanImpl( listener_.stats...
0
[ "CWE-835" ]
envoy
c8de199e2971f79cbcbc6b5eadc8c566b28705d1
121,715,784,083,331,900,000,000,000,000,000,000,000
19
listener: clean up accept filter before creating connection (#8922) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
static const char *ccid3_rx_state_name(enum ccid3_hc_rx_states state) { static const char *const ccid3_rx_state_names[] = { [TFRC_RSTATE_NO_DATA] = "NO_DATA", [TFRC_RSTATE_DATA] = "DATA", }; return ccid3_rx_state_names[state]; }
0
[ "CWE-200" ]
linux
7b07f8eb75aa3097cdfd4f6eac3da49db787381d
144,261,029,155,328,860,000,000,000,000,000,000,000
9
dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO) The CCID3 code fails to initialize the trailing padding bytes of struct tfrc_tx_info added for alignment on 64 bit architectures. It that for potentially leaks four bytes kernel stack via the getsockopt() syscall. Add an explicit memset(0) before filling th...
size_t Magick::Image::subRange(void) const { return(constOptions()->subRange()); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
145,454,178,465,791,280,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
void CommandHelpers::appendSimpleCommandStatus(BSONObjBuilder& result, bool ok, const std::string& errmsg) { BSONObj tmp = result.asTempObj(); bool have_ok = tmp.hasField("ok"); bool need_errmsg = !ok && !tmp.hasFi...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
248,069,725,271,288,620,000,000,000,000,000,000,000
14
SERVER-38275 ban find explain with UUID
int xen_irq_from_gsi(unsigned gsi) { struct irq_info *info; list_for_each_entry(info, &xen_irq_list_head, list) { if (info->type != IRQT_PIRQ) continue; if (info->u.pirq.gsi == gsi) return info->irq; } return -1; }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
33,866,025,080,374,500,000,000,000,000,000,000,000
14
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
UdfDelete ( IN EFI_FILE_PROTOCOL *This ) { PRIVATE_UDF_FILE_DATA *PrivFileData; if (This == NULL) { return EFI_INVALID_PARAMETER; } PrivFileData = PRIVATE_UDF_FILE_DATA_FROM_THIS (This); (VOID)PrivFileData->FileIo.Close(This); return EFI_WARN_DELETE_FAILURE; }
0
[]
edk2
b9ae1705adfdd43668027a25a2b03c2e81960219
299,583,513,502,526,800,000,000,000,000,000,000,000
16
MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828 The commit refines the boundary checks for file/path name string to prevent possible buffer overrun. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: ...
static void _php_curl_close(zend_resource *rsrc) { php_curl *ch = (php_curl *) rsrc->ptr; _php_curl_close_ex(ch); }
0
[]
php-src
124fb22a13fafa3648e4e15b4f207c7096d8155e
124,070,600,113,971,330,000,000,000,000,000,000,000
5
Fixed bug #68739 #68740 #68741
png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val) { if (value > 0 && value < 65535) { # ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED /* The same (unsigned int)->(double) constraints apply here as above, * however in this case the (unsigned int) to (int) conversion can * overflo...
0
[ "CWE-476" ]
libpng
812768d7a9c973452222d454634496b25ed415eb
187,582,622,456,583,600,000,000,000,000,000,000,000
27
[libpng16] Fixed a potential null pointer dereference in png_set_text_2() (bug report and patch by Patrick Keshishian).
int mp_montgomery_setup(fp_int *a, fp_digit *rho) { return fp_montgomery_setup(a, rho); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
11,831,980,391,674,166,000,000,000,000,000,000,000
4
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 inline int rtnetlink_rcv_skb(struct sk_buff *skb) { int err; struct nlmsghdr * nlh; while (skb->len >= NLMSG_SPACE(0)) { u32 rlen; nlh = (struct nlmsghdr *)skb->data; if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) return 0; rlen = NLMSG_ALIGN(nlh->nlmsg_len); if (rlen > skb->le...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
27,446,553,018,055,786,000,000,000,000,000,000,000
29
[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>
string CLua::setuniqregistry() { char name[100]; snprintf(name, sizeof name, "__cru%u", uniqindex++); lua_pushstring(state(), name); lua_insert(state(), -2); lua_settable(state(), LUA_REGISTRYINDEX); return name; }
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
105,467,964,735,842,110,000,000,000,000,000,000,000
10
Disable lua load(), loadstring() bytcode loading
size_t _q_urldecode(char *str) { if (str == NULL) { return 0; } char *pEncPt, *pBinPt = str; for (pEncPt = str; *pEncPt != '\0'; pEncPt++) { switch (*pEncPt) { case '+': { *pBinPt++ = ' '; break; } case '%': { ...
0
[ "CWE-94" ]
qdecoder
ce7c8a7ac450a823a11b06508ef1eb7441241f81
69,503,130,416,046,065,000,000,000,000,000,000,000
33
security update: add check on improperly encoded input
static void iwl_trans_pcie_sw_reset(struct iwl_trans *trans) { /* Reset entire device - do controller reset (results in SHRD_HW_RST) */ iwl_set_bit(trans, trans->trans_cfg->csr->addr_sw_reset, BIT(trans->trans_cfg->csr->flag_sw_reset)); usleep_range(5000, 6000); }
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
67,999,860,574,016,095,000,000,000,000,000,000,000
7
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
ZEND_API zval* ZEND_FASTCALL zend_hash_index_add_empty_element(HashTable *ht, zend_ulong h) { zval dummy; ZVAL_NULL(&dummy); return zend_hash_index_add(ht, h, &dummy); }
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
338,734,542,148,663,350,000,000,000,000,000,000,000
7
Fix #73832 - leave the table in a safe state if the size is too big.
static bool pgattr_change_is_safe(u64 old, u64 new) { /* * The following mapping attributes may be updated in live * kernel mappings without the need for break-before-make. */ static const pteval_t mask = PTE_PXN | PTE_RDONLY | PTE_WRITE; /* creating or taking down mappings is always safe */ if (old == 0 || ...
0
[]
linux
15122ee2c515a253b0c66a3e618bc7ebe35105eb
116,608,633,402,108,950,000,000,000,000,000,000,000
22
arm64: Enforce BBM for huge IO/VMAP mappings ioremap_page_range doesn't honour break-before-make and attempts to put down huge mappings (using p*d_set_huge) over the top of pre-existing table entries. This leads to us leaking page table memory and also gives rise to TLB conflicts and spurious aborts, which have been s...
int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, unsigned int flags) { int fput_needed, err, datagrams; struct socket *sock; struct mmsghdr __user *entry; struct compat_mmsghdr __user *compat_entry; struct msghdr msg_sys; struct used_address used_address; unsigned int oflags = flag...
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
202,490,431,252,401,320,000,000,000,000,000,000,000
63
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static struct zonelist *policy_zonelist(gfp_t gfp, struct mempolicy *policy, int nd) { if (policy->mode == MPOL_PREFERRED && !(policy->flags & MPOL_F_LOCAL)) nd = policy->v.preferred_node; else { /* * __GFP_THISNODE shouldn't even be used with the bind policy * because we might easily break the expectation...
0
[ "CWE-388" ]
linux
cf01fb9985e8deb25ccf0ea54d916b8871ae0e62
199,863,046,813,603,850,000,000,000,000,000,000,000
16
mm/mempolicy.c: fix error handling in set_mempolicy and mbind. In the case that compat_get_bitmap fails we do not want to copy the bitmap to the user as it will contain uninitialized stack data and leak sensitive data. Signed-off-by: Chris Salls <salls@cs.ucsb.edu> Signed-off-by: Linus Torvalds <torvalds@linux-founda...
void CommandInvocation::checkAuthorization(OperationContext* opCtx, const OpMsgRequest& request) const { // Always send an authorization event to audit log, even if OK. // Not using a scope guard because auditLogAuthEvent could conceivably throw. try { cons...
0
[ "CWE-20" ]
mongo
d315547544d7146b93a8e6e94cc4b88cd0d19c95
27,925,128,766,124,223,000,000,000,000,000,000,000
28
SERVER-38275 ban explain with UUID
static inline int bitmap_position_packfile(const unsigned char *sha1) { off_t offset = find_pack_entry_one(sha1, bitmap_git.pack); if (!offset) return -1; return find_revindex_position(bitmap_git.pack, offset); }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
278,609,496,223,143,260,000,000,000,000,000,000,000
8
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
qf_get_nth_below_entry(qfline_T *entry_arg, int n, int linewise, int *errornr) { qfline_T *entry = entry_arg; while (n-- > 0 && !got_int) { int first_errornr = *errornr; if (linewise) // Treat all the entries on the same line in this file as one entry = qf_find_last_entry_on_line(entry, error...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
236,382,918,638,603,800,000,000,000,000,000,000,000
24
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
DH_Server::~DH_Server() { ysArrayDelete(keyMessage_); ysArrayDelete(signature_); }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
311,715,934,048,929,920,000,000,000,000,000,000,000
5
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static void hwahc_init(struct hwahc *hwahc) { wa_init(&hwahc->wa); }
0
[ "CWE-400", "CWE-703" ]
linux
704620afc70cf47abb9d6a1a57f3825d2bca49cf
272,495,908,907,391,570,000,000,000,000,000,000,000
4
USB: check usb_get_extra_descriptor for proper size When reading an extra descriptor, we need to properly check the minimum and maximum size allowed, to prevent from invalid data being sent by a device. Reported-by: Hui Peng <benquike@gmail.com> Reported-by: Mathias Payer <mathias.payer@nebelwelt.net> Co-developed-by...
TEST_F(QueryPlannerTest, LockstepOrEnumerationDoesPrioritizeLockstepIteration) { params.options = QueryPlannerParams::NO_TABLE_SCAN | QueryPlannerParams::ENUMERATE_OR_CHILDREN_LOCKSTEP; ASSERT_EQ(internalQueryEnumerationMaxOrSolutions.load(), 10); addIndex(BSON("a" << 1 << "b" << 1)); addIndex(B...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
138,190,832,869,173,380,000,000,000,000,000,000,000
43
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void readChunk(DataBuf& buffer, BasicIo& io) { #ifdef DEBUG std::cout << "Exiv2::PngImage::readMetadata: Position: " << io.tell() << std::endl; #endif long bufRead = io.read(buffer.pData_, buffer.size_); if (io.error()) { throw Error(kerFailedToReadImageData); } ...
0
[ "CWE-190" ]
exiv2
8cd95e221889e41e9cc153e2cfb5a7b41c7bc7a4
99,415,355,430,993,630,000,000,000,000,000,000,000
13
Avoid negative integer overflow when `chunkLength == 0`. This fixes #789.
sctp_disposition_t sctp_sf_cookie_wait_prm_shutdown( const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT)); sctp_add_cmd_sf(commands, SCTP_CMD_N...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
104,252,178,458,583,220,000,000,000,000,000,000,000
19
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
MagickExport void GetQuantizeInfo(QuantizeInfo *quantize_info) { (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(quantize_info != (QuantizeInfo *) NULL); (void) memset(quantize_info,0,sizeof(*quantize_info)); quantize_info->number_colors=256; quantize_info->dither_method=RiemersmaDitherMetho...
0
[ "CWE-125" ]
ImageMagick
5294966898532a6bd54699fbf04edf18902513ac
320,694,092,978,636,200,000,000,000,000,000,000,000
11
https://github.com/ImageMagick/ImageMagick/issues/1156
int EC_GROUP_have_precompute_mult(const EC_GROUP *group) { if (group->meth->mul == 0) /* use default */ return ec_wNAF_have_precompute_mult(group); if (group->meth->have_precompute_mult != 0) return group->meth->have_precompute_mult(group); else return 0; /* ca...
0
[]
openssl
21c856b75d81eff61aa63b4f036bb64a85bf6d46
326,686,746,999,050,640,000,000,000,000,000,000,000
12
[crypto/ec] for ECC parameters with NULL or zero cofactor, compute it The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present. This PR allows EC_GROUP_set_generator to ...
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
87,775,366,363,650,820,000,000,000,000,000,000,000
14
- 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
srcip_matches(struct sockaddr *srcaddr, struct sockaddr *rhs) { switch (srcaddr->sa_family) { case AF_UNSPEC: return (rhs->sa_family == AF_UNSPEC); case AF_INET: { struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr; struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs; return (saddr4->sin_addr.s_ad...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
277,743,630,491,776,300,000,000,000,000,000,000,000
20
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
static int __tipc_nl_add_sk_publ(struct sk_buff *skb, struct netlink_callback *cb, struct publication *publ) { void *hdr; struct nlattr *attrs; hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, &tipc_genl_family, NLM_F_MULTI, TIPC_NL_PUBL_GET); if (!hdr) goto msg_cancel; att...
0
[ "CWE-200", "CWE-909" ]
linux
d6d86830705f173fca6087a3e67ceaf68db80523
114,308,734,369,477,360,000,000,000,000,000,000,000
37
net ticp:fix a kernel-infoleak in __tipc_sendmsg() struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently copying it to user space,causing kernel-infoleak. BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in instrument_c...
static bool is_data_section(RBinSection *sect) { if (strstr (sect->name, "_cstring")) { return true; } if (strstr (sect->name, "_objc_methname")) { return true; } if (strstr (sect->name, "_objc_classname")) { return true; } if (strstr (sect->name, "_objc_methtype")) { return true; } return false; }
0
[ "CWE-787" ]
radare2
ca8d8b39f3e34a4fd943270330b80f1148129de4
209,586,210,544,772,850,000,000,000,000,000,000,000
15
Fix oobread in the macho parser ##crash * Reported by @Han0nly via huntr.dev * Reproducers: heapoverflow1 * BountyID: e589bd97-4c74-4e79-93b5-0951a281facc
path_mountpoint(struct nameidata *nd, unsigned flags, struct path *path) { const char *s = path_init(nd, flags); int err; if (IS_ERR(s)) return PTR_ERR(s); while (!(err = link_path_walk(s, nd)) && (err = mountpoint_last(nd)) > 0) { s = trailing_symlink(nd); if (IS_ERR(s)) { err = PTR_ERR(s); break; ...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
318,756,415,227,141,600,000,000,000,000,000,000,000
23
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
StatusOr<ShapeHandle> InferenceContext::MakeShapeFromShapeTensor( const TensorShape& shape) { ShapeHandle out; TF_RETURN_IF_ERROR(MakeShapeFromTensorShape(shape, &out)); return out; }
0
[ "CWE-190" ]
tensorflow
acd56b8bcb72b163c834ae4f18469047b001fadf
333,983,596,231,670,250,000,000,000,000,000,000,000
6
Fix security vulnerability with SpaceToBatchNDOp. PiperOrigin-RevId: 445527615
ptaWriteMem(l_uint8 **pdata, size_t *psize, PTA *pta, l_int32 type) { l_int32 ret; FILE *fp; PROCNAME("ptaWriteMem"); if (pdata) *pdata = NULL; if (psize) *psize = 0; if (!pdata) return ERROR_INT("&data not defined", procName, 1); if (!p...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
235,961,892,838,088,330,000,000,000,000,000,000,000
39
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
iperf_set_test_role(struct iperf_test *ipt, char role) { ipt->role = role; if (role == 'c') ipt->sender = 1; else if (role == 's') ipt->sender = 0; if (ipt->reverse) ipt->sender = ! ipt->sender; check_sender_has_retransmits(ipt); }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
278,765,358,150,113,430,000,000,000,000,000,000,000
11
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode) { struct path path; int error; error = user_path_at(dfd, filename, LOOKUP_FOLLOW, &path); if (!error) { error = chmod_common(&path, mode); path_put(&path); } return error; }
0
[ "CWE-732" ]
linux-stable
e57712ebebbb9db7d8dcef216437b3171ddcf115
75,389,763,328,550,680,000,000,000,000,000,000,000
12
merge fchmod() and fchmodat() guts, kill ancient broken kludge The kludge in question is undocumented and doesn't work for 32bit binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as mode had (since 0.99.14v and contrary to behaviour of any other Unix, prescriptions of POSIX, SuS and our own manpages) was kinda-...
static ssize_t evdev_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { struct evdev_client *client = file->private_data; struct evdev *evdev = client->evdev; struct input_event event; size_t read = 0; int error; if (count != 0 && count < input_event_size()) return -EINVAL; for (...
0
[]
linux
7c4f56070fde2367766fa1fb04852599b5e1ad35
85,807,478,755,255,790,000,000,000,000,000,000,000
50
Input: evdev - fix EVIOCG{type} ioctl The 'max' size passed into the function is measured in number of bits (KEY_MAX, LED_MAX, etc) so we need to convert it accordingly before trying to copy the data out, otherwise we will try copying too much and end up with up with a page fault. Reported-by: Pavel Machek <pavel@ucw...
int my_wc_mb_utf8_with_escape(CHARSET_INFO *cs, my_wc_t escape, my_wc_t wc, uchar *str, uchar *end) { DBUG_ASSERT(escape > 0); if (str + 1 >= end) return MY_CS_TOOSMALL2; // Not enough space, need at least two bytes. *str= (uchar)escape; int cnvres= my_charset_utf8_handler.wc_...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
30,382,229,926,542,724,000,000,000,000,000,000,000
15
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
ppp_print(netdissect_options *ndo, register const u_char *p, u_int length) { u_int proto,ppp_header; u_int olen = length; /* _o_riginal length */ u_int hdr_len = 0; /* * Here, we assume that p points to the Address and Control * field (if they present). */ if (length < 2) goto trunc; ND_...
0
[ "CWE-119" ]
tcpdump
0f95d441e4b5d7512cc5c326c8668a120e048eda
330,624,539,722,487,600,000,000,000,000,000,000,000
67
Do bounds checking when unescaping PPP. Clean up a const issue while we're at it.