func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
SparseTensor(const SparseTensor& other) : SparseTensor(other.ix_, other.vals_, other.shape_, other.order_) {}
0
[ "CWE-703", "CWE-787" ]
tensorflow
8ba6fa29cd8bf9cef9b718dc31c78c73081f5b31
117,261,012,974,741,430,000,000,000,000,000,000,000
2
Fix heap-buffer-overflow issue with `tf.raw_ops.SparseSplit`. PiperOrigin-RevId: 371242872 Change-Id: I482bb3d12602c7c3cc9446f97fb9f584bb98e9a4
int pt_removexattr(FsContext *ctx, const char *path, const char *name) { return local_removexattr_nofollow(ctx, path, name); }
0
[ "CWE-772" ]
qemu
4ffcdef4277a91af15a3c09f7d16af072c29f3f2
312,104,625,189,417,600,000,000,000,000,000,000,000
4
9pfs: xattr: fix memory leak in v9fs_list_xattr Free 'orig_value' in error path. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Greg Kurz <groug@kaod.org>
static int pkey_GOST_ECcp_encrypt(EVP_PKEY_CTX *pctx, unsigned char *out, size_t *out_len, const unsigned char *key, size_t key_len) { GOST_KEY_TRANSPORT *gkt = NULL; EVP_PKEY *pubk = EVP_PKEY_CTX_get0_pkey(pctx); struct gost_pmeth_data *data = EVP_PKEY_...
0
[ "CWE-120", "CWE-787" ]
engine
b2b4d629f100eaee9f5942a106b1ccefe85b8808
201,342,392,091,198,860,000,000,000,000,000,000,000
131
On unpacking key blob output buffer size should be fixed Related: CVE-2022-29242
static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) { struct futex_hash_bucket *hb; struct futex_q *this, *next; struct plist_head *head; union futex_key key = FUTEX_KEY_INIT; u32 uval, vpid = task_pid_vnr(current); int ret; retry: if (get_user(uval, uaddr)) return -EFAULT; /* * We release on...
0
[ "CWE-20" ]
linux
6f7b0a2a5c0fb03be7c25bd1745baa50582348ef
210,195,439,635,959,770,000,000,000,000,000,000,000
85
futex: Forbid uaddr == uaddr2 in futex_wait_requeue_pi() If uaddr == uaddr2, then we have broken the rule of only requeueing from a non-pi futex to a pi futex with this call. If we attempt this, as the trinity test suite manages to do, we miss early wakeups as q.key is equal to key2 (because they are the same uaddr). ...
const char *dccp_state_name(const int state) { static char *dccp_state_names[] = { [DCCP_OPEN] = "OPEN", [DCCP_REQUESTING] = "REQUESTING", [DCCP_PARTOPEN] = "PARTOPEN", [DCCP_LISTEN] = "LISTEN", [DCCP_RESPOND] = "RESPOND", [DCCP_CLOSING] = "CLOSING", [DCCP_ACTIVE_CLOSEREQ] = "CLOSEREQ", [DCCP_PASSIVE_CLOS...
0
[ "CWE-189" ]
linux-2.6
3e8a0a559c66ee9e7468195691a56fefc3589740
20,356,461,362,658,592,000,000,000,000,000,000,000
21
dccp: change L/R must have at least one byte in the dccpsf_val field Thanks to Eugene Teo for reporting this problem. Signed-off-by: Eugene Teo <eugenete@kernel.sg> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <da...
void lftp_ssl_openssl::global_init() { if(!instance) instance=new lftp_ssl_openssl_instance(); }
0
[ "CWE-310" ]
lftp
6357bed2583171b7515af6bb6585cf56d2117e3f
184,613,244,615,027,980,000,000,000,000,000,000,000
5
use hostmatch function from latest curl (addresses CVE-2014-0139)
static double mp_mul2(_cimg_math_parser& mp) { return _mp_arg(2)*_mp_arg(3)*_mp_arg(4); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
325,774,610,358,086,400,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.
void set_use_include_prefix(bool use_include_prefix) { use_include_prefix_ = use_include_prefix; }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
9,951,230,780,966,579,000,000,000,000,000,000,000
1
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
u32 ReadVirtIODeviceRegister(ULONG_PTR ulRegister) { ULONG ulValue; NdisRawReadPortUlong(ulRegister, &ulValue); DPrintf(6, ("[%s]R[%x]=%x\n", __FUNCTION__, (ULONG)ulRegister, ulValue) ); return ulValue; }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
86,971,005,347,490,340,000,000,000,000,000,000,000
9
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
void remove_migration_ptes(struct page *old, struct page *new, bool locked) { struct rmap_walk_control rwc = { .rmap_one = remove_migration_pte, .arg = old, }; if (locked) rmap_walk_locked(new, &rwc); else rmap_walk(new, &rwc); }
0
[ "CWE-200" ]
linux
197e7e521384a23b9e585178f3f11c9fa08274b9
93,979,334,917,264,040,000,000,000,000,000,000,000
12
Sanitize 'move_pages()' permission checks The 'move_paghes()' system call was introduced long long ago with the same permission checks as for sending a signal (except using CAP_SYS_NICE instead of CAP_SYS_KILL for the overriding capability). That turns out to not be a great choice - while the system call really only ...
static int proc_fd_info(struct inode *inode, struct path *path, char *info) { struct task_struct *task = get_proc_task(inode); struct files_struct *files = NULL; struct file *file; int fd = proc_fd(inode); if (task) { files = get_files_struct(task); put_task_struct(task); } if (files) { /* * We are not...
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
72,096,353,134,340,140,000,000,000,000,000,000,000
38
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
static void php_session_initialize(TSRMLS_D) /* {{{ */ { char *val = NULL; int vallen; if (!PS(mod)) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "No storage module chosen - failed to initialize session"); return; } /* Open session handler first */ if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session...
0
[ "CWE-416" ]
php-src
3798eb6fd5dddb211b01d41495072fd9858d4e32
71,314,405,908,000,460,000,000,000,000,000,000,000
60
Fix bug #72562 - destroy var_hash properly
pfm_get_new_msg(pfm_context_t *ctx) { int idx, next; next = (ctx->ctx_msgq_tail+1) % PFM_MAX_MSGS; DPRINT(("ctx_fd=%p head=%d tail=%d\n", ctx, ctx->ctx_msgq_head, ctx->ctx_msgq_tail)); if (next == ctx->ctx_msgq_head) return NULL; idx = ctx->ctx_msgq_tail; ctx->ctx_msgq_tail = next; DPRINT(("ctx=%p head=%d ...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
223,229,911,998,735,500,000,000,000,000,000,000,000
16
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
cmd_string_uppercase (const char *com _GL_UNUSED, const char *val, void *place) { char *q, **pstring; pstring = (char **)place; xfree_null (*pstring); *pstring = xmalloc (strlen (val) + 1); for (q = *pstring; *val; val++, q++) *q = c_toupper (*val); *q = '\0'; return true; }
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
268,640,066,310,619,400,000,000,000,000,000,000,000
14
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
TEST_F(RouterTest, HashPolicy) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()) .WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_)); EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _, _)) .WillOnce(Return(absl::optional<uint64_t>(10))); EXPECT_CAL...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
206,613,416,258,848,020,000,000,000,000,000,000,000
27
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static void NORETURN die_verify_filename(struct repository *r, const char *prefix, const char *arg, int diagnose_misspelt_rev) { if (!diagnose_misspelt_rev) die(_("%s: no such path in the working tree.\n" "Use 'git <command> -- <path>...' to specify paths that do not exist locally."), ...
0
[ "CWE-22" ]
git
3b0bf2704980b1ed6018622bdf5377ec22289688
255,241,743,540,477,870,000,000,000,000,000,000,000
24
setup: tighten ownership checks post CVE-2022-24765 8959555cee7 (setup_git_directory(): add an owner check for the top-level directory, 2022-03-02), adds a function to check for ownership of repositories using a directory that is representative of it, and ways to add exempt a specific repository from said check if nee...
local int dynamic(struct state *s) { int nlen, ndist, ncode; /* number of lengths in descriptor */ int index; /* index of lengths[] */ int err; /* construct() return value */ short lengths[MAXCODES]; /* descriptor code lengths */...
0
[ "CWE-20" ]
libtorrent
debf3c6e3688aab8394fe5c47737625faffe6f9e
161,156,550,114,186,080,000,000,000,000,000,000,000
83
update puff.c for gzip inflation (#1022) update puff.c for gzip inflation
soa_query(isc_task_t *task, isc_event_t *event) { const char me[] = "soa_query"; isc_result_t result = ISC_R_FAILURE; dns_message_t *message = NULL; dns_zone_t *zone = event->ev_arg; dns_zone_t *dummy = NULL; isc_netaddr_t masterip; dns_tsigkey_t *key = NULL; uint32_t options; bool cancel = true; int timeout;...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
9,295,339,801,759,165,000,000,000,000,000,000,000
197
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
mono_gc_finalize_threadpool_threads (void) { while (threads_to_finalize) { MonoInternalThread *thread = (MonoInternalThread*) mono_mlist_get_data (threads_to_finalize); /* Force finalization of the thread. */ thread->threadpool_thread = FALSE; mono_object_register_finalizer ((MonoObject*)thread); mono_gc_r...
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
189,391,468,918,175,400,000,000,000,000,000,000,000
14
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
static void update_maria_group_commit(MYSQL_THD thd, struct st_mysql_sys_var *var, void *var_ptr, const void *save) { ulong value= (ulong)*((long *)var_ptr); DBUG_ENTER("update_maria_group_commit"); DBUG_PRINT("enter", ("old value: %lu n...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
240,912,634,628,973,100,000,000,000,000,000,000,000
44
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
explicit HStackCheckEliminator(HGraph* graph) : graph_(graph) { }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
178,596,482,921,386,330,000,000,000,000,000,000,000
1
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
void usb_root_hub_lost_power(struct usb_device *rhdev) { dev_warn(&rhdev->dev, "root hub lost power or was reset\n"); rhdev->reset_resume = 1; }
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
167,273,139,279,290,490,000,000,000,000,000,000,000
5
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
postscript_type_find (GstTypeFind * tf, gpointer unused) { const guint8 *data = gst_type_find_peek (tf, 0, 3); if (!data) return; if (data[0] == 0x04) data++; if (data[0] == '%' && data[1] == '!') gst_type_find_suggest (tf, GST_TYPE_FIND_POSSIBLE, POSTSCRIPT_CAPS); }
0
[ "CWE-125" ]
gst-plugins-base
2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095
338,878,999,471,479,200,000,000,000,000,000,000,000
12
typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
int main(int argc, char *argv[]) { int fd, n, pid, request, ret; char *me, *newname; struct user_nic_args args; int container_veth_ifidx = -1, host_veth_ifidx = -1, netns_fd = -1; char *cnic = NULL, *nicname = NULL; struct alloted_s *alloted = NULL; if (argc < 7 || argc > 8) { usage(argv[0], true); exit(EXI...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
114,126,230,493,276,960,000,000,000,000,000,000,000
211
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
add_nr_var( dict_T *dp, dictitem_T *v, char *name, varnumber_T nr) { STRCPY(v->di_key, name); v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX; hash_add(&dp->dv_hashtab, DI2HIKEY(v)); v->di_tv.v_type = VAR_NUMBER; v->di_tv.v_lock = VAR_FIXED; v->di_tv.vval.v_number = nr; }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
311,603,321,740,097,560,000,000,000,000,000,000,000
13
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
circuit_clear_cell_queue(circuit_t *circ, channel_t *chan) { cell_queue_t *queue; cell_direction_t direction; if (circ->n_chan == chan) { queue = &circ->n_chan_cells; direction = CELL_DIRECTION_OUT; } else { or_circuit_t *orcirc = TO_OR_CIRCUIT(circ); tor_assert(orcirc->p_chan == chan); que...
0
[ "CWE-200", "CWE-617" ]
tor
56a7c5bc15e0447203a491c1ee37de9939ad1dcd
87,435,454,552,141,980,000,000,000,000,000,000,000
22
TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell On an hidden service rendezvous circuit, a BEGIN_DIR could be sent (maliciously) which would trigger a tor_assert() because connection_edge_process_relay_cell() thought that the circuit is an or_circuit_t but is an origin circuit in reality. ...
spa_smb_encrypt (uschar * passwd, uschar * c8, uschar * p24) { uschar p14[15], p21[21]; memset (p21, '\0', 21); memset (p14, '\0', 14); StrnCpy (CS p14, CS passwd, 14); strupper (CS p14); E_P16 (p14, p21); SMBOWFencrypt (p21, c8, p24); #ifdef DEBUG_PASSWORD DEBUG_X (100, ("spa_smb_encrypt: lm#, challenge, respon...
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
16,900,865,695,967,045,000,000,000,000,000,000,000
20
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
static atomic_t *load_sipi_vector(struct mp_params *mp_params) { struct rmodule sipi_mod; int module_size; int num_msrs; struct sipi_params *sp; char *mod_loc = (void *)sipi_vector_location; const int loc_size = sipi_vector_location_size; atomic_t *ap_count = NULL; if (rmodule_parse(&_binary_sipi_vector_start,...
0
[ "CWE-269" ]
coreboot
afb7a814783cda12f5b72167163b9109ee1d15a7
126,422,787,997,549,290,000,000,000,000,000,000,000
73
cpu/x86/smm: Introduce SMM module loader version 2 Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores). Current coreboot SMM is unable to handle more than ~32 CPU threads. This patch introduces a version 2 of the SMM module loader which addresses this problem. Having two versions of the SMM module lo...
static void emac_set_link(NetClientState *nc) { MSF2EmacState *s = qemu_get_nic_opaque(nc); msf2_phy_update_link(s); }
0
[ "CWE-835" ]
qemu
26194a58f4eb83c5bdf4061a1628508084450ba1
134,704,307,068,120,000,000,000,000,000,000,000,000
6
msf2-mac: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.c...
Finder::check() { QPDFTokenizer tokenizer; QPDFTokenizer::Token t = tokenizer.readToken(is, "finder", true); qpdf_offset_t offset = this->is->tell(); bool result = (t == QPDFTokenizer::Token(QPDFTokenizer::tt_word, str)); this->is->seek(offset - QIntC::to_offset(this->str.length()), SEEK_SET); r...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
185,101,857,502,726,330,000,000,000,000,000,000,000
9
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 ...
iasecc_init(struct sc_card *card) { struct sc_context *ctx = card->ctx; struct iasecc_private_data *private_data = NULL; int rv = SC_ERROR_NO_CARD_SUPPORT; void *old_drv_data = card->drv_data; LOG_FUNC_CALLED(ctx); private_data = (struct iasecc_private_data *) calloc(1, sizeof(struct iasecc_private_data)); if (...
0
[]
OpenSC
ae1cf0be90396fb6c0be95829bf0d3eecbd2fd1c
307,632,849,181,908,230,000,000,000,000,000,000,000
66
iasecc: Prevent stack buffer overflow when empty ACL is returned Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30800
SQLRETURN SQLSetDescFieldA( SQLHDESC descriptor_handle, SQLSMALLINT rec_number, SQLSMALLINT field_identifier, SQLPOINTER value, SQLINTEGER buffer_length ) { return SQLSetDescField( descriptor_handle, rec_number, field_identifier, value,...
0
[ "CWE-119", "CWE-369" ]
unixODBC
45ef78e037f578b15fc58938a3a3251655e71d6f
212,895,200,218,110,850,000,000,000,000,000,000,000
12
New Pre Source
static int usb_device_init(USBDevice *dev) { USBDeviceClass *klass = USB_DEVICE_GET_CLASS(dev); if (klass->init) { return klass->init(dev); } return 0; }
0
[ "CWE-119" ]
qemu
9f8e9895c504149d7048e9fc5eb5cbb34b16e49a
63,305,129,940,488,010,000,000,000,000,000,000,000
8
usb: sanity check setup_index+setup_len in post_load CVE-2013-4541 s->setup_len and s->setup_index are fed into usb_packet_copy as size/offset into s->data_buf, it's possible for invalid state to exploit this to load arbitrary data. setup_len and setup_index should be checked to make sure they are not negative. Cc:...
DECLARESepPutFunc(putRGBUAseparate8bittile) { (void) img; (void) y; for( ; h > 0; --h) { uint32 rv, gv, bv, av; uint8* m; for (x = w; x > 0; --x) { av = *a++; m = img->UaToAa+((size_t) av<<8); rv = m[*r++]; gv = m[*g++]; bv = m[*b++]; *cp++ = PACK4(rv,gv,bv,av); } SKEW4(r, g, b, a, fromske...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
306,314,354,817,121,920,000,000,000,000,000,000,000
18
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
static int jas_image_growcmpts(jas_image_t *image, int maxcmpts) { jas_image_cmpt_t **newcmpts; int cmptno; newcmpts = (!image->cmpts_) ? jas_alloc2(maxcmpts, sizeof(jas_image_cmpt_t *)) : jas_realloc2(image->cmpts_, maxcmpts, sizeof(jas_image_cmpt_t *)); if (!newcmpts) { return -1; } image->cmpts_ = new...
0
[ "CWE-415" ]
jasper
b35a05635e56f554870ce85f64293a3868793f69
204,067,326,712,806,500,000,000,000,000,000,000,000
18
Fixed potential integer overflow problem.
static dma_addr_t __swiotlb_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, struct dma_attrs *attrs) { dma_addr_t dev_addr; dev_addr = swiotlb_map_page(dev, page, offset, size, dir, attrs); if (!is_device_dma_coherent(dev)) ...
0
[ "CWE-200" ]
linux
6829e274a623187c24f7cfc0e3d35f25d087fcc5
75,805,673,921,187,380,000,000,000,000,000,000,000
13
arm64: dma-mapping: always clear allocated buffers Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha, ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures. It turned out that some drivers rely on this 'feature'. Allocated buffer might be also exposed to userspace with dma_mmap() c...
virtual ~LossyDctEncoder () {}
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
184,300,428,458,197,220,000,000,000,000,000,000,000
1
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static double mp_Ioff(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const unsigned int boundary_conditions = (unsigned int)_mp_arg(3), vsiz = (unsigned int)mp.opcode[4]; const CImg<T> &img = mp.imgin; const longT off = (longT)_mp_arg(2), ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
30,549,458,555,309,776,000,000,000,000,000,000,000
37
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bool Binary::is_valid_addr(uint64_t address) const { range_t r = va_ranges(); return r.start <= address && address < r.end; }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
130,348,599,615,717,970,000,000,000,000,000,000,000
4
Resolve #764
static void fill_device_from_item(struct extent_buffer *leaf, struct btrfs_dev_item *dev_item, struct btrfs_device *device) { unsigned long ptr; device->devid = btrfs_device_id(leaf, dev_item); device->disk_total_bytes = btrfs_device_total_bytes(leaf, dev_item); device->total_bytes = device->disk_total_b...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
101,631,388,302,807,520,000,000,000,000,000,000,000
22
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
static int check_stack_read_fixed_off(struct bpf_verifier_env *env, /* func where src register points to */ struct bpf_func_state *reg_state, int off, int size, int dst_regno) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curfr...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
242,610,995,896,701,460,000,000,000,000,000,000,000
74
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
static void pit_register_types(void) { type_register_static(&pit_info); }
0
[ "CWE-119" ]
qemu
d4862a87e31a51de9eb260f25c9e99a75efe3235
166,786,715,454,769,030,000,000,000,000,000,000,000
4
i8254: fix out-of-bounds memory access in pit_ioport_read() Due converting PIO to the new memory read/write api we no longer provide separate I/O region lenghts for read and write operations. As a result, reading from PIT Mode/Command register will end with accessing pit->channels with invalid index. Fix this by igno...
void damage_state(struct swaylock_state *state) { struct swaylock_surface *surface; wl_list_for_each(surface, &state->surfaces, link) { damage_surface(surface); } }
0
[ "CWE-703" ]
swaylock
1d1c75b6316d21933069a9d201f966d84099f6ca
158,300,166,865,283,140,000,000,000,000,000,000,000
6
Add support for ext-session-lock-v1 This is a new protocol to lock the session [1]. It should be more reliable than layer-shell + input-inhibitor. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
get_parameter_uint( struct para_data_s *para, enum para_name key ) { return get_parameter_u32( para, key ); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
9,078,443,641,321,627,000,000,000,000,000,000,000
4
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 ...
gst_h264_write_sei_mastering_display_colour_volume (NalWriter * nw, GstH264MasteringDisplayColourVolume * mdcv) { gint i; for (i = 0; i < 3; i++) { WRITE_UINT16 (nw, mdcv->display_primaries_x[i], 16); WRITE_UINT16 (nw, mdcv->display_primaries_y[i], 16); } WRITE_UINT16 (nw, mdcv->white_point_x, 16)...
0
[ "CWE-787" ]
gst-plugins-bad
11353b3f6e2f047cc37483d21e6a37ae558896bc
82,709,709,249,089,270,000,000,000,000,000,000,000
20
codecparsers: h264parser: guard against ref_pic_markings overflow Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703>
static double mp_isdir(_cimg_math_parser& mp) { const unsigned int siz = (unsigned int)mp.opcode[3]; const double *ptrs = &_mp_arg(2) + (siz?1:0); if (!siz) { char str[2] = { 0 }; *str = *ptrs; return (double)cimg::is_directory(str); } CImg<charT> ss(siz + 1); cimg_forX(ss,...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
164,373,137,889,177,900,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void pid_ns_release_proc(struct pid_namespace *ns) { kern_unmount(ns->proc_mnt); }
0
[]
linux
97412950b10e64f347aec4a9b759395c2465adf6
302,861,069,895,870,700,000,000,000,000,000,000,000
4
procfs: parse mount options Add support for procfs mount options. Actual mount options are coming in the next patches. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: "H. Peter Anvin" <hpa...
fst_op_raise(struct fst_port_info *port, unsigned int outputs) { outputs |= FST_RDL(port->card, v24OpSts[port->index]); FST_WRL(port->card, v24OpSts[port->index], outputs); if (port->run) fst_issue_cmd(port, SETV24O); }
0
[ "CWE-399" ]
linux
96b340406724d87e4621284ebac5e059d67b2194
197,325,939,431,951,900,000,000,000,000,000,000,000
8
farsync: fix info leak in ioctl The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. ...
static int tcp_v6_rcv(struct sk_buff *skb) { struct tcphdr *th; const struct ipv6hdr *hdr; struct sock *sk; int ret; struct net *net = dev_net(skb->dev); if (skb->pkt_type != PACKET_HOST) goto discard_it; /* * Count it even if it's bad. */ TCP_INC_STATS_BH(net, TCP_MIB_INSEGS); if (!pskb_may_pull(skb,...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
218,624,603,324,953,040,000,000,000,000,000,000,000
147
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
history_tree_add_child(OnigCaptureTreeNode* parent, OnigCaptureTreeNode* child) { #define HISTORY_TREE_INIT_ALLOC_SIZE 8 if (parent->num_childs >= parent->allocated) { int n, i; if (IS_NULL(parent->childs)) { n = HISTORY_TREE_INIT_ALLOC_SIZE; parent->childs = (OnigCaptureTreeNode** )xma...
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
298,384,489,192,515,440,000,000,000,000,000,000,000
29
fix heap-buffer-overflow
int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq) { struct list_head *fn = &dreq->dreq_featneg; struct dccp_feat_entry *entry; u8 is_local, ccid; for (is_local = 0; is_local <= 1; is_local++) { entry = dccp_feat_list_lookup(fn, DCCPF_CCID, is_local); if (entry != NULL && !entry->empty_con...
0
[ "CWE-401" ]
linux
1d3ff0950e2b40dc861b1739029649d03f591820
252,346,549,332,920,200,000,000,000,000,000,000,000
19
dccp: Fix memleak in __feat_register_sp If dccp_feat_push_change fails, we forget free the mem which is alloced by kmemdup in dccp_feat_clone_sp_val. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values") Reviewed-by: Mukesh Ojha <mojha@codeaurora.o...
STATIC void S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, scan_data_t *data, SSize_t *minlenp, int is_inf) { const STRLEN l = CHR_SVLEN(data->last_found); SV * const longest_sv = data->substrs[data->cur_is_floating].str; const STRLEN old_l = CHR_SVLEN(longest_sv); GET_RE_DEBUG...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
143,950,916,226,904,800,000,000,000,000,000,000,000
49
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
static int i40e_vsi_configure_tx(struct i40e_vsi *vsi) { int err = 0; u16 i; for (i = 0; (i < vsi->num_queue_pairs) && !err; i++) err = i40e_configure_tx_ring(vsi->tx_rings[i]); if (err || !i40e_enabled_xdp_vsi(vsi)) return err; for (i = 0; (i < vsi->num_queue_pairs) && !err; i++) err = i40e_configure_tx_...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
95,521,834,600,105,830,000,000,000,000,000,000,000
16
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { struct vcpu_svm *svm = to_svm(vcpu); int i; if (unlikely(cpu != vcpu->cpu)) { svm->asid_generation = 0; mark_all_dirty(svm->vmcb); } #ifdef CONFIG_X86_64 rdmsrl(MSR_GS_BASE, to_svm(vcpu)->host.gs_base); #endif savesegment(fs, svm->host.fs); savese...
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
260,699,778,152,496,400,000,000,000,000,000,000,000
26
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
utf32le_is_mbc_newline(const UChar* p, const UChar* end) { if (p + 3 < end) { if (*p == 0x0a && *(p+1) == 0 && *(p+2) == 0 && *(p+3) == 0) return 1; #ifdef USE_UNICODE_ALL_LINE_TERMINATORS if (( #ifndef USE_CRNL_AS_LINE_TERMINATOR *p == 0x0d || #endif *p == 0x85) && *(p+1) == 0x00 && (p+2) == 0x00 ...
0
[ "CWE-125" ]
php-src
9d6c59eeea88a3e9d7039cb4fed5126ef704593a
294,483,205,885,191,950,000,000,000,000,000,000,000
20
Fix bug #77418 - Heap overflow in utf32be_mbc_to_code
static char* http_decode(char *str) { char *pstr = str, *buf = (char*)malloc(strlen(str) + 1), *pbuf = buf; while (*pstr) { if(*pstr == '%') { if(pstr[1] && pstr[2]) { *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); pstr += 2; } } else if(*pstr == '+') { *pbuf++ = ' '...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
56,668,904,019,803,490,000,000,000,000,000,000,000
18
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
static void encode_bind_conn_to_session(struct xdr_stream *xdr, const struct nfs41_bind_conn_to_session_args *args, struct compound_hdr *hdr) { __be32 *p; encode_op_hdr(xdr, OP_BIND_CONN_TO_SESSION, decode_bind_conn_to_session_maxsz, hdr); encode_opaque_fixed(xdr, args->sessionid.data, NFS4_MAX_SESS...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
49,597,477,124,874,700,000,000,000,000,000,000,000
13
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
Envoy::Runtime::Loader& PerListenerFactoryContextImpl::runtime() { return listener_factory_context_base_->runtime(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
320,026,997,193,856,530,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
ModuleExport void UnregisterCAPTIONImage(void) { (void) UnregisterMagickInfo("CAPTION"); }
0
[ "CWE-835" ]
ImageMagick
7d8e14899c562157c7760a77fc91625a27cb596f
227,277,553,654,219,000,000,000,000,000,000,000,000
4
https://github.com/ImageMagick/ImageMagick/issues/771
void restore_to_before_no_rows_in_result() { (*ref)->restore_to_before_no_rows_in_result(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
304,664,313,616,823,330,000,000,000,000,000,000,000
4
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....
Bool gf_eac3_parser_bs(GF_BitStream *bs, GF_AC3Header *hdr, Bool full_parse) { u32 fscod, bsid, ac3_mod, freq, framesize, syncword, substreamid, lfon, channels, numblkscod; u64 pos; restart: if (!hdr || (gf_bs_available(bs) < 6)) return GF_FALSE; if (!AC3_FindSyncCodeBS(bs)) return GF_FALSE; pos = gf_bs_get_...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
47,113,832,093,472,700,000,000,000,000,000,000,000
109
fix some exploitable overflows (#994, #997)
static int ntop_get_interface_networks_stats(lua_State* vm) { NetworkInterfaceView *ntop_interface = getCurrentInterface(vm); ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); if(ntop_interface) ntop_interface->getNetworksStats(vm); return(CONST_LUA_OK); }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
271,750,990,065,259,500,000,000,000,000,000,000,000
8
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
lka_report_smtp_tx_mail(const char *direction, struct timeval *tv, uint64_t reqid, uint32_t msgid, const char *address, int ok) { const char *result; switch (ok) { case 1: result = "ok"; break; case 0: result = "permfail"; break; default: result = "tempfail"; break; } report_smtp_broadcast(reqid, di...
0
[ "CWE-476" ]
src
6c3220444ed06b5796dedfd53a0f4becd903c0d1
98,695,356,897,986,930,000,000,000,000,000,000,000
18
smtpd's filter state machine can prematurely release resources leading to a crash. From gilles@
int Lex_input_stream::lex_token(YYSTYPE *yylval, THD *thd) { int token; const int left_paren= (int) '('; if (lookahead_token >= 0) { /* The next token was already parsed in advance, return it. */ token= lookahead_token; lookahead_token= -1; *yylval= *(lookahead_yylval); look...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
255,913,973,982,637,550,000,000,000,000,000,000,000
137
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static void i40e_veb_clear(struct i40e_veb *veb) { if (!veb) return; if (veb->pf) { struct i40e_pf *pf = veb->pf; mutex_lock(&pf->switch_mutex); if (pf->veb[veb->idx] == veb) pf->veb[veb->idx] = NULL; mutex_unlock(&pf->switch_mutex); } kfree(veb); }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
275,041,940,443,173,020,000,000,000,000,000,000,000
16
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
GF_Err ssix_box_dump(GF_Box *a, FILE * trace) { u32 i, j; GF_SubsegmentIndexBox *p = (GF_SubsegmentIndexBox *)a; gf_isom_box_dump_start(a, "SubsegmentIndexBox", trace); gf_fprintf(trace, "subsegment_count=\"%d\"", p->subsegment_count); if (p->internal_flags & GF_ISOM_BOX_COMPRESSED) gf_fprintf(trace, " compress...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
324,248,853,627,059,300,000,000,000,000,000,000,000
26
fixed #2138
int do_item_link(item *it, const uint32_t hv) { MEMCACHED_ITEM_LINK(ITEM_key(it), it->nkey, it->nbytes); assert((it->it_flags & (ITEM_LINKED|ITEM_SLABBED)) == 0); mutex_lock(&cache_lock); it->it_flags |= ITEM_LINKED; it->time = current_time; STATS_LOCK(); stats.curr_bytes += ITEM_ntotal(it)...
0
[ "CWE-119" ]
memcached
fbe823d9a61b5149cd6e3b5e17bd28dd3b8dd760
190,184,647,017,538,730,000,000,000,000,000,000,000
22
fix potential unbounded key prints item key isn't necessarily null terminated. user submitted a patch for one, this clears two more.
SSL_SESSION *SSL_SESSION_new(void) { SSL_SESSION *ss; ss=(SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION)); if (ss == NULL) { SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE); return(0); } memset(ss,0,sizeof(SSL_SESSION)); ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */ ss->reference...
1
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
295,609,268,761,873,060,000,000,000,000,000,000,000
29
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
static int nfs4_recover_expired_lease(struct nfs_server *server) { struct nfs_client *clp = server->nfs_client; int ret; for (;;) { ret = nfs4_wait_clnt_recover(clp); if (ret != 0) return ret; if (!test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state) && !test_bit(NFS4CLNT_CHECK_LEASE,&clp->cl_state)) ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
163,348,434,538,415,000,000,000,000,000,000,000,000
16
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void mmu_spte_set(u64 *sptep, u64 new_spte) { WARN_ON(is_shadow_present_pte(*sptep)); __set_spte(sptep, new_spte); }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
314,012,606,368,331,500,000,000,000,000,000,000,000
5
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
idds_map_attrt_v3( const char *atin) { int i; for (i = 0; idds_v2_attrt[i][0] != NULL; i++) { if (strcasecmp(atin, idds_v2_attrt[i][1]) == 0) { return (idds_v2_attrt[i][0]); } } return NULL; }
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
339,562,748,581,798,500,000,000,000,000,000,000,000
13
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
static int count_configs(struct usb_composite_dev *cdev, unsigned type) { struct usb_gadget *gadget = cdev->gadget; struct usb_configuration *c; unsigned count = 0; int hs = 0; int ss = 0; int ssp = 0; if (gadget_is_dualspeed(gadget)) { if (gadget->speed == USB_SPEED_HIGH) hs = 1; if (gadget-...
0
[ "CWE-476" ]
linux
75e5b4849b81e19e9efe1654b30d7f3151c33c2c
323,997,070,051,608,180,000,000,000,000,000,000,000
38
USB: gadget: validate interface OS descriptor requests Stall the control endpoint in case provided index exceeds array size of MAX_CONFIG_INTERFACES or when the retrieved function pointer is null. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregk...
Read the message body */ PHP_FUNCTION(imap_body) { zval *streamind; zend_long msgno, flags = 0; pils *imap_le_struct; int msgindex, argc = ZEND_NUM_ARGS(); char *body; unsigned long body_len = 0; if (zend_parse_parameters(argc, "rl|l", &streamind, &msgno, &flags) == FAILURE) { return; } if (flags && ((f...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
136,845,919,667,674,140,000,000,000,000,000,000,000
42
Disable rsh/ssh functionality in imap by default (bug #77153)
static int user_page_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { if (!(buf->flags & PIPE_BUF_FLAG_GIFT)) return 1; buf->flags |= PIPE_BUF_FLAG_LRU; return generic_pipe_buf_steal(pipe, buf); }
0
[ "CWE-94" ]
linux-2.6
8811930dc74a503415b35c4a79d14fb0b408a361
221,577,013,687,485,600,000,000,000,000,000,000,000
9
splice: missing user pointer access verification vmsplice_to_user() must always check the user pointer and length with access_ok() before copying. Likewise, for the slow path of copy_from_user_mmap_sem() we need to check that we may read from the user region. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Cc: Wojc...
static void outputfiles(int f, void * const tls_fd) { unsigned int n; struct filename *p; struct filename *q; if (!head) { return; } tail->down = NULL; tail = NULL; colwidth = (colwidth | 7U) + 1U; if (opt_l != 0 || opt_C == 0) { colwidth = 75U; } /* set up f...
0
[ "CWE-400", "CWE-703" ]
pure-ftpd
aea56f4bcb9948d456f3fae4d044fd3fa2e19706
227,729,400,041,944,100,000,000,000,000,000,000,000
86
listdir(): reuse a single buffer to store every file name to display Allocating a new buffer for each entry is useless. And as these buffers are allocated on the stack, on systems with a small stack size, with many entries, the limit can easily be reached, causing a stack exhaustion and aborting the user session. Re...
void nft_set_gc_batch_release(struct rcu_head *rcu) { struct nft_set_gc_batch *gcb; unsigned int i; gcb = container_of(rcu, struct nft_set_gc_batch, head.rcu); for (i = 0; i < gcb->head.cnt; i++) nft_set_elem_destroy(gcb->head.set, gcb->elems[i], true); kfree(gcb); }
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
103,626,046,709,328,380,000,000,000,000,000,000,000
10
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static void nbt_name_socket_timeout(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private_data) { struct nbt_name_request *req = talloc_get_type(private_data, struct nbt_name_request); if (req->num_retries != 0) { req->num_retries--; req->te = tevent_add_timer(r...
0
[ "CWE-834" ]
samba
3cc0f1eeda5f133532dda31eef9fc1b394127e50
61,839,648,468,583,290,000,000,000,000,000,000,000
33
CVE-2020-14303: s4 nbt: fix busy loop on empty UDP packet An empty UDP packet put the nbt server into a busy loop that consumes 100% of a cpu. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14417 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild...
TEST_F(QueryPlannerTest, ContainedOrPathLevelMultikeyCombineTrailingOutsidePreds) { MultikeyPaths multikeyPaths1{{0U}, {0U}}; MultikeyPaths multikeyPaths2{{0U}}; addIndex(BSON("a.c" << 1 << "a.b" << 1), multikeyPaths1); addIndex(BSON("a.d" << 1), multikeyPaths2); runQuery(fromjson( "{a: {$e...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
314,572,696,543,135,500,000,000,000,000,000,000,000
18
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
static int init_npn(SSL *s, unsigned int context) { s->s3->npn_seen = 0; return 1; }
0
[ "CWE-476" ]
openssl
fb9fa6b51defd48157eeb207f52181f735d96148
325,941,394,603,108,770,000,000,000,000,000,000,000
6
ssl sigalg extension: fix NULL pointer dereference As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's possible to crash an openssl tls secured server remotely by sending a manipulated hello message in a rehandshake. On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls tls12_shared_s...
gopherEndHTML(GopherStateData * gopherState) { StoreEntry *e = gopherState->entry; if (!gopherState->HTML_header_added) { gopherHTMLHeader(e, "Server Return Nothing", NULL); storeAppendPrintf(e, "<P>The Gopher query resulted in a blank response</P>"); } else if (gopherState->HTML_pre) { ...
0
[ "CWE-400" ]
squid
780c4ea1b4c9d2fb41f6962aa6ed73ae57f74b2b
336,050,945,888,570,700,000,000,000,000,000,000,000
13
Improve handling of Gopher responses (#1022)
MONGO_EXPORT int gridfile_writer_done( gridfile *gfile ) { /* write any remaining pending chunk data. * pending data will always take up less than one chunk */ bson *oChunk; int response; if( gfile->pending_data ) { oChunk = chunk_new( gfile->id, gfile->chunk_num, gfile->pending_data, gfil...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
163,596,224,903,393,410,000,000,000,000,000,000,000
23
don't mix up int and size_t (first pass to fix that)
static void e1000e_set_eitr(E1000ECore *core, int index, uint32_t val) { uint32_t interval = val & 0xffff; uint32_t eitr_num = index - EITR; trace_e1000e_irq_eitr_set(eitr_num, val); core->eitr_guest_value[eitr_num] = interval; core->mac[index] = MAX(interval, E1000E_MIN_XITR);
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
337,872,066,454,821,700,000,000,000,000,000,000,000
10
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
ssize_t Http2Session::OnDWordAlignedPadding(size_t frameLen, size_t maxPayloadLen) { size_t r = (frameLen + 9) % 8; if (r == 0) return frameLen; // If already a multiple of 8, return. size_t pad = frameLen + (8 - r); // If maxPayloadLen happens to be less than the ...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
243,096,771,783,492,660,000,000,000,000,000,000,000
14
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
unsigned int dictObjHash(const void *key) { const robj *o = key; return dictGenHashFunction(o->ptr, sdslen((sds)o->ptr)); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
42,516,936,445,240,368,000,000,000,000,000,000,000
4
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
static int local_unlinkat_common(FsContext *ctx, int dirfd, const char *name, int flags) { int ret = -1; if (ctx->export_flags & V9FS_SM_MAPPED_FILE) { int map_dirfd; if (flags == AT_REMOVEDIR) { int fd; fd = openat_dir(dirfd, name); ...
0
[ "CWE-732" ]
qemu
9c6b899f7a46893ab3b671e341a2234e9c0c060e
168,341,799,059,680,450,000,000,000,000,000,000,000
49
9pfs: local: set the path of the export root to "." The local backend was recently converted to using "at*()" syscalls in order to ensure all accesses happen below the shared directory. This requires that we only pass relative paths, otherwise the dirfd argument to the "at*()" syscalls is ignored and the path is treat...
static SQInteger default_delegate_len(HSQUIRRELVM v) { v->Push(SQInteger(sq_getsize(v,1))); return 1; }
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
119,445,325,412,261,900,000,000,000,000,000,000,000
5
fix in thread.call
static int opl3_alloc_voice(int dev, int chn, int note, struct voice_alloc_info *alloc) { int i, p, best, first, avail, best_time = 0x7fffffff; struct sbi_instrument *instr; int is4op; int instr_no; if (chn < 0 || chn > 15) instr_no = 0; else instr_no = devc->chn_info[chn].pgm_num; instr = &devc->i_map[ins...
0
[ "CWE-119", "CWE-264", "CWE-284" ]
linux
4d00135a680727f6c3be78f8befaac009030e4df
280,981,480,082,993,300,000,000,000,000,000,000,000
65
sound/oss/opl3: validate voice and channel indexes User-controllable indexes for voice and channel values may cause reading and writing beyond the bounds of their respective arrays, leading to potentially exploitable memory corruption. Validate these indexes. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> C...
go_complete (void *opaque, int *err) { int *i = opaque; *i = *err; return 0; }
0
[ "CWE-617" ]
libnbd
fb4440de9cc76e9c14bd3ddf3333e78621f40ad0
160,141,745,857,017,300,000,000,000,000,000,000,000
6
opt_go: Tolerate unplanned server death While debugging some experimental nbdkit code that was triggering an assertion failure in nbdkit, I noticed a secondary failure of nbdsh also dying from an assertion: libnbd: debug: nbdsh: nbd_opt_go: transition: NEWSTYLE.OPT_GO.SEND -> DEAD libnbd: debug: nbdsh: nbd_opt_go: op...
isdn_ciscohdlck_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { isdn_net_local *lp = netdev_priv(dev); unsigned long len = 0; unsigned long expires = 0; int tmp = 0; int period = lp->cisco_keepalive_period; s8 debserint = lp->cisco_debserint; int rc = 0; if (lp->p_encap != ISDN_NET_ENCAP_CISCOH...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
160,775,499,651,451,300,000,000,000,000,000,000,000
64
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
GF_Err gf_isom_set_track_matrix(GF_ISOFile *the_file, u32 trackNumber, s32 matrix[9]) { GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Header) return GF_BAD_PARAM; memcpy(trak->Header->matrix, matrix, sizeof(trak->Header->matrix)); return GF_OK; }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
185,503,007,082,069,270,000,000,000,000,000,000,000
7
fixed #1706
static void usbredir_alt_setting_status(void *priv, uint64_t id, struct usb_redir_alt_setting_status_header *alt_setting_status) { USBRedirDevice *dev = priv; USBPacket *p; DPRINTF("alt status %d intf %d alt %d id: %"PRIu64"\n", alt_setting_status->status, alt_setting_status->interface, ...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
292,758,152,147,421,800,000,000,000,000,000,000,000
20
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
static int run_command(char* cmd, DYNAMIC_STRING *ds_res) { char buf[512]= {0}; FILE *res_file; int error; DBUG_ENTER("run_command"); DBUG_PRINT("enter", ("cmd: %s", cmd)); if (!(res_file= popen(cmd, "r"))) { report_or_die("popen(\"%s\", \"r\") failed", cmd); return -1; }...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
98,322,279,727,296,230,000,000,000,000,000,000,000
33
mysqltest: don't eat new lines in --exec pass them through as is
static inline unsigned __d_entry_type(const struct dentry *dentry) { return dentry->d_flags & DCACHE_ENTRY_TYPE; }
0
[ "CWE-284" ]
linux
54d5ca871e72f2bb172ec9323497f01cd5091ec7
292,254,449,539,181,380,000,000,000,000,000,000,000
4
vfs: add vfs_select_inode() helper Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> # v4.2+
gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj) { mrb_assert(is_gray(obj)); paint_black(obj); gc->gray_list = obj->gcnext; mrb_gc_mark(mrb, (struct RBasic*)obj->c); switch (obj->tt) { case MRB_TT_ICLASS: { struct RClass *c = (struct RClass*)obj; if (MRB_FLAG_TEST(c, MRB_FLAG...
0
[ "CWE-416" ]
mruby
5c114c91d4ff31859fcd84cf8bf349b737b90d99
147,932,498,038,579,510,000,000,000,000,000,000,000
97
Clear unused stack region that may refer freed objects; fix #3596
nm_utils_format_con_diff_for_audit(GHashTable *diff) { GHashTable * setting_diff; char * setting_name, *prop_name; GHashTableIter iter, iter2; GString * str; str = g_string_sized_new(32); g_hash_table_iter_init(&iter, diff); while (g_hash_table_iter_next(&iter, (gpointer *) ...
0
[ "CWE-20" ]
NetworkManager
420784e342da4883f6debdfe10cde68507b10d27
318,109,003,680,817,200,000,000,000,000,000,000,000
25
core: fix crash in nm_wildcard_match_check() It's not entirely clear how to treat %NULL. Clearly "match.interface-name=eth0" should not match with an interface %NULL. But what about "match.interface-name=!eth0"? It's now implemented that negative matches still succeed against %NULL. What about "match.interface-name=*"...
static MagickBooleanType InsertRow(int bpp,unsigned char *p,ssize_t y, Image *image) { ExceptionInfo *exception; int bit; ssize_t x; register PixelPacket *q; IndexPacket index; register IndexPacket *indexes; exception=(&image->exception); q=QueueAuthenticPixels(image,0,y,...
0
[ "CWE-20", "CWE-908" ]
ImageMagick6
1e59b29e520d2beab73e8c78aacd5f1c0d76196d
33,905,425,792,512,480,000,000,000,000,000,000,000
168
https://github.com/ImageMagick/ImageMagick/issues/1599
static void trace(struct kmem_cache *s, struct page *page, void *object, int alloc) { if (s->flags & SLAB_TRACE) { printk(KERN_INFO "TRACE %s %s 0x%p inuse=%d fp=0x%p\n", s->name, alloc ? "alloc" : "free", object, page->inuse, page->freelist); if (!alloc) print_section("Object", (void *)object, s->...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
282,226,210,812,645,280,000,000,000,000,000,000,000
15
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
apdu_send_simple (int slot, int extended_mode, int class, int ins, int p0, int p1, int lc, const char *data) { return send_le (slot, class, ins, p0, p1, lc, data, -1, NULL, NULL, NULL, extended_mode); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
139,859,776,520,092,700,000,000,000,000,000,000,000
7
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 RList *classes(RBinFile *bf) { RDyldCache *cache = (RDyldCache*) bf->o->bin_obj; if (!cache) { return NULL; } RList *ret = r_list_newf (free); if (!ret) { return NULL; } if (!cache->objc_opt_info_loaded) { cache->oi = get_objc_opt_info (bf, cache); cache->objc_opt_info_loaded = true; } RListI...
0
[ "CWE-787" ]
radare2
c84b7232626badd075caf3ae29661b609164bac6
7,308,247,685,079,897,000,000,000,000,000,000,000
112
Fix heap buffer overflow in dyldcache parser ##crash * Reported by: Lazymio via huntr.dev * Reproducer: dyldovf
static void pxa2xx_i2c_event(I2CSlave *i2c, enum i2c_event event) { PXA2xxI2CSlaveState *slave = PXA2XX_I2C_SLAVE(i2c); PXA2xxI2CState *s = slave->host; switch (event) { case I2C_START_SEND: s->status |= (1 << 9); /* set SAD */ s->status &= ~(1 << 0); /* clear RWM */ break...
0
[ "CWE-119" ]
qemu
caa881abe0e01f9931125a0977ec33c5343e4aa7
307,401,959,246,981,570,000,000,000,000,000,000,000
23
pxa2xx: avoid buffer overrun on incoming migration CVE-2013-4533 s->rx_level is read from the wire and used to determine how many bytes to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the length of s->rx_fifo[] the buffer can be overrun with arbitrary data from the wire. Fix this by validating rx_leve...