func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
CompressionHeader(ConstDataRangeCursor* cursor) { originalOpCode = _readWithChecking<LittleEndian<std::int32_t>>(cursor); uncompressedSize = _readWithChecking<LittleEndian<std::int32_t>>(cursor); compressorId = _readWithChecking<LittleEndian<uint8_t>>(cursor); }
0
[]
mongo
5ad69b851801edadbfde8fdf271f4ba7c21170b5
264,349,062,014,151,450,000,000,000,000,000,000,000
5
SERVER-31273 Use Source/Sink version of snappy functions (cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99)
flatpak_deploy_get_deploy_data (FlatpakDeploy *deploy, int required_version, GCancellable *cancellable, GError **error) { return flatpak_load_deploy_data (deploy->dir, d...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
156,326,142,027,582,970,000,000,000,000,000,000,000
12
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static int mailimf_minute_parse(const char * message, size_t length, size_t * indx, int * result) { uint32_t minute; int r; r = mailimf_number_parse(message, length, indx, &minute); if (r != MAILIMF_NO_ERROR) return r; * result = minute; return MAILIMF_NO_ERROR; }
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
93,138,086,755,194,960,000,000,000,000,000,000,000
14
Fixed crash #274
_tiffSizeProc(thandle_t fd) { _TIFF_stat_s sb; fd_as_handle_union_t fdh; fdh.h = fd; if (_TIFF_fstat_f(fdh.fd,&sb)<0) return(0); else return((uint64)sb.st_size); }
0
[ "CWE-119" ]
libtiff
d60332057b9575ada4f264489582b13e30137be1
278,176,912,119,589,870,000,000,000,000,000,000,000
10
* libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc() * libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero initialize tif_rawdata. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651
void CalendarRegressionTest::test4051765() { UErrorCode status = U_ZERO_ERROR; Calendar *cal = Calendar::createInstance(status); if(U_FAILURE(status)) { dataerrln("Error creating Calendar: %s", u_errorName(status)); delete cal; return; } cal->setLenient(FALSE); cal->set(UCAL_DA...
0
[ "CWE-190" ]
icu
71dd84d4ffd6600a70e5bca56a22b957e6642bd4
254,714,735,677,991,000,000,000,000,000,000,000,000
22
ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J X-SVN-Rev: 40654
int URI_FUNC(FreeUriMembersMm)(URI_TYPE(Uri) * uri, UriMemoryManager * memory) { if (uri == NULL) { return URI_ERROR_NULL; } URI_CHECK_MEMORY_MANAGER(memory); /* may return */ if (uri->owner) { /* Scheme */ if (uri->scheme.first != NULL) { if (uri->scheme.first != uri->scheme.afterLast) { memory->fr...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
66,667,995,162,694,920,000,000,000,000,000,000,000
109
Fix uriParse*Ex* out-of-bounds read
void reftype_box_del(GF_Box *s) { GF_TrackReferenceTypeBox *ptr = (GF_TrackReferenceTypeBox *)s; if (!ptr) return; if (ptr->trackIDs) gf_free(ptr->trackIDs); gf_free(ptr);
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
295,069,743,979,987,560,000,000,000,000,000,000,000
7
fixed #1587
static int restore_mixer_value(struct usb_mixer_elem_list *list) { struct usb_mixer_elem_info *cval = (struct usb_mixer_elem_info *)list; int c, err, idx; if (cval->cmask) { idx = 0; for (c = 0; c < MAX_CHANNELS; c++) { if (!(cval->cmask & (1 << c))) continue; if (cval->cached & (1 << (c + 1))) { ...
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
94,895,147,836,225,650,000,000,000,000,000,000,000
29
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
static BOOL update_read_glyph_index_order(wStream* s, const ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index) { ORDER_FIELD_BYTE(1, glyph_index->cacheId); ORDER_FIELD_BYTE(2, glyph_index->flAccel); ORDER_FIELD_BYTE(3, glyph_index->ulCharInc); ORDER_FIELD_BYTE(4, glyph_...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
57,805,938,701,694,490,000,000,000,000,000,000,000
40
Fixed #6013: Check new length is > 0
static void sctp_add_asconf_response(struct sctp_chunk *chunk, __be32 crr_id, __be16 err_code, sctp_addip_param_t *asconf_param) { sctp_addip_param_t ack_param; sctp_errhdr_t err_param; int asconf_param_len = 0; int err_param_len = 0; __be16 response_type; if (SCTP_ERROR_NO_ERROR == err_code) { ...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
80,190,102,644,344,760,000,000,000,000,000,000,000
39
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
if (err != MP_OKAY) { return err; }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
138,209,943,495,572,700,000,000,000,000,000,000,000
3
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static void ping_v4_format_sock(struct sock *sp, struct seq_file *f, int bucket) { struct inet_sock *inet = inet_sk(sp); __be32 dest = inet->inet_daddr; __be32 src = inet->inet_rcv_saddr; __u16 destp = ntohs(inet->inet_dport); __u16 srcp = ntohs(inet->inet_sport); seq_printf(f, "%5d: %08X:%04X %08X:%04X" " %...
0
[ "CWE-20" ]
net
85fbaa75037d0b6b786ff18658ddf0b4014ce2a4
1,363,080,726,416,099,600,000,000,000,000,000,000
20
inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage of uninitialized memory to user in recv syscalls") conditionally updated addr_len if the msg_name is written to. The recv_error and rxpmtu functions relied on the re...
int x509_get_name( unsigned char **p, const unsigned char *end, x509_name *cur ) { int ret; size_t len; const unsigned char *end2; x509_name *use; if( ( ret = asn1_get_tag( p, end, &len, ASN1_CONSTRUCTED | ASN1_SET ) ) != 0 ) return( POLARSSL_ERR_X509_INVALID_...
1
[ "CWE-310" ]
polarssl
5d8618539f8e186c1b2c1b5a548d6f85936fe41f
236,834,192,004,106,600,000,000,000,000,000,000,000
52
Fix memory leak while parsing some X.509 certs
bool AbstractSqlStorage::watchQuery(QSqlQuery &query) { bool queryError = query.lastError().isValid(); if (queryError || _debug) { if (queryError) qCritical() << "unhandled Error in QSqlQuery!"; qCritical() << " last Query:\n" << qPrintable(query.lastQuery()); ...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
24,121,271,512,433,550,000,000,000,000,000,000,000
47
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
Bool gf_fs_forward_gf_event(GF_FilterSession *fsess, GF_Event *evt, Bool consumed, Bool skip_user) { if (!fsess || fsess->in_final_flush) return GF_FALSE; if (fsess->event_listeners) { GF_FSEventListener *el; u32 i=0; gf_mx_p(fsess->evt_mx); fsess->in_event_listener ++; gf_mx_v(fsess->evt_mx); while ((e...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
51,808,688,536,673,140,000,000,000,000,000,000,000
27
fixed crashes for very long path - cf #1908
_public_ int sd_bus_is_ready(sd_bus *bus) { assert_return(bus, -EINVAL); assert_return(bus = bus_resolve(bus), -ENOPKG); assert_return(!bus_pid_changed(bus), -ECHILD); return bus->state == BUS_RUNNING; }
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
63,986,543,154,339,850,000,000,000,000,000,000,000
7
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
rsvg_handle_new_from_stream_sync (GInputStream *input_stream, GFile *base_file, RsvgHandleFlags flags, GCancellable *cancellable, GError **error) { RsvgHandle...
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
177,539,017,474,707,820,000,000,000,000,000,000,000
25
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
static void *wsgi_merge_dir_config(apr_pool_t *p, void *base_conf, void *new_conf) { WSGIDirectoryConfig *config = NULL; WSGIDirectoryConfig *parent = NULL; WSGIDirectoryConfig *child = NULL; config = newWSGIDirectoryConfig(p); parent = (WSGIDirectoryConfig *)bas...
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
237,313,175,129,579,950,000,000,000,000,000,000,000
105
Local privilege escalation when using daemon mode. (CVE-2014-0240)
static void touch_pud(struct vm_area_struct *vma, unsigned long addr, pud_t *pud, int flags) { pud_t _pud; _pud = pud_mkyoung(*pud); if (flags & FOLL_WRITE) _pud = pud_mkdirty(_pud); if (pudp_set_access_flags(vma, addr & HPAGE_PUD_MASK, pud, _pud, flags & FOLL_WRITE)) update_mmu_cache_pud(vma, addr, pud)...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
109,840,784,061,773,420,000,000,000,000,000,000,000
12
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
Item *Item_num::safe_charset_converter(THD *thd, CHARSET_INFO *tocs) { /* Item_num returns pure ASCII result, so conversion is needed only in case of "tricky" character sets like UCS2. If tocs is not "tricky", return the item itself. */ if (!(tocs->state & MY_CS_NONASCII)) return this; Item *...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
121,263,241,635,237,380,000,000,000,000,000,000,000
15
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static Exit_status safe_connect() { mysql= mysql_init(NULL); if (!mysql) { error("Failed on mysql_init."); return ERROR_STOP; } SSL_SET_OPTIONS(mysql); if (opt_plugin_dir && *opt_plugin_dir) mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir); if (opt_default_auth && *opt_default_auth) ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
56,647,608,034,864,520,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...
BOOL rdp_send_error_info(rdpRdp* rdp) { wStream* s; BOOL status; if (rdp->errorInfo == ERRINFO_SUCCESS) return TRUE; s = rdp_data_pdu_init(rdp); if (!s) return FALSE; Stream_Write_UINT32(s, rdp->errorInfo); /* error id (4 bytes) */ status = rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SET_ERROR_INFO, 0); ret...
0
[ "CWE-125" ]
FreeRDP
9301bfe730c66180263248b74353daa99f5a969b
298,754,151,557,619,200,000,000,000,000,000,000,000
17
Fixed #6007: Boundary checks in rdp_read_flow_control_pdu
callbacks_scrollbar_button_pressed (GtkWidget *widget, GdkEventButton *event){ //screen.last_x = ((GtkAdjustment *)screen.win.hAdjustment)->value; screen.state = SCROLLBAR; return FALSE; }
0
[ "CWE-200" ]
gerbv
319a8af890e4d0a5c38e6d08f510da8eefc42537
269,769,123,803,799,200,000,000,000,000,000,000,000
5
Remove local alias to parameter array Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402
void MainWindow::on_actionChannels6_triggered(bool checked) { changeAudioChannels(checked, 6); }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
173,814,961,896,331,900,000,000,000,000,000,000,000
4
fix upgrade check is not using TLS correctly
read_infile(char *fname) { register int i, fd, cc; register char *cp; struct stat buf; fd = open(fname, O_RDONLY|O_BINARY); if (fd < 0) error("can't open %s: %s", fname, pcap_strerror(errno)); if (fstat(fd, &buf) < 0) error("can't stat %s: %s", fname, pcap_strerror(errno)); cp = malloc((u_int)buf.st_size ...
0
[ "CWE-120", "CWE-787" ]
tcpdump
9ba91381954ad325ea4fd26b9c65a8bd9a2a85b6
328,547,270,692,292,230,000,000,000,000,000,000,000
33
(for 4.9.3) CVE-2018-14879/fix -V to fail invalid input safely get_next_file() did not check the return value of strlen() and underflowed an array index if the line read by fgets() from the file started with \0. This caused an out-of-bounds read and could cause a write. Add the missing check. This vulnerability was d...
void Filter::onUpstream1xxHeaders(Http::ResponseHeaderMapPtr&& headers, UpstreamRequest& upstream_request) { const uint64_t response_code = Http::Utility::getResponseStatus(*headers); chargeUpstreamCode(response_code, *headers, upstream_request.upstreamHost(), false); ENVOY_STREA...
0
[ "CWE-703" ]
envoy
5bf9b0f1e7f247a4eee7180849cb0823926f7fff
93,733,030,051,993,600,000,000,000,000,000,000,000
28
[1.21] CVE-2022-21655 Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static AVCodec *find_encdec(enum AVCodecID id, int encoder) { AVCodec *p, *experimental = NULL; p = first_avcodec; id= remap_deprecated_codec_id(id); while (p) { if ((encoder ? av_codec_is_encoder(p) : av_codec_is_decoder(p)) && p->id == id) { if (p->capabilities & AV_COD...
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
1,146,264,906,576,657,300,000,000,000,000,000,000
17
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Item *Item_string::clone_item(THD *thd) { return new (thd->mem_root) Item_string(thd, name.str, str_value.ptr(), str_value.length(), collation.collation); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
15,157,197,622,162,758,000,000,000,000,000,000,000
6
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
zip_read_data_deflate(struct archive_read *a, const void **buff, size_t *size, int64_t *offset) { struct zip *zip; ssize_t bytes_avail; const void *compressed_buff, *sp; int r; (void)offset; /* UNUSED */ zip = (struct zip *)(a->format->data); /* If the buffer hasn't been allocated, allocate it now. */ if...
0
[ "CWE-703", "CWE-125" ]
libarchive
cfaa28168a07ea4a53276b63068f94fce37d6aff
30,930,936,236,421,203,000,000,000,000,000,000,000
156
ZIP reader: fix possible out-of-bounds read in zipx_lzma_alone_init() Fixes #1672
MagickExport void CloseMagickLog(void) { ExceptionInfo *exception; LogInfo *log_info; if (IsEventLogging() == MagickFalse) return; exception=AcquireExceptionInfo(); log_info=GetLogInfo("*",exception); exception=DestroyExceptionInfo(exception); LockSemaphoreInfo(log_semaphore); if (log_info...
0
[ "CWE-476" ]
ImageMagick
107ce8577e818cf4801e5a59641cb769d645cc95
55,638,518,052,759,110,000,000,000,000,000,000,000
22
https://github.com/ImageMagick/ImageMagick/issues/1224
ves_icall_MonoType_GetArrayRank (MonoReflectionType *type) { MonoClass *class; if (type->type->type != MONO_TYPE_ARRAY && type->type->type != MONO_TYPE_SZARRAY) mono_raise_exception (mono_get_exception_argument ("type", "Type must be an array type")); class = mono_class_from_mono_type (type->type); return class...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
42,109,151,235,065,666,000,000,000,000,000,000,000
10
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
backward_search(regex_t* reg, const UChar* str, const UChar* end, UChar* s, const UChar* range, UChar* adjrange, UChar** low, UChar** high) { UChar *p; p = s; retry: switch (reg->optimize) { case OPTIMIZE_STR: exact_method: p = slow_search_backward(reg->enc, reg->exact, reg->exact_end, ...
1
[ "CWE-125" ]
oniguruma
778a43dd56925ed58bbe26e3a7bb8202d72c3f3f
217,671,523,284,336,270,000,000,000,000,000,000,000
102
fix #164: Integer overflow related to reg->dmax in search_in_range()
static void MSLCharacters(void *context,const xmlChar *c,int length) { MSLInfo *msl_info; register char *p; register ssize_t i; /* Receiving some characters from the parser. */ (void) LogMagickEvent(CoderEvent,GetMagickModule(), " SAX.characters(%s,%d)",c,length); msl_info=(MSLInfo...
0
[ "CWE-772" ]
ImageMagick6
bb77f9e905597c7ab1e92042c7de418d999b00bf
213,276,295,665,983,600,000,000,000,000,000,000,000
37
Fixed leaking of the image when writing an MSL image.
static int pagemap_hugetlb_range(pte_t *pte, unsigned long hmask, unsigned long addr, unsigned long end, struct mm_walk *walk) { struct pagemapread *pm = walk->private; int err = 0; u64 pfn; for (; addr != end; addr += PAGE_SIZE) { int offset = (addr & ~hmask) >> PAGE_SHIFT; pfn = huge_pte_to_pagemap...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
333,156,547,917,497,940,000,000,000,000,000,000,000
20
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static void insertHeader(std::vector<nghttp2_nv>& headers, const HeaderEntry& header) { uint8_t flags = 0; if (header.key().type() == HeaderString::Type::Reference) { flags |= NGHTTP2_NV_FLAG_NO_COPY_NAME; } if (header.value().type() == HeaderString::Type::Reference) { flags |= NGHTTP2_NV_FLAG_NO_COPY_V...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
191,361,968,778,853,660,000,000,000,000,000,000,000
14
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...
int l2tp_recv(int fd, struct l2tp_packet_t **p, struct in_pktinfo *pkt_info, const char *secret, size_t secret_len) { int n, length; uint8_t *buf; struct l2tp_hdr_t *hdr; struct l2tp_avp_t *avp; struct l2tp_dict_attr_t *da; struct l2tp_attr_t *attr, *RV = NULL; uint8_t *ptr; struct l2tp_packet_t *pack; ...
1
[ "CWE-119", "CWE-125", "CWE-120" ]
accel-ppp
2324bcd5ba12cf28f47357a8f03cd41b7c04c52b
301,171,951,458,517,840,000,000,000,000,000,000,000
245
l2tp: fix RCE through buffer overflow & fix LE/BE compatibility Unsufficent checks of valid l2tp header & avp length cause possible RCE through buffer overflow, reported by https://github.com/WinMin swings & leommxj, Chaitin Security Research Lab. Add missed header length and avp length validation to fix the issue. O...
static void init_code_range_array(void) { THREAD_ATOMIC_START; CodeRanges[0] = CR_NEWLINE; CodeRanges[1] = CR_Alpha; CodeRanges[2] = CR_Blank; CodeRanges[3] = CR_Cntrl; CodeRanges[4] = CR_Digit; CodeRanges[5] = CR_Graph; CodeRanges[6] = CR_Lower; CodeRanges[7] = CR_Print; CodeRanges[8] = CR_Punct; ...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
180,327,829,205,098,040,000,000,000,000,000,000,000
125
onig-5.9.2
void part_round_stats(struct request_queue *q, int cpu, struct hd_struct *part) { struct hd_struct *part2 = NULL; unsigned long now = jiffies; unsigned int inflight[2]; int stats = 0; if (part->stamp != now) stats |= 1; if (part->partno) { part2 = &part_to_disk(part)->part0; if (part2->stamp != now) st...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
228,084,989,772,888,850,000,000,000,000,000,000,000
26
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
int ssl23_get_client_hello(SSL *s) { char buf_space[11]; /* Request this many bytes in initial read. * We can detect SSL 3.0/TLS 1.0 Client Hellos * ('type == 3') correctly only when the following * is in a single record, which is not guaranteed by ...
1
[ "CWE-310" ]
openssl
cd332a07503bd9771595de87e768179f81715704
51,629,337,842,442,660,000,000,000,000,000,000,000
377
Fix no-ssl3 configuration option CVE-2014-3568 Reviewed-by: Emilia Kasper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
u32 gf_isom_get_media_type(GF_ISOFile *movie, u32 trackNumber) { GF_TrackBox *trak; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak) return GF_BAD_PARAM; return (trak->Media && trak->Media->handler) ? trak->Media->handler->handlerType : 0; }
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
86,564,884,161,936,420,000,000,000,000,000,000,000
7
fixed #1706
static struct socket *get_raw_socket(int fd) { struct { struct sockaddr_ll sa; char buf[MAX_ADDR_LEN]; } uaddr; int uaddr_len = sizeof uaddr, r; struct socket *sock = sockfd_lookup(fd, &r); if (!sock) return ERR_PTR(-ENOTSOCK); /* Parameter checking */ if (sock->sk->sk_type != SOCK_RAW) { r = -ESOCKTN...
0
[ "CWE-787" ]
linux
e2b3b35eb9896f26c98b9a2c047d9111638059a2
80,577,284,356,518,030,000,000,000,000,000,000,000
32
vhost_net: batch used ring update in rx This patch tries to batched used ring update during RX. This is pretty fit for the case when guest is much faster (e.g dpdk based backend). In this case, used ring is almost empty: - we may get serious cache line misses/contending on both used ring and used idx. - at most 1 p...
static int xfrm_get_ae(struct sk_buff *skb, struct nlmsghdr *nlh, struct nlattr **attrs) { struct net *net = sock_net(skb->sk); struct xfrm_state *x; struct sk_buff *r_skb; int err; struct km_event c; u32 mark; struct xfrm_mark m; struct xfrm_aevent_id *p = nlmsg_data(nlh); struct xfrm_usersa_id *id = &p->sa...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
26,511,058,270,576,326,000,000,000,000,000,000,000
42
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
firewall_is_fascist_or(void) { return reachable_or_addr_policy != NULL; }
0
[ "CWE-119" ]
tor
43414eb98821d3b5c6c65181d7545ce938f82c8e
293,769,261,343,784,330,000,000,000,000,000,000,000
4
Fix bounds-checking in policy_summarize Found by piebeer.
SteamNetworkingMicroseconds CSteamNetworkConnectionBase::SNP_GetNextThinkTime( SteamNetworkingMicroseconds usecNow ) { // We really shouldn't be trying to do this when not connected if ( !BStateIsConnectedForWirePurposes() ) { AssertMsg( false, "We shouldn't be trying to think SNP when not fully connected" ); re...
0
[ "CWE-787" ]
GameNetworkingSockets
e0c86dcb9139771db3db0cfdb1fb8bef0af19c43
139,396,089,242,916,370,000,000,000,000,000,000,000
52
Drop unreliable segments with weird offset/size. And be more deliberate about limits of unreliable message/segment sizes.
void readErr(const AsyncSocketException& ex) noexcept override { std::cerr << "readError " << ex.what() << std::endl; // do nothing since this is expected }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
297,207,504,331,505,840,000,000,000,000,000,000,000
4
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
int hrtimer_cancel(struct hrtimer *timer) { for (;;) { int ret = hrtimer_try_to_cancel(timer); if (ret >= 0) return ret; cpu_relax(); } }
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
337,582,601,652,652,100,000,000,000,000,000,000,000
10
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
static struct minidump_module *read_module(RBuffer *b, ut64 addr) { st64 o_addr = r_buf_seek (b, 0, R_BUF_CUR); if (r_buf_seek (b, addr, R_BUF_SET) == -1) { return NULL; } struct minidump_module *module = R_NEW0 (struct minidump_module); if (!module) { return NULL; } module->base_of_image = r_buf_read_le64 (...
0
[ "CWE-400", "CWE-703" ]
radare2
27fe8031782d3a06c3998eaa94354867864f9f1b
94,188,836,992,260,460,000,000,000,000,000,000,000
36
Fix DoS in the minidump parser ##crash * Reported by lazymio via huntr.dev * Reproducer: mdmp-dos
ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, int overwrite) { begin_read(source); begin_write(target); zend_hash_merge(TS_HASH(target), TS_HASH(source), pCopyConstructor, overwrite); end_write(target); end_read(source); }
0
[]
php-src
2bcf69d073190e4f032d883f3416dea1b027a39e
268,972,249,380,842,180,000,000,000,000,000,000,000
8
Fixed bug #68676 (Explicit Double Free)
get_arg_pat(pat, quote) VALUE pat; { return rb_rescue2(get_pat_quoted, pat, regcomp_failed, pat, rb_eRegexpError, (VALUE)0); }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
50,051,955,680,748,610,000,000,000,000,000,000,000
7
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
__releases(fiq->waitq.lock) { struct fuse_in_header ih; struct fuse_interrupt_in arg; unsigned reqsize = sizeof(ih) + sizeof(arg); int err; list_del_init(&req->intr_entry); memset(&ih, 0, sizeof(ih)); memset(&arg, 0, sizeof(arg)); ih.len = reqsize; ih.opcode = FUSE_INTERRUPT; ih.unique = (req->in.h.unique | ...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
302,877,356,546,687,820,000,000,000,000,000,000,000
26
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
DecimalQuantity &DecimalQuantity::setToDecNumber(StringPiece n, UErrorCode& status) { setBcdToZero(); flags = 0; // Compute the decNumber representation DecNum decnum; decnum.setTo(n, status); _setToDecNum(decnum, status); return *this; }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
115,966,598,063,669,090,000,000,000,000,000,000,000
11
ICU-20246 Fixing another integer overflow in number parsing.
static void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt) { unsigned n; unsigned count = field->report_count; unsigned offset = field->report_offset; unsigned size = field->report_size; __s32 min = field->logical_minimum; __s32 max = field->logical_maximum; __...
1
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
183,977,518,605,925,460,000,000,000,000,000,000,000
51
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
static void virtio_blk_handle_flush(VirtIOBlockReq *req, MultiReqBuffer *mrb) { BlockDriverAIOCB *acb; /* * Make sure all outstanding writes are posted to the backing device. */ virtio_submit_multiwrite(req->dev->bs, mrb); acb = bdrv_aio_flush(req->dev->bs, virtio_blk_flush_complete, req); ...
0
[ "CWE-119" ]
qemu-kvm
52c050236eaa4f0b5e1d160cd66dc18106445c4d
35,030,703,329,912,020,000,000,000,000,000,000,000
14
virtio-blk: fail unaligned requests Like all block drivers virtio-blk should not allow small than block size granularity access. But given that the protocol specifies a byte unit length field we currently accept such requests, which cause qemu to abort() in lower layers. Add checks to the main read and write handler...
static Variant HHVM_FUNCTION(zip_entry_filesize, const Resource& zip_entry) { auto zipEntry = cast<ZipEntry>(zip_entry); FAIL_IF_INVALID_ZIPENTRY(zip_entry_filesize, zipEntry); return zipEntry->getSize(); }
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
181,977,733,617,282,800,000,000,000,000,000,000,000
7
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *old_re, bool *is_bare_re, U32 orig_rx_flags, U32 pm_flags) { REGEXP *rx; struct regexp *r; regexp_internal *ri; STRLEN plen; char *exp; regnode *scan; I32 flags; SSize_t...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
289,531,010,241,587,800,000,000,000,000,000,000,000
1,042
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
int __ext4_forget(const char *where, unsigned int line, handle_t *handle, int is_metadata, struct inode *inode, struct buffer_head *bh, ext4_fsblk_t blocknr) { int err; might_sleep(); trace_ext4_forget(inode, is_metadata, blocknr); BUFFER_TRACE(bh, "enter"); jbd_debug(4, "forgetting bh %p: is_metadata =...
0
[ "CWE-416" ]
linux
6934da9238da947628be83635e365df41064b09b
99,443,794,862,896,580,000,000,000,000,000,000,000
54
ext4: fix potential use after free in __ext4_journal_stop There is a use-after-free possibility in __ext4_journal_stop() in the case that we free the handle in the first jbd2_journal_stop() because we're referencing handle->h_err afterwards. This was introduced in 9705acd63b125dee8b15c705216d7186daea4625 and it is wro...
plperl_spi_exec(char *query, int limit) { HV *ret_hv; /* * Execute the query inside a sub-transaction, so we can cope with errors * sanely */ MemoryContext oldcontext = CurrentMemoryContext; ResourceOwner oldowner = CurrentResourceOwner; check_spi_usage_allowed(); BeginInternalSubTransaction(NULL); ...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
168,034,065,683,805,440,000,000,000,000,000,000,000
70
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv, struct v4l2_format *f) { struct zr364xx_camera *cam = video_drvdata(file); struct videobuf_queue *q = &cam->vb_vidq; char pixelformat_name[5]; int ret = zr364xx_vidioc_try_fmt_vid_cap(file, cam, f); int i; if (ret < 0) return ret; ...
0
[ "CWE-476" ]
linux
5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e
275,992,896,177,031,920,000,000,000,000,000,000,000
93
media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap SyzKaller hit the null pointer deref while reading from uninitialized udev->product in zr364xx_vidioc_querycap(). ================================================================== BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20 in...
replotrequest() { /* do not store directly into the replot_line string until the * new plot line has been successfully plotted. This way, * if user makes a typo in a replot line, they do not have * to start from scratch. The replot_line will be committed * after do_plot has returned, whence we k...
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
12,191,247,005,175,785,000,000,000,000,000,000,000
56
successive failures of "set print <foo>" could cause double-free Bug #2312
int kvm_hv_hypercall(struct kvm_vcpu *vcpu) { u64 param, ingpa, outgpa, ret; uint16_t code, rep_idx, rep_cnt, res = HV_STATUS_SUCCESS, rep_done = 0; bool fast, longmode; int cs_db, cs_l; /* * hypercall generates UD from non zero cpl and real mode * per HYPER-V spec */ if (kvm_x86_ops->get_cpl(vcpu) != 0 ||...
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
281,827,390,539,106,400,000,000,000,000,000,000,000
61
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
int ping_init_sock(struct sock *sk) { struct net *net = sock_net(sk); kgid_t group = current_egid(); struct group_info *group_info; int i; kgid_t low, high; int ret = 0; if (sk->sk_family == AF_INET6) sk->sk_ipv6only = 1; inet_get_ping_group_range_net(net, &low, &high); if (gid_lte(low, group) && gid_lte(g...
0
[ "CWE-284" ]
linux
0eab121ef8750a5c8637d51534d5e9143fb0633f
307,330,306,164,976,630,000,000,000,000,000,000,000
30
net: ping: check minimum size on ICMP header length Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there was no check that the iovec contained enough bytes for an ICMP header, and the read loop would walk across neighboring stack contents. Since the iov_iter conversion, bad arguments are noticed, ...
dp_packet_batch_apply_cutlen(struct dp_packet_batch *pktb) { int i; if (!pktb->trunc) return; for (i = 0; i < pktb->count; i++) { uint32_t cutlen = dp_packet_get_cutlen(pktb->packets[i]); dp_packet_set_size(pktb->packets[i], dp_packet_size(pktb->packets[i]) - c...
0
[ "CWE-400" ]
ovs
ad0d22f6435b43ecfc30c0e877d490d36721f200
213,439,957,022,356,230,000,000,000,000,000,000,000
16
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...
static void __user *io_provided_buffer_select(struct io_kiocb *req, size_t *len, struct io_buffer_list *bl) { if (!list_empty(&bl->buf_list)) { struct io_buffer *kbuf; kbuf = list_first_entry(&bl->buf_list, struct io_buffer, list); list_del(&kbuf->list); if (*len > kbuf->len) *len = kbuf->len; ...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
320,374,017,547,602,170,000,000,000,000,000,000,000
17
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
ldns_rr_new_frm_fp(ldns_rr **newrr, FILE *fp, uint32_t *ttl, ldns_rdf **origin, ldns_rdf **prev) { return ldns_rr_new_frm_fp_l(newrr, fp, ttl, origin, prev, NULL); }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
168,205,564,247,262,130,000,000,000,000,000,000,000
4
CAA and URI
local unsigned long crc32_little(crc, buf, len) unsigned long crc; const unsigned char FAR *buf; unsigned len; { register z_crc_t c; register const z_crc_t FAR *buf4; c = (z_crc_t)crc; c = ~c; while (len && ((ptrdiff_t)buf & 3)) { c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8)...
0
[ "CWE-703", "CWE-189" ]
zlib
d1d577490c15a0c6862473d7576352a9f18ef811
94,134,300,590,624,480,000,000,000,000,000,000,000
32
Avoid pre-decrement of pointer in big-endian CRC calculation. There was a small optimization for PowerPCs to pre-increment a pointer when accessing a word, instead of post-incrementing. This required prefacing the loop with a decrement of the pointer, possibly pointing before the object passed. This is not compliant w...
bool const_item() const { return used_tables() == 0; }
1
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
176,129,634,520,084,980,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
ExecASUpdateTriggers(EState *estate, ResultRelInfo *relinfo) { TriggerDesc *trigdesc = relinfo->ri_TrigDesc; if (trigdesc && trigdesc->trig_update_after_statement) AfterTriggerSaveEvent(estate, relinfo, TRIGGER_EVENT_UPDATE, false, NULL, NULL, NIL, GetModifiedColumns(relinfo, estate)); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
79,218,679,434,072,720,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
class Component *Scan::ComponentOf(UBYTE i) { assert(i < 4); if (m_pComponent[i] == NULL) m_pComponent[i] = m_pFrame->FindComponent(m_ucComponent[i]); return m_pComponent[i]; }
0
[ "CWE-476" ]
libjpeg
ea6315164b1649ff932a396b7600eac4bffcfaba
218,624,929,346,414,260,000,000,000,000,000,000,000
9
Added a check whether all components in a scan are actually present.
static void php_session_initialize(TSRMLS_D) /* {{{ */ { char *val = NULL; int vallen; if (!PS(mod)) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "No storage module chosen - failed to initialize session"); return; } /* Open session handler first */ if (PS(mod)->s_open(&PS(mod_data), PS(save_path), PS(session...
0
[ "CWE-399", "CWE-74" ]
php-src
8763c6090d627d8bb0ee1d030c30e58f406be9ce
304,887,932,988,574,980,000,000,000,000,000,000,000
60
Fix bug #72681 - consume data even if we're not storing them
TEST(HeaderMapImplTest, SetCopyOldBehavior) { TestScopedRuntime runtime; Runtime::LoaderSingleton::getExisting()->mergeValues( {{"envoy.reloadable_features.http_set_copy_replace_all_headers", "false"}}); TestRequestHeaderMapImpl headers; LowerCaseString foo("hello"); headers.setCopy(foo, "world"); EX...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
87,833,030,238,674,690,000,000,000,000,000,000,000
48
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
GF_Err gf_isom_remove_track(GF_ISOFile *movie, u32 trackNumber) { GF_Err e; GF_TrackBox *the_trak, *trak; GF_TrackReferenceTypeBox *tref; u32 i, j, k, descIndex; GF_ISOTrackID *newRefs; u8 found; GF_ISOSample *samp; the_trak = gf_isom_get_track_from_file(movie, trackNumber); if (!the_trak) return GF_BAD_PARAM;...
0
[ "CWE-476" ]
gpac
586e817dcd531bb3e75438390f1f753cfe6e940a
101,330,262,437,035,880,000,000,000,000,000,000,000
131
fixed #2046
TEST_F(QuicUnencryptedServerTransportTest, TestCloseWhileAsyncPending) { folly::EventBase testLooper; setupClientReadCodec(); getFakeHandshakeLayer()->initialize(&testLooper, server.get()); recvClientHello(); testLooper.loop(); // Make sure the test looper worked. IOBufEqualTo eq; EXPECT_TRUE(eq(getCr...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
32,600,961,477,298,710,000,000,000,000,000,000,000
33
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
int is_windows_drive(const char *filename) { if (is_windows_drive_prefix(filename) && filename[2] == '\0') return 1; if (strstart(filename, "\\\\.\\", NULL) || strstart(filename, "//./", NULL)) return 1; return 0; }
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
98,391,653,205,108,970,000,000,000,000,000,000,000
10
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
static int dict_int_cmp(const void *a, const void *b) { intptr_t ia, ib; ia = (intptr_t)a; ib = (intptr_t)b; return (ia-ib); }
0
[ "CWE-787" ]
e2fsprogs
71ba13755337e19c9a826dfc874562a36e1b24d3
136,609,765,685,742,670,000,000,000,000,000,000,000
9
e2fsck: don't try to rehash a deleted directory If directory has been deleted in pass1[bcd] processing, then we shouldn't try to rehash the directory in pass 3a when we try to rehash/reoptimize directories. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
newSWFShapeFromBitmap(SWFBitmap bitmap, int flag) { SWFShape shape = newSWFShape(); SWFFillStyle fill; int width, height; if ( flag != SWFFILL_TILED_BITMAP && flag != SWFFILL_CLIPPED_BITMAP && flag != SWFFILL_NONSMOOTHED_TILED_BITMAP && flag != SWFFILL_NONSMOOTHED_CLIPPED_BITMAP) { SWF_error("...
0
[ "CWE-20", "CWE-476" ]
libming
6e76e8c71cb51c8ba0aa9737a636b9ac3029887f
147,322,916,852,722,600,000,000,000,000,000,000,000
29
SWFShape_setLeftFillStyle: prevent fill overflow
static unsigned long sfq_find(struct Qdisc *sch, u32 classid) { return 0; }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
239,208,719,684,750,950,000,000,000,000,000,000,000
4
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...
buf_freeall(buf_T *buf, int flags) { int is_curbuf = (buf == curbuf); bufref_T bufref; int is_curwin = (curwin != NULL && curwin->w_buffer == buf); win_T *the_curwin = curwin; tabpage_T *the_curtab = curtab; // Make sure the buffer isn't closed by autocommands. ++buf->b_locked; ++buf-...
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
238,076,154,060,269,240,000,000,000,000,000,000,000
100
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
static inline bool nvme_is_write(NvmeRequest *req) { NvmeRwCmd *rw = (NvmeRwCmd *)&req->cmd; return rw->opcode == NVME_CMD_WRITE || rw->opcode == NVME_CMD_ZONE_APPEND || rw->opcode == NVME_CMD_WRITE_ZEROES; }
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
74,725,932,987,997,590,000,000,000,000,000,000,000
8
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
TiledInputFile::numYLevels () const { return _data->numYLevels; }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
78,165,188,069,014,140,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
ImagingSgiRleDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t bytes) { UINT8 *ptr; SGISTATE *c; int err = 0; int status; /* size check */ if (im->xsize > INT_MAX / im->bands || im->ysize > INT_MAX / im->bands) { state->errcode = IMAGING_CODEC_MEMORY; return -1;...
0
[ "CWE-125" ]
Pillow
4853e522bddbec66022c0915b9a56255d0188bf9
177,284,881,201,672,000,000,000,000,000,000,000,000
128
Fix OOB read in SgiRleDecode.c * From Pillow 4.3.0->8.1.0 * CVE-2021-25293
isdn_receive_skb_callback(int di, int channel, struct sk_buff *skb) { int i; if ((i = isdn_dc2minor(di, channel)) == -1) { dev_kfree_skb(skb); return; } /* Update statistics */ dev->ibytes[i] += skb->len; /* First, try to deliver data to network-device */ if (isdn_net_rcv_skb(i, skb)) return; /* V.110...
0
[ "CWE-119" ]
linux-2.6
eafe1aa37e6ec2d56f14732b5240c4dd09f0613a
75,693,923,821,006,865,000,000,000,000,000,000,000
35
I4L: fix isdn_ioctl memory overrun vulnerability Fix possible memory overrun issue in the isdn ioctl code. Found by ADLAB <adlab@venustech.com.cn> Signed-off-by: Karsten Keil <kkeil@suse.de> Cc: ADLAB <adlab@venustech.com.cn> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off...
const vector<CClient*>& CClient::GetClients() const { if (m_pNetwork) { return m_pNetwork->GetClients(); } return m_pUser->GetUserClients(); }
0
[ "CWE-476" ]
znc
2390ad111bde16a78c98ac44572090b33c3bd2d8
273,756,844,521,706,400,000,000,000,000,000,000,000
7
Fix null pointer dereference in echo-message The bug was introduced while fixing #1705. If a client did not enable echo-message, and doesn't have a network, it crashes. Thanks to LunarBNC for reporting this
static apr_status_t unschedule_slow_tasks(h2_mplx *m) { h2_stream *stream; int n; /* Try to get rid of streams that occupy workers. Look for safe requests * that are repeatable. If none found, fail the connection. */ n = (m->tasks_active - m->limit_active - (int)h2_ihash_count(m->sredo))...
1
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
2,424,423,855,958,842,600,000,000,000,000,000,000
26
* Fixed keepalives counter on slave connections.
static struct cma_pernet *cma_pernet(struct net *net) { return net_generic(net, cma_pernet_id); }
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
196,897,127,483,765,150,000,000,000,000,000,000,000
4
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
lldp_tlv_put_u8(struct dp_packet *p, uint8_t x) { dp_packet_put(p, &x, sizeof x); }
0
[ "CWE-400" ]
ovs
78e712c0b1dacc2f12d2a03d98f083d8672867f0
58,474,367,586,596,460,000,000,000,000,000,000,000
4
lldp: do not leak memory on multiple instances of TLVs Upstream commit: commit a8d3c90feca548fc0656d95b5d278713db86ff61 Date: Tue, 17 Nov 2020 09:28:17 -0500 lldp: avoid memory leak from bad packets A packet that contains multiple instances of certain TLVs will cause lldpd to continually allocate...
static int shash_finup_unaligned(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *out) { return crypto_shash_update(desc, data, len) ?: crypto_shash_final(desc, out); }
0
[ "CWE-787" ]
linux
af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1
21,417,526,239,442,470,000,000,000,000,000,000,000
6
crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting ...
static void convert_pseudo_ld_imm64(struct verifier_env *env) { struct bpf_insn *insn = env->prog->insnsi; int insn_cnt = env->prog->len; int i; for (i = 0; i < insn_cnt; i++, insn++) if (insn->code == (BPF_LD | BPF_IMM | BPF_DW)) insn->src_reg = 0; }
0
[ "CWE-200" ]
linux
a1b14d27ed0965838350f1377ff97c93ee383492
274,190,748,188,634,000,000,000,000,000,000,000,000
10
bpf: fix branch offset adjustment on backjumps after patching ctx expansion When ctx access is used, the kernel often needs to expand/rewrite instructions, so after that patching, branch offsets have to be adjusted for both forward and backward jumps in the new eBPF program, but for backward jumps it fails to account ...
xfs_defer_agfl_block( struct xfs_trans *tp, xfs_agnumber_t agno, xfs_fsblock_t agbno, struct xfs_owner_info *oinfo) { struct xfs_mount *mp = tp->t_mountp; struct xfs_extent_free_item *new; /* new element */ ASSERT(xfs_bmap_free_item_zone != NULL); ASSERT(oinfo != NULL); new = kmem_zone_alloc(xfs_bmap...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
d0c7feaf87678371c2c09b3709400be416b2dc62
37,579,818,414,824,295,000,000,000,000,000,000,000
21
xfs: add agf freeblocks verify in xfs_agf_verify We recently used fuzz(hydra) to test XFS and automatically generate tmp.img(XFS v5 format, but some metadata is wrong) xfs_repair information(just one AG): agf_freeblks 0, counted 3224 in ag 0 agf_longest 536874136, counted 3224 in ag 0 sb_fdblocks 613, counted 3228 T...
PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval *nzval) { zend_long i; var_entries *var_hash = (*var_hashx)->first; #if VAR_ENTRIES_DBG fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval)); #endif while (var_hash) { for (i = 0; i < var_hash->...
0
[]
php-src
d76b293ac71aa5bd4e9a433192afef6e0dd5a4ee
262,902,405,022,200,400,000,000,000,000,000,000,000
18
forgot to commit this one
static void __srpt_close_ch(struct srpt_rdma_ch *ch) { enum rdma_ch_state prev_state; unsigned long flags; spin_lock_irqsave(&ch->spinlock, flags); prev_state = ch->state; switch (prev_state) { case CH_CONNECTING: case CH_LIVE: ch->state = CH_DISCONNECTING; break; default: break; } spin_unlock_irqresto...
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
267,153,541,262,988,870,000,000,000,000,000,000,000
33
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static char *run_event_gtk_logging(char *log_line, void *param) { struct analyze_event_data *evd = (struct analyze_event_data *)param; update_command_run_log(log_line, evd); return log_line; }
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
93,817,629,463,678,430,000,000,000,000,000,000,000
6
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
cached_module_load (const char *name, int flags, char **err) { MonoDl *res; if (err) *err = NULL; mono_loader_lock (); if (!global_module_map) global_module_map = g_hash_table_new (g_str_hash, g_str_equal); res = g_hash_table_lookup (global_module_map, name); if (res) { mono_loader_unlock (); return res;...
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
265,260,379,161,030,320,000,000,000,000,000,000,000
20
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
ns_nprint(netdissect_options *ndo, register const u_char *cp, register const u_char *bp) { register u_int i, l; register const u_char *rp = NULL; register int compress = 0; int elt; u_int offset, max_offset; if ((l = labellen(ndo, cp)) == (u_int)-1) return(NULL); if (!ND_TTEST2(*cp, 1)) return(NUL...
0
[ "CWE-399", "CWE-835" ]
tcpdump
3a76fd7c95fced2c2f8c8148a9055c3a542eff29
19,692,711,057,735,752,000,000,000,000,000,000,000
83
CVE-2017-12995/Check for DNS compression pointers that don't point backwards. This is what BIND 9.11.0-P2 does; it not only detects pointers that loop, as "point backwards" means "point before anything we've processed so far, including what we're processing right now", so the pointer can't point to itself (as that's w...
static inline void vmxnet3_ring_read_curr_cell(PCIDevice *d, Vmxnet3Ring *ring, void *buff) { vmw_shmem_read(d, vmxnet3_ring_curr_cell_pa(ring), buff, ring->cell_size); }
0
[]
qemu
d05dcd94aee88728facafb993c7280547eb4d645
331,196,955,478,543,980,000,000,000,000,000,000,000
5
net: vmxnet3: validate configuration values during activate (CVE-2021-20203) While activating device in vmxnet3_acticate_device(), it does not validate guest supplied configuration values against predefined minimum - maximum limits. This may lead to integer overflow or OOB access issues. Add checks to avoid it. Fixes...
static void SVGEndElement(void *context,const xmlChar *name) { SVGInfo *svg_info; /* Called when the end of an element has been detected. */ (void) LogMagickEvent(CoderEvent,GetMagickModule(), " SAX.endElement(%s)",name); svg_info=(SVGInfo *) context; if (strchr((char *) name,':') != (char *) ...
0
[ "CWE-401" ]
ImageMagick6
e3417aebe17cbe274b7361aa92c83226ca5b646b
133,936,095,693,166,400,000,000,000,000,000,000,000
353
https://github.com/ImageMagick/ImageMagick/issues/1533
void ImportEPUB::LocateOrCreateNCX(const QString &ncx_id_on_spine) { QString load_warning; QString ncx_href = "not_found"; m_NCXId = ncx_id_on_spine; // Handle various failure conditions, such as: // - ncx not specified in the spine (search for a matching manifest item by extension) // - ncx sp...
0
[ "CWE-22" ]
Sigil
04e2f280cc4a0766bedcc7b9eb56449ceecc2ad4
108,606,250,499,128,800,000,000,000,000,000,000,000
69
further harden against malicious epubs and produce error message
UnicodeString::UnicodeString(const UnicodeString& that, int32_t srcStart, int32_t srcLength) { fUnion.fFields.fLengthAndFlags = kShortString; setTo(that, srcStart, srcLength); }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
72,822,052,552,283,080,000,000,000,000,000,000,000
6
ICU-20958 Prevent SEGV_MAPERR in append See #971
int cil_build_ast(struct cil_db *db, struct cil_tree_node *parse_tree, struct cil_tree_node *ast) { int rc = SEPOL_ERR; struct cil_args_build extra_args; if (db == NULL || parse_tree == NULL || ast == NULL) { goto exit; } extra_args.ast = ast; extra_args.db = db; extra_args.tunif = NULL; extra_args.in = NUL...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
172,124,307,564,071,100,000,000,000,000,000,000,000
27
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static struct genl_family *genl_family_find_byid(unsigned int id) { struct genl_family *f; list_for_each_entry(f, genl_family_chain(id), family_list) if (f->id == id) return f; return NULL; }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
190,437,352,577,648,270,000,000,000,000,000,000,000
10
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size) { struct evbuffer_chain *chain, *next, *tmp, *last_with_data; unsigned char *buffer, *result = NULL; ev_ssize_t remaining; int removed_last_with_data = 0; int removed_last_with_datap = 0; EVBUFFER_LOCK(buf); chain = buf->first; if (size < 0) size = buf...
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
185,866,156,067,244,980,000,000,000,000,000,000,000
110
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...