func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool DDeviceDiskInfoPrivate::atEnd() const { if (!process) { return buffer.atEnd(); } process->waitForReadyRead(-1); return process->atEnd(); }
0
[ "CWE-59", "CWE-61" ]
deepin-clone
e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab
251,899,232,621,785,800,000,000,000,000,000,000,000
10
fix: Do not use the "/tmp" directory https://github.com/linuxdeepin/deepin-clone/issues/16 https://bugzilla.opensuse.org/show_bug.cgi?id=1130388
void msPostGISEnablePaging(layerObj *layer, int value) { #ifdef USE_POSTGIS msPostGISLayerInfo *layerinfo = NULL; if (layer->debug) { msDebug("msPostGISEnablePaging called.\n"); } if(!msPostGISLayerIsOpen(layer)) msPostGISLayerOpen(layer); assert( layer->layerinfo != NULL); layerinfo = (msPostGI...
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
224,991,649,749,466,500,000,000,000,000,000,000,000
24
Fix potential SQL Injection with postgis TIME filters (#4834)
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const Tensor& segment_ids = context->input(1); if (!SegmentReductionDoValidation(context, input, segment_ids)) { return; } const int64 num_indices = segment_ids.NumElements(); auto input_flat = i...
0
[ "CWE-703", "CWE-681", "CWE-787" ]
tensorflow
db4f9717c41bccc3ce10099ab61996b246099892
202,204,606,073,883,660,000,000,000,000,000,000,000
115
Fix heap buffer overflow in UnsortedSegmentSum. When Index=int32, data_size and num_segments were truncated from int64 to int32. This truncation can produce negative numbers, which causes UnsortedSegmentFunctor to access out of bounds memory. Also: - Switches some indexing calculations to int64 to avoid signed intege...
static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos) { struct sg_proc_deviter * it = s->private; *pos = ++it->index; return (it->index < it->max) ? it : NULL; }
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
115,145,869,631,821,330,000,000,000,000,000,000,000
7
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
xmlBufferWriteChar(xmlBufferPtr buf, const char *string) { if (buf == NULL) return; if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return; xmlBufferCCat(buf, string); }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
314,129,801,125,263,870,000,000,000,000,000,000,000
6
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
static char *to_led_name(int selector) { switch (selector) { case HUB_LED_AMBER: return "amber"; case HUB_LED_GREEN: return "green"; case HUB_LED_OFF: return "off"; case HUB_LED_AUTO: return "auto"; default: return "??"; } }
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
279,166,753,092,620,540,000,000,000,000,000,000,000
15
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
Formattable::getLong(UErrorCode& status) const { if (U_FAILURE(status)) { return 0; } switch (fType) { case Formattable::kLong: return (int32_t)fValue.fInt64; case Formattable::kInt64: if (fValue.fInt64 > INT32_MAX) { status = U_INVALID_FORMAT_ERROR; ...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
125,154,439,760,548,360,000,000,000,000,000,000,000
45
ICU-20246 Fixing another integer overflow in number parsing.
horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc) { TIFFPredictorState* sp = PredictorState(tif); tmsize_t stride = sp->stride; unsigned char* cp = (unsigned char*) cp0; assert((cc%stride)==0); if (cc > stride) { cc -= stride; /* * Pipeline the most common cases. */ if (stride == 3) { unsigned int r1, ...
1
[ "CWE-119", "CWE-787" ]
libtiff
3ca657a8793dd011bf869695d72ad31c779c3cc1
188,779,069,964,547,170,000,000,000,000,000,000,000
45
* libtiff/tif_predict.h, libtiff/tif_predict.c: Replace assertions by runtime checks to avoid assertions in debug mode, or buffer overflows in release mode. Can happen when dealing with unusual tile size like YCbCr with subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities &...
static BOOL rdp_write_rfx_server_capability_container(wStream* s, const rdpSettings* settings) { WINPR_UNUSED(settings); if (!Stream_EnsureRemainingCapacity(s, 8)) return FALSE; Stream_Write_UINT16(s, 4); /* codecPropertiesLength */ Stream_Write_UINT32(s, 0); /* reserved */ return TRUE; }
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
30,381,998,541,812,810,000,000,000,000,000,000,000
10
Fixed #6011: Bounds check in rdp_read_font_capability_set
int mutt_ssl_starttls (CONNECTION* conn) { sslsockdata* ssldata; int maxbits; long ssl_options = 0; if (ssl_init()) goto bail; ssldata = (sslsockdata*) safe_calloc (1, sizeof (sslsockdata)); /* the ssl_use_xxx protocol options don't apply. We must use TLS in TLS. * * However, we need to be able ...
1
[ "CWE-74" ]
mutt
c547433cdf2e79191b15c6932c57f1472bfb5ff4
29,185,884,844,725,413,000,000,000,000,000,000,000
120
Fix STARTTLS response injection attack. Thanks again to Damian Poddebniak and Fabian Ising from the Münster University of Applied Sciences for reporting this issue. Their summary in ticket 248 states the issue clearly: We found another STARTTLS-related issue in Mutt. Unfortunately, it affects SMTP, POP3 and IMAP...
static double mp_matrix_svd(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const double *ptr1 = &_mp_arg(2) + 1; const unsigned int k = (unsigned int)mp.opcode[3], l = (unsigned int)mp.opcode[4]; CImg<doubleT> U, S, V; CImg<doubleT>(ptr1,k,l,1...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
64,696,873,204,247,240,000,000,000,000,000,000,000
13
Fix other issues in 'CImg<T>::load_bmp()'.
int jas_image_getcmptbytype(jas_image_t *image, int ctype) { int cmptno; for (cmptno = 0; cmptno < image->numcmpts_; ++cmptno) { if (image->cmpts_[cmptno]->type_ == ctype) { return cmptno; } } return -1; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
243,798,819,948,144,540,000,000,000,000,000,000,000
11
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static inline void dma_contiguous_set_default(struct cma *cma) { }
0
[ "CWE-682" ]
linux
67a2e213e7e937c41c52ab5bc46bf3f4de469f6e
305,414,757,425,285,800,000,000,000,000,000,000,000
1
mm: cma: fix incorrect type conversion for size during dma allocation This was found during userspace fuzzing test when a large size dma cma allocation is made by driver(like ion) through userspace. show_stack+0x10/0x1c dump_stack+0x74/0xc8 kasan_report_error+0x2b0/0x408 kasan_report+0x34/0x40 __asan_storeN...
static bool io_get_sqring(struct io_ring_ctx *ctx, struct io_kiocb *req, const struct io_uring_sqe **sqe_ptr) { u32 *sq_array = ctx->sq_array; unsigned head; /* * The cached sq head (or cq tail) serves two purposes: * * 1) allows us to batch the cost of updating the user visible * head updates. * ...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
243,303,685,487,754,000,000,000,000,000,000,000,000
35
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
gdata_service_update_entry_async (GDataService *self, GDataAuthorizationDomain *domain, GDataEntry *entry, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSimpleAsyncResult *result; UpdateEntryAsyncData *data; g_return_if_fail (GDATA_IS_SERVICE (self...
0
[ "CWE-20" ]
libgdata
6799f2c525a584dc998821a6ce897e463dad7840
38,351,852,386,233,780,000,000,000,000,000,000,000
20
core: Validate SSL certificates for all connections This prevents MitM attacks which use spoofed SSL certificates. Note that this bumps our libsoup requirement to 2.37.91. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535
xmlValidateQName(const xmlChar *value, int space) { const xmlChar *cur = value; int c,l; if (value == NULL) return(-1); /* * First quick algorithm for ASCII range */ if (space) while (IS_BLANK_CH(*cur)) cur++; if (((*cur >= 'a') && (*cur <= 'z')) || ((*cur >= 'A') && (*cur <=...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
243,304,189,615,291,100,000,000,000,000,000,000,000
86
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) char *string; int *sindex; char *opener, *alt_opener, *closer; int flags; { int i, c, si; size_t slen; char *t, *result; int pass_character, nesting_level, in_comment; int len_closer, len_opener, len_alt_opener; ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
261,944,469,311,356,040,000,000,000,000,000,000,000
158
bash-4.4-rc2 release
int input_device_set_channel(const bdaddr_t *src, const bdaddr_t *dst, int psm, GIOChannel *io) { struct input_device *idev = find_device(src, dst); GIOCondition cond = G_IO_HUP | G_IO_ERR | G_IO_NVAL; DBG("idev %p psm %d", idev, psm); if (!idev) return -ENOENT; if (uhid_enabled) cond |= G_IO_IN; ...
0
[]
bluez
3cccdbab2324086588df4ccf5f892fb3ce1f1787
122,732,275,057,275,730,000,000,000,000,000,000,000
36
HID accepts bonded device connections only. This change adds a configuration for platforms to choose a more secure posture for the HID profile. While some older mice are known to not support pairing or encryption, some platform may choose a more secure posture by requiring the device to be bonded and require the con...
static void test_long_data_str1() { MYSQL_STMT *stmt; int rc, i; char data[255]; long length; ulong max_blob_length, blob_length, length1; my_bool true_value; MYSQL_RES *result; MYSQL_BIND my_bind[2]; MYSQL_FIELD *field; char query[MAX_TEST_QUERY_LENGTH]; myheader("tes...
0
[ "CWE-416" ]
mysql-server
4797ea0b772d5f4c5889bc552424132806f46e93
60,827,631,305,422,250,000,000,000,000,000,000,000
155
BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST() Analysis: --------- Invalid memory access maybe observed when using prepared statements if: a) The mysql client connection is lost after statement preparation is complete and b) There is at least one statement which is in initialized state but not ...
const CImg<T>& save_inr(const char *const filename, const float *const voxel_size=0) const { return _save_inr(0,filename,voxel_size); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
261,145,994,526,341,470,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Magick::ClassType Magick::Image::classType(void) const { return static_cast<Magick::ClassType>(constImage()->storage_class); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
106,356,755,347,536,750,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
void HRangeAnalysis::Analyze() { HPhase phase("H_Range analysis", graph_); Analyze(graph_->entry_block()); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
313,241,395,649,339,600,000,000,000,000,000,000,000
4
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
void Discovered_table_list::sort() { tables->sort(cmp_table_names); }
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
32,840,250,906,458,737,000,000,000,000,000,000,000
4
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
coolkey_get_attribute_data(const u8 *attr, u8 object_record_type, size_t buf_len, sc_cardctl_coolkey_attribute_t *attr_out) { /* handle the V0 objects first */ if (object_record_type == COOLKEY_V0_OBJECT) { return coolkey_v0_get_attribute_data(attr, buf_len, attr_out); } /* don't crash if we encounter some new o...
0
[ "CWE-415" ]
OpenSC
c246f6f69a749d4f68626b40795a4f69168008f4
247,908,817,052,874,600,000,000,000,000,000,000,000
15
coolkey: Make sure the object ID is unique when filling list Thanks to oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208
httpClientShutdownHandler(int status, FdEventHandlerPtr event, StreamRequestPtr request) { HTTPConnectionPtr connection = request->data; assert(connection->flags & CONN_READER); if(!(connection->flags & CONN_WRITER)) { connection->flags &= ~CONN_READER; connection...
0
[ "CWE-617" ]
polipo
0e2b44af619e46e365971ea52b97457bc0778cd3
128,237,938,110,065,670,000,000,000,000,000,000,000
21
Try to read POST requests to local configuration interface correctly.
static ssize_t drop_sync(QIOChannel *ioc, size_t size) { ssize_t ret = 0; char small[1024]; char *buffer; buffer = sizeof(small) >= size ? small : g_malloc(MIN(65536, size)); while (size > 0) { ssize_t count = read_sync(ioc, buffer, MIN(65536, size)); if (count <= 0) { ...
0
[ "CWE-787" ]
qemu
2563c9c6b8670400c48e562034b321a7cf3d9a85
22,199,122,594,180,884,000,000,000,000,000,000,000
24
nbd/client: fix drop_sync [CVE-2017-2630] Comparison symbol is misused. It may lead to memory corruption. Introduced in commit 7d3123e. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20170203154757.36140-6-vsementsov@virtuozzo.com> [eblake: add CVE details, update conditional] Sig...
virtual Ref_Type ref_type() { return DIRECT_REF; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
78,173,306,611,392,490,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
static void usbredir_bulk_streams_status(void *priv, uint64_t id, struct usb_redir_bulk_streams_status_header *bulk_streams_status) { #if USBREDIR_VERSION >= 0x000700 USBRedirDevice *dev = priv; if (bulk_streams_status->status == usb_redir_success) { DPRINTF("bulk streams status %d eps %08x\n", ...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
277,097,184,455,234,630,000,000,000,000,000,000,000
18
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
void set_harakiri(struct wsgi_request *wsgi_req, int sec) { if (!wsgi_req) return; if (sec == 0) { uwsgi.workers[uwsgi.mywid].cores[wsgi_req->async_id].harakiri = 0; } else { uwsgi.workers[uwsgi.mywid].cores[wsgi_req->async_id].harakiri = uwsgi_now() + sec; } if (!uwsgi.master_process) { alarm(sec); } }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
187,344,005,967,782,280,000,000,000,000,000,000,000
12
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
update_mouseshape(int shape_idx) { int new_mouse_shape; // Only works in GUI mode. if (!gui.in_use || gui.starting) return; // Postpone the updating when more is to come. Speeds up executing of // mappings. if (shape_idx == -1 && char_avail()) { postponed_mouseshape = TRUE; return; ...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
60,451,679,051,378,035,000,000,000,000,000,000,000
39
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
struct snd_seq_subscribers *snd_seq_port_get_subscription(struct snd_seq_port_subs_info *src_grp, struct snd_seq_addr *dest_addr) { struct snd_seq_subscribers *s, *found = NULL; down_read(&src_grp->list_mutex); list_for_each_entry(s, &src_grp->list_head, src_list) { if (addr_match(dest_addr, &s->info.des...
0
[ "CWE-416", "CWE-362" ]
linux
71105998845fb012937332fe2e806d443c09e026
272,457,854,581,270,500,000,000,000,000,000,000,000
15
ALSA: seq: Fix use-after-free at creating a port There is a potential race window opened at creating and deleting a port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates a port object and returns its pointer, but it doesn't take the refcount, thus it can be deleted immediately by another thread. Meanwh...
static int netlink_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct netlink_sock *nlk = nlk_sk(sk); unsigned int val = 0; int err; if (level != SOL_NETLINK) return -ENOPROTOOPT; if (optlen >= sizeof(int) && get...
0
[ "CWE-287", "CWE-284" ]
linux
e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
237,376,488,480,312,330,000,000,000,000,000,000,000
65
af_netlink: force credentials passing [CVE-2012-3520] Pablo Neira Ayuso discovered that avahi and potentially NetworkManager accept spoofed Netlink messages because of a kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data to the receiver if the sender did not provide such data, instead of not includ...
~_functor2d_expr() { mp->end(); delete mp; } _functor2d_expr(const char *const expr):mp(0) { mp = new _cimg_math_parser(expr,0,CImg<T>::const_empty(),0);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
321,558,680,395,527,650,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
int main(int argc, char **argv) { int c; char *orgoptions = NULL; char *mountpoint = NULL; char *options = NULL; char *orig_dev = NULL; char *currentaddress, *nextaddress; char *value = NULL; char *ep = NULL; int rc = 0; int already_uppercased = 0; int sloppy = 0; int fallback_sudo_uid = 0; size_t options_...
0
[ "CWE-200", "CWE-668" ]
cifs-utils
8acc963a2e7e9d63fe1f2e7f73f5a03f83d9c379
301,123,726,347,901,100,000,000,000,000,000,000,000
315
mount.cifs: fix verbose messages on option parsing When verbose logging is enabled, invalid credentials file lines may be dumped to stderr. This may lead to information disclosure in particular conditions when the credentials file given is sensitive and contains '=' signs. Bug: https://bugzilla.samba.org/show_bug.cgi...
static int rbd_obj_write_object(struct rbd_obj_request *obj_req) { struct ceph_osd_request *osd_req; int num_ops = count_write_ops(obj_req); int which = 0; int ret; if (obj_req->flags & RBD_OBJ_FLAG_COPYUP_ENABLED) num_ops++; /* stat */ osd_req = rbd_obj_add_osd_request(obj_req, num_ops); if (IS_ERR(osd_req)...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
254,756,885,998,025,220,000,000,000,000,000,000,000
30
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
void DoRealBackwardFFT(OpKernelContext* ctx, uint64* fft_shape, const Tensor& in, Tensor* out) { auto device = ctx->eigen_device<CPUDevice>(); // Reconstruct the full FFT and take the inverse. auto input = Tensor(in).flat_inner_dims<ComplexT, FFTRank + 1>(); auto output = out-...
1
[ "CWE-617", "CWE-369" ]
tensorflow
1c56f53be0b722ca657cbc7df461ed676c8642a2
56,902,686,635,502,280,000,000,000,000,000,000,000
70
Fix a check fail in Fast Fourier implementation PiperOrigin-RevId: 372026629 Change-Id: Id05c3362aa575271bc3e06b16316c9037085fc11
ves_icall_System_Environment_get_MachineName (void) { #if defined (PLATFORM_WIN32) gunichar2 *buf; guint32 len; MonoString *result; len = MAX_COMPUTERNAME_LENGTH + 1; buf = g_new (gunichar2, len); result = NULL; if (GetComputerName (buf, (PDWORD) &len)) result = mono_string_new_utf16 (mono_domain_get (), buf...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
262,566,561,004,297,350,000,000,000,000,000,000,000
30
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
bool ImportEPUB::BookContentEncrypted(const QHash<QString, QString> &encrypted_files) { foreach(QString algorithm, encrypted_files.values()) { if (algorithm != ADOBE_FONT_ALGO_ID && algorithm != IDPF_FONT_ALGO_ID) { return true; } } return false; }
0
[ "CWE-22" ]
Sigil
04e2f280cc4a0766bedcc7b9eb56449ceecc2ad4
299,206,185,248,981,720,000,000,000,000,000,000,000
10
further harden against malicious epubs and produce error message
void DL_Dxf::endSequence(DL_CreationInterface* creationInterface) { creationInterface->endSequence(); }
0
[ "CWE-191" ]
qcad
1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8
265,475,439,646,985,900,000,000,000,000,000,000,000
3
check vertexIndex which might be -1 for broken DXF
size_t choice() const { return choice_; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
159,708,258,556,123,400,000,000,000,000,000,000,000
1
Fix #122
md_leave_child_containers(MD_CTX* ctx, int n_keep) { int ret = 0; while(ctx->n_containers > n_keep) { MD_CONTAINER* c = &ctx->containers[ctx->n_containers-1]; int is_ordered_list = FALSE; switch(c->ch) { case _T(')'): case _T('.'): is_ordered_lis...
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
98,835,645,614,662,080,000,000,000,000,000,000,000
41
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
static int kill_ok_by_cred(struct task_struct *t) { const struct cred *cred = current_cred(); const struct cred *tcred = __task_cred(t); if (uid_eq(cred->euid, tcred->suid) || uid_eq(cred->euid, tcred->uid) || uid_eq(cred->uid, tcred->suid) || uid_eq(cred->uid, tcred->uid)) return 1; if (ns_ca...
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
34,903,238,104,546,277,000,000,000,000,000,000,000
16
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
static void free_alloted(struct alloted_s **head) { struct alloted_s *cur; if (head == NULL) { return; } cur = *head; while (cur != NULL) { cur = cur->next; free((*head)->name); free(*head); *head = cur; } }
0
[ "CWE-284", "CWE-862" ]
lxc
16af238036a5464ae8f2420ed3af214f0de875f9
309,584,336,114,995,070,000,000,000,000,000,000,000
17
CVE-2017-5985: Ensure target netns is caller-owned Before this commit, lxc-user-nic could potentially have been tricked into operating on a network namespace over which the caller did not hold privilege. This commit ensures that the caller is privileged over the network namespace by temporarily dropping privilege. L...
static int io_renameat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_rename *ren = &req->rename; const char __user *oldf, *newf; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->ioprio || sqe->buf_index || sqe->splice_fd_in) return -EINVAL; if (unli...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
124,703,703,621,270,400,000,000,000,000,000,000,000
32
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
uint32_t mobi_get_orth_entry_offset(const MOBIIndexEntry *entry) { uint32_t entry_startpos; MOBI_RET ret = mobi_get_indxentry_tagvalue(&entry_startpos, entry, INDX_TAG_ORTH_POSITION); if (ret != MOBI_SUCCESS) { return MOBI_NOTSET; } return entry_startpos; }
0
[ "CWE-125", "CWE-787" ]
libmobi
eafc415bc6067e72577f70d6dd5acbf057ce6e6f
107,924,237,108,204,950,000,000,000,000,000,000,000
10
Fix wrong boundary checks in inflections parser resulting in stack buffer over-read with corrupt input
void *Type_ColorantTable_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag) { cmsUInt32Number i, Count; cmsNAMEDCOLORLIST* List; char Name[34]; cmsUInt16Number PCS[3]; if (!_cmsReadUInt32Number(io, &Count)) return NULL; if (Count >...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
296,300,405,652,965,850,000,000,000,000,000,000,000
37
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
void CL_Ping_f( void ) { netadr_t to; ping_t* pingptr; char* server; int argc; netadrtype_t family = NA_UNSPEC; argc = Cmd_Argc(); if ( argc != 2 && argc != 3 ) { Com_Printf( "usage: ping [-4|-6] server\n"); return; } if(argc == 2) server = Cmd_Argv(1); else { if(!strcmp(Cmd_Argv(1), "-4")) ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
54,282,796,306,019,850,000,000,000,000,000,000,000
44
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static int cac_parse_CCC(sc_card_t *card, cac_private_data_t *priv, u8 *tl, size_t tl_len, u8 *val, size_t val_len) { size_t len = 0; u8 *tl_end = tl + tl_len; u8 *val_end = val + val_len; sc_path_t new_path; int r; for (; (tl < tl_end) && (val< val_end); val += len) { /* get the tag and the length */ ...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
170,009,229,447,414,620,000,000,000,000,000,000,000
96
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
static inline u64 fuse_dentry_time(const struct dentry *entry) { return ((union fuse_dentry *) entry->d_fsdata)->time; }
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
107,768,380,328,241,900,000,000,000,000,000,000,000
4
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
GC_API void GC_CALL GC_debug_end_stubborn_change( const void * p GC_ATTR_UNUSED) {}
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
254,158,953,948,472,200,000,000,000,000,000,000,000
2
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...
static IPAddressOrRanges *make_prefix_or_range(IPAddrBlocks *addr, const unsigned afi, const unsigned *safi) { IPAddressFamily *f = make_IPAddressFamily(addr, afi, safi); IPAddressOrRanges *aors = NULL; if (f == N...
0
[ "CWE-119", "CWE-787" ]
openssl
068b963bb7afc57f5bdd723de0dd15e7795d5822
225,488,196,808,661,880,000,000,000,000,000,000,000
30
Avoid out-of-bounds read Fixes CVE 2017-3735 Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4276) (cherry picked from commit b23171744b01e473ebbfd6edad70c1c3825ffbcd)
int getNumImages() const { return numImages; }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
87,560,495,810,319,040,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static int mov_open_dref(MOVContext *c, AVIOContext **pb, const char *src, MOVDref *ref) { /* try relative path, we do not try the absolute because it can leak information about our system to an attacker */ if (ref->nlvl_to > 0 && ref->nlvl_from > 0) { char filename[1025]; const char *src...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
21,578,170,549,381,840,000,000,000,000,000,000,000
71
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int spl_array_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); if (intern->fptr_count) { zval *rv; zend_call_method_with_0_params(&object, intern->std.ce, &intern->fptr_count, "count", &rv); if (...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
86,181,106,207,478,430,000,000,000,000,000,000,000
20
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
static inline void mnt_unhold_writers(struct mount *mnt) { /* * MNT_READONLY must become visible before ~MNT_WRITE_HOLD, so writers * that become unheld will see MNT_READONLY. */ smp_wmb(); mnt->mnt.mnt_flags &= ~MNT_WRITE_HOLD; }
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
64,601,989,274,445,560,000,000,000,000,000,000,000
9
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static int convert_context(u32 key, struct context *c, void *p) { struct convert_context_args *args; struct context oldc; struct ocontext *oc; struct mls_range *range; struct role_datum *role; struct type_datum *typdatum; struct user_datum *usrdatum; char *s; u32 len; int rc = 0; if (key <= SECI...
0
[ "CWE-20" ]
linux
2172fa709ab32ca60e86179dc67d0857be8e2c98
59,171,702,323,315,810,000,000,000,000,000,000,000
139
SELinux: Fix kernel BUG on empty security contexts. Setting an empty security context (length=0) on a file will lead to incorrectly dereferencing the type and other fields of the security context structure, yielding a kernel BUG. As a zero-length security context is never valid, just reject all such security contexts...
static void virtio_net_rsc_extract_unit4(VirtioNetRscChain *chain, const uint8_t *buf, VirtioNetRscUnit *unit) { uint16_t ip_hdrlen; struct ip_header *ip; ip = (struct ip_header *)(buf + chain->n->guest_hdr_len ...
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
159,283,421,372,272,400,000,000,000,000,000,000,000
16
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
de265_error video_usability_information::read(error_queue* errqueue, bitreader* br, const seq_parameter_set* sps) { int vlc; // --- sample aspect ratio (SAR) --- aspect_ratio_info_present_flag = get_bits(br, 1); if (aspect_ratio_info_present_flag) { int aspec...
1
[ "CWE-787" ]
libde265
8e89fe0e175d2870c39486fdd09250b230ec10b8
62,541,024,364,977,780,000,000,000,000,000,000,000
192
error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590)
inline int Http2Session::OnDataChunkReceived(nghttp2_session* handle, uint8_t flags, int32_t id, const uint8_t* data, size_t len, ...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
231,007,393,697,983,640,000,000,000,000,000,000,000
24
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
void ciEnv::dump_replay_data_unsafe(outputStream* out) { ResourceMark rm; #if INCLUDE_JVMTI out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables); out->print_cr("JvmtiExport can_hotswap_or_post_breakpoint %d", _jvmti_can_hotswap_or_post_breakpoint); out->print_cr("Jvm...
0
[]
jdk17u
8be0fc09f0ba2dd1dbfd6627456fa929d5574b04
176,000,517,965,023,100,000,000,000,000,000,000,000
16
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
TEST(ExpressionSubstrCPTest, DoesThrowWithBadContinuationByte) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); VariablesParseState vps = expCtx->variablesParseState; const auto continuationByte = "\x80\x00"_sd; const auto expr = Expression::parseExpression( exp...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
37,654,774,478,670,155,000,000,000,000,000,000,000
9
SERVER-38070 fix infinite loop in agg expression
smb2_set_file_size(const unsigned int xid, struct cifs_tcon *tcon, struct cifsFileInfo *cfile, __u64 size, bool set_alloc) { __le64 eof = cpu_to_le64(size); struct inode *inode; /* * If extending file more than one page make sparse. Many Linux fs * make files sparse by default when extending via ftruncate ...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
131,436,085,196,470,240,000,000,000,000,000,000,000
22
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
static int rpciod_start(void) { struct workqueue_struct *wq; /* * Create the rpciod thread and wait for it to start. */ dprintk("RPC: creating workqueue rpciod\n"); wq = alloc_workqueue("rpciod", WQ_MEM_RECLAIM, 0); rpciod_workqueue = wq; return rpciod_workqueue != NULL; }
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
283,575,828,820,891,020,000,000,000,000,000,000,000
12
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
static int check_method(struct transaction_t *txn) { const char **hdr; struct request_line_t *req_line = &txn->req_line; if (txn->flags.redirect) return 0; /* Check for HTTP method override */ if (!strcmp(req_line->meth, "POST") && (hdr = spool_getheader(txn->req_hdrs, "X-HTTP-Method-Overr...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
8,211,112,097,873,642,000,000,000,000,000,000,000
23
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
int trace_array_printk_buf(struct ring_buffer *buffer, unsigned long ip, const char *fmt, ...) { int ret; va_list ap; if (!(global_trace.trace_flags & TRACE_ITER_PRINTK)) return 0; va_start(ap, fmt); ret = __trace_array_vprintk(buffer, ip, fmt, ap); va_end(ap); return ret; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
209,827,474,916,927,970,000,000,000,000,000,000,000
14
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
gnutls_certificate_send_x509_rdn_sequence(gnutls_session_t session, int status) { session->internals.ignore_rdn_sequence = status; }
0
[ "CWE-400" ]
gnutls
1ffb827e45721ef56982d0ffd5c5de52376c428e
222,502,208,010,807,960,000,000,000,000,000,000,000
5
handshake: set a maximum number of warning messages that can be received per handshake That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost of processing.
static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc) { struct dentry *parent = desc->file->f_path.dentry; struct inode *dir = parent->d_inode; struct nfs_entry *entry = desc->entry; struct dentry *dentry, *alias; struct qstr name = { .name = entry->name, .len = entry->len, }; struct inode...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
77,069,567,289,346,720,000,000,000,000,000,000,000
69
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
static int do_last(struct nameidata *nd, struct file *file, const struct open_flags *op, int *opened) { struct dentry *dir = nd->path.dentry; int open_flag = op->open_flag; bool will_truncate = (open_flag & O_TRUNC) != 0; bool got_write = false; int acc_mode = op->acc_mode; unsigned seq; struct inode *...
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
219,355,617,514,344,600,000,000,000,000,000,000,000
228
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
int SSL_get_servername_type(const SSL *s) { if (s->session && (!s->tlsext_hostname ? s->session-> tlsext_hostname : s->tlsext_hostname)) return TLSEXT_NAMETYPE_host_name; return -1; }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
245,808,386,549,119,700,000,000,000,000,000,000,000
8
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
static ssize_t SmushYGap(const Image *smush_image,const Image *images, const ssize_t offset,ExceptionInfo *exception) { CacheView *bottom_view, *top_view; const Image *bottom_image, *top_image; RectangleInfo bottom_geometry, top_geometry; register const Quantum *p; register s...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
302,765,776,629,811,900,000,000,000,000,000,000,000
70
Set pixel cache to undefined if any resource limit is exceeded
eval_addlist(typval_T *tv1, typval_T *tv2) { typval_T var3; // concatenate Lists if (list_concat(tv1->vval.v_list, tv2->vval.v_list, &var3) == FAIL) { clear_tv(tv1); clear_tv(tv2); return FAIL; } clear_tv(tv1); *tv1 = var3; return OK; }
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
272,477,989,358,858,600,000,000,000,000,000,000,000
15
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
static size_t subpath_len(const char *path) { const char *slash_pos = strchr(path, '/'); if (slash_pos == NULL) return strlen(path); return slash_pos - path; }
0
[ "CWE-20" ]
libgit2
928429c5c96a701bcbcafacb2421a82602b36915
176,659,623,329,694,550,000,000,000,000,000,000,000
8
tree: Check for `.git` with case insensitivy
CImgList<T>& assign(const char *const filename) { return load(filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
310,414,775,529,422,380,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int uac_mixer_unit_get_channels(struct mixer_build *state, struct uac_mixer_unit_descriptor *desc) { int mu_channels; void *c; if (desc->bLength < sizeof(*desc)) return -EINVAL; if (!desc->bNrInPins) return -EINVAL; if (desc->bLength < sizeof(*desc) + desc->bNrInPins) return -EINVAL; swi...
0
[ "CWE-674" ]
sound
19bce474c45be69a284ecee660aa12d8f1e88f18
83,200,586,248,213,110,000,000,000,000,000,000,000
36
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument as the caller, it triggers e...
// Convert a CImg<T> to a cv::Mat. cv::Mat _cimg2cvmat() const { if (is_empty()) throw CImgInstanceException(_cimg_instance "_cimg2cvmat() : Instance image is empty.", cimg_instance); if (_spectrum==2) throw CImg...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
3,591,443,648,432,328,000,000,000,000,000,000,000
34
.
GIT_INLINE(int) checkout_idxentry_cmp( const git_index_entry *a, const git_index_entry *b) { if (!a && !b) return 0; else if (!a && b) return -1; else if(a && !b) return 1; else return strcmp(a->path, b->path); }
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
217,978,073,454,470,060,000,000,000,000,000,000,000
13
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
static int gs_usb_set_identify(struct net_device *netdev, bool do_identify) { struct gs_can *dev = netdev_priv(netdev); struct gs_identify_mode *imode; int rc; imode = kmalloc(sizeof(*imode), GFP_KERNEL); if (!imode) return -ENOMEM; if (do_identify) imode->mode = GS_CAN_IDENTIFY_ON; else imode->mode = G...
0
[ "CWE-400", "CWE-401" ]
linux
fb5be6a7b4863ecc44963bb80ca614584b6c7817
232,852,430,728,954,300,000,000,000,000,000,000,000
32
can: gs_usb: gs_can_open(): prevent memory leak In gs_can_open() if usb_submit_urb() fails the allocated urb should be released. Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices") Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off...
save_last_search_pattern(void) { if (++did_save_last_search_spat != 1) // nested call, nothing to do return; saved_last_search_spat = spats[RE_SEARCH]; if (spats[RE_SEARCH].pat != NULL) saved_last_search_spat.pat = vim_strsave(spats[RE_SEARCH].pat); saved_last_idx = last_idx; saved_no_hlsearch =...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
234,946,017,746,996,300,000,000,000,000,000,000,000
12
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
static int nf_tables_newflowtable(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { struct netlink_ext_ack *extack = info->extack; struct nft_flowtable_hook flowtable_hook; u8 genmask = nft_genmask_next(info->net); u8 family = info->nfmsg->nfgen_family; const struc...
0
[ "CWE-787" ]
linux
6e1acfa387b9ff82cfc7db8cc3b6959221a95851
83,224,570,683,930,240,000,000,000,000,000,000,000
125
netfilter: nf_tables: validate registers coming from userspace. Bail out in case userspace uses unsupported registers. Fixes: 49499c3e6e18 ("netfilter: nf_tables: switch registers to 32 bit addressing") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream( const char *fname, OPJ_BOOL p_is_read_stream) { return opj_stream_create_file_stream(fname, OPJ_J2K_STREAM_CHUNK_SIZE, p_is_read_stream); }
0
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
17,559,890,615,960,570,000,000,000,000,000,000,000
6
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
static int ext4_bh_unmapped_or_delay(handle_t *handle, struct buffer_head *bh) { /* * unmapped buffer is possible for holes. * delay buffer is possible with delayed allocation */ return ((!buffer_mapped(bh) || buffer_delay(bh)) && buffer_dirty(bh)); }
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
114,155,068,154,320,460,000,000,000,000,000,000,000
8
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
GF_Err clap_box_read(GF_Box *s, GF_BitStream *bs) { GF_CleanApertureBox *ptr = (GF_CleanApertureBox*)s; ISOM_DECREASE_SIZE(ptr, 32); ptr->cleanApertureWidthN = gf_bs_read_u32(bs); ptr->cleanApertureWidthD = gf_bs_read_u32(bs); ptr->cleanApertureHeightN = gf_bs_read_u32(bs); ptr->cleanApertureHeightD = gf_bs_read...
0
[ "CWE-476" ]
gpac
586e817dcd531bb3e75438390f1f753cfe6e940a
55,391,620,639,754,005,000,000,000,000,000,000,000
14
fixed #2046
e_ews_backend_type_register (GTypeModule *type_module) { /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration * function, so we have to wrap it with a public function in * order to register types from a separate compilation unit. */ e_ews_backend_register_type (type_module); }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
139,839,776,799,824,000,000,000,000,000,000,000,000
7
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
Node* TY_(InferredTag)(TidyDocImpl* doc, TidyTagId id) { Lexer *lexer = doc->lexer; Node *node = TY_(NewNode)( lexer->allocator, lexer ); const Dict* dict = TY_(LookupTagDef)(id); assert( dict != NULL ); node->type = StartTag; node->implicit = yes; node->element = TY_(tmbstrdup)(doc->alloc...
0
[ "CWE-119" ]
tidy-html5
c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
15,828,891,910,316,033,000,000,000,000,000,000,000
17
Issue #217 - avoid len going negative, ever...
static inline int check_data_rlimit(unsigned long rlim, unsigned long new, unsigned long start, unsigned long end_data, unsigned long start_data) { if (rlim < RLIM_INFINITY) { if (((new - start) + (end_data - start_data)) > rlim) return -ENOSPC; } return 0; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
33,975,471,412,076,610,000,000,000,000,000,000,000
13
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
bool ConnectionManagerImpl::ActiveStream::createFilterChain() { if (state_.created_filter_chain_) { return false; } bool upgrade_rejected = false; auto upgrade = request_headers_ ? request_headers_->Upgrade() : nullptr; state_.created_filter_chain_ = true; if (upgrade != nullptr) { const Router::Rou...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
29,763,010,778,038,250,000,000,000,000,000,000,000
32
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 int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size) { struct l2cap_conf_rsp *rsp = data; void *ptr = rsp->data; void *endptr = data + data_size; void *req = chan->conf_req; int len = chan->conf_len; int type, hint, olen; unsigned long val; struct l2cap_conf_rfc rfc = { .mode =...
1
[ "CWE-125" ]
linux
7c9cbd0b5e38a1672fcd137894ace3b042dfbf69
243,490,351,055,019,160,000,000,000,000,000,000,000
222
Bluetooth: Verify that l2cap_get_conf_opt provides large enough buffer The function l2cap_get_conf_opt will return L2CAP_CONF_OPT_SIZE + opt->len as length value. The opt->len however is in control over the remote user and can be used by an attacker to gain access beyond the bounds of the actual packet. To prevent an...
aodv_rreq(netdissect_options *ndo, const u_char *dat, u_int length) { u_int i; const struct aodv_rreq *ap = (const struct aodv_rreq *)dat; ND_TCHECK(*ap); if (length < sizeof(*ap)) goto trunc; ND_PRINT((ndo, " rreq %u %s%s%s%s%shops %u id 0x%08lx\n" "\tdst %s seq %lu src %s seq %lu", length, ap->rreq_...
0
[ "CWE-125", "CWE-787" ]
tcpdump
cbddb98484ea8ec1deece351abd56e063d775b38
31,035,508,464,900,040,000,000,000,000,000,000,000
29
CVE-2017-13002/AODV: Add some missing bounds checks. In aodv_extension() do a bounds check on the extension header before we look at it. This fixes a buffer over-read discovered by Kamil Frankowicz. Add a test using the capture file supplied by the reporter(s). While we're at it, add the RFC number, and check the v...
archive_read_format_rar_has_encrypted_entries(struct archive_read *_a) { if (_a && _a->format) { struct rar * rar = (struct rar *)_a->format->data; if (rar) { return rar->has_encrypted_entries; } } return ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW; }
0
[ "CWE-119", "CWE-787" ]
libarchive
05caadc7eedbef471ac9610809ba683f0c698700
137,717,246,468,006,650,000,000,000,000,000,000,000
10
Issue 719: Fix for TALOS-CAN-154 A RAR file with an invalid zero dictionary size was not being rejected, leading to a zero-sized allocation for the dictionary storage which was then overwritten during the dictionary initialization. Thanks to the Open Source and Threat Intelligence project at Cisco for reporting this...
static void rsi_perform_cqm(struct rsi_common *common, u8 *bssid, s8 rssi, struct ieee80211_vif *vif) { s8 last_event = common->cqm_info.last_cqm_event_rssi; int thold = common->cqm_info.rssi_thold; u32 hyst = common->cqm_info.rssi_hyst; enum nl80211_cqm_rssi_threshold_event event; if (rssi <...
0
[ "CWE-416" ]
linux
abd39c6ded9db53aa44c2540092bdd5fb6590fa8
114,860,442,925,680,820,000,000,000,000,000,000,000
24
rsi: add fix for crash during assertions Observed crash in some scenarios when assertion has occurred, this is because hw structure is freed and is tried to get accessed in some functions where null check is already present. So, avoided the crash by making the hw to NULL after freeing. Signed-off-by: Sanjay Konduri <...
zzip_mem_disk_fopen(ZZIP_MEM_DISK * dir, char *filename) { ZZIP_MEM_ENTRY *entry = zzip_mem_disk_findfile(dir, filename, 0, 0); if (! entry) return 0; else return zzip_mem_entry_fopen(dir, entry); }
0
[]
zziplib
72ec933663f738d8e166979aa7fd5590b2104a07
161,283,644,385,195,340,000,000,000,000,000,000,000
8
need to check on endbuf for stored files #15
rsvg_metadata_handler_characters (RsvgSaxHandler * self, const char *ch, int len) { RsvgSaxHandlerDesc *z = (RsvgSaxHandlerDesc *) self; RsvgHandle *ctx = z->ctx; /* This isn't quite the correct behavior - in theory, any graphics element may contain a metadata or desc element */ if (!ch || !len...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
133,644,851,347,547,370,000,000,000,000,000,000,000
20
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static int ArchiveSpacePerThread() { return sizeof(ThreadLocalTop); }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
196,270,195,224,748,870,000,000,000,000,000,000,000
1
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
open_progress_dialog_with_open_destination (FrWindow *window) { if (window->priv->hide_progress_timeout != 0) { g_source_remove (window->priv->hide_progress_timeout); window->priv->hide_progress_timeout = 0; } if (window->priv->progress_timeout != 0) { g_source_remove (window->priv->progress_timeout); window...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
142,408,898,967,043,930,000,000,000,000,000,000,000
24
libarchive: sanitize filenames before extracting
static void put_rxbuf_data_and_resubmit_bulk_urb(struct hso_serial *serial) { int count; struct urb *curr_urb; while (serial->rx_urb_filled[serial->curr_rx_urb_idx]) { curr_urb = serial->rx_urb[serial->curr_rx_urb_idx]; count = put_rxbuf_data(curr_urb, serial); if (count == -1) return; if (count == 0) { ...
0
[ "CWE-125" ]
linux
5146f95df782b0ac61abde36567e718692725c89
300,614,775,948,817,400,000,000,000,000,000,000,000
18
USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Add a length check for both locations and updated hso_probe to ...
stop_pipeline (async, ignore) int async; COMMAND *ignore; { already_making_children = 0; return 0; }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
319,383,547,699,153,180,000,000,000,000,000,000,000
7
bash-4.4-rc2 release
static long btrfs_ioctl_qgroup_assign(struct file *file, void __user *arg) { struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root; struct btrfs_ioctl_qgroup_assign_args *sa; struct btrfs_trans_handle *trans; int ret; int err; if (!capable(CAP_SYS_ADMIN)) return -EPERM; ret = mnt_want_write_file(fi...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
263,116,898,399,915,950,000,000,000,000,000,000,000
46
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
cifs_setup_request(struct cifs_ses *ses, struct smb_rqst *rqst) { int rc; struct smb_hdr *hdr = (struct smb_hdr *)rqst->rq_iov[0].iov_base; struct mid_q_entry *mid; rc = allocate_mid(ses, hdr, &mid); if (rc) return ERR_PTR(rc); rc = cifs_sign_rqst(rqst, ses->server, &mid->sequence_number); if (rc) { cifs_de...
0
[ "CWE-362" ]
linux
ea702b80e0bbb2448e201472127288beb82ca2fe
64,756,019,621,927,580,000,000,000,000,000,000,000
16
cifs: move check for NULL socket into smb_send_rqst Cai reported this oops: [90701.616664] BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 [90701.625438] IP: [<ffffffff814a343e>] kernel_setsockopt+0x2e/0x60 [90701.632167] PGD fea319067 PUD 103fda4067 PMD 0 [90701.637255] Oops: 0000 [#1] SMP ...
static inline struct iso_inode_info *ISOFS_I(struct inode *inode) { return container_of(inode, struct iso_inode_info, vfs_inode); }
0
[ "CWE-20", "CWE-399" ]
linux
410dd3cf4c9b36f27ed4542ee18b1af5e68645a4
225,374,363,257,550,260,000,000,000,000,000,000,000
4
isofs: Fix unbounded recursion when processing relocated directories We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow...
int ConnectionImpl::onHeadersCompleteBase() { ASSERT(!processing_trailers_); ENVOY_CONN_LOG(trace, "onHeadersCompleteBase", connection_); completeLastHeader(); if (!(parser_.http_major == 1 && parser_.http_minor == 1)) { // This is not necessarily true, but it's good enough since higher layers only care if...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
240,980,556,007,304,700,000,000,000,000,000,000,000
71
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>