func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void hsts_free(struct stsentry *e) { free((char *)e->host); free(e); }
0
[]
curl
fae6fea209a2d4db1582f608bd8cc8000721733a
131,657,877,148,205,370,000,000,000,000,000,000,000
5
hsts: ignore trailing dots when comparing hosts names CVE-2022-30115 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-30115.html Closes #8821
typval2string(typval_T *tv, int convert) { garray_T ga; char_u *retval; #ifdef FEAT_FLOAT char_u numbuf[NUMBUFLEN]; #endif if (convert && tv->v_type == VAR_LIST) { ga_init2(&ga, sizeof(char), 80); if (tv->vval.v_list != NULL) { list_join(&ga, tv->vval.v_list, (char_u *)"\n", TRUE, FALSE, 0)...
0
[ "CWE-786", "CWE-119", "CWE-787" ]
vim
fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d
150,700,038,932,676,370,000,000,000,000,000,000,000
31
patch 8.2.4206: condition with many "(" causes a crash Problem: Condition with many "(" causes a crash. Solution: Limit recursion to 1000.
rescore_suggestions(suginfo_T *su) { int i; if (su->su_sallang != NULL) for (i = 0; i < su->su_ga.ga_len; ++i) rescore_one(su, &SUG(su->su_ga, i)); }
0
[ "CWE-457" ]
vim
15d9890eee53afc61eb0a03b878a19cb5672f732
31,502,886,040,129,395,000,000,000,000,000,000,000
8
patch 8.2.3582: reading uninitialized memory when giving spell suggestions Problem: Reading uninitialized memory when giving spell suggestions. Solution: Check that preword is not empty.
static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, u32 changed) { struct hwsim_vif_priv *vp = (void *)vif->drv_priv; struct mac80211_hwsim_data *data = hw->priv; hwsim_check_magic(vif); wiphy_dbg(hw->wiphy, "%...
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
285,219,209,475,307,370,000,000,000,000,000,000,000
83
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static void get_sem_elements(struct sem_data *p) { size_t i; if (!p || !p->sem_nsems || p->sem_perm.id < 0) return; p->elements = xcalloc(p->sem_nsems, sizeof(struct sem_elem)); for (i = 0; i < p->sem_nsems; i++) { struct sem_elem *e = &p->elements[i]; union semun arg = { .val = 0 }; e->semval = semctl(...
1
[ "CWE-190" ]
util-linux
1c9143d0c1f979c3daf10e1c37b5b1e916c22a1c
28,475,209,410,884,317,000,000,000,000,000,000,000
30
sys-utils/ipcutils: be careful when call calloc() for uint64 nmembs Fix: https://github.com/karelzak/util-linux/issues/1395 Signed-off-by: Karel Zak <kzak@redhat.com>
void encoder_progress_callback(const FLAC__StreamEncoder *encoder, FLAC__uint64 bytes_written, FLAC__uint64 samples_written, unsigned frames_written, unsigned total_frames_estimate, void *client_data) { EncoderSession *e = (EncoderSession*)client_data; const FLAC__uint64 uesize = e->unencoded_size; e->progress = e...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
179,292,897,601,064,930,000,000,000,000,000,000,000
19
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
print_stonith_meta(Stonith * stonith_obj, const char *rsc_type) { const char * meta_param = NULL; const char * meta_longdesc = NULL; const char * meta_shortdesc = NULL; char *xml_meta_longdesc = NULL; char *xml_meta_shortdesc = NULL; static const char * no_parameter_info = "<!-- no value -->"; meta_longdesc = s...
0
[ "CWE-287" ]
cluster-glue
3d7b464439ee0271da76e0ee9480f3dc14005879
253,000,661,829,800,200,000,000,000,000,000,000,000
35
Medium: stonith: add -E option to get the configuration from the environment
int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm) { char *v; int gmt=0; int i; int y=0,M=0,d=0,h=0,m=0,s=0; char *f = NULL; int f_len = 0; i=tm->length; v=(char *)tm->data; if (i < 12) goto err; if (v[i-1] == 'Z') gmt=1; for (i=0; i<12; i++) if ((v[i] > '9') || (v[i] < '0')) goto err; y...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
161,262,186,869,086,250,000,000,000,000,000,000,000
46
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
static unsigned int snd_disconnect_poll(struct file * file, poll_table * wait) { return POLLERR | POLLNVAL; }
0
[ "CWE-362", "CWE-399" ]
linux
07f4d9d74a04aa7c72c5dae0ef97565f28f17b92
103,025,445,156,860,020,000,000,000,000,000,000,000
4
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...
static int dn_fib_dnaddr_event(struct notifier_block *this, unsigned long event, void *ptr) { struct dn_ifaddr *ifa = (struct dn_ifaddr *)ptr; switch (event) { case NETDEV_UP: dn_fib_add_ifaddr(ifa); dn_fib_sync_up(ifa->ifa_dev->dev); dn_rt_cache_flush(-1); break; case NETDEV_DOWN: dn_fib_del_ifaddr(ifa)...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
63,045,975,639,491,020,000,000,000,000,000,000,000
21
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
SPL_METHOD(RecursiveDirectoryIterator, getSubPathname) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); char *sub_name; int len; char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH; if (zend_parse_parameters_none() == F...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
332,478,404,300,378,650,000,000,000,000,000,000,000
18
Fix bug #72262 - do not overflow int
nautilus_directory_set_up_request (NautilusFileAttributes file_attributes) { Request request; request = 0; if ((file_attributes & NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_COUNT) != 0) { REQUEST_SET_TYPE (request, REQUEST_DIRECTORY_COUNT); } if ((file_attributes & NAUTILUS_FILE_ATTRIBUTE_DEEP_COUNTS) != 0) { ...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
286,827,881,937,645,330,000,000,000,000,000,000,000
60
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-...
Status GetSimpleSliceAxis(const NodeDef* node, const NodeDef* pack, const PartialTensorShape& pack_output_shape, int pack_axis, int64* slice_start_value, bool* found) { NodeDef* slice_begin; NodeDef* slice_size; TF_RETURN_...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
33,981,442,963,324,910,000,000,000,000,000,000,000
90
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
Status SliceShape(InferenceContext* c) { ShapeHandle input = c->input(0); ShapeHandle begin_shape; TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 1, &begin_shape)); ShapeHandle sizes_shape; TF_RETURN_IF_ERROR(c->WithRank(c->input(2), 1, &sizes_shape)); // Merge to check compatibility of begin and sizes tensor...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
191,928,159,627,040,000,000,000,000,000,000,000,000
75
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
multi_reap_range(const struct multi_context *m, int start_bucket, int end_bucket) { struct gc_arena gc = gc_new(); struct hash_iterator hi; struct hash_element *he; if (start_bucket < 0) { start_bucket = 0; end_bucket = hash_n_buckets(m->vhash); ...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
249,264,918,469,575,620,000,000,000,000,000,000,000
31
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
static int zr364xx_vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p) { int rc; struct zr364xx_camera *cam = video_drvdata(file); _DBG("%s\n", __func__); if (cam->owner && cam->owner != priv) return -EBUSY; rc = videobuf_dqbuf(&cam->vb_vidq, p, file->f_flags & O_NONBLOCK); return rc; }
0
[ "CWE-476" ]
linux
5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e
98,884,422,801,140,950,000,000,000,000,000,000,000
12
media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap SyzKaller hit the null pointer deref while reading from uninitialized udev->product in zr364xx_vidioc_querycap(). ================================================================== BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20 in...
iperf_set_test_unit_format(struct iperf_test *ipt, char unit_format) { ipt->settings->unit_format = unit_format; }
0
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
94,294,831,193,689,270,000,000,000,000,000,000,000
4
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...
static bool nfs_verify_change_attribute(struct inode *dir, unsigned long verf) { return (verf & ~1UL) == nfs_save_change_attribute(dir); }
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
83,206,796,394,358,510,000,000,000,000,000,000,000
4
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
Item* Item_cache_wrapper::get_tmp_table_item(THD *thd) { if (!orig_item->with_sum_func && !orig_item->const_item()) return new (thd->mem_root) Item_temptable_field(thd, result_field); return copy_or_same(thd); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
199,846,863,859,531,860,000,000,000,000,000,000,000
6
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
template <typename T = Ast> void add_ast_action(Definition &rule) { rule.action = [&](const SemanticValues &sv) { auto line = sv.line_info(); if (rule.is_token()) { return std::make_shared<T>(sv.path, line.first, line.second, rule.name.c_str(), sv.token(), ...
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
228,654,449,645,977,600,000,000,000,000,000,000,000
22
Fix #122
void intel_pmu_pebs_disable_all(void) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); if (cpuc->pebs_enabled) wrmsrl(MSR_IA32_PEBS_ENABLE, 0); }
0
[ "CWE-755" ]
linux
d88d05a9e0b6d9356e97129d4ff9942d765f46ea
107,306,705,206,437,600,000,000,000,000,000,000,000
7
perf/x86/intel: Fix a crash caused by zero PEBS status A repeatable crash can be triggered by the perf_fuzzer on some Haswell system. https://lore.kernel.org/lkml/7170d3b-c17f-1ded-52aa-cc6d9ae999f4@maine.edu/ For some old CPUs (HSW and earlier), the PEBS status in a PEBS record may be mistakenly set to 0. To minimiz...
static int __init inotify_user_setup(void) { int ret; ret = register_filesystem(&inotify_fs_type); if (unlikely(ret)) panic("inotify: register_filesystem returned %d!\n", ret); inotify_mnt = kern_mount(&inotify_fs_type); if (IS_ERR(inotify_mnt)) panic("inotify: kern_mount ret %ld!\n", PTR_ERR(inotify_mnt)); ...
0
[ "CWE-399" ]
linux-2.6
3632dee2f8b8a9720329f29eeaa4ec4669a3aff8
276,917,303,108,027,700,000,000,000,000,000,000,000
25
inotify: clean up inotify_read and fix locking problems If userspace supplies an invalid pointer to a read() of an inotify instance, the inotify device's event list mutex is unlocked twice. This causes an unbalance which effectively leaves the data structure unprotected, and we can trigger oopses by accessing the inot...
static int pin_vector_pages(struct user_sdma_request *req, struct user_sdma_iovec *iovec) { int ret = 0, pinned, npages; struct hfi1_user_sdma_pkt_q *pq = req->pq; struct sdma_mmu_node *node = NULL; struct mmu_rb_node *rb_node; struct iovec *iov; bool extracted; extracted = hfi1_mmu_rb_remove_unless_ex...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
295,006,654,757,282,100,000,000,000,000,000,000,000
62
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
void term_set_color(TERM_WINDOW *window, int col) #endif { int set_normal; unsigned int fg, bg; #ifdef TERM_TRUECOLOR if (col & ATTR_FGCOLOR24) { if (fgcol24) fg = fgcol24 << 8; else fg = COLOR_BLACK24; } else #endif fg = (col & FG_MASK); #ifdef TERM_TRUECOLOR if (col & ATTR_BGCOLOR24) { if (bgcol2...
0
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
188,394,423,788,750,000,000,000,000,000,000,000,000
107
Merge branch 'security' into 'master' See merge request !7
close_sb(PG_FUNCTION_ARGS) { LSEG *lseg = PG_GETARG_LSEG_P(0); BOX *box = PG_GETARG_BOX_P(1); Point point; LSEG bseg, seg; double dist, d; /* segment intersects box? then just return closest point to center */ if (DatumGetBool(DirectFunctionCall2(inter_sb, LsegPGetDatum(lseg), ...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
300,369,476,694,462,400,000,000,000,000,000,000,000
55
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static INLINE BOOL update_read_delta_points(wStream* s, DELTA_POINT* points, int number, INT16 x, INT16 y) { int i; BYTE flags = 0; BYTE* zeroBits; UINT32 zeroBitsSize; zeroBitsSize = ((number + 3) / 4); if (Stream_GetRemainingLength(s) < zeroBitsSize) { WLog_ERR(TA...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
209,312,914,382,021,500,000,000,000,000,000,000,000
41
Fixed #6013: Check new length is > 0
ContentLine_Analyzer::~ContentLine_Analyzer() { delete [] buf; }
0
[ "CWE-787" ]
bro
6c0f101a62489b1c5927b4ed63b0e1d37db40282
19,874,043,822,671,375,000,000,000,000,000,000,000
4
Patch OOB write in content-line analyzer. A combination of packets can trigger an out of bound write of '0' byte in the content-line analyzer. This bug was found by Frank Meier. Addresses BIT-1856.
BOOL license_read_new_or_upgrade_license_packet(rdpLicense* license, wStream* s) { UINT32 os_major; UINT32 os_minor; UINT32 cbScope, cbCompanyName, cbProductId, cbLicenseInfo; wStream* licenseStream = NULL; BOOL ret = FALSE; BYTE computedMac[16]; LICENSE_BLOB* calBlob; DEBUG_LICENSE("Receiving Server New/Upgra...
0
[ "CWE-125" ]
FreeRDP
6ade7b4cbfd71c54b3d724e8f2d6ac76a58e879a
119,587,276,096,900,180,000,000,000,000,000,000,000
100
Fixed OOB Read in license_read_new_or_upgrade_license_packet CVE-2020-11099 thanks to @antonio-morales for finding this.
static struct page *shmem_swapin_async(struct shared_policy *p, swp_entry_t entry, unsigned long idx) { struct page *page; struct vm_area_struct pvma; /* Create a pseudo vma that just contains the policy */ memset(&pvma, 0, sizeof(struct vm_area_struct)); pvma.vm_end = PAGE_SIZE; pvma.vm_pgoff = idx; ...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
205,733,208,269,960,750,000,000,000,000,000,000,000
15
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
void NumberFormatTest::Test13148_ParseGroupingSeparators() { IcuTestErrorCode status(*this, "Test13148"); LocalPointer<DecimalFormat> fmt( (DecimalFormat*)NumberFormat::createInstance("en-ZA", status), status); if (!assertSuccess("", status, true, __FILE__, __LINE__)) { return; } DecimalFormatSymbols sym...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
133,176,979,935,902,750,000,000,000,000,000,000,000
15
ICU-20246 Fixing another integer overflow in number parsing.
note_client_request(int purpose, int compressed, size_t bytes) { char *key; const char *kind = NULL; switch (purpose) { case DIR_PURPOSE_FETCH_V2_NETWORKSTATUS: kind = "dl/status"; break; case DIR_PURPOSE_FETCH_CONSENSUS: kind = "dl/consensus"; break; case DIR_PURPOSE_FETCH_CERTIFICATE: kind = "...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
114,214,427,449,996,300,000,000,000,000,000,000,000
32
Fix assertion failure in tor_timegm. Fixes bug 6811.
WandExport ssize_t PixelGetIteratorRow(PixelIterator *iterator) { assert(iterator != (const PixelIterator *) NULL); assert(iterator->signature == MagickWandSignature); if (iterator->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name); return(iterator->y); }
0
[ "CWE-369" ]
ImageMagick
a81ca9a1b46a96be83682af3389f0a6f3d0d389d
290,073,637,644,246,200,000,000,000,000,000,000,000
8
https://github.com/ImageMagick/ImageMagick/issues/1711
ZEND_VM_COLD_CONSTCONST_HANDLER(188, ZEND_SWITCH_STRING, CONST|TMPVARCV, CONST, JMP_ADDR) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op, *jump_zv; HashTable *jumptable; op = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); if (Z_TYPE_P(op) != IS_STRING) { if (OP1...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
277,788,792,473,156,680,000,000,000,000,000,000,000
33
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
applet_get_default_active_connection (NMApplet *applet, NMDevice **device) { NMActiveConnection *default_ac = NULL; NMDevice *non_default_device = NULL; NMActiveConnection *non_default_ac = NULL; const GPtrArray *connections; int i; g_return_val_if_fail (NM_IS_APPLET (applet), NULL); g_return_val_if_fail (devic...
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
325,190,445,900,318,080,000,000,000,000,000,000,000
43
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
static bool is_spillable_regtype(enum bpf_reg_type type) { switch (type) { case PTR_TO_MAP_VALUE: case PTR_TO_MAP_VALUE_OR_NULL: case PTR_TO_STACK: case PTR_TO_CTX: case PTR_TO_PACKET: case PTR_TO_PACKET_META: case PTR_TO_PACKET_END: case CONST_PTR_TO_MAP: return true; default: return false; } }
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
50,731,803,943,892,205,000,000,000,000,000,000,000
16
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
void *__kmalloc_node(size_t size, gfp_t flags, int node) { struct kmem_cache *s; if (unlikely(size > PAGE_SIZE)) return kmalloc_large_node(size, flags, node); s = get_slab(size, flags); if (unlikely(ZERO_OR_NULL_PTR(s))) return s; return slab_alloc(s, flags, node, __builtin_return_address(0)); }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
34,495,483,102,887,580,000,000,000,000,000,000,000
14
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 ...
NO_INLINE void jspEnsureIsPrototype(JsVar *instanceOf, JsVar *prototypeName) { if (!prototypeName) return; JsVar *prototypeVar = jsvSkipName(prototypeName); if (!jsvIsObject(prototypeVar)) { if (!jsvIsUndefined(prototypeVar)) jsExceptionHere(JSET_TYPEERROR, "Prototype should be an object, got %t", proto...
0
[ "CWE-125", "CWE-674" ]
Espruino
51380baf17241728b6d48cdb84140b931e3e3cc5
266,163,221,133,529,670,000,000,000,000,000,000,000
16
Fix stack overflow if interpreting a file full of '{' (fix #1448)
evdev_notify_axis_legacy_wheel(struct evdev_device *device, uint64_t time, uint32_t axes, const struct normalized_coords *delta_in, const struct discrete_coords *discrete_in) { struct normalized_coords delta = *delta_in; struct discrete_coords discrete = *discrete_in; if (dev...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
315,236,859,482,114,960,000,000,000,000,000,000,000
27
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
R_API RBinJavaField *r_bin_java_read_next_field(RBinJavaObj *bin, const ut64 offset, const ut8 *buffer, const ut64 len) { RBinJavaAttrInfo *attr; ut32 i, idx; ut8 buf[8]; RBinJavaCPTypeObj *item = NULL; const ut8 *f_buf = buffer + offset; ut64 adv = 0; RBinJavaField *field; if (bin == NULL) { return NULL; } ...
0
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
57,227,003,334,794,800,000,000,000,000,000,000,000
99
Fix #10498 - Fix crash in fuzzed java files (#10511)
delete_slaves(ip) Tcl_Interp *ip; { int thr_crit_bup; Tcl_Interp *slave; int argc; char **argv; char *slave_list; char *slave_name; int i, len; DUMP1("delete slaves"); thr_crit_bup = rb_thread_critical; rb_thread_critical = Qtrue; if (!Tcl_InterpDeleted(ip) && Tcl_Eval...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
241,054,931,424,569,100,000,000,000,000,000,000,000
39
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
armpmu_reserve_hardware(struct arm_pmu *armpmu) { int err, irq; unsigned int i, irqs; struct platform_device *pmu_device = armpmu->plat_device; if (!pmu_device) { pr_err("no PMU device registered\n"); return -ENODEV; } irqs = min(pmu_device->num_resources, num_possible_cpus()); if (!irqs) { pr_err("no ir...
0
[ "CWE-284", "CWE-264" ]
linux
8fff105e13041e49b82f92eef034f363a6b1c071
170,194,866,694,520,220,000,000,000,000,000,000,000
69
arm64: perf: reject groups spanning multiple HW PMUs The perf core implicitly rejects events spanning multiple HW PMUs, as in these cases the event->ctx will differ. However this validation is performed after pmu::event_init() is called in perf_init_event(), and thus pmu::event_init() may be called with a group leader...
ZEND_VM_COLD_CONSTCONST_HANDLER(10, ZEND_BW_AND, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) { ...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
164,854,106,963,848,440,000,000,000,000,000,000,000
18
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
Variant nextFile() { if (m_curIndex >= m_numFiles) { return false; } auto zipEntry = req::make<ZipEntry>(m_zip, m_curIndex); if (!zipEntry->isValid()) { return false; } ++m_curIndex; return Variant(std::move(zipEntry)); }
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
329,220,420,580,145,100,000,000,000,000,000,000,000
15
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
unsigned char lodepng_chunk_private(const unsigned char* chunk) { return((chunk[6] & 32) != 0); }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
57,477,087,392,293,230,000,000,000,000,000,000,000
4
Fixed #5645: realloc return handling
static void SFS_AddString(ScriptParser *parser, char *str) { char *new_str; if (!str) return; if (strlen(parser->string) + strlen(str) >= parser->length) { parser->length += PARSER_STEP_ALLOC; new_str = (char *)gf_malloc(sizeof(char)*parser->length); strcpy(new_str, parser->string); gf_free(parser->string); ...
1
[ "CWE-94" ]
gpac
b5741da08e88e8dcc8da0a7669b92405b9862850
96,885,558,209,062,280,000,000,000,000,000,000,000
13
fix overflow on script_dec (#2052)
void kvm_mmu_sync_prev_roots(struct kvm_vcpu *vcpu) { unsigned long roots_to_free = 0; int i; for (i = 0; i < KVM_MMU_NUM_PREV_ROOTS; i++) if (is_unsync_root(vcpu->arch.mmu->prev_roots[i].hpa)) roots_to_free |= KVM_MMU_ROOT_PREVIOUS(i); /* sync prev_roots by simply freeing them */ kvm_mmu_free_roots(vcpu->k...
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
275,169,026,659,437,080,000,000,000,000,000,000,000
12
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...
static void processCertificateElements(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, u_int16_t p_offset, u_int16_t certificate_len) { struct ndpi_packet_struct *packet = &flow->packet; u_int num_found = 0, i; char buffer[64] = { '\0' }, rdnSeqBuf[1024] = { ...
1
[ "CWE-190", "CWE-787" ]
nDPI
23594f036536468072198a57c59b6e9d63caf6ce
261,337,372,012,049,070,000,000,000,000,000,000,000
252
Fixed stack overflow caused by missing length check Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
wl_map_for_each(struct wl_map *map, wl_iterator_func_t func, void *data) { enum wl_iterator_result ret; ret = for_each_helper(&map->client_entries, func, data); if (ret == WL_ITERATOR_CONTINUE) for_each_helper(&map->server_entries, func, data); }
0
[]
wayland
b19488c7154b902354cb26a27f11415d7799b0b2
10,573,656,852,097,492,000,000,000,000,000,000,000
8
util: Limit size of wl_map Since server IDs are basically indistinguishable from really big client IDs at many points in the source, it's theoretically possible to overflow a map and either overflow server IDs into the client ID space, or grow client IDs into the server ID space. This would currently take a massive am...
TEST_F(HttpConnectionManagerImplTest, MaxStreamDurationCallbackNotCalledIfResetStreamValidly) { max_stream_duration_ = std::chrono::milliseconds(5000); setup(false, ""); Event::MockTimer* duration_timer = setUpTimer(); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status { ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
97,501,665,107,079,070,000,000,000,000,000,000,000
20
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static device_t* _cast_device(const oe_device_t* device_) { device_t* device = (device_t*)device_; if (device == NULL || device->magic != DEVICE_MAGIC) return NULL; return device; }
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
285,230,581,957,228,100,000,000,000,000,000,000,000
9
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static int v9fs_xattr_get_acl(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode, const char *name, void *buffer, size_t size) { struct v9fs_session_info *v9ses; struct posix_acl *acl; int error; v9ses = v9fs_dentry2v9ses(dentry); /* * We allow set/get/list of acl ...
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
207,008,249,368,447,100,000,000,000,000,000,000,000
25
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
connection_ap_handshake_rewrite_and_attach(entry_connection_t *conn, origin_circuit_t *circ, crypt_path_t *cpath) { socks_request_t *socks = conn->socks_request; const or_options_t *options = get_options(); connection_t *base_co...
1
[ "CWE-532" ]
tor
80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9
127,301,477,910,039,570,000,000,000,000,000,000,000
423
Log warning when connecting to soon-to-be-deprecated v2 onions.
int vrend_renderer_resource_map(struct pipe_resource *pres, void **map, uint64_t *out_size) { struct vrend_resource *res = (struct vrend_resource *)pres; if (!has_bits(res->storage_bits, VREND_STORAGE_GL_BUFFER | VREND_STORAGE_GL_IMMUTABLE)) return -EINVAL; glBindBufferARB(res->target, res->id); *map...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
221,628,842,674,338,500,000,000,000,000,000,000,000
15
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
unsigned long last_ram_page(void) { RAMBlock *block; ram_addr_t last = 0; rcu_read_lock(); RAMBLOCK_FOREACH(block) { last = MAX(last, block->offset + block->max_length); } rcu_read_unlock(); return last >> TARGET_PAGE_BITS; }
0
[ "CWE-125" ]
qemu
04bf2526ce87f21b32c9acba1c5518708c243ad0
244,262,154,457,659,260,000,000,000,000,000,000,000
12
exec: use qemu_ram_ptr_length to access guest ram When accessing guest's ram block during DMA operation, use 'qemu_ram_ptr_length' to get ram block pointer. It ensures that DMA operation of given length is possible; And avoids any OOB memory access situations. Reported-by: Alex <broscutamaker@gmail.com> Signed-off-by...
Supports_Condition_Obj Parser::parse_supports_operator(bool top_level) { Supports_Condition_Obj cond = parse_supports_condition_in_parens(/*parens_required=*/top_level); if (cond.isNull()) return {}; while (true) { Supports_Operator::Operand op = Supports_Operator::OR; if (lex < kwd_and >()...
0
[ "CWE-674" ]
libsass
f2db04883e5fff4e03777dcc1eb60d4373c45be1
158,496,208,800,067,800,000,000,000,000,000,000,000
18
Make `parse_css_variable_value` non-recursive Fixes #2658 stack overflow
can_delete_without_confirm (GFile *file) { if (g_file_has_uri_scheme (file, "burn") || g_file_has_uri_scheme (file, "recent") || g_file_has_uri_scheme (file, "x-nautilus-desktop")) { return TRUE; } return FALSE; }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
294,344,255,018,212,670,000,000,000,000,000,000,000
11
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
ConnStateData::initiateTunneledRequest(HttpRequest::Pointer const &cause, Http::MethodType const method, const char *reason, const SBuf &payload) { // fake a CONNECT request to force connState to tunnel SBuf connectHost; unsigned short connectPort = 0; if (pinning.serverConnection != nullptr) { ...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
51,252,159,761,614,450,000,000,000,000,000,000,000
36
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
char* imap_set_flags (IMAP_DATA* idata, HEADER* h, char* s, int *server_changes) { CONTEXT* ctx = idata->ctx; IMAP_HEADER newh; IMAP_HEADER_DATA old_hd; IMAP_HEADER_DATA* hd; unsigned char readonly; int local_changes; local_changes = h->changed; memset (&newh, 0, sizeof (newh)); hd = h->data; newh...
0
[ "CWE-787" ]
mutt
3287534daa3beac68e2e83ca4b4fe8a3148ff870
75,309,849,452,495,590,000,000,000,000,000,000,000
51
Don't overflow tmp in msg_parse_fetch. Ensure INTERNALDATE and RFC822.SIZE field sizes fit temp buffer. Thanks to Jeriko One for the bug report and patch, which this patch is based upon.
xmlParseElement(xmlParserCtxtPtr ctxt) { if (xmlParseElementStart(ctxt) != 0) return; xmlParseContentInternal(ctxt); if (ctxt->instate == XML_PARSER_EOF) return; if (CUR == 0) { const xmlChar *name = ctxt->nameTab[ctxt->nameNr - 1]; int line = ctxt->pushTab[ctxt->nameNr - 1].l...
0
[ "CWE-776" ]
libxml2
8598060bacada41a0eb09d95c97744ff4e428f8e
328,975,250,883,218,560,000,000,000,000,000,000,000
19
Patch for security issue CVE-2021-3541 This is relapted to parameter entities expansion and following the line of the billion laugh attack. Somehow in that path the counting of parameters was missed and the normal algorithm based on entities "density" was useless.
struct dentry *lookup_one_len_unlocked(const char *name, struct dentry *base, int len) { struct qstr this; int err; struct dentry *ret; err = lookup_one_len_common(name, base, len, &this); if (err) return ERR_PTR(err); ret = lookup_dcache(&this, base, 0); if (!ret) ret = lookup_slow(&this, base,...
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
114,949,171,794,787,200,000,000,000,000,000,000,000
16
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
GC_INNER void GC_mprotect_stop(void) { GC_mprotect_thread_notify(ID_STOP); }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
89,735,512,951,661,400,000,000,000,000,000,000,000
4
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
void ensureSocketOptions() { if (!listen_socket_options_) { listen_socket_options_ = std::make_shared<std::vector<Network::Socket::OptionConstSharedPtr>>(); } }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
139,529,107,462,371,410,000,000,000,000,000,000,000
6
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
int udp_ioctl(struct sock *sk, int cmd, unsigned long arg) { switch (cmd) { case SIOCOUTQ: { int amount = sk_wmem_alloc_get(sk); return put_user(amount, (int __user *)arg); } case SIOCINQ: { int amount = max_t(int, 0, first_packet_length(sk)); return put_user(amount, (int __user *)arg); } default: ...
0
[ "CWE-362" ]
net
85f1bd9a7b5a79d5baa8bf44af19658f7bf77bfa
120,962,100,401,498,760,000,000,000,000,000,000,000
23
udp: consistently apply ufo or fragmentation When iteratively building a UDP datagram with MSG_MORE and that datagram exceeds MTU, consistently choose UFO or fragmentation. Once skb_is_gso, always apply ufo. Conversely, once a datagram is split across multiple skbs, do not consider ufo. Sendpage already maintains th...
gnutls_ocsp_resp_import(gnutls_ocsp_resp_t resp, const gnutls_datum_t * data) { int ret = 0; if (resp == NULL || data == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } if (resp->init != 0) { /* Any earlier _asn1_strict_der_decode will modify the ASN.1 structure, so we need to replace it...
0
[ "CWE-264" ]
gnutls
964632f37dfdfb914ebc5e49db4fa29af35b1de9
209,555,244,604,604,330,000,000,000,000,000,000,000
85
ocsp: corrected the comparison of the serial size in OCSP response Previously the OCSP certificate check wouldn't verify the serial length and could succeed in cases it shouldn't. Reported by Stefan Buehler.
uv_buf_t TLSWrap::OnStreamAlloc(size_t suggested_size) { CHECK_NOT_NULL(ssl_); size_t size = suggested_size; char* base = crypto::NodeBIO::FromBIO(enc_in_)->PeekWritable(&size); return uv_buf_init(base, size); }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
182,955,623,753,476,400,000,000,000,000,000,000,000
7
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 <...
size_t _cdk_pkt_read_len(FILE * inp, size_t * ret_partial) { int c1, c2; size_t pktlen; c1 = fgetc(inp); if (c1 == EOF) return (size_t) EOF; if (c1 < 224 || c1 == 255) *ret_partial = 0; /* End of partial data */ if (c1 < 192) pktlen = c1; else if (c1 >= 192 && c1 <= 223) { c2 = fgetc(inp); if (c2 == E...
0
[ "CWE-119" ]
gnutls
94fcf1645ea17223237aaf8d19132e004afddc1a
162,197,889,796,000,220,000,000,000,000,000,000,000
26
opencdk: read_attribute: added more precise checks when reading stream That addresses heap read overflows found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=338 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=346 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
static struct page *__rmqueue_pcplist(struct zone *zone, int migratetype, struct per_cpu_pages *pcp, struct list_head *list) { struct page *page; do { if (list_empty(list)) { pcp->count += rmqueue_bulk(zone, 0, pcp->batch, list, migratetype); if (unlikely(list_empty(list))) return NULL; ...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
149,001,530,242,597,480,000,000,000,000,000,000,000
22
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
MsgSetAfterPRIOffs(msg_t *pMsg, short offs) { assert(pMsg != NULL); pMsg->offAfterPRI = offs; return RS_RET_OK; }
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
57,549,581,620,259,120,000,000,000,000,000,000,000
6
backporting abort condition fix from 5.7.7
dtdReset(DTD *p, const XML_Memory_Handling_Suite *ms) { HASH_TABLE_ITER iter; hashTableIterInit(&iter, &(p->elementTypes)); for (;;) { ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter); if (!e) break; if (e->allocDefaultAtts != 0) ms->free_fcn(e->defaultAtts); } hashTableClear...
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
66,791,615,759,007,410,000,000,000,000,000,000,000
40
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
void check_limit_rows_examined() { if (++accessed_rows_and_keys > lex->limit_rows_examined_cnt) set_killed(ABORT_QUERY); }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
140,396,158,277,795,660,000,000,000,000,000,000,000
5
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
R_API RBinJavaAttrInfo *r_bin_java_annotation_default_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) { ut64 offset = 0; RBinJavaAttrInfo *attr = NULL; attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset); offset += 6; if (attr && sz >= offset) { attr->type = R_BIN_JAVA_ATTR_TYPE_AN...
1
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
134,072,193,773,089,700,000,000,000,000,000,000,000
15
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
PHP_MSHUTDOWN_FUNCTION(openssl) { #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) EVP_cleanup(); /* prevent accessing locking callback from unloaded extension */ CRYPTO_set_locking_callback(NULL); /* free allocated error strings */ ERR_free_strings(); CONF_modules_free(); #endif p...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
234,670,425,731,557,850,000,000,000,000,000,000,000
31
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
ex_splitview(exarg_T *eap) { win_T *old_curwin = curwin; #if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE) char_u *fname = NULL; #endif #ifdef FEAT_BROWSE char_u dot_path[] = "."; int save_cmod_flags = cmdmod.cmod_flags; #endif int use_tab = eap->cmdidx == CMD_tabedit || eap->cmdidx ==...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
299,631,821,236,624,700,000,000,000,000,000,000,000
116
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
static int e1000_tx_tso_post_load(void *opaque, int version_id) { E1000State *s = opaque; s->received_tx_tso = true; return 0; }
0
[ "CWE-835" ]
qemu
1caff0340f49c93d535c6558a5138d20d475315c
89,679,586,631,101,250,000,000,000,000,000,000,000
6
e1000: 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.com>...
GF_Err totl_box_size(GF_Box *s) { s->size += 4; return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
326,844,834,418,512,370,000,000,000,000,000,000,000
5
fixed #1587
static inline void hwsim_set_sta_magic(struct ieee80211_sta *sta) { struct hwsim_sta_priv *sp = (void *)sta->drv_priv; sp->magic = HWSIM_STA_MAGIC; }
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
65,548,012,714,967,150,000,000,000,000,000,000,000
5
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
void kvm_update_dr7(struct kvm_vcpu *vcpu) { unsigned long dr7; if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP) dr7 = vcpu->arch.guest_debug_dr7; else dr7 = vcpu->arch.dr7; static_call(kvm_x86_set_dr7)(vcpu, dr7); vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_BP_ENABLED; if (dr7 & DR7_BP_EN_MASK) vcpu->arch.s...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
202,732,118,541,300,350,000,000,000,000,000,000,000
13
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 2); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); // Reinterprete the opaque data provided by user. OpData* data = reinterpret_cast<OpData*>(node->user_data); const TfLiteTensor* input1; TF_LITE...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
301,859,422,539,660,060,000,000,000,000,000,000,000
38
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
InteractiveBackend(StringInfo inBuf) { int c; /* character read from getc() */ bool end = false; /* end-of-input flag */ bool backslashSeen = false; /* have we seen a \ ? */ /* * display a prompt and obtain input from the user */ printf("backend> "); fflush(stdout); resetStringInfo(inBuf); if (Use...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
119,552,077,453,574,600,000,000,000,000,000,000,000
81
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
static bool vmx_xsaves_supported(void) { return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_XSAVES; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
255,271,207,278,017,720,000,000,000,000,000,000,000
5
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
TEST(IndexBoundsBuilderTest, TranslateGtNumber) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$gt: 1}}"); auto expr = parseMatchExpression(obj); BSONElement elt = obj.firstElement(); OrderedIntervalList oil; IndexBoundsBuilder::BoundsTightness tightness; IndexBound...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
17,894,643,758,976,386,000,000,000,000,000,000,000
15
SERVER-44377 generate correct plan for indexed inequalities to null
mono_reflection_encode_sighelper (MonoDynamicImage *assembly, MonoReflectionSigHelper *helper) { SigBuffer buf; guint32 nargs; guint32 size; guint32 i, idx; if (!assembly->save) return 0; /* FIXME: this means SignatureHelper.SignatureHelpType.HELPER_METHOD */ g_assert (helper->type == 2); if (helper->argum...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
336,499,356,231,760,730,000,000,000,000,000,000,000
61
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
stack_slot_stack_type_full_name (ILStackDesc *value) { GString *str = g_string_new (""); char *result; gboolean has_pred = FALSE, first = TRUE; if ((value->stype & TYPE_MASK) != value->stype) { g_string_append(str, "["); APPEND_WITH_PREDICATE (stack_slot_is_this_pointer, "this"); APPEND_WITH_PREDICATE (stack...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
143,266,356,537,446,650,000,000,000,000,000,000,000
33
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
njs_object_property(njs_vm_t *vm, const njs_value_t *value, njs_lvlhsh_query_t *lhq, njs_value_t *retval) { njs_int_t ret; njs_object_t *object; njs_object_prop_t *prop; object = njs_object(value); do { ret = njs_lvlhsh_find(&object->hash, lhq); if (njs_fast_pa...
0
[]
njs
6549d49630ce5f5ac823fd3ae0c6c8558b8716ae
57,308,129,952,058,220,000,000,000,000,000,000,000
47
Fixed redefinition of special props in Object.defineProperty(). Previously, when NJS_PROPERTY_HANDLER property was updated it might be left in inconsistent state. Namely, prop->type was left unchanged, but prop->value did not have an expected property handler. As a result consecutive reference to the property may re...
static void cbq_ovl_delay(struct cbq_class *cl) { struct cbq_sched_data *q = qdisc_priv(cl->qdisc); psched_tdiff_t delay = PSCHED_TDIFF(cl->undertime, q->now); if (!cl->delayed) { unsigned long sched = jiffies; delay += cl->offtime; if (cl->avgidle < 0) delay -= (-cl->avgidle) - ((-cl->avgidle) >> cl->ewm...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
214,275,598,385,958,500,000,000,000,000,000,000,000
33
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
hb_map_set (hb_map_t *map, hb_codepoint_t key, hb_codepoint_t value) { /* Immutable-safe. */ map->set (key, value); }
0
[ "CWE-787" ]
harfbuzz
d3e09bf4654fe5478b6dbf2b26ebab6271317d81
154,897,396,677,813,200,000,000,000,000,000,000,000
7
[set] Make all operators null-safe again Changed my mind. Also for hb_map_clear(). Part of https://github.com/harfbuzz/harfbuzz/pull/3162
xmlSchemaGetIDCDesignation(xmlChar **buf, xmlSchemaIDCPtr idc) { return(xmlSchemaGetComponentDesignation(buf, idc)); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
146,515,227,834,946,680,000,000,000,000,000,000,000
4
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
ExecCreateTableAs(CreateTableAsStmt *stmt, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv, char *completionTag) { Query *query = castNode(Query, stmt->query); IntoClause *into = stmt->into; bool is_matview = (into->viewQuery != NULL); DestReceiver *dest; Oid save_userid...
1
[ "CWE-94" ]
postgres
5579726bd60a6e7afb04a3548bced348cd5ffd89
140,002,904,338,919,040,000,000,000,000,000,000,000
158
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
GenerationPtr getGeneration(unsigned int number) const { // Must not used boost::make_shared() here because Watchdog.cpp // deletes the raw pointer in cleanupAgentsInBackground(). return ptr(new Generation(path, number)); }
0
[ "CWE-401" ]
passenger
94428057c602da3d6d34ef75c78091066ecac5c0
142,991,436,924,094,180,000,000,000,000,000,000,000
5
Fix a symlink-related security vulnerability. The fix in commit 34b10878 and contained a small attack time window in between two filesystem operations. This has been fixed.
static inline int __platform_match(struct device *dev, const void *drv) { return platform_match(dev, (struct device_driver *)drv); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
206,829,859,520,230,630,000,000,000,000,000,000,000
4
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
date_s__strptime(int argc, VALUE *argv, VALUE klass) { return date_s__strptime_internal(argc, argv, klass, "%F"); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
112,786,854,121,622,080,000,000,000,000,000,000,000
4
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
void imap_unmunge_mbox_name (IMAP_DATA *idata, char *s) { char *buf; imap_unquote_string(s); buf = safe_strdup (s); if (buf) { imap_utf_decode (idata, &buf); strncpy (s, buf, strlen (s)); } FREE (&buf); }
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
192,058,577,395,917,860,000,000,000,000,000,000,000
15
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
int tls1_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain, int idx) { int i; int rv = 0; int check_flags = 0, strict_mode; CERT_PKEY *cpk = NULL; CERT *c = s->cert; uint32_t *pvalid; unsigned int suiteb_flags = tls1_suiteb(s); /* idx == -1 means check...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
135,544,307,426,011,830,000,000,000,000,000,000,000
246
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
void dm_set_md_type(struct mapped_device *md, enum dm_queue_mode type) { BUG_ON(!mutex_is_locked(&md->type_lock)); md->type = type; }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
43,885,328,651,931,380,000,000,000,000,000,000,000
5
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
EUnsignedCert CSteamNetworkConnectionlocalhostLoopback::AllowRemoteUnsignedCert() { return k_EUnsignedCert_Allow; }
0
[ "CWE-703" ]
GameNetworkingSockets
d944a10808891d202bb1d5e1998de6e0423af678
26,621,620,681,341,573,000,000,000,000,000,000,000
4
Tweak pointer math to avoid possible integer overflow
static unsigned int event_status_media(IDEState *s, uint8_t *buf) { uint8_t event_code, media_status; media_status = 0; if (s->tray_open) { media_status = MS_TRAY_OPEN; } else if (blk_is_inserted(s->blk)) { media_status = MS_MEDIA_PRESENT; } ...
0
[ "CWE-125" ]
qemu
813212288970c39b1800f63e83ac6e96588095c6
327,980,942,087,630,100,000,000,000,000,000,000,000
33
ide: atapi: assert that the buffer pointer is in range A case was reported where s->io_buffer_index can be out of range. The report skimped on the details but it seems to be triggered by s->lba == -1 on the READ/READ CD paths (e.g. by sending an ATAPI command with LBA = 0xFFFFFFFF). For now paper over it with asserti...
void AuthorizationManagerImpl::setShouldValidateAuthSchemaOnStartup(bool validate) { _startupAuthSchemaValidation = validate; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
26,397,148,852,809,990,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
static int io_req_defer(struct io_kiocb *req) { struct io_ring_ctx *ctx = req->ctx; struct io_defer_entry *de; int ret; u32 seq; /* Still need defer if there is pending req in defer list. */ if (likely(list_empty_careful(&ctx->defer_list) && !(req->flags & REQ_F_IO_DRAIN))) return 0; seq = io_get_sequence...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
240,012,646,033,559,230,000,000,000,000,000,000,000
40
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static void XMLRPC_to_PHP(XMLRPC_VALUE el, zval *elem) { const char* pStr; if (el) { XMLRPC_VALUE_TYPE type = XMLRPC_GetValueType(el); switch (type) { case xmlrpc_empty: ZVAL_NULL(elem); break; case xmlrpc_string: pStr = XMLRPC_GetValueString(el); if (pStr) { ZVAL_STRINGL(elem, pStr, ...
0
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
72,257,093,950,267,160,000,000,000,000,000,000,000
57
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c
spnego_gss_verify_mic( OM_uint32 *minor_status, const gss_ctx_id_t context_handle, const gss_buffer_t msg_buffer, const gss_buffer_t token_buffer, gss_qop_t *qop_state) { OM_uint32 ret; spnego_gss_ctx_id_t sc = (spnego_gss_ctx_id_t)context_handle; if (sc->ctx_handle == GSS_C_NO_CONTEXT) return (GSS_S_NO...
0
[ "CWE-18", "CWE-763" ]
krb5
b51b33f2bc5d1497ddf5bd107f791c101695000d
178,118,305,253,287,250,000,000,000,000,000,000,000
20
Fix SPNEGO context aliasing bugs [CVE-2015-2695] The SPNEGO mechanism currently replaces its context handle with the mechanism context handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations ...