func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int smb_vfs_call_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname) { VFS_FIND(stat); return handle->fns->stat(handle, smb_fname); }
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
106,968,866,453,353,680,000,000,000,000,000,000,000
6
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
static int tcp_try_undo_recovery(struct sock *sk) { struct tcp_sock *tp = tcp_sk(sk); if (tcp_may_undo(tp)) { int mib_idx; /* Happy end! We did not retransmit anything * or our original transmission succeeded. */ DBGUNDO(sk, inet_csk(sk)->icsk_ca_state == TCP_CA_Loss ? "loss" : "retrans"); tcp_undo_cw...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
269,114,545,429,052,130,000,000,000,000,000,000,000
30
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
bool FunctionContext::is_arg_constant(int i) const { if (i < 0 || i >= _impl->_constant_args.size()) { return false; } return _impl->_constant_args[i] != nullptr; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
316,942,794,714,456,570,000,000,000,000,000,000,000
6
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i) { struct usb_usbvision *usbvision = video_drvdata(file); usbvision->streaming = stream_on; call_all(usbvision, video, s_stream, 1); return 0; }
0
[ "CWE-17" ]
media_tree
fa52bd506f274b7619955917abfde355e3d19ffe
324,219,805,634,973,500,000,000,000,000,000,000,000
9
[media] usbvision: fix crash on detecting device with invalid configuration The usbvision driver crashes when a specially crafted usb device with invalid number of interfaces or endpoints is detected. This fix adds checks that the device has proper configuration expected by the driver. Reported-by: Ralf Spenneberg <r...
static s32 gf_media_vvc_read_sps_bs_internal(GF_BitStream *bs, VVCState *vvc, u8 layer_id, u32 *vui_flag_pos) { s32 vps_id, sps_id; u32 i, CtbSizeY; VVC_SPS *sps; u8 sps_ptl_dpb_hrd_params_present_flag; if (vui_flag_pos) *vui_flag_pos = 0; sps_id = gf_bs_read_int_log(bs, 4, "sps_id"); if (sps_id >= 16) { ret...
1
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
148,825,474,867,684,870,000,000,000,000,000,000,000
195
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
get_variable_value (var) SHELL_VAR *var; { if (var == 0) return ((char *)NULL); #if defined (ARRAY_VARS) else if (array_p (var)) return (array_reference (array_cell (var), 0)); else if (assoc_p (var)) return (assoc_reference (assoc_cell (var), "0")); #endif else return (value_cell (var)); }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
80,794,563,729,707,090,000,000,000,000,000,000,000
14
commit bash-20120224 snapshot
OFB crypt/decrypt data using key key with cipher cipher starting with iv */ PHP_FUNCTION(mcrypt_ofb) { zval **mode; char *cipher, *key, *data, *iv = NULL; int cipher_len, key_len, data_len, iv_len = 0; MCRYPT_GET_CRYPT_ARGS convert_to_long_ex(mode); php_mcrypt_do_crypt(cipher, key, key_len, data, data_len,...
1
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
271,487,334,764,332,950,000,000,000,000,000,000,000
12
Fix bug #72455: Heap Overflow due to integer overflows
static int get_qcc(Jpeg2000DecoderContext *s, int n, Jpeg2000QuantStyle *q, uint8_t *properties) { int compno; if (bytestream2_get_bytes_left(&s->g) < 1) return AVERROR_INVALIDDATA; compno = bytestream2_get_byteu(&s->g); if (compno >= s->ncomponents) { av_log(s->avc...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
9a271a9368eaabf99e6c2046103acb33957e63b7
140,860,919,764,587,540,000,000,000,000,000,000,000
20
jpeg2000: check log2_cblk dimensions Fixes out of array access Fixes Ticket2895 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
bar_value(int size, uint64_t val) { uint64_t mask; assert(size == 1 || size == 2 || size == 4 || size == 8); mask = (size < 8 ? 1UL << (size * 8) : 0UL) - 1; return val & mask; }
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
124,833,491,220,296,200,000,000,000,000,000,000,000
9
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
gif_fill_in_pixels (GifContext *context, guchar *dest, gint offset, guchar v) { guchar *pixel = NULL; guchar (*cmap)[MAXCOLORMAPSIZE]; if (context->frame_cmap_active) cmap = context->frame_color_map; else cmap = context->global_color_map; if (context->...
0
[]
gdk-pixbuf
f8569bb13e2aa1584dde61ca545144750f7a7c98
128,640,831,877,421,290,000,000,000,000,000,000,000
23
GIF: Don't return a partially initialized pixbuf structure It was found that gdk-pixbuf GIF image loader gdk_pixbuf__gif_image_load() routine did not properly handle certain return values from their subroutines. A remote attacker could provide a specially-crafted GIF image, which once opened in an application, linked ...
ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ { ZVAL_BOOL(result, !zend_is_identical(op1, op2)); return SUCCESS; }
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
247,275,466,253,147,500,000,000,000,000,000,000,000
5
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.
static void uc_fw_unbind_ggtt(struct intel_uc_fw *uc_fw) { struct drm_i915_gem_object *obj = uc_fw->obj; struct i915_ggtt *ggtt = __uc_fw_to_gt(uc_fw)->ggtt; u64 start = uc_fw_ggtt_offset(uc_fw); ggtt->vm.clear_range(&ggtt->vm, start, obj->base.size); }
0
[ "CWE-20", "CWE-190" ]
linux
c784e5249e773689e38d2bc1749f08b986621a26
44,006,834,057,447,320,000,000,000,000,000,000,000
8
drm/i915/guc: Update to use firmware v49.0.1 The latest GuC firmware includes a number of interface changes that require driver updates to match. * Starting from Gen11, the ID to be provided to GuC needs to contain the engine class in bits [0..2] and the instance in bits [3..6]. NOTE: this patch breaks pointer d...
static void wake_all_kswapds(unsigned int order, const struct alloc_context *ac) { struct zoneref *z; struct zone *zone; pg_data_t *last_pgdat = NULL; for_each_zone_zonelist_nodemask(zone, z, ac->zonelist, ac->high_zoneidx, ac->nodemask) { if (last_pgdat != zone->zone_pgdat) wakeup_kswapd(zone, order, ac...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
339,617,283,994,488,660,000,000,000,000,000,000,000
13
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...
static void put_arg_page(struct page *page) { }
0
[ "CWE-200" ]
linux-2.6
b66c5984017533316fd1951770302649baf1aa33
89,690,995,748,855,960,000,000,000,000,000,000,000
3
exec: do not leave bprm->interp on stack If a series of scripts are executed, each triggering module loading via unprintable bytes in the script header, kernel stack contents can leak into the command line. Normally execution of binfmt_script and binfmt_misc happens recursively. However, when modules are enabled, and...
static int php_array_element_export(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; smart_str *buf; level = va_arg(args, int); buf = va_arg(args, smart_str *); if (hash_key->nKeyLength == 0) { /* numeric key */ buffer_append_spaces(buf, level+1); smart_str_app...
0
[]
php-src
e8429400d40e3c3aa4b22ba701991d698a2f3b2f
276,789,099,281,452,000,000,000,000,000,000,000,000
35
Fix bug #70172 - Use After Free Vulnerability in unserialize()
void subselect_union_engine::exclude() { unit->exclude_level(); }
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
246,455,366,774,503,420,000,000,000,000,000,000,000
4
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
autoar_extractor_do_sanitize_pathname (AutoarExtractor *self, const char *pathname_bytes) { GFile *extracted_filename; gboolean valid_filename; g_autofree char *sanitized_pathname = NULL; g_autofree char *utf8_pathname; utf8_pathname = autoar_common_get_utf8_pathna...
0
[ "CWE-22" ]
gnome-autoar
adb067e645732fdbe7103516e506d09eb6a54429
81,271,880,351,242,485,000,000,000,000,000,000,000
42
AutoarExtractor: Do not extract files outside the destination dir Currently, a malicious archive can cause that the files are extracted outside of the destination dir. This can happen if the archive contains a file whose parent is a symbolic link, which points outside of the destination dir. This is potentially a secu...
bfad_im_num_of_ports_show(struct device *dev, struct device_attribute *attr, char *buf) { struct Scsi_Host *shost = class_to_shost(dev); struct bfad_im_port_s *im_port = (struct bfad_im_port_s *) shost->hostdata[0]; struct bfad_s *bfad = im_port->bfad; return snprintf(buf, PAGE_SIZE, "%d\n", bfa_get_npor...
0
[ "CWE-400", "CWE-401" ]
linux
0e62395da2bd5166d7c9e14cbc7503b256a34cb0
150,625,694,796,674,940,000,000,000,000,000,000,000
11
scsi: bfa: release allocated memory in case of error In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to be released. Link: https://lore.kernel.org/r/20190910234417.22151-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Martin K. Petersen <m...
xmlCheckFilename (const char *path) { #ifdef HAVE_STAT struct stat stat_buffer; #endif if (path == NULL) return(0); #ifdef HAVE_STAT #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) /* * On Windows stat and wstat do not work with long pathname, * which start with '\\?\' *...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
110,335,554,364,515,400,000,000,000,000,000,000,000
31
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.
authority_certs_fetch_missing(networkstatus_t *status, time_t now, const char *dir_hint) { /* * The pending_id digestmap tracks pending certificate downloads by * identity digest; the pending_cert digestmap tracks pending downloads * by (identity digest, signing key digest) pair...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
192,819,042,197,701,040,000,000,000,000,000,000,000
297
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static void rlvl_destroy(jpc_enc_rlvl_t *rlvl) { jpc_enc_band_t *band; uint_fast16_t bandno; if (rlvl->bands) { for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; ++bandno, ++band) { band_destroy(band); } jas_free(rlvl->bands); } }
1
[ "CWE-416" ]
jasper
03fe49ab96bf65fea784cdc256507ea88267fc7c
163,368,022,022,545,140,000,000,000,000,000,000,000
13
Fixed some potential double-free problems in the JPC codec.
static int v4l_g_frequency(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct video_device *vfd = video_devdata(file); struct v4l2_frequency *p = arg; if (vfd->vfl_type == VFL_TYPE_SDR) p->type = V4L2_TUNER_SDR; else p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? V4L2_TUN...
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
194,622,904,617,774,420,000,000,000,000,000,000,000
13
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
static void pl022_register_types(void) { type_register_static(&pl022_info); }
0
[ "CWE-119" ]
qemu
d8d0a0bc7e194300e53a346d25fe5724fd588387
199,977,727,212,406,400,000,000,000,000,000,000,000
4
pl022: fix buffer overun on invalid state load CVE-2013-4530 pl022.c did not bounds check tx_fifo_head and rx_fifo_head after loading them from file and before they are used to dereference array. Reported-by: Michael S. Tsirkin <mst@redhat.com Reported-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Micha...
flatpak_proxy_new (const char *dbus_address, const char *socket_path) { FlatpakProxy *proxy; proxy = g_object_new (FLATPAK_TYPE_PROXY, "dbus-address", dbus_address, "socket-path", socket_path, NULL); return proxy; }
0
[ "CWE-284", "CWE-436" ]
flatpak
52346bf187b5a7f1c0fe9075b328b7ad6abe78f6
241,925,563,075,194,400,000,000,000,000,000,000,000
8
Fix vulnerability in dbus proxy During the authentication all client data is directly forwarded to the dbus daemon as is, until we detect the BEGIN command after which we start filtering the binary dbus protocol. Unfortunately the detection of the BEGIN command in the proxy did not exactly match the detection in the ...
key2_print (const struct key2* k, const struct key_type *kt, const char* prefix0, const char* prefix1) { struct gc_arena gc = gc_new (); ASSERT (k->n == 2); dmsg (D_SHOW_KEY_SOURCE, "%s (cipher): %s", prefix0, format_hex (k->keys[0].cipher, kt->cipher_length, 0, &gc)); dmsg (D_SHOW_...
0
[ "CWE-200" ]
openvpn
11d21349a4e7e38a025849479b36ace7c2eec2ee
34,603,677,447,389,210,000,000,000,000,000,000,000
21
Use constant time memcmp when comparing HMACs in openvpn_decrypt. Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: Gert Doering <gert@greenie.muc.de>
httpLocalRequest(ObjectPtr object, int method, int from, int to, HTTPRequestPtr requestor, void *closure) { if(object->requestor == NULL) object->requestor = requestor; if(!disableLocalInterface && urlIsSpecial(object->key, object->key_size)) return httpSpecialRequest(object, m...
1
[ "CWE-617" ]
polipo
0e2b44af619e46e365971ea52b97457bc0778cd3
109,054,380,054,124,660,000,000,000,000,000,000,000
28
Try to read POST requests to local configuration interface correctly.
static int dissect_mswsp_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { smb2_info_t *si = (smb2_info_t*)data; gboolean in; char* fid_name = NULL; guint32 open_frame = 0, close_frame = 0; if (!si) { return 0; } if (si->saved) { dcerpc_fetch_polhnd_data(&si->saved->policy_hnd, &f...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
133,719,507,854,516,980,000,000,000,000,000,000,000
23
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
static int pid_numa_maps_open(struct inode *inode, struct file *file) { return numa_maps_open(inode, file, &proc_pid_numa_maps_op); }
0
[ "CWE-200" ]
linux
ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce
139,585,993,376,640,640,000,000,000,000,000,000,000
4
pagemap: do not leak physical addresses to non-privileged userspace As pointed by recent post[1] on exploiting DRAM physical imperfection, /proc/PID/pagemap exposes sensitive information which can be used to do attacks. This disallows anybody without CAP_SYS_ADMIN to read the pagemap. [1] http://googleprojectzero.bl...
void l2cap_chan_close(struct l2cap_chan *chan, int reason) { struct l2cap_conn *conn = chan->conn; BT_DBG("chan %p state %s", chan, state_to_string(chan->state)); switch (chan->state) { case BT_LISTEN: chan->ops->teardown(chan, 0); break; case BT_CONNECTED: case BT_CONFIG: if (chan->chan_type == L2CAP_CH...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
308,974,243,942,839,600,000,000,000,000,000,000,000
41
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static void t1_getline(void) { int c, l, eexec_scan; char *p; static const char eexec_str[] = "currentfile eexec"; static int eexec_len = 17; restart: if (t1_eof()) normal_error("type 1","unexpected end of file"); t1_line_ptr = t1_line_array; alloc_array(t1_line, 1, T1_BUF_SIZE); ...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
20,353,898,437,599,907,000,000,000,000,000,000,000
61
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
system_call_script(thread_master_t *m, int (*func) (thread_t *), void * arg, unsigned long timer, notify_script_t* script) { pid_t pid; /* Daemonization to not degrade our scheduling timer */ if (log_file_name) flush_log_file(); pid = local_fork(); if (pid < 0) { /* fork error */ log_message(LOG_INFO, "Fa...
1
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
25,082,536,199,682,144,000,000,000,000,000,000,000
31
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) { struct dwc3 *dwc = dep->dwc; if (!dep->endpoint.desc) { dev_err(dwc->dev, "%s: can't queue to disabled endpoint\n", dep->name); return -ESHUTDOWN; } if (WARN(req->dep != dep, "request %pK belongs to '%s'\n", &req->requ...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
288,647,596,053,653,540,000,000,000,000,000,000,000
58
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
ProcessContextOptRef ListenerFactoryContextBaseImpl::processContext() { return server_.processContext(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
70,890,656,767,217,270,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>
request_counter_add_request (RequestCounter counter, Request request) { guint i; for (i = 0; i < REQUEST_TYPE_LAST; i++) { if (REQUEST_WANTS_TYPE (request, i)) { counter[i]++; } } }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
78,250,140,564,129,480,000,000,000,000,000,000,000
11
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-...
gx_page_device_get_page_device(gx_device * dev) { return dev; }
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
24,702,694,664,538,045,000,000,000,000,000,000,000
4
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
CreateForeignDataWrapper(ParseState *pstate, CreateFdwStmt *stmt) { Relation rel; Datum values[Natts_pg_foreign_data_wrapper]; bool nulls[Natts_pg_foreign_data_wrapper]; HeapTuple tuple; Oid fdwId; bool handler_given; bool validator_given; Oid fdwhandler; Oid fdwvalidator; Datum fdwoptions; Oid ...
0
[ "CWE-94" ]
postgres
b9b21acc766db54d8c337d508d0fe2f5bf2daab0
153,821,150,289,648,030,000,000,000,000,000,000,000
110
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...
int MonClient::ping_monitor(const string &mon_id, string *result_reply) { ldout(cct, 10) << __func__ << dendl; string new_mon_id; if (monmap.contains("noname-"+mon_id)) { new_mon_id = "noname-"+mon_id; } else { new_mon_id = mon_id; } if (new_mon_id.empty()) { ldout(cct, 10) << __func__ << " sp...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
13,048,491,179,196,644,000,000,000,000,000,000,000
60
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
static void handle_skipped_hlink(struct file_struct *file, int itemizing, enum logcode code, int f_out) { char fbuf[MAXPATHLEN]; int new_last_ndx; struct file_list *save_flist = cur_flist; /* If we skip the last item in a chain of links and there was a * prior non-skipped hard-link waiting to finish, finish...
0
[ "CWE-59" ]
rsync
e12a6c087ca1eecdb8eae5977be239c24f4dd3d9
70,226,983,275,703,050,000,000,000,000,000,000,000
19
Add parent-dir validation for --no-inc-recurse too.
static int dcbnl_getstate(struct net_device *netdev, struct nlmsghdr *nlh, u32 seq, struct nlattr **tb, struct sk_buff *skb) { /* if (!tb[DCB_ATTR_STATE] || !netdev->dcbnl_ops->getstate) */ if (!netdev->dcbnl_ops->getstate) return -EOPNOTSUPP; return nla_put_u8(skb, DCB_ATTR_STATE, netdev->dcbnl_ops->ge...
0
[ "CWE-399" ]
linux-2.6
29cd8ae0e1a39e239a3a7b67da1986add1199fc0
286,277,531,011,482,500,000,000,000,000,000,000,000
10
dcbnl: fix various netlink info leaks The dcb netlink interface leaks stack memory in various places: * perm_addr[] buffer is only filled at max with 12 of the 32 bytes but copied completely, * no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand, so we're leaking up to 58 bytes for ieee_ets structs...
static ssize_t proc_write( struct file *file, const char __user *buffer, size_t len, loff_t *offset ) { ssize_t ret; struct proc_data *priv = file->private_data; if (!priv->wbuffer) return -EINVAL; ret = simple_write_to_buffer(priv->wbuffer, priv->maxwritelen, offset, buffer, len); if (r...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
154,878,532,882,260,830,000,000,000,000,000,000,000
18
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...
COMPS_HSList* comps_mrtree_keys(COMPS_MRTree * rt) { COMPS_HSList *tmplist, *tmp_subnodes, *ret; COMPS_HSListItem *it; struct Pair { COMPS_HSList * subnodes; char * key; char added; } *pair, *parent_pair; pair = malloc(sizeof(struct Pair)); pair->subnodes = rt->subnodes;...
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
300,176,989,397,351,050,000,000,000,000,000,000,000
77
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
_hb_ot_layout_set_glyph_class (hb_face_t *face, hb_codepoint_t glyph, hb_ot_layout_glyph_class_t klass) { if (HB_OBJECT_IS_INERT (face)) return; /* TODO optimize this? similar to old harfbuzz code for example */ hb_ot_layout_t *layout = &face->ot_layout; ...
0
[ "CWE-119" ]
pango
797d46714d27f147277fdd5346648d838c68fb8c
192,450,385,780,777,170,000,000,000,000,000,000,000
50
[HB/GDEF] Fix bug in building synthetic GDEF table
VOID CALLBACK tq_timer_cb(PVOID arg, BOOLEAN timed_out) { zend_bool *php_timed_out; /* The doc states it'll be always true, however it theoretically could be FALSE when the thread was signaled. */ if (!timed_out) { return; } php_timed_out = (zend_bool *)arg; *php_timed_out = 1; }
0
[ "CWE-134" ]
php-src
b101a6bbd4f2181c360bd38e7683df4a03cba83e
243,797,306,371,248,700,000,000,000,000,000,000,000
13
Use format string
static int addXMLCommand(XMLRPCCmd * xml) { if (XMLRPCCMD == NULL) XMLRPCCMD = mowgli_patricia_create(strcasecanon); mowgli_patricia_add(XMLRPCCMD, xml->name, xml); return XMLRPC_ERR_OK; }
0
[ "CWE-119", "CWE-787" ]
atheme
87580d767868360d2fed503980129504da84b63e
55,140,507,230,794,980,000,000,000,000,000,000,000
9
Do not copy more bytes than were allocated
bool LEX::sp_pop_loop_label(THD *thd, const LEX_CSTRING *label_name) { sp_label *lab= spcont->pop_label(); sphead->backpatch(lab); if (label_name->str && lex_string_cmp(system_charset_info, label_name, &lab->name) != 0) { my_error(ER_SP_LABEL_MISMATCH, MYF(0), label_name->str); ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
115,992,714,816,811,590,000,000,000,000,000,000,000
13
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...
TEST_F(RouterTest, HashKeyNoHashPolicy) { ON_CALL(callbacks_.route_->route_entry_, hashPolicy()).WillByDefault(Return(nullptr)); EXPECT_FALSE(router_.computeHashKey().has_value()); }
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
161,173,970,478,412,280,000,000,000,000,000,000,000
4
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp) { struct file *eventfp, *filep = NULL; struct eventfd_ctx *ctx = NULL; u64 p; long r; int i, fd; /* If you are not the owner, you can become one */ if (ioctl == VHOST_SET_OWNER) { r = vhost_dev_set_owner(d); goto done; } /* ...
1
[ "CWE-399" ]
linux
7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5
219,968,646,784,447,100,000,000,000,000,000,000,000
78
vhost: actually track log eventfd file While reviewing vhost log code, I found out that log_file is never set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet). Cc: stable@vger.kernel.org Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
static void generate_json_object(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj) { char *object_nl = state->object_nl; long object_nl_len = state->object_nl_len; char *indent = state->indent; long indent_len = state->indent_len; long max_nesting = state->max_nesting; char ...
0
[ "CWE-119", "CWE-787" ]
json
8f782fd8e181d9cfe9387ded43a5ca9692266b85
233,130,728,992,771,500,000,000,000,000,000,000,000
48
Fix arbitrary heap exposure problem
static void cma_save_ib_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id, struct ib_sa_path_rec *path) { struct sockaddr_ib *listen_ib, *ib; listen_ib = (struct sockaddr_ib *) &listen_id->route.addr.src_addr; ib = (struct sockaddr_ib *) &id->route.addr.src_addr; ib->sib_family = listen_ib->sib_fami...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
135,345,327,618,853,800,000,000,000,000,000,000,000
21
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) { struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dir); int retval; char name[2 + U32_MAX_DIGITS + 1 + U32_MAX_DIGITS + 1]; u32 perm; p9_debug(P9_DEBUG_VFS, " %lu,%pd mode: %hx MAJOR: %u MINOR: %u\n", dir->i_ino, dentry, mode...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
177,708,942,770,801,660,000,000,000,000,000,000,000
24
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
static void dwc3_disconnect_gadget(struct dwc3 *dwc) { if (dwc->gadget_driver && dwc->gadget_driver->disconnect) { spin_unlock(&dwc->lock); dwc->gadget_driver->disconnect(&dwc->gadget); spin_lock(&dwc->lock); } }
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
57,650,698,906,469,470,000,000,000,000,000,000,000
8
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
static int sctp_bind_add(struct sock *sk, struct sockaddr *addrs, int addrlen) { int err; lock_sock(sk); err = sctp_setsockopt_bindx(sk, addrs, addrlen, SCTP_BINDX_ADD_ADDR); release_sock(sk); return err; }
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
223,221,693,962,563,700,000,000,000,000,000,000,000
10
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
static void bmpmask32toimage(const OPJ_UINT8* pData, OPJ_UINT32 stride, opj_image_t* image, OPJ_UINT32 redMask, OPJ_UINT32 greenMask, OPJ_UINT32 blueMask, OPJ_UINT32 alphaMask) { int index; OPJ_UINT32 width, height; OPJ_UINT32 x, y; const OPJ_UIN...
0
[ "CWE-119", "CWE-787" ]
openjpeg
baf0c1ad4572daa89caa3b12985bdd93530f0dd7
223,288,518,030,544,120,000,000,000,000,000,000,000
61
bmp_read_info_header(): reject bmp files with biBitCount == 0 (#983)
Status ModularFrameDecoder::DecodeGroup(const Rect& rect, BitReader* reader, int minShift, int maxShift, const ModularStreamId& stream, bool zerofill, PassesDec...
0
[ "CWE-787" ]
libjxl
1c05e110d69b457696366fb4e762057b6855349b
326,059,685,007,902,220,000,000,000,000,000,000,000
74
fix use_full_image==false case (#365) Some fixes to the case where the full modular image is skipped: - don't assume that everything happens at the modular AC group level (minShift==0), there can also be upsampling causing channels to have nonzero shift even when there's no Squeeze - for partial decodes (when zero...
CBINDInstallDlg::UpdateService(CString StartName) { SC_HANDLE hSCManager; SC_HANDLE hService; if(m_toolsOnly) return; SetCurrent(IDS_OPEN_SCM); hSCManager= OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (!hSCManager) { MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); return; } DWORD dwStart = SERVICE_D...
0
[ "CWE-284" ]
bind9
967a3b9419a3c12b8c0870c86d1ee3840bcbbad7
321,177,848,808,084,200,000,000,000,000,000,000,000
57
[master] quote service registry paths 4532. [security] The BIND installer on Windows used an unquoted service path, which can enable privilege escalation. (CVE-2017-3141) [RT #45229]
GetStructFieldBufSize(matvar_t *matvar, size_t *size) { int err; size_t nBytes = 0, type_buf_size; size_t tag_size = 8, array_flags_size = 8; *size = 0; if ( matvar == NULL ) return GetEmptyMatrixMaxBufSize(NULL, 2, size); /* Add the Array Flags tag and space to the number of bytes */...
0
[ "CWE-200", "CWE-401" ]
matio
b53b62b756920f4c1509f4ee06427f66c3b5c9c4
180,432,200,620,506,460,000,000,000,000,000,000,000
27
Fix memory leak As reported by https://github.com/tbeu/matio/issues/186
n_start_visual_mode(int c) { #ifdef FEAT_CONCEAL int cursor_line_was_concealed = curwin->w_p_cole > 0 && conceal_cursor_line(curwin); #endif VIsual_mode = c; VIsual_active = TRUE; VIsual_reselect = TRUE; trigger_modechanged(); // Corner case: the 0 position in a tab may change when going...
1
[ "CWE-122" ]
vim
a062006b9de0b2947ab5fb376c6e67ef92a8cd69
50,861,159,610,133,700,000,000,000,000,000,000,000
47
patch 8.2.3610: crash when ModeChanged triggered too early Problem: Crash when ModeChanged triggered too early. Solution: Trigger ModeChanged after setting VIsual.
MagickExport Image *TransposeImage(const Image *image,ExceptionInfo *exception) { #define TransposeImageTag "Transpose/Image" CacheView *image_view, *transpose_view; Image *transpose_image; MagickBooleanType status; MagickOffsetType progress; RectangleInfo page; ssize_t y;...
0
[ "CWE-190" ]
ImageMagick
64dc80b2e1907f7f20bf34d4df9483f938b0de71
126,077,873,436,594,700,000,000,000,000,000,000,000
112
https://github.com/ImageMagick/ImageMagick/issues/1731
check_secret_key (ECC_secret_key *sk, mpi_ec_t ec, int flags) { int rc = 1; mpi_point_struct Q; gcry_mpi_t x1, y1; gcry_mpi_t x2 = NULL; gcry_mpi_t y2 = NULL; point_init (&Q); x1 = mpi_new (0); if (ec->model == MPI_EC_MONTGOMERY) y1 = NULL; else y1 = mpi_new (0); /* G in E(F_p) */ if (!_...
0
[ "CWE-200" ]
libgcrypt
bf76acbf0da6b0f245e491bec12c0f0a1b5be7c9
196,953,019,922,368,270,000,000,000,000,000,000,000
107
ecc: Add input validation for X25519. * cipher/ecc.c (ecc_decrypt_raw): Add input validation. * mpi/ec.c (ec_p_init): Use scratch buffer for bad points. (_gcry_mpi_ec_bad_point): New. -- Following is the paper describing the attack: May the Fourth Be With You: A Microarchitectural Side Channel Attack on Rea...
flags_from_portable(int pflags) { int flags = 0; if ((pflags & SSH2_FXF_READ) && (pflags & SSH2_FXF_WRITE)) { flags = O_RDWR; } else if (pflags & SSH2_FXF_READ) { flags = O_RDONLY; } else if (pflags & SSH2_FXF_WRITE) { flags = O_WRONLY; } if (pflags & SSH2_FXF_APPEND) flags |= O_APPEND; if (pflags ...
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
11,547,849,949,785,519,000,000,000,000,000,000,000
22
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
static void mct_u232_break_ctl(struct tty_struct *tty, int break_state) { struct usb_serial_port *port = tty->driver_data; struct mct_u232_private *priv = usb_get_serial_port_data(port); unsigned char lcr; unsigned long flags; spin_lock_irqsave(&priv->lock, flags); lcr = priv->last_lcr; if (break_state) lcr ...
0
[ "CWE-703" ]
linux
4e9a0b05257f29cf4b75f3209243ed71614d062e
284,791,309,673,935,430,000,000,000,000,000,000,000
16
USB: mct_u232: add sanity checking in probe An attack using the lack of sanity checking in probe is known. This patch checks for the existence of a second port. CVE-2016-3136 Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org [johan: add error message ] Signed-off-by: Johan Hovold <johan@kern...
static int monitor_interception(struct vcpu_svm *svm) { printk_once(KERN_WARNING "kvm: MONITOR instruction emulated as NOP!\n"); return nop_interception(svm); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
189,762,884,360,453,900,000,000,000,000,000,000,000
5
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...
dfamust (struct dfa *d) { must *musts; must *mp; char *result; size_t ri; size_t i; int exact; token t; static must must0; struct dfamust *dm; static char empty_string[] = ""; result = empty_string; exact = 0; MALLOC (musts, d->tindex + 1); mp = musts; for (i = 0; i <= d->tindex; ++i) ...
0
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
33,238,087,462,623,470,000,000,000,000,000,000,000
226
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
static void ipv6_mc_rejoin_groups(struct inet6_dev *idev) { struct ifmcaddr6 *pmc; ASSERT_RTNL(); mutex_lock(&idev->mc_lock); if (mld_in_v1_mode(idev)) { for_each_mc_mclock(idev, pmc) igmp6_join_group(pmc); } else { mld_send_report(idev, NULL); } mutex_unlock(&idev->mc_lock); }
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
96,861,043,802,199,520,000,000,000,000,000,000,000
15
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
StreamEncoder& ClientConnectionImpl::newStream(StreamDecoder& response_decoder) { if (resetStreamCalled()) { throw CodecClientException("cannot create new streams after calling reset"); } // If reads were disabled due to flow control, we expect reads to always be enabled again before // reusing this connec...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
197,230,253,310,208,000,000,000,000,000,000,000,000
13
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static void cli_flush_use_result(MYSQL *mysql, my_bool flush_all_results) { /* Clear the current execution status */ DBUG_ENTER("cli_flush_use_result"); DBUG_PRINT("warning",("Not all packets read, clearing them")); if (flush_one_result(mysql)) DBUG_VOID_RETURN; /* An error occurr...
0
[ "CWE-254" ]
mysql-server
13380bf81f6bc20d39549f531f9acebdfb5a8c37
76,757,697,035,975,810,000,000,000,000,000,000,000
38
Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM
ipmi_fru_read_internal_use(struct ipmi_intf * intf, uint8_t id, char * pFileName) { struct fru_info fru; uint16_t size; uint16_t offset; int rc = 0; rc = ipmi_fru_get_internal_use_info(intf, id, &fru, &size, &offset); if(rc == 0) { uint8_t * frubuf; lprintf(LOG_DEBUG, "Internal Use Area Offset: %i", offse...
0
[ "CWE-120", "CWE-787" ]
ipmitool
e824c23316ae50beb7f7488f2055ac65e8b341f2
290,397,334,096,765,840,000,000,000,000,000,000,000
63
fru: Fix buffer overflow vulnerabilities Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `read_fru_area_section` function only performs size validation of requested read size, and falsely assumes that the IPMI message will not respond with more than ...
static void pmac_backlight_unblank(void) { mutex_lock(&pmac_backlight_mutex); if (pmac_backlight) { struct backlight_properties *props; props = &pmac_backlight->props; props->brightness = props->max_brightness; props->power = FB_BLANK_UNBLANK; backlight_update_status(pmac_backlight); } mutex_unlock(&pmac...
0
[]
linux
5d176f751ee3c6eededd984ad409bff201f436a7
51,647,088,605,088,020,000,000,000,000,000,000,000
13
powerpc: tm: Enable transactional memory (TM) lazily for userspace Currently the MSR TM bit is always set if the hardware is TM capable. This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and TFAIR) must be swapped for each process regardless of if they use TM. For processes that don't use TM the TM MSR ...
static int file_map_prot_check(struct file *file, unsigned long prot, int shared) { const struct cred *cred = current_cred(); int rc = 0; #ifndef CONFIG_PPC32 if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) { /* * We are making executable an anonymous mapping or a * private file mappi...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
17,074,033,501,534,610,000,000,000,000,000,000,000
35
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int file_read(jas_stream_obj_t *obj, char *buf, int cnt) { jas_stream_fileobj_t *fileobj; JAS_DBGLOG(100, ("file_read(%p, %p, %d)\n", obj, buf, cnt)); fileobj = JAS_CAST(jas_stream_fileobj_t *, obj); return read(fileobj->fd, buf, cnt); }
0
[ "CWE-415", "CWE-190", "CWE-369" ]
jasper
634ce8e8a5accc0fa05dd2c20d42b4749d4b2735
8,139,650,960,061,536,000,000,000,000,000,000,000
7
Made some changes to the I/O stream library for memory streams. There were a number of potential problems due to the possibility of integer overflow. Changed some integral types to the larger types size_t or ssize_t. For example, the function mem_resize now takes the buffer size parameter as a size_t. Added a new funct...
void LibRaw::exp_bef(float shift, float smooth) { // params limits if(shift>8) shift = 8; if(shift<0.25) shift = 0.25; if(smooth < 0.0) smooth = 0.0; if(smooth > 1.0) smooth = 1.0; unsigned short *lut = (ushort*)malloc((TBLN+1)*sizeof(unsigned short)); if(shift <=1.0) { ...
1
[ "CWE-119", "CWE-787" ]
LibRaw
2f912f5b33582961b1cdbd9fd828589f8b78f21d
152,471,740,197,897,450,000,000,000,000,000,000,000
53
fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef
int git_index_snapshot_find( size_t *out, git_vector *entries, git_vector_cmp entry_srch, const char *path, size_t path_len, int stage) { return index_find_in_entries(out, entries, entry_srch, path, path_len, stage); }
0
[ "CWE-415", "CWE-190" ]
libgit2
3db1af1f370295ad5355b8f64b865a2a357bcac0
11,113,038,455,120,042,000,000,000,000,000,000,000
6
index: error out on unreasonable prefix-compressed path lengths When computing the complete path length from the encoded prefix-compressed path, we end up just allocating the complete path without ever checking what the encoded path length actually is. This can easily lead to a denial of service by just encoding an un...
ebb_ews_store_x_attribute (EContact *contact, const gchar *xname, const gchar *value) { EVCardAttribute *attr; g_return_if_fail (E_IS_CONTACT (contact)); g_return_if_fail (xname != NULL); ebb_ews_remove_x_attribute (contact, xname); if (!value) return; attr = e_vcard_attribute_new ("", xname); ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
142,847,021,856,113,870,000,000,000,000,000,000,000
18
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static inline void cpu_to_ube32(uint8_t *buf, unsigned int val) { buf[0] = val >> 24; buf[1] = val >> 16; buf[2] = val >> 8; buf[3] = val & 0xff; }
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
230,678,413,681,133,530,000,000,000,000,000,000,000
7
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
gs_manager_finalize (GObject *object) { GSManager *manager; g_return_if_fail (object != NULL); g_return_if_fail (GS_IS_MANAGER (object)); manager = GS_MANAGER (object); g_return_if_fail (manager->priv != NULL); if (manager->priv->bg_notify_id != 0) { g...
1
[]
gnome-screensaver
f6d3defdc7080a540d7f8df15dc309a9364ae668
340,204,079,059,999,640,000,000,000,000,000,000,000
50
Create or remove windows as number of monitors changes due to randr 1.2 2008-08-20 William Jon McCann <jmccann@redhat.com> * src/gs-manager.c (gs_manager_create_window_for_monitor), (on_screen_monitors_changed), (gs_manager_destroy_windows), (gs_manager_finalize), (gs_manager_create_windows_for_screen): Create ...
size_t olm_pk_max_plaintext_length( OlmPkDecryption * decryption, size_t ciphertext_length ) { return _olm_cipher_aes_sha_256_ops.decrypt_max_plaintext_length( olm_pk_cipher, olm::decode_base64_length(ciphertext_length) ); }
0
[ "CWE-787" ]
olm
ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b
225,070,997,079,150,530,000,000,000,000,000,000,000
8
olm_pk_decrypt: Ensure inputs are of correct length.
policies_parse_exit_policy_internal(config_line_t *cfg, smartlist_t **dest, int ipv6_exit, int rejectprivate, const smartlist_t *configured_addresses, ...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
43,023,115,199,804,620,000,000,000,000,000,000,000
43
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static int ip_vs_info_seq_show(struct seq_file *seq, void *v) { if (v == SEQ_START_TOKEN) { seq_printf(seq, "IP Virtual Server version %d.%d.%d (size=%d)\n", NVERSION(IP_VS_VERSION_CODE), IP_VS_CONN_TAB_SIZE); seq_puts(seq, "Prot LocalAddress:Port Scheduler Flags\n"); seq_puts(seq, " -> RemoteAddr...
0
[ "CWE-119", "CWE-787" ]
linux
04bcef2a83f40c6db24222b27a52892cba39dffb
193,899,404,618,802,530,000,000,000,000,000,000,000
70
ipvs: Add boundary check on ioctl arguments The ipvs code has a nifty system for doing the size of ioctl command copies; it defines an array with values into which it indexes the cmd to find the right length. Unfortunately, the ipvs code forgot to check if the cmd was in the range that the array provides, allowing fo...
static int init_rmode_identity_map(struct kvm *kvm) { int i, r, ret; pfn_t identity_map_pfn; u32 tmp; if (!enable_ept) return 1; if (unlikely(!kvm->arch.ept_identity_pagetable)) { printk(KERN_ERR "EPT: identity-mapping pagetable " "haven't been allocated!\n"); return 0; } if (likely(kvm->arch.ept_ident...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
92,108,942,488,564,020,000,000,000,000,000,000,000
34
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
void qmp_guest_suspend_disk(Error **errp) { Error *local_err = NULL; GuestSuspendMode *mode = g_new(GuestSuspendMode, 1); *mode = GUEST_SUSPEND_MODE_DISK; check_suspend_mode(*mode, &local_err); acquire_privilege(SE_SHUTDOWN_NAME, &local_err); execute_async(do_suspend, mode, &local_err); if...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
65,110,341,573,646,400,000,000,000,000,000,000,000
15
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
void *Type_ProfileSequenceDesc_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag) { cmsSEQ* OutSeq; cmsUInt32Number i, Count; *nItems = 0; if (!_cmsReadUInt32Number(io, &Count)) return NULL; if (SizeOfTag < sizeof(cmsUInt32Number)) ret...
1
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
178,317,971,097,833,900,000,000,000,000,000,000,000
51
Fixes from coverity check
GF_Err gnrv_Read(GF_Box *s, GF_BitStream *bs) { return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
287,330,678,435,310,300,000,000,000,000,000,000,000
4
prevent dref memleak on invalid input (#1183)
coroutine_fn iscsi_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes) { IscsiLun *iscsilun = bs->opaque; struct IscsiTask iTask; struct unmap_list list; int r = 0; if (!is_byte_request_lun_aligned(offset, bytes, iscsilun)) { return -ENOTSUP; } if (!iscsilun->lbp.lbpu) { ...
0
[ "CWE-125" ]
qemu
ff0507c239a246fd7215b31c5658fc6a3ee1e4c5
266,325,439,274,934,000,000,000,000,000,000,000,000
61
block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb There is an overflow, the source 'datain.data[2]' is 100 bytes, but the 'ss' is 252 bytes.This may cause a security issue because we can access a lot of unrelated memory data. The len for sbp copy data should take the minimum of mx_sb_len and sb_len_wr, no...
pci_get_cfgdata16(struct pci_vdev *dev, int offset) { if ((offset > PCI_REGMAX - 1) || (offset & 1) != 0) { pr_err("%s: out of range of PCI config space!\n", __func__); return 0xffff; } return (*(uint16_t *)(dev->cfgdata + offset)); }
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
2b3dedfb9ba13f15887f22b935d373f36c9a59fa
194,365,449,031,342,000,000,000,000,000,000,000,000
8
dm: pci: clean up assert() in pci core Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
int fat_subdirs(struct inode *dir) { struct buffer_head *bh; struct msdos_dir_entry *de; loff_t cpos; int count = 0; bh = NULL; cpos = 0; while (fat_get_short_entry(dir, &cpos, &bh, &de) >= 0) { if (de->attr & ATTR_DIR) count++; } brelse(bh); return count; }
0
[]
linux-2.6
c483bab099cb89e92b7cad94a52fcdaf37e56657
221,150,289,131,148,840,000,000,000,000,000,000,000
16
fat: fix VFAT compat ioctls on 64-bit systems If you compile and run the below test case in an msdos or vfat directory on an x86-64 system with -m32 you'll get garbage in the kernel_dirent struct followed by a SIGSEGV. The patch fixes this. Reported and initial fix by Bart Oldeman #include <sys/types.h> #include <s...
set_max_block_time(self, time) VALUE self; VALUE time; { struct Tcl_Time tcl_time; VALUE divmod; switch(TYPE(time)) { case T_FIXNUM: case T_BIGNUM: /* time is micro-second value */ divmod = rb_funcall(time, rb_intern("divmod"), 1, LONG2NUM(1000000)); tcl_time.sec = ...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
322,811,910,419,656,770,000,000,000,000,000,000,000
34
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
static void jsR_callcfunction(js_State *J, int n, int min, js_CFunction F) { int i; js_Value v; for (i = n; i < min; ++i) js_pushundefined(J); F(J); v = *stackidx(J, -1); TOP = --BOT; /* clear stack */ js_pushvalue(J, v); }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
39,501,193,780,260,324,000,000,000,000,000,000,000
13
Fix 697401: Error when dropping extra arguments to lightweight functions.
static __latent_entropy struct task_struct *copy_process( unsigned long clone_flags, unsigned long stack_start, unsigned long stack_size, int __user *child_tidptr, struct pid *pid, int trace, unsigned long tls, int node) { int retval; struct task_struct *p; struct multiprocess...
0
[ "CWE-362" ]
linux
7b55851367136b1efd84d98fea81ba57a98304cf
252,164,488,133,332,900,000,000,000,000,000,000,000
492
fork: record start_time late This changes the fork(2) syscall to record the process start_time after initializing the basic task structure but still before making the new process visible to user-space. Technically, we could record the start_time anytime during fork(2). But this might lead to scenarios where a start_...
mlx5_tx_dseg_vlan(struct mlx5_txq_data *restrict txq, struct mlx5_txq_local *restrict loc __rte_unused, struct mlx5_wqe_dseg *restrict dseg, uint8_t *buf, unsigned int len, unsigned int olx __rte_unused) { unsigned int part; uint8_t *pdst; assert(len > MLX5_ESEG_MIN_INLINE_SIZE); static_assert...
0
[]
dpdk-stable
8b090f2664e9d014cd8fa0fde90597aaf4349e7e
274,603,463,083,581,100,000,000,000,000,000,000,000
57
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
static int ssl_parse_ecjpake_kkpp( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) { int ret; if( ssl->transform_negotiate->ciphersuite_info->key_exchange != MBEDTLS_KEY_EXCHANGE_ECJPAKE ) { MBEDTLS_SSL_D...
0
[ "CWE-119", "CWE-125", "CWE-295" ]
mbedtls
a1098f81c252b317ad34ea978aea2bc47760b215
38,321,314,133,837,947,000,000,000,000,000,000,000
29
Add bounds check before signature length read
void onDataInternal(Buffer::Instance& data) { buffer_.add(data); while (true) { if (size_ == 0) { uint16_t size_n; if (buffer_.length() < sizeof(size_n)) { // If we don't have enough bytes to determine size, wait until we do. return; } ...
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
284,957,438,943,359,600,000,000,000,000,000,000,000
155
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, struct ip_options *opt) { struct tcp_options_received tcp_opt; u8 *hash_location; struct inet_request_sock *ireq; struct tcp_request_sock *treq; struct tcp_sock *tp = tcp_sk(sk); const struct tcphdr *th = tcp_hdr(skb); __u32 cookie = ntoh...
1
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
148,163,105,186,983,800,000,000,000,000,000,000,000
112
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...
static void mmtimer_set_next_timer(int nodeid) { struct mmtimer_node *n = &timers[nodeid]; struct mmtimer *x; struct k_itimer *t; int o; restart: if (n->next == NULL) return; x = rb_entry(n->next, struct mmtimer, list); t = x->timer; if (!t->it.mmtimer.incr) { /* Not an interval timer */ if (!mmtimer_se...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
313,441,642,630,882,140,000,000,000,000,000,000,000
56
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 ...
uint32_t crypt_get_compatibility(struct crypt_device *cd) { if (cd) return cd->compatibility; return 0; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
90,062,438,258,234,490,000,000,000,000,000,000,000
7
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static void vvc_compute_poc(VVCSliceInfo *si) { u32 max_poc_lsb = 1 << (si->sps->log2_max_poc_lsb); /*POC reset for IDR frames, NOT for CRA*/ if (si->irap_or_gdr_pic && !si->gdr_pic) { si->poc_lsb_prev = 0; si->poc_msb_prev = 0; } if (si->poc_msb_cycle_present_flag) { si->poc_msb = si->poc_msb_cycle; } el...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
335,142,549,690,232,950,000,000,000,000,000,000,000
23
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static void cli_server_init_globals(zend_cli_server_globals *cg TSRMLS_DC) { cg->color = 0; }
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
44,283,818,163,537,060,000,000,000,000,000,000,000
4
slim post data
static inline bool is_invalid_opcode(u32 intr_info) { return (intr_info & (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VECTOR_MASK | INTR_INFO_VALID_MASK)) == (INTR_TYPE_HARD_EXCEPTION | UD_VECTOR | INTR_INFO_VALID_MASK); }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
107,657,002,480,146,560,000,000,000,000,000,000,000
6
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
UsbHubResetPort ( IN USB_INTERFACE *HubIf, IN UINT8 Port ) { EFI_USB_PORT_STATUS PortState; UINTN Index; EFI_STATUS Status; Status = UsbHubSetPortFeature (HubIf, Port, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_RESET); if (EFI_ERROR (Status...
0
[ "CWE-787" ]
edk2
acebdf14c985c5c9f50b37ece0b15ada87767359
225,719,403,125,446,950,000,000,000,000,000,000,000
44
MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 HUB descriptor has variable length. But the code uses stack (HubDesc in UsbHubInit) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It uses hard code length value...
stack_double(int is_alloca, char** arg_alloc_base, OnigStackType** arg_stk_base, OnigStackType** arg_stk_end, OnigStackType** arg_stk, OnigMatchArg* msa) { unsigned int n; int used; size_t size; size_t new_size; char* alloc_base; char* new_alloc_base; OnigStackType *stk_base, *stk_end, *...
0
[ "CWE-125" ]
oniguruma
690313a061f7a4fa614ec5cc8368b4f2284e059b
109,418,410,253,903,950,000,000,000,000,000,000,000
53
fix #57 : DATA_ENSURE() check must be before data access
static int mov_read_saiz(MOVContext *c, AVIOContext *pb, MOVAtom atom) { MOVEncryptionIndex *encryption_index; MOVStreamContext *sc; int ret; unsigned int sample_count, aux_info_type, aux_info_param; ret = get_current_encryption_info(c, &encryption_index, &sc); if (ret != 1) return ret;...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
306,737,486,190,364,260,000,000,000,000,000,000,000
71
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>