func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
QPDFFormFieldObjectHelper::isCheckbox() { return ((getFieldType() == "/Btn") && ((getFlags() & (ff_btn_radio | ff_btn_pushbutton)) == 0)); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
313,695,095,640,712,100,000,000,000,000,000,000,000
5
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
void CLASS parse_sinar_ia() { int entries, off; char str[8], *cp; order = 0x4949; fseek(ifp, 4, SEEK_SET); entries = get4(); fseek(ifp, get4(), SEEK_SET); while (entries--) { off = get4(); get4(); fread(str, 8, 1, ifp); if (!strcmp(str, "META")) meta_offset = off; if (!strcmp(...
1
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
50,204,784,202,549,725,000,000,000,000,000,000,000
37
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
static void *must_realloc(void *ptr, size_t size) { void *old = ptr; do { ptr = realloc(old, size); } while(!ptr); return ptr; }
0
[ "CWE-78", "CWE-216" ]
runc
0a8e4117e7f715d5fbeef398405813ce8e88558b
286,352,123,974,159,850,000,000,000,000,000,000,000
8
nsenter: clone /proc/self/exe to avoid exposing host binary to container There are quite a few circumstances where /proc/self/exe pointing to a pretty important container binary is a _bad_ thing, so to avoid this we have to make a copy (preferably doing self-clean-up and not being writeable). We require memfd_create(...
send_status_direct (ctrl_t ctrl, const char *keyword, const char *args) { assuan_context_t ctx = ctrl->server_local->assuan_ctx; if (strchr (args, '\n')) log_error ("error: LF detected in status line - not sending\n"); else assuan_write_status (ctx, keyword, args); }
0
[]
gnupg
b0b3803e8c2959dd67ca96debc54b5c6464f0d41
305,392,110,315,292,440,000,000,000,000,000,000,000
9
scd: Avoid double-free on error condition in scd * scd/command.c (cmd_readkey): avoid double-free of cert -- When ksba_cert_new() fails, cert will be double-freed. Debian-Bug-Id: 773471 Original patch changed by wk to do the free only at leave.
void bpf_prog_array_delete_safe(struct bpf_prog_array __rcu *progs, struct bpf_prog *old_prog) { struct bpf_prog **prog = progs->progs; for (; *prog; prog++) if (*prog == old_prog) { WRITE_ONCE(*prog, &dummy_bpf_prog.prog); break; } }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
139,037,200,610,044,720,000,000,000,000,000,000,000
11
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
ipmi_sdr_find_sdr_bytype(struct ipmi_intf *intf, uint8_t type) { struct sdr_get_rs *header; struct sdr_record_list *e; struct sdr_record_list *head; if (!sdr_list_itr) { sdr_list_itr = ipmi_sdr_start(intf, 0); if (!sdr_list_itr) { lprintf(LOG_ERR, "Unable to open SDR for reading"); return NULL; } } ...
0
[ "CWE-120" ]
ipmitool
7ccea283dd62a05a320c1921e3d8d71a87772637
206,533,935,948,159,900,000,000,000,000,000,000,000
99
fru, sdr: Fix id_string buffer overflows Final part of the fixes for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp 9 variants of stack buffer overflow when parsing `id_string` field of SDR records returned from `CMD_GET_SDR` command. SDR record structs have an `id_co...
rb_push_glob(VALUE str, int flags) /* '\0' is delimiter */ { long offset = 0; VALUE ary; GlobPathValue(str, TRUE); ary = rb_ary_new(); while (offset < RSTRING_LEN(str)) { char *p, *pend; int status; p = RSTRING_PTR(str) + offset; status = push_glob(ary, rb_enc_str_new(p, strlen(p), rb_enc_get(...
1
[ "CWE-22" ]
ruby
143eb22f1877815dd802f7928959c5f93d4c7bb3
323,319,456,581,420,150,000,000,000,000,000,000,000
25
merge revision(s) 62989: dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63015 b2dd03c...
char **env_copy(char **envp) { int save_errno; size_t count, i; char **p; for (count = 0; envp[count] != NULL; count++) ; p = (char **) malloc((count + 1) * sizeof (char *)); /* 1 for the NULL */ if (p != NULL) { for (i = 0; i < count; i++) if ((p[i] = strdup(envp[i])) == NULL) { save_errno = errno; ...
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
313,446,675,470,084,800,000,000,000,000,000,000,000
22
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
bool RGWCORSRule::has_wildcard_origin() { if (allowed_origins.find("*") != allowed_origins.end()) return true; return false; }
0
[ "CWE-113" ]
ceph
46817f30cee60bc5df8354ab326762e7c783fe2c
11,018,032,832,240,478,000,000,000,000,000,000,000
6
rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader the values in the <ExposeHeader> element are sent back to clients in a Access-Control-Expose-Headers response header. if the values are allowed to have newlines in them, they can be used to inject arbitrary response headers this issue only affects s3, whic...
int sscanf(const char *buf, const char *fmt, ...) { va_list args; int i; va_start(args, fmt); i = vsscanf(buf, fmt, args); va_end(args); return i; }
0
[ "CWE-200" ]
linux
ad67b74d2469d9b82aaa572d76474c95bc484d57
57,264,535,182,740,390,000,000,000,000,000,000
11
printk: hash addresses printed with %p Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the a...
static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) { switch (h->sps.bit_depth_luma) { case 9: if (CHROMA444(h)) { if (h->avctx->colorspace == AVCOL_SPC_RGB) { return AV_PIX_FMT_GBRP9; } else return AV_PIX_FMT_YUV444P9; ...
0
[ "CWE-703" ]
FFmpeg
29ffeef5e73b8f41ff3a3f2242d356759c66f91f
5,346,165,788,927,222,000,000,000,000,000,000,000
80
avcodec/h264: do not trust last_pic_droppable when marking pictures as done This simplifies the code and fixes a deadlock Fixes Ticket2927 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ShutdownWrap* StreamBase::CreateShutdownWrap( Local<Object> object) { auto* wrap = new SimpleShutdownWrap<AsyncWrap>(this, object); wrap->MakeWeak(); return wrap; }
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
207,110,408,572,271,100,000,000,000,000,000,000,000
6
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
static int piv_match_card(sc_card_t *card) { int r = 0; sc_debug(card->ctx,SC_LOG_DEBUG_MATCH, "PIV_MATCH card->type:%d\n", card->type); /* piv_match_card may be called with card->type, set by opensc.conf */ /* user provide card type must be one we know */ switch (card->type) { case -1: case SC_CARD_TYPE_PIV...
0
[]
OpenSC
456ac566938a1da774db06126a2fa6c0cba514b3
325,944,606,964,924,100,000,000,000,000,000,000,000
41
PIV Improved parsing of data from the card Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced with sc_asn1_read_tag. The input is also tested that the expected tag is the first byte. Additional tests are also add. sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs do not ...
int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, struct futex_q *q, union futex_key *key2, struct hrtimer_sleeper *timeout) { int ret = 0; /* * With the hb lock held, we avoid races while we process the wakeup. * We only need to hold hb (and not hb2) to ensure atomicity as the * w...
0
[ "CWE-264", "CWE-269" ]
linux
e9c243a5a6de0be8e584c604d353412584b592f8
41,475,773,095,101,087,000,000,000,000,000,000,000
31
futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1) If uaddr == uaddr2, then we have broken the rule of only requeueing from a non-pi futex to a pi futex with this call. If we attempt this, then dangling pointers may be left for rt_waiter resulting in an expl...
OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads) { /* Currently we pass the thread-pool to the tcd, so we cannot re-set it */ /* afterwards */ if (opj_has_thread_support() && j2k->m_tcd == NULL) { opj_thread_pool_destroy(j2k->m_tp); j2k->m_tp = NULL; if (num_threa...
0
[ "CWE-20" ]
openjpeg
73fdf28342e4594019af26eb6a347a34eceb6296
168,056,589,374,643,060,000,000,000,000,000,000,000
18
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
script_get(exarg_T *eap UNUSED, char_u *cmd UNUSED) { #ifdef FEAT_EVAL list_T *l; listitem_T *li; char_u *s; garray_T ga; if (cmd[0] != '<' || cmd[1] != '<' || eap->getline == NULL) return NULL; cmd += 2; l = heredoc_get(eap, cmd, TRUE, FALSE); if (l == NULL) return NULL; ga_ini...
0
[ "CWE-122", "CWE-787" ]
vim
ef02f16609ff0a26ffc6e20263523424980898fe
264,813,422,233,078,960,000,000,000,000,000,000,000
32
patch 8.2.4899: with latin1 encoding CTRL-W might go before the cmdline Problem: With latin1 encoding CTRL-W might go before the start of the command line. Solution: Check already being at the start of the command line.
static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, struct sk_buff_head *frames) { struct sk_buff *skb = rx->skb; struct ieee80211_local *local = rx->local; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; struct sta_info *sta = rx->sta; struct tid_ampdu_rx *tid_agg_rx; ...
0
[]
linux
588f7d39b3592a36fb7702ae3b8bdd9be4621e2f
275,434,537,616,878,650,000,000,000,000,000,000,000
75
mac80211: drop robust management frames from unknown TA When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static int TCPGetWscaleTest01(void) { int retval = 0; static uint8_t raw_tcp[] = {0xda, 0xc1, 0x00, 0x50, 0xb6, 0x21, 0x7f, 0x58, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x16, 0xd0, 0x8a, 0xaf, 0x00, 0x00, 0x02, 0x04, 0x05, 0xb4, ...
0
[]
suricata
50e2b973eeec7172991bf8f544ab06fb782b97df
19,573,033,745,079,646,000,000,000,000,000,000,000
45
stream/tcp: handle RST with MD5 or AO header Special handling for RST packets if they have an TCP MD5 or AO header option. The options hash can't be validated. The end host might be able to validate it, as it can have a key/password that was communicated out of band. The sender could use this to move the TCP state to...
//! Load image from a PAR-REC (Philips) file \newinstance. static CImg<T> get_load_parrec(const char *const filename, const char axis='c', const float align=0) { return CImg<T>().load_parrec(filename,axis,align);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
259,634,044,758,406,140,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static void sas_resume_port(struct asd_sas_phy *phy) { struct domain_device *dev; struct asd_sas_port *port = phy->port; struct sas_ha_struct *sas_ha = phy->ha; struct sas_internal *si = to_sas_internal(sas_ha->core.shost->transportt); if (si->dft->lldd_port_formed) si->dft->lldd_port_formed(phy); if (port->s...
1
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
225,660,789,206,092,580,000,000,000,000,000,000,000
42
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
vips_foreign_load_iscompat( VipsImage *a, VipsImage *b ) { if( a->Xsize != b->Xsize || a->Ysize != b->Ysize || a->Bands != b->Bands || a->Coding != b->Coding || a->BandFmt != b->BandFmt ) { vips_error( "VipsForeignLoad", "%s", _( "images do not match" ) ); return( FALSE ); } return( TRUE ); }
0
[ "CWE-362", "CWE-476" ]
libvips
20d840e6da15c1574b3ed998bc92f91d1e36c2a5
36,650,542,859,239,530,000,000,000,000,000,000,000
14
fix a crash with delayed load If a delayed load failed, it could leave the pipeline only half-set up. Sebsequent threads could then segv. Set a load-has-failed flag and test before generate. See https://github.com/jcupitt/libvips/issues/893
lzh_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { int bits; if (hf->bitlen == NULL) { hf->bitlen = malloc(len_size * sizeof(hf->bitlen[0])); if (hf->bitlen == NULL) return (ARCHIVE_FATAL); } if (hf->tbl == NULL) { if (tbl_bits < HTBL_BITS) bits = tbl_bits; else bits = HTBL_BITS...
0
[ "CWE-125" ]
libarchive
98dcbbf0bf4854bf987557e55e55fff7abbf3ea9
86,925,834,049,288,020,000,000,000,000,000,000,000
28
Fail with negative lha->compsize in lha_read_file_header_1() Fixes a heap buffer overflow reported in Secunia SA74169
bool Item_func_case::date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) { DBUG_ASSERT(fixed == 1); Item *item= find_item(); if (!item) return (null_value= true); Datetime_truncation_not_needed dt(thd, item, fuzzydate); return (null_value= dt.copy_to_mysql_time(ltime, mysql_timestamp_type())); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
319,331,104,453,373,860,000,000,000,000,000,000,000
9
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
TEST(ComparisonsTest, GreaterInt) { ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_INT32, BuiltinOperator_GREATER); model.PopulateTensor<int>(model.input1(), {-1, 9, 7, 3}); model.PopulateTensor<int>(model.input2(), {1, 2, 7, 5}); model.Invoke(); EXPECT_THAT(model.Ge...
0
[ "CWE-20", "CWE-703" ]
tensorflow
a989426ee1346693cc015792f11d715f6944f2b8
42,242,051,348,301,760,000,000,000,000,000,000,000
10
Improve to cover scale value greater than one PiperOrigin-RevId: 433050921
ex_bunload(exarg_T *eap) { if (ERROR_IF_ANY_POPUP_WINDOW) return; eap->errmsg = do_bufdel( eap->cmdidx == CMD_bdelete ? DOBUF_DEL : eap->cmdidx == CMD_bwipeout ? DOBUF_WIPE : DOBUF_UNLOAD, eap->arg, eap->addr_count, (int)eap->line1, (int)eap->line2, eap->forceit); }
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
128,112,675,082,965,880,000,000,000,000,000,000,000
10
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
map_to_exists(char_u *str, char_u *modechars, int abbr) { int mode = 0; char_u *rhs; char_u *buf; int retval; rhs = replace_termcodes(str, &buf, FALSE, TRUE, FALSE); if (vim_strchr(modechars, 'n') != NULL) mode |= NORMAL; if (vim_strchr(modechars, 'v') != NULL) mode |= VISUAL + SELECTM...
0
[ "CWE-78" ]
vim
53575521406739cf20bbe4e384d88e7dca11f040
298,812,624,927,926,500,000,000,000,000,000,000,000
31
patch 8.1.1365: source command doesn't check for the sandbox Problem: Source command doesn't check for the sandbox. (Armin Razmjou) Solution: Check for the sandbox when sourcing a file.
void t_go_generator::generate_typedef(t_typedef* ttypedef) { generate_go_docstring(f_types_, ttypedef); string new_type_name(publicize(ttypedef->get_symbolic())); string base_type(type_to_go_type(ttypedef->get_type())); if (base_type == new_type_name) { return; } f_types_ << "type " << new_type_name <...
0
[ "CWE-77" ]
thrift
2007783e874d524a46b818598a45078448ecc53e
57,192,178,086,968,140,000,000,000,000,000,000,000
15
THRIFT-3893 Command injection in format_go_output Client: Go Patch: Jens Geyer
GC_INNER GC_bool GC_page_was_dirty(struct hblk *h) { if ((word)h < (word)GC_vd_base || (word)h >= (word)(GC_vd_base + NPAGES*HBLKSIZE)) { return(TRUE); } return(GC_grungy_bits[h - (struct hblk *)GC_vd_base] & PCR_VD_DB_dirtyBit); }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
200,492,856,885,398,870,000,000,000,000,000,000,000
8
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...
fill_str(char *str, int c, int max) { memset(str, c, max); *(str + max) = '\0'; return str; }
0
[ "CWE-120" ]
postgres
0150ab567bcf5e5913e2b62a1678f84cc272441f
200,337,245,610,582,180,000,000,000,000,000,000,000
6
to_char(): prevent accesses beyond the allocated buffer Previously very long field masks for floats could access memory beyond the existing buffer allocated to hold the result. Reported by Andres Freund and Peter Geoghegan. Backpatch to all supported versions. Security: CVE-2015-0241
nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen, struct svc_fh *tfhp, char *tname, int tlen) { struct dentry *fdentry, *tdentry, *odentry, *ndentry, *trap; struct inode *fdir, *tdir; __be32 err; int host_err; bool has_cached = false; err = fh_verify(rqstp, ffhp, S_IFDIR, ...
0
[ "CWE-732" ]
linux
22cf8419f1319ff87ec759d0ebdff4cbafaee832
128,612,015,010,891,650,000,000,000,000,000,000,000
111
nfsd: apply umask on fs without ACL support The server is failing to apply the umask when creating new objects on filesystems without ACL support. To reproduce this, you need to use NFSv4.2 and a client and server recent enough to support umask, and you need to export a filesystem that lacks ACL support (for example,...
GF_Err gf_isom_remove_track_reference(GF_ISOFile *isom_file, u32 trackNumber, u32 ref_type) { GF_TrackBox *trak; u32 i=0; GF_TrackReferenceTypeBox *ref; trak = gf_isom_get_track_from_file(isom_file, trackNumber); if (!trak) return GF_BAD_PARAM; if (!trak->References) return GF_OK; while ((ref = gf_list_enum(tra...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
60,364,736,935,078,370,000,000,000,000,000,000,000
18
fixed #1706
std::string Utils::String::toStdString(const QString &str) { #ifdef QBT_USES_QT5 return str.toStdString(); #else QByteArray utf8 = str.toUtf8(); return std::string(utf8.constData(), utf8.length()); #endif }
0
[ "CWE-20", "CWE-79" ]
qBittorrent
6ca3e4f094da0a0017cb2d483ec1db6176bb0b16
122,906,991,652,478,070,000,000,000,000,000,000,000
9
Add Utils::String::toHtmlEscaped
static int rfcomm_release_dev(void __user *arg) { struct rfcomm_dev_req req; struct rfcomm_dev *dev; if (copy_from_user(&req, arg, sizeof(req))) return -EFAULT; BT_DBG("dev_id %d flags 0x%x", req.dev_id, req.flags); dev = rfcomm_dev_get(req.dev_id); if (!dev) return -ENODEV; if (dev->flags != NOCAP_FLAGS...
0
[ "CWE-200" ]
linux
f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a
92,986,373,781,308,680,000,000,000,000,000,000,000
31
Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST) The RFCOMM code fails to initialize the two padding bytes of struct rfcomm_dev_list_req inserted for alignment before copying it to userland. Additionally there are two padding bytes in each instance of struct rfcomm_dev_info. The ioctl() that for disclosure...
static int hardware_enable(void *garbage) { int cpu = raw_smp_processor_id(); u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); u64 old, test_bits; if (read_cr4() & X86_CR4_VMXE) return -EBUSY; INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu)); rdmsrl(MSR_IA32_FEATURE_CONTROL, old); test_bits = FEATURE_CONTROL_LOCKED;...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
185,498,620,665,986,960,000,000,000,000,000,000,000
32
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-...
static int usbredir_get_bufpq(QEMUFile *f, void *priv, size_t unused, const VMStateField *field) { struct endp_data *endp = priv; USBRedirDevice *dev = endp->dev; struct buf_packet *bufp; int i; endp->bufpq_size = qemu_get_be32(f); for (i = 0; i < endp->bufpq_size;...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
30,365,511,408,481,545,000,000,000,000,000,000,000
23
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { size_t i = 0; dest->text_keys = 0; dest->text_strings = 0; dest->text_num = 0; for(i = 0; i < source->text_num; i++) { CERROR_TRY_RETURN(lodepng_add_text(dest, source->text_keys[i], source->text_strings[i])); } return 0...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
303,200,815,493,293,150,000,000,000,000,000,000,000
12
Fixed #5645: realloc return handling
SYSCALL_DEFINE1(osf_brk, unsigned long, brk) { unsigned long retval = sys_brk(brk); if (brk && brk != retval) retval = -ENOMEM; return retval; }
0
[ "CWE-703", "CWE-264", "CWE-189" ]
linux
21c5977a836e399fc710ff2c5367845ed5c2527f
185,106,922,966,229,860,000,000,000,000,000,000,000
7
alpha: fix several security issues Fix several security issues in Alpha-specific syscalls. Untested, but mostly trivial. 1. Signedness issue in osf_getdomainname allows copying out-of-bounds kernel memory to userland. 2. Signedness issue in osf_sysinfo allows copying large amounts of kernel memory to userland. 3. ...
static int parse_audio_selector_unit(struct mixer_build *state, int unitid, void *raw_desc) { struct uac_selector_unit_descriptor *desc = raw_desc; unsigned int i, nameid, len; int err; struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; const struct usbmix_name_map *map; char **namelist; if ...
0
[ "CWE-125" ]
linux
f4351a199cc120ff9d59e06d02e8657d08e6cc46
143,465,609,358,144,630,000,000,000,000,000,000,000
135
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit() The parser for the processing unit reads bNrInPins field before the bLength sanity check, which may lead to an out-of-bound access when a malformed descriptor is given. Fix it by assignment after the bLength check. Cc: <stable@vger.kernel.o...
static int alarmtimer_rtc_add_device(struct device *dev, struct class_interface *class_intf) { unsigned long flags; struct rtc_device *rtc = to_rtc_device(dev); struct wakeup_source *__ws; if (rtcdev) return -EBUSY; if (!rtc->ops->set_alarm) return -1; if (!device_may_wakeup(rtc->dev.parent)) return -...
0
[ "CWE-190" ]
linux
5f936e19cc0ef97dbe3a56e9498922ad5ba1edef
307,275,463,422,830,100,000,000,000,000,000,000,000
36
alarmtimer: Prevent overflow for relative nanosleep Air Icy reported: UBSAN: Undefined behaviour in kernel/time/alarmtimer.c:811:7 signed integer overflow: 1529859276030040771 + 9223372036854775807 cannot be represented in type 'long long int' Call Trace: alarm_timer_nsleep+0x44c/0x510 kernel/time/alarmtim...
CImg<T>& operator=(std::initializer_list<t> values) { _cimg_constructor_cpp11(siz>values.size()); return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
25,815,604,607,015,905,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
PHP_FUNCTION(deg2rad) { double deg; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", &deg) == FAILURE) { return; } RETURN_DOUBLE((deg / 180.0) * M_PI); }
0
[]
php-src
0d822f6df946764f3f0348b82efae2e1eaa83aa0
317,612,233,651,436,270,000,000,000,000,000,000,000
9
Bug #71201 round() segfault on 64-bit builds
TEST(ArrayOpsTest, Placeholder_ShapeFn) { { // 2D shape ShapeInferenceTestOp op("Placeholder"); TensorShape shape({1, 2}); TF_ASSERT_OK(NodeDefBuilder("test", "Placeholder") .Attr("shape", shape) .Attr("dtype", DT_FLOAT) .Finalize(&op.node...
0
[ "CWE-125" ]
tensorflow
7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d
325,988,441,560,786,620,000,000,000,000,000,000,000
47
Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute. PiperOrigin-RevId: 402446942 Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9
} EXPORT_SYMBOL_GPL(iscsi_create_session); static void iscsi_conn_release(struct device *dev) { struct iscsi_cls_conn *conn = iscsi_dev_to_conn(dev); struct device *parent = conn->dev.parent; ISCSI_DBG_TRANS_CONN(conn, "Releasing conn\n");
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
234,929,960,987,308,930,000,000,000,000,000,000,000
9
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
vc4_job_done_work(struct work_struct *work) { struct vc4_dev *vc4 = container_of(work, struct vc4_dev, job_done_work); vc4_job_handle_completed(vc4); }
0
[ "CWE-190", "CWE-703" ]
linux
0f2ff82e11c86c05d051cae32b58226392d33bbf
268,748,325,661,868,200,000,000,000,000,000,000,000
7
drm/vc4: Fix an integer overflow in temporary allocation layout. We copy the unvalidated ioctl arguments from the user into kernel temporary memory to run the validation from, to avoid a race where the user updates the unvalidate contents in between validating them and copying them into the validated BO. However, in ...
static void qxl_vga_ioport_write(void *opaque, uint32_t addr, uint32_t val) { VGACommonState *vga = opaque; PCIQXLDevice *qxl = container_of(vga, PCIQXLDevice, vga); if (qxl->mode != QXL_MODE_VGA) { dprint(qxl, 1, "%s\n", __FUNCTION__); qxl_destroy_primary(qxl); qxl_soft_reset(qxl);...
1
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
314,393,919,555,074,480,000,000,000,000,000,000,000
12
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
TEST_P(QuicServerTransportAllowMigrationTest, MigrateToValidatedPeer) { folly::SocketAddress newPeer("100.101.102.103", 23456); server->getNonConstConn().migrationState.previousPeerAddresses.push_back( newPeer); CongestionAndRttState state; state.peerAddress = newPeer; state.recordTime = Clock::now(); ...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
147,058,227,660,796,030,000,000,000,000,000,000,000
71
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
assign_priv_user_host(Security_context *sctx, const ACL_USER *user) { if (user->user) strmake(sctx->priv_user, user->user, USERNAME_LENGTH - 1); else *sctx->priv_user= 0; if (user->host.get_host()) strmake(sctx->priv_host, user->host.get_host(), MAX_HOSTNAME - 1); else *sctx->priv_host= 0; }
0
[ "CWE-190" ]
mysql-server
f4165eae6384141905dd39d22c7611ea85de08f4
90,032,793,918,456,980,000,000,000,000,000,000,000
12
Bug#25714674: MYSQL SERVER REMOTE PREAUTH PROBLEM THROUGH INTEGER OVERFLOW Description: A missing length check for length-encoded string causes problem in preauthorization stage. (cherry picked from commit bb1af908fce21b0d8708cdccde628e3d5b1d86ec)
pk_transaction_media_change_required_cb (PkBackend *backend, PkMediaChangeRequired *item, PkTransaction *transaction) { PkMediaTypeEnum media_type; g_autofree gchar *media_id = NULL; g_autofree gchar *media_text = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction-...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
168,115,970,864,248,500,000,000,000,000,000,000,000
40
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
virtual ~Silence_routine_definer_errors() {}
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
111,163,703,788,966,620,000,000,000,000,000,000,000
2
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
parse_compl_arg( char_u *value, int vallen, int *complp, long *argt, char_u **compl_arg UNUSED) { char_u *arg = NULL; # if defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL) size_t arglen = 0; # endif int i; int valend = vallen; /* Look for any argument part - which is the part ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
239,032,099,668,620,470,000,000,000,000,000,000,000
73
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
static sctp_disposition_t sctp_sf_violation_chunk( struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { static const char err_str[]="The following chunk violates prot...
0
[]
linux
196d67593439b03088913227093e374235596e33
163,746,333,054,609,860,000,000,000,000,000,000,000
16
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
int tls1_enc(SSL *s, SSL3_RECORD *recs, unsigned int n_recs, int send) { EVP_CIPHER_CTX *ds; size_t reclen[SSL_MAX_PIPELINES]; unsigned char buf[SSL_MAX_PIPELINES][EVP_AEAD_TLS1_AAD_LEN]; int bs, i, j, k, pad = 0, ret, mac_size = 0; const EVP_CIPHER *enc; unsigned int ctr; if (send) { ...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
55,563,434,432,343,080,000,000,000,000,000,000,000
206
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
static int rsi_compare(const void *a, const void *b) { u16 _a = *(const u16 *)(a); u16 _b = *(const u16 *)(b); if (_a > _b) return -1; if (_a < _b) return 1; return 0; }
0
[ "CWE-400", "CWE-401" ]
linux
d563131ef23cbc756026f839a82598c8445bc45f
185,743,155,560,022,600,000,000,000,000,000,000,000
13
rsi: release skb if rsi_prepare_beacon fails In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static void clean_up_cur_rule(void) { free(G.cur_rule.envvar); if (G.cur_rule.regex_compiled) regfree(&G.cur_rule.match); free(G.cur_rule.ren_mov); IF_FEATURE_MDEV_EXEC(free(G.cur_rule.r_cmd);) make_default_cur_rule(); }
0
[ "CWE-264" ]
busybox
4609f477c7e043a4f6147dfe6e86b775da2ef784
117,102,527,964,144,020,000,000,000,000,000,000,000
9
mdev: fix mode of dir1 in =dir1/dir2/file rule Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
read_merged_image_block (PSDimage *img_a, FILE *f, GError **error) { img_a->merged_image_start = ftell(f); if (fseek (f, 0, SEEK_END) < 0) { psd_set_error (feof (f), errno, error); return -1; } img_a->merged_image_len = ftell(f) - img_...
0
[ "CWE-190" ]
gimp
88eccea84aa375197cc04a2a0e2e29debb56bfa5
257,332,632,841,555,850,000,000,000,000,000,000,000
18
Harden the PSD plugin against integer overflows. Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232 and CVE identifier CVE-2009-3909. Fixes bug #600741. (cherry picked from commit 9cc8d78ff33b7a36852b74e64b427489cad44d0e)
static MagickBooleanType ReadPSDLayer(Image *image,const ImageInfo *image_info, const PSDInfo *psd_info,LayerInfo* layer_info,ExceptionInfo *exception) { char message[MagickPathExtent]; MagickBooleanType status; PSDCompressionType compression; ssize_t j; if (image->debug != MagickFalse) ...
0
[ "CWE-399", "CWE-401" ]
ImageMagick
8a43abefb38c5e29138e1c9c515b313363541c06
198,911,445,892,069,300,000,000,000,000,000,000,000
97
https://github.com/ImageMagick/ImageMagick/issues/1451
static int ras_getint(jas_stream_t *in, int_fast32_t *val) { int_fast32_t x; int c; int i; x = 0; for (i = 0; i < 4; i++) { if ((c = jas_stream_getc(in)) == EOF) { return -1; } x = (x << 8) | (c & 0xff); } *val = x; return 0; }
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
208,975,379,124,204,750,000,000,000,000,000,000,000
17
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
photo_ber (EContact *contact) { struct berval **result = NULL; EContactPhoto *photo; photo = e_contact_get (contact, E_CONTACT_PHOTO); if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) { result = g_new (struct berval *, 2); result[0] = g_new (struct berval, 1); result[0]->bv_len = photo->data.inline...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
334,997,372,033,394,070,000,000,000,000,000,000,000
20
Bug 796174 - strcat() considered unsafe for buffer overflow
CAMLexport value caml_input_value_from_malloc(char * data, intnat ofs) { uint32_t magic; value obj; intern_input = (unsigned char *) data; intern_src = intern_input + ofs; intern_input_malloced = 1; magic = read32u(); if (magic != Intext_magic_number) caml_failwith("input_value_from_malloc: bad objec...
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
94,936,518,131,837,870,000,000,000,000,000,000,000
17
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
send_ldap_result_ext( Slapi_PBlock *pb, int err, char *matched, char *text, int nentries, struct berval **urls, BerElement *ber) { Slapi_Operation *operation; passwdPolicy *pwpolicy = NULL; Connection *conn = NULL; Slapi_DN *sdn = NULL; const char *dn = NULL; ber_tag_...
1
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
14,590,148,183,451,851,000,000,000,000,000,000,000
292
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
int call_netdevice_notifiers(unsigned long val, struct net_device *dev) { ASSERT_RTNL(); return raw_notifier_call_chain(&netdev_chain, val, dev); }
0
[ "CWE-264" ]
linux
8909c9ad8ff03611c9c96c9a92656213e4bb495b
197,453,797,979,815,050,000,000,000,000,000,000,000
5
net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are limited to /lib/modules/**. However, CAP_NET_ADMIN...
SCM_DEFINE (scm_directory_stream_p, "directory-stream?", 1, 0, 0, (SCM obj), "Return a boolean indicating whether @var{obj} is a directory\n" "stream as returned by @code{opendir}.") #define FUNC_NAME s_scm_directory_stream_p { return scm_from_bool (SCM_DIRP (obj)); }
0
[]
guile
245608911698adb3472803856019bdd5670b6614
58,702,169,658,247,360,000,000,000,000,000,000,000
8
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
mono_runtime_set_has_tls_get (gboolean val) { has_tls_get = val; }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
255,835,459,164,685,700,000,000,000,000,000,000,000
4
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
static int atalk_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) { struct sockaddr_at sat; struct sock *sk = sock->sk; struct atalk_sock *at = at_sk(sk); int err; lock_sock(sk); err = -ENOBUFS; if (sock_flag(sk, SOCK_ZAPPED)) if (atalk_autobind(sk) < 0) goto out; *uaddr...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
269,961,494,757,343,500,000,000,000,000,000,000,000
39
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
sctp_disposition_t sctp_sf_discard_chunk(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; /* Make sure that the chunk has a valid length. * Since we d...
0
[]
linux
196d67593439b03088913227093e374235596e33
59,621,306,823,864,050,000,000,000,000,000,000,000
20
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
u32 flow_hash_from_keys(struct flow_keys *keys) { __flow_hash_secret_init(); return __flow_hash_from_keys(keys, hashrnd); }
1
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
239,860,681,605,261,380,000,000,000,000,000,000,000
5
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
flattenenv(struct env *env) { char **envp; struct envnode *node; u_int i; envp = reallocarray(NULL, env->count + 1, sizeof(char *)); if (!envp) err(1, NULL); i = 0; RB_FOREACH(node, envtree, &env->root) { if (asprintf(&envp[i], "%s=%s", node->key, node->value) == -1) err(1, NULL); i++; } envp[i] = NU...
0
[ "CWE-200", "CWE-909" ]
OpenDoas
01c658f8c45cb92a343be5f32aa6da70b2032168
144,004,793,996,960,400,000,000,000,000,000,000,000
18
redo the environment inheritance to not inherit. it was intended to make life easier, but it can be surprising or even unsafe. instead, reset just about everything to the target user's values. ok deraadt martijn Thanks to Sander Bos in particular for pointing out some nasty edge cases.
static int encode_getattr_one(struct xdr_stream *xdr, uint32_t bitmap) { __be32 *p; RESERVE_SPACE(12); WRITE32(OP_GETATTR); WRITE32(1); WRITE32(bitmap); return 0; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
307,829,150,386,517,130,000,000,000,000,000,000,000
10
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void ff_layout_reset_read(struct nfs_pgio_header *hdr) { struct rpc_task *task = &hdr->task; pnfs_layoutcommit_inode(hdr->inode, false); pnfs_error_mark_layout_for_return(hdr->inode, hdr->lseg); if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) { dprintk("%s Reset task %5u for i/o through MDS " "(re...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
165,625,786,622,733,840,000,000,000,000,000,000,000
23
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
static void sas_print_parent_topology_bug(struct domain_device *child, struct ex_phy *parent_phy, struct ex_phy *child_phy) { static const char *ex_type[] = { [SAS_EDGE_EXPANDER_DEVICE] = "edge", [SAS_FANOUT_EXPANDER_DEVICE] = "fanout", }; struct domain_device *parent = child->parent; pr_notice("...
0
[ "CWE-401" ]
linux
3b0541791453fbe7f42867e310e0c9eb6295364d
188,025,610,567,101,200,000,000,000,000,000,000,000
22
scsi: libsas: delete sas port if expander discover failed The sas_port(phy->port) allocated in sas_ex_discover_expander() will not be deleted when the expander failed to discover. This will cause resource leak and a further issue of kernel BUG like below: [159785.843156] port-2:17:29: trying to add phy phy-2:17:29 f...
static unsigned deflateFixed(ucvector* out, size_t* bp, Hash* hash, const unsigned char* data, size_t datapos, size_t dataend, const LodePNGCompressSettings* settings, unsigned final) { HuffmanTree tree_ll; /*tree for literal value...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
334,625,240,692,811,500,000,000,000,000,000,000,000
54
Fixed #5645: realloc return handling
static int ext4_feature_set_ok(struct super_block *sb, int readonly) { if (ext4_has_unknown_ext4_incompat_features(sb)) { ext4_msg(sb, KERN_ERR, "Couldn't mount because of " "unsupported optional features (%x)", (le32_to_cpu(EXT4_SB(sb)->s_es->s_feature_incompat) & ~EXT4_FEATURE_INCOMPAT_SUPP)); return...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
255,849,913,905,974,000,000,000,000,000,000,000,000
60
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
static int do_arpt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) { int ret; if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) return -EPERM; switch (cmd) { case ARPT_SO_GET_INFO: ret = get_info(sock_net(sk), user, len, 0); break; case ARPT_SO_GET_ENTRIES: ret = get_entries(sock_net...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
44,323,196,164,586,230,000,000,000,000,000,000,000
42
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
void gf_isom_sample_entry_init(GF_SampleEntryBox *ent) { ent->internal_type = GF_ISOM_SAMPLE_ENTRY_MP4S; }
0
[ "CWE-476", "CWE-401" ]
gpac
328c6d682698fdb9878dbb4f282963d42c538c01
180,038,753,424,545,660,000,000,000,000,000,000,000
4
fixed #1756
PHP_FUNCTION(sqlite_busy_timeout) { zval *zdb; struct php_sqlite_db *db; long ms; zval *object = getThis(); if (object) { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ms)) { return; } DB_FROM_OBJECT(db, object); } else { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSR...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
157,805,294,288,852,330,000,000,000,000,000,000,000
21
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static struct sctp_af *sctp_sockaddr_af(struct sctp_sock *opt, union sctp_addr *addr, int len) { struct sctp_af *af; /* Check minimum size. */ if (len < sizeof (struct sockaddr)) return NULL; /* V4 mapped address are really of AF_INET family */ if (addr->sa.sa_family == AF_INET6 && ipv6_addr_v4mappe...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
288,638,770,244,015,520,000,000,000,000,000,000,000
28
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
nfsreq_print_noaddr(netdissect_options *ndo, register const u_char *bp, u_int length, register const u_char *bp2) { register const struct sunrpc_msg *rp; register const uint32_t *dp; nfs_type type; int v3; uint32_t proc; uint32_t access_flags; struct nfsv3_sattr sa3; ND_...
1
[ "CWE-125", "CWE-787" ]
tcpdump
19d25dd8781620cd41bf178a5e2e27fc1cf242d0
155,694,477,965,311,570,000,000,000,000,000,000,000
255
CVE-2017-12898/NFS: Fix bounds checking. Fix the bounds checking for the NFSv3 WRITE procedure to check whether the length of the opaque data being written is present in the captured data, not just whether the byte count is present in the captured data. furthest forward in the packet, not the item before it. (This al...
static void destroy_qp_rings(PvrdmaRing *ring, uint8_t is_srq) { pvrdma_ring_free(&ring[0]); if (!is_srq) { pvrdma_ring_free(&ring[1]); } rdma_pci_dma_unmap(ring->dev, ring->ring_state, TARGET_PAGE_SIZE); g_free(ring); }
0
[ "CWE-787" ]
qemu
284f191b4abad213aed04cb0458e1600fd18d7c4
266,291,933,875,048,700,000,000,000,000,000,000,000
10
hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582) Ensure mremap boundaries not trusting the guest kernel to pass the correct buffer length. Fixes: CVE-2021-3582 Reported-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Tested-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Signed-off-by: Mar...
flow_compose_l4_csum(struct dp_packet *p, const struct flow *flow, uint32_t pseudo_hdr_csum) { size_t l4_len = (char *) dp_packet_tail(p) - (char *) dp_packet_l4(p); if (!(flow->nw_frag & FLOW_NW_FRAG_ANY) || !(flow->nw_frag & FLOW_NW_FRAG_LATER)) { if (flow->nw_proto == IP...
0
[ "CWE-400" ]
ovs
ad0d22f6435b43ecfc30c0e877d490d36721f200
1,450,432,359,781,987,400,000,000,000,000,000,000
43
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
ews_client_check_node (const xmlNode *node, const gchar *name) { g_return_val_if_fail (node != NULL, FALSE); return node->type == XML_ELEMENT_NODE && !g_strcmp0 ((gchar *) node->name, name); }
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
97,410,957,694,924,110,000,000,000,000,000,000,000
5
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
SecureElementStatus_t SecureElementVerifyAesCmac( uint8_t* buffer, uint16_t size, uint32_t expectedCmac, KeyIdentifier_t keyID ) { if( buffer == NULL ) { return SECURE_ELEMENT_ERROR_NPE; } SecureElementStatus_t retval = SECURE_ELEMENT_ERROR; ...
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
133,380,425,516,236,800,000,000,000,000,000,000,000
23
Added received buffer size checks.
static unsigned long get_align_bits(void) { return va_align.bits & get_align_mask(); }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
77,496,486,566,815,390,000,000,000,000,000,000,000
4
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 ...
void CLASS foveon_decoder (unsigned size, unsigned code) { static unsigned huff[1024]; struct decode *cur; int i, len; if (!code) { for (i=0; i < size; i++) huff[i] = get4(); memset (first_decode, 0, sizeof first_decode); free_decode = first_decode; } cur = free_decode++; if (free_decod...
0
[ "CWE-119", "CWE-787", "CWE-190" ]
LibRaw-demosaic-pack-GPL2
194f592e205990ea8fce72b6c571c14350aca716
268,776,387,690,739,830,000,000,000,000,000,000,000
35
Fixed possible foveon buffer overrun (Secunia SA750000)
int vrend_create_vertex_elements_state(struct vrend_context *ctx, uint32_t handle, unsigned num_elements, const struct pipe_vertex_element *elements) { struct vrend_vertex_element_array *v; const s...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
241,677,795,324,026,970,000,000,000,000,000,000,000
105
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
void do_let(struct st_command *command) { char *p= command->first_argument; char *var_name, *var_name_end; DYNAMIC_STRING let_rhs_expr; DBUG_ENTER("do_let"); init_dynamic_string(&let_rhs_expr, "", 512, 2048); /* Find <var_name> */ if (!*p) die("Missing arguments to let"); var_name= p; while (*p ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
10,471,288,272,840,687,000,000,000,000,000,000,000
38
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
XMLParser(FileStorage_API* _fs) : fs(_fs) { }
0
[ "CWE-787" ]
opencv
f42d5399aac80d371b17d689851406669c9b9111
333,892,246,456,893,660,000,000,000,000,000,000,000
3
core(persistence): add more checks for implementation limitations
static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb) { struct sk_buff **pp = NULL; struct packet_offload *ptype; __be16 type = skb->protocol; struct list_head *head = &offload_base; int same_flow; enum gro_result ret; int grow; if (netif_elide_gro(skb->dev)) goto normal; g...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
203,321,838,587,575,500,000,000,000,000,000,000,000
111
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static void store_param_datetime(NET *net, MYSQL_BIND *param) { MYSQL_TIME *tm= (MYSQL_TIME *) param->buffer; net_store_datetime(net, tm); }
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
281,270,785,065,933,700,000,000,000,000,000,000,000
5
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
static void ip6gre_tnl_parm_to_user(struct ip6_tnl_parm2 *u, const struct __ip6_tnl_parm *p) { u->proto = IPPROTO_GRE; u->laddr = p->laddr; u->raddr = p->raddr; u->flags = p->flags; u->hop_limit = p->hop_limit; u->encap_limit = p->encap_limit; u->flowinfo = p->flowinfo; u->link = p->link; u->i_key = p->i_key;...
0
[ "CWE-125" ]
net
7892032cfe67f4bde6fc2ee967e45a8fbaf33756
188,476,890,386,076,550,000,000,000,000,000,000,000
17
ip6_gre: fix ip6gre_err() invalid reads Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6 headers. Let's use a "struct ...
GF_Err gf_isom_set_track_switch_parameter(GF_ISOFile *movie, u32 trackNumber, u32 trackRefGroup, Bool is_switch_group, u32 *switchGroupID, u32 *criteriaList, u32 criteriaListCount) { GF_TrackSelectionBox *tsel; GF_TrackBox *trak; GF_UserDataMap *map; GF_Err e; u32 alternateGroupID = 0; u32 next_switch_group_id = ...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
329,062,228,094,615,270,000,000,000,000,000,000,000
102
fixed #1706
static int ssl_conf_has_psk_or_cb( mbedtls_ssl_config const *conf ) { if( conf->f_psk != NULL ) return( 1 ); if( conf->psk_identity_len == 0 || conf->psk_identity == NULL ) return( 0 ); if( conf->psk != NULL && conf->psk_len != 0 ) return( 1 ); #if defined(MBEDTLS_USE_PSA_CRYPTO) ...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
217,609,160,758,665,300,000,000,000,000,000,000,000
18
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
static int _ext4_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh, int flags) { struct ext4_map_blocks map; int ret = 0; if (ext4_has_inline_data(inode)) return -ERANGE; map.m_lblk = iblock; map.m_len = bh->b_size >> inode->i_blkbits; ret = ext4_map_blocks(ext4_journal_current_han...
0
[ "CWE-200" ]
linux
06bd3c36a733ac27962fea7d6f47168841376824
339,914,881,553,702,940,000,000,000,000,000,000,000
22
ext4: fix data exposure after a crash Huang has reported that in his powerfail testing he is seeing stale block contents in some of recently allocated blocks although he mounts ext4 in data=ordered mode. After some investigation I have found out that indeed when delayed allocation is used, we don't add inode to transa...
TPMU_ASYM_SCHEME_Marshal(TPMU_ASYM_SCHEME *source, BYTE **buffer, INT32 *size, UINT32 selector) { UINT16 written = 0; switch (selector) { #if ALG_ECDH case TPM_ALG_ECDH: written += TPMS_KEY_SCHEME_ECDH_Marshal(&source->ecdh, buffer, size); break; #endif #if ALG_ECMQV case TPM_ALG_ECMQV: written...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
30,427,502,992,844,690,000,000,000,000,000,000,000
62
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static int tg3_ptp_enable(struct ptp_clock_info *ptp, struct ptp_clock_request *rq, int on) { return -EOPNOTSUPP; }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
186,972,201,264,952,700,000,000,000,000,000,000,000
5
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
spool_write_header(uschar *id, int where, uschar **errmsg) { int fd; int i; int size_correction; FILE *f; header_line *h; struct stat statbuf; uschar name[256]; uschar temp_name[256]; sprintf(CS temp_name, "%s/input/%s/hdr.%d", spool_directory, message_subdir, (int)getpid()); fd = spool_open_temp(temp_name); if (fd ...
0
[]
exim
7be682ca5ebd9571a01b762195b11c34cd231830
116,942,820,915,668,330,000,000,000,000,000,000,000
219
TLS SNI support for OpenSSL ($tls_sni)
static void fastrpc_get_buff_overlaps(struct fastrpc_invoke_ctx *ctx) { u64 max_end = 0; int i; for (i = 0; i < ctx->nbufs; ++i) { ctx->olaps[i].start = ctx->args[i].ptr; ctx->olaps[i].end = ctx->olaps[i].start + ctx->args[i].length; ctx->olaps[i].raix = i; } sort(ctx->olaps, ctx->nbufs, sizeof(*ctx->olaps...
0
[ "CWE-400", "CWE-401" ]
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
302,734,200,071,339,870,000,000,000,000,000,000,000
35
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com Signed-off-by: Greg...
static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff *skb) { struct sk_buff **pp = NULL; struct packet_offload *ptype; __be16 type = skb->protocol; struct list_head *head = &offload_base; int same_flow; enum gro_result ret; int grow; if (!(skb->dev->features & NETIF_F_GRO)) goto n...
1
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
63,368,893,537,186,630,000,000,000,000,000,000,000
106
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
CURLcode pop3_perform(struct connectdata *conn, bool *connected, /* connect status after PASV / PORT */ bool *dophase_done) { /* this is POP3 and no proxy */ CURLcode result=CURLE_OK; struct pop3_conn *pop3c = &conn->proto.pop3c; DEBUGF(infof(conn->data, "DO phase sta...
0
[ "CWE-89" ]
curl
75ca568fa1c19de4c5358fed246686de8467c238
124,306,543,065,075,640,000,000,000,000,000,000,000
43
URL sanitize: reject URLs containing bad data Protocols (IMAP, POP3 and SMTP) that use the path part of a URL in a decoded manner now use the new Curl_urldecode() function to reject URLs with embedded control codes (anything that is or decodes to a byte value less than 32). URLs containing such codes could easily oth...
static const char *set_server_alias(cmd_parms *cmd, void *dummy, const char *arg) { if (!cmd->server->names) { return "ServerAlias only used in <VirtualHost>"; } while (*arg) { char **item, *name = ap_getword_conf(cmd->pool, &arg); if (ap_is_matc...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
17,247,670,581,592,975,000,000,000,000,000,000,000
22
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
void blk_flush_plug_list(struct blk_plug *plug, bool from_schedule) { flush_plug_callbacks(plug, from_schedule); if (!list_empty(&plug->mq_list)) blk_mq_flush_plug_list(plug, from_schedule); }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
129,851,869,408,933,380,000,000,000,000,000,000,000
7
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...