func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static hm_fragment *dtls1_hm_fragment_new(unsigned long frag_len, int reassembly) { hm_fragment *frag = NULL; unsigned char *buf = NULL; unsigned char *bitmask = NULL; frag = OPENSSL_malloc(sizeof(*frag)); if (frag == NULL) return NULL; if (fra...
0
[ "CWE-399" ]
openssl
df6b5e29ffea2d5a3e08de92fb765fdb21c7a21e
232,365,334,698,544,430,000,000,000,000,000,000,000
36
Excessive allocation of memory in dtls1_preprocess_fragment() This issue is very similar to CVE-2016-6307 described in the previous commit. The underlying defect is different but the security analysis and impacts are the same except that it impacts DTLS. A DTLS message includes 3 bytes for its length in the header fo...
EXPORTED void content_md5_hdr(struct transaction_t *txn, const unsigned char *md5) { char base64[MD5_BASE64_LEN+1]; sasl_encode64((char *) md5, MD5_DIGEST_LENGTH, base64, MD5_BASE64_LEN, NULL); simple_hdr(txn, "Content-MD5", base64); }
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
216,040,153,981,609,900,000,000,000,000,000,000,000
8
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
void libxsmm_sparse_csc_reader( libxsmm_generated_code* io_generated_code, const char* i_csc_file_in, unsigned int** o_row_idx, unsigned int** o_column_idx, doubl...
0
[ "CWE-295" ]
libxsmm
3f417e5e0670b066d558052fd32fc8093c81ee94
4,792,608,185,873,770,000,000,000,000,000,000,000
134
Issue 513: merge fixes from master/main.
void PSOutputDev::writePSFmt(const char *fmt, ...) { va_list args; GooString *buf; va_start(args, fmt); if (t3String) { t3String->appendfv((char *)fmt, args); } else { buf = GooString::formatv((char *)fmt, args); (*outputFunc)(outputStream, buf->getCString(), buf->getLength()); delete buf; ...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
244,848,698,962,688,370,000,000,000,000,000,000,000
14
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
(CirrusVGAState *s, uint32_t dstaddr, uint32_t srcaddr, int dstpitch, int srcpitch, int bltwidth, int bltheight) { uint32_t addr; int x, y, bitpos, pattern_y; unsigned int bits, bits_xor; unsigned int col; #if DEPTH == 24 int dstskipleft = s->vga.gr[0x2f] & 0x1f; int srcsk...
0
[ "CWE-119" ]
qemu
ffaf857778286ca54e3804432a2369a279e73aa7
253,044,849,453,733,100,000,000,000,000,000,000,000
41
cirrus: stop passing around src pointers in the blitter Does basically the same as "cirrus: stop passing around dst pointers in the blitter", just for the src pointer instead of the dst pointer. For the src we have to care about cputovideo blits though and fetch the data from s->cirrus_bltbuf instead of vga memory. ...
static int decode_object_map_header(void **p, void *end, u64 *object_map_size) { u8 struct_v; u32 struct_len; u32 header_len; void *header_end; int ret; ceph_decode_32_safe(p, end, header_len, e_inval); header_end = *p + header_len; ret = ceph_start_decoding(p, end, 1, "BitVector header", &struct_v, &st...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
58,377,750,220,290,855,000,000,000,000,000,000,000
24
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static int StreamTcpTest30(void) { Packet p; Flow f; ThreadVars tv; StreamTcpThread stt; TCPHdr tcph; TcpSession ssn; IPV4Hdr ipv4h; struct in_addr addr; struct in_addr addr1; TCPCache tcpc; TCPVars tcpvars; TcpStream server; TcpStream client; memset (&p, 0, SIZE...
0
[]
suricata
843d0b7a10bb45627f94764a6c5d468a24143345
288,426,059,355,113,970,000,000,000,000,000,000,000
133
stream: support RST getting lost/ignored In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'. However, the target of the RST may not have received it, or may not have accepted it. Also, the RST may have been injected, so the supposed sender may not actually be aware of the RST that was sent in it's ...
open_file_modified_cb (GFileMonitor *monitor, GFile *monitor_file, GFile *other_file, GFileMonitorEvent event_type, gpointer user_data) { FrWindow *window = user_data; OpenFile *file; GList *scan; if ((event_type != G_FILE_MONITOR_EVENT_CHAN...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
177,504,932,966,154,400,000,000,000,000,000,000,000
31
libarchive: sanitize filenames before extracting
unsigned char read_fixed_ujpg_header() { Sirikata::Array1d<unsigned char, 22> header; header.memset(0); if (IOUtil::ReadFull(str_in, header.begin(), 22) != 22) { custom_exit(ExitCode::SHORT_READ); } // check version number if (header[0] != 1 && header[0] != 2 && header[0] != 3 && header...
0
[ "CWE-399", "CWE-190" ]
lepton
6a5ceefac1162783fffd9506a3de39c85c725761
71,014,110,402,568,740,000,000,000,000,000,000,000
37
fix #111
std::unique_ptr<cql_server::response> cql_server::connection::make_ready(int16_t stream, const tracing::trace_state_ptr& tr_state) const { return std::make_unique<cql_server::response>(stream, cql_binary_opcode::READY, tr_state); }
0
[]
scylladb
1c2eef384da439b0457b6d71c7e37d7268e471cb
244,876,579,763,304,360,000,000,000,000,000,000,000
4
transport/server.cc: Return correct size of decompressed lz4 buffer An incorrect size is returned from the function, which could lead to crashes or undefined behavior. Fix by erroring out in these cases. Fixes #11476
static void recal_interrupt(void) { debugt(__func__, ""); if (inr != 2) FDCS->reset = 1; else if (ST0 & ST0_ECE) { switch (DRS->track) { case NEED_1_RECAL: debugt(__func__, "need 1 recal"); /* after a second recalibrate, we still haven't * reached track 0. Probably no drive. Raise an * error, as ...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
58,127,038,189,708,130,000,000,000,000,000,000,000
45
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
static int get_sub_part_id_from_key(const TABLE *table,uchar *buf, KEY *key_info, const key_range *key_spec, uint32 *part_id) { uchar *rec0= table->record[0]; partition_info *part_info= table->part_info; in...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
128,471,341,192,031,280,000,000,000,000,000,000,000
24
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
void HierarchicalBitmapRequester::CropEncodingRegion(RectAngle<LONG> &region,const struct RectangleRequest *) { #if ACCUSOFT_CODE int i; ClipToImage(region); // Find the region to request. for(i = 0;i < m_ucCount;i++) { if (m_pulReadyLines[i] < ULONG(region.ra_MinY)) region.ra_MinY = m_pulReadyLine...
0
[ "CWE-125", "CWE-787" ]
libjpeg
187035b9726710b4fe11d565c7808975c930895d
331,509,096,628,423,200,000,000,000,000,000,000,000
16
The code now checks for consistency of the MCU sizes across hierarchical levels, and fails in case they are different.
static INLINE BOOL update_write_2byte_signed(wStream* s, INT32 value) { BYTE byte; BOOL negative = FALSE; if (value < 0) { negative = TRUE; value *= -1; } if (value > 0x3FFF) return FALSE; if (value >= 0x3F) { byte = ((value & 0x3F00) >> 8); if (negative) byte |= 0x40; Stream_Write_UINT8(s, ...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
274,842,591,585,735,930,000,000,000,000,000,000,000
37
Fixed #6013: Check new length is > 0
filter_session_io(struct io *io, int evt, void *arg) { struct smtp_tx*tx = arg; char*line = NULL; ssize_t len; log_trace(TRACE_IO, "filter session io (smtp): %p: %s %s", tx, io_strevent(evt), io_strio(io)); switch (evt) { case IO_DATAIN: nextline: line = io_getline(tx->filter, &len); /* No complete li...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
171,284,887,432,030,230,000,000,000,000,000,000,000
25
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
slap_sasl_matches( Operation *op, BerVarray rules, struct berval *assertDN, struct berval *authc ) { int rc = LDAP_INAPPROPRIATE_AUTH; if ( rules != NULL ) { int i; for( i = 0; !BER_BVISNULL( &rules[i] ); i++ ) { rc = slap_sasl_match( op, &rules[i], assertDN, authc ); if ( rc == LDAP_SUCCESS ) break; ...
0
[ "CWE-617" ]
openldap
02dfc32d658fadc25e4040f78e36592f6e1e1ca0
138,213,732,476,259,000,000,000,000,000,000,000,000
16
ITS#9406 fix debug msg
header_seek (SF_PRIVATE *psf, sf_count_t position, int whence) { switch (whence) { case SEEK_SET : if (position > SIGNED_SIZEOF (psf->header)) { /* Too much header to cache so just seek instead. */ psf_fseek (psf, position, whence) ; return ; } ; if (position > psf->headend) psf->headend += p...
1
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
334,614,658,161,768,080,000,000,000,000,000,000,000
47
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
template<typename t> CImg<T> get_dijkstra(const unsigned int starting_node, const unsigned int ending_node, CImg<t>& previous_node) const { if (_width!=_height || _depth!=1 || _spectrum!=1) throw CImgInstanceException(_cimg_instance "dij...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
222,615,406,796,147,400,000,000,000,000,000,000,000
9
Fix other issues in 'CImg<T>::load_bmp()'.
TEST_F(OwnedImplTest, AddEmptyFragment) { char input[] = "hello world"; BufferFragmentImpl frag1(input, 11, [](const void*, size_t, const BufferFragmentImpl*) {}); BufferFragmentImpl frag2("", 0, [this](const void*, size_t, const BufferFragmentImpl*) { release_callback_called_ = true; }); BufferFragmentIm...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
31,074,057,085,191,640,000,000,000,000,000,000,000
29
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
static void CvtOldMacFeature(PST1 *pst) { int i; if ( pst->macfeature ) return; for ( i=0; formertags[i].feature!=-1 ; ++i ) { if ( pst->tag == formertags[i].tag ) { pst->macfeature = true; pst->tag = (formertags[i].feature<<16) | formertags[i].setting; return; } } }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
250,133,126,462,933,360,000,000,000,000,000,000,000
13
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
int snd_usb_mixer_suspend(struct usb_mixer_interface *mixer) { snd_usb_mixer_inactivate(mixer); return 0; }
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
166,997,629,229,974,380,000,000,000,000,000,000,000
5
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...
MONGO_EXPORT int bson_append_code_n( bson *b, const char *name, const char *value, size_t len ) { return bson_append_string_base( b, name, value, len, BSON_CODE ); }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
197,880,579,340,030,700,000,000,000,000,000,000,000
3
don't mix up int and size_t (first pass to fix that)
void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl) { memset(rl->write_sequence, 0, sizeof(rl->write_sequence)); }
0
[ "CWE-20" ]
openssl
63658103d4441924f8dbfc517b99bb54758a98b9
316,204,095,499,182,700,000,000,000,000,000,000,000
4
Fix a hang with SSL_peek() If while calling SSL_peek() we read an empty record then we go into an infinite loop, continually trying to read data from the empty record and never making any progress. This could be exploited by a malicious peer in a Denial Of Service attack. CVE-2016-6305 GitHub Issue #1563 Reviewed-b...
gui_bg_default(void) { if (gui_get_lightness(gui.back_pixel) < 127) return (char_u *)"dark"; return (char_u *)"light"; }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
244,036,920,854,639,880,000,000,000,000,000,000,000
6
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
XML_StopParser(XML_Parser parser, XML_Bool resumable) { if (parser == NULL) return XML_STATUS_ERROR; switch (parser->m_parsingStatus.parsing) { case XML_SUSPENDED: if (resumable) { parser->m_errorCode = XML_ERROR_SUSPENDED; return XML_STATUS_ERROR; } parser->m_parsingStatus.parsing = X...
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
65,989,767,195,458,170,000,000,000,000,000,000,000
28
xmlparse.c: Deny internal entities closing the doctype
win_setwidth_win(int width, win_T *wp) { // Always keep current window at least one column wide, even when // 'winminwidth' is zero. if (wp == curwin) { if (width < p_wmw) width = p_wmw; if (width == 0) width = 1; } else if (width < 0) width = 0; frame_setwidth(wp->w_frame, wid...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
256,693,335,582,276,800,000,000,000,000,000,000,000
21
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
static inline unsigned int bio_allowed_max_sectors(struct request_queue *q) { return round_down(UINT_MAX, queue_logical_block_size(q)) >> 9; }
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
86,487,461,200,467,140,000,000,000,000,000,000,000
4
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...
unsigned int datagram_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk = sock->sk; unsigned int mask; sock_poll_wait(file, sk_sleep(sk), wait); mask = 0; /* exceptional events? */ if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) mask |= POLLERR; if (sk->sk_shutdo...
0
[]
linux-2.6
77c1090f94d1b0b5186fb13a1b71b47b1343f87f
50,905,281,780,456,900,000,000,000,000,000,000,000
38
net: fix infinite loop in __skb_recv_datagram() Tommi was fuzzing with trinity and reported the following problem : commit 3f518bf745 (datagram: Add offset argument to __skb_recv_datagram) missed that a raw socket receive queue can contain skbs with no payload. We can loop in __skb_recv_datagram() with MSG_PEEK mode...
virDomainCreateXML(virConnectPtr conn, const char *xmlDesc, unsigned int flags) { VIR_DEBUG("conn=%p, xmlDesc=%s, flags=%x", conn, NULLSTR(xmlDesc), flags); virResetLastError(); virCheckConnectReturn(conn, NULL); virCheckNonNullArgGoto(xmlDesc, error); virCheckReadOnlyGoto(conn-...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
183,961,348,855,262,420,000,000,000,000,000,000,000
24
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
static int get_cluster_table(BlockDriverState *bs, uint64_t offset, uint64_t **new_l2_table, int *new_l2_index) { BDRVQcowState *s = bs->opaque; unsigned int l2_index; uint64_t l1_index, l2_offset; uint64_t *l2_table = NULL; int ret; /* ...
0
[ "CWE-190" ]
qemu
cab60de930684c33f67d4e32c7509b567f8c445b
220,090,319,358,097,150,000,000,000,000,000,000,000
54
qcow2: Fix new L1 table size check (CVE-2014-0143) The size in bytes is assigned to an int later, so check that instead of the number of entries. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
static void __perf_event_read(void *info) { struct perf_read_data *data = info; struct perf_event *sub, *event = data->event; struct perf_event_context *ctx = event->ctx; struct perf_cpu_context *cpuctx = __get_cpu_context(ctx); struct pmu *pmu = event->pmu; /* * If this is a task context, we need to check whe...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
181,382,601,980,818,660,000,000,000,000,000,000,000
56
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
*/ PHP_FUNCTION(date_add) { zval *object, *interval; php_date_obj *dateobj; php_interval_obj *intobj; timelib_time *new_time; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &object, date_ce_date, &interval, date_ce_interval) == FAILURE) { RETURN_FALSE; } dateobj = (ph...
0
[]
php-src
7b1898183032eeabc64a086ff040af991cebcd93
294,415,846,206,627,950,000,000,000,000,000,000,000
21
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) Conflicts: ext/date/php_date.c
void spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAMETERS, long ctor_flags) /* {{{ */ { spl_filesystem_object *intern; char *path; int parsed, len; long flags; zend_error_handling error_handling; zend_replace_error_handling(EH_THROW, spl_ce_UnexpectedValueException, &error_handling TSRMLS_CC); if (SPL_...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
26,338,639,681,438,516,000,000,000,000,000,000,000
57
Fix bug #72262 - do not overflow int
static Image *ReadPNGImage(const ImageInfo *image_info, ExceptionInfo *exception) { Image *image; MagickBooleanType logging, status; MngInfo *mng_info; char magic_number[MagickPathExtent]; ssize_t count; /* Open image file. */ assert(image_info != (const ImageInfo *) N...
0
[ "CWE-399", "CWE-772" ]
ImageMagick
76efa969342568841ecf320b5a041685a6d24e0b
93,735,653,952,371,680,000,000,000,000,000,000,000
129
https://github.com/ImageMagick/ImageMagick/issues/1201
compile_nested_function(exarg_T *eap, cctx_T *cctx, char_u **line_to_free) { int is_global = *eap->arg == 'g' && eap->arg[1] == ':'; char_u *name_start = eap->arg; char_u *name_end = to_name_end(eap->arg, TRUE); int off; char_u *func_name; char_u *lambda_name; ufunc_T *ufunc; int r = ...
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
79,712,705,175,516,170,000,000,000,000,000,000,000
133
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
**/ const CImg<T>& save_imagemagick_external(const char *const filename, const unsigned int quality=100) const { if (!filename) throw CImgArgumentException(_cimg_instance "save_imagemagick_external(): Specified filename is (null).", ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
151,505,742,628,977,140,000,000,000,000,000,000,000
47
Fix other issues in 'CImg<T>::load_bmp()'.
inline char uppercase(const char x) { return (char)((x<'a'||x>'z')?x:x - 'a' + 'A'); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
63,931,240,454,177,910,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
LConvCheck(int) {}
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
134,403,376,677,570,230,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
void Curl_detach_connnection(struct Curl_easy *data) { struct connectdata *conn = data->conn; if(conn) { Curl_llist_remove(&conn->easyq, &data->conn_queue, NULL); Curl_ssl_detach_conn(data, conn); } data->conn = NULL; }
0
[ "CWE-416", "CWE-295" ]
curl
7f4a9a9b2a49547eae24d2e19bc5c346e9026479
22,823,294,137,679,767,000,000,000,000,000,000,000
9
openssl: associate/detach the transfer from connection CVE-2021-22901 Bug: https://curl.se/docs/CVE-2021-22901.html
static int replmd_extended_replicated_objects(struct ldb_module *module, struct ldb_request *req) { struct ldb_context *ldb; struct dsdb_extended_replicated_objects *objs; struct replmd_replicated_request *ar; struct ldb_control **ctrls; int ret; ldb = ldb_module_get_ctx(module); ldb_debug(ldb, LDB_DEBUG_TRACE...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
320,713,261,348,582,000,000,000,000,000,000,000,000
65
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static int convert_ctx_accesses(struct bpf_verifier_env *env) { const struct bpf_verifier_ops *ops = env->ops; int i, cnt, size, ctx_field_size, delta = 0; const int insn_cnt = env->prog->len; struct bpf_insn insn_buf[16], *insn; u32 target_size, size_default, off; struct bpf_prog *new_prog; enum bpf_access_type...
0
[ "CWE-367" ]
bpf
353050be4c19e102178ccc05988101887c25ae53
121,193,938,926,224,960,000,000,000,000,000,000,000
186
bpf: Fix toctou on read-only map's constant scalar tracking Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is checking whether maps are read-only both from BPF program side and user space side, and then, given their content is constant, reading out their data via map->ops->map_direct_value_ad...
static int cmpname (const void *_a, const void *_b) { const RAnalFunction *a = _a, *b = _b; return (int)strcmp (a->name, b->name); }
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
26,824,622,193,716,650,000,000,000,000,000,000,000
4
Fix segfault in adf (#16230)
ASS_Track *ass_new_track(ASS_Library *library) { int def_sid = -1; ASS_Track *track = calloc(1, sizeof(ASS_Track)); if (!track) goto fail; track->library = library; track->ScaledBorderAndShadow = 0; track->parser_priv = calloc(1, sizeof(ASS_ParserPriv)); if (!track->parser_priv) ...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
4,166,245,679,286,720,000,000,000,000,000,000,000
30
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
handle_source_data(CMD_Request *rx_message, CMD_Reply *tx_message) { RPT_SourceReport report; struct timeval now_corr; /* Get data */ LCL_ReadCookedTime(&now_corr, NULL); if (SRC_ReportSource(ntohl(rx_message->data.source_data.index), &report, &now_corr)) { switch (SRC_GetType(ntohl(rx_message->data.sour...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
299,038,627,373,322,300,000,000,000,000,000,000,000
74
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
int parse_rtattr_byindex(struct rtattr *tb[], int max, struct rtattr *rta, int len) { int i = 0; memset(tb, 0, sizeof(struct rtattr *) * max); while (RTA_OK(rta, len)) { if (rta->rta_type <= max && i < max) tb[i++] = rta; rta = RTA_NEXT(rta, len); } if (len) fprintf(stderr, "!!!Deficit %d, rta_len=%d...
0
[]
iproute2
8c50b728b226f6254251282697ce38a72639a6fc
288,347,008,980,714,200,000,000,000,000,000,000,000
16
libnetlink: fix use-after-free of message buf In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically allocated 'buf' that is used to store netlink messages. If netlink message is an error message, buf is deallocated before returning with error code. However, on return err->error code is checked one ...
static void nfs4_xdr_enc_fsid_present(struct rpc_rqst *req, struct xdr_stream *xdr, const void *data) { const struct nfs4_fsid_present_arg *args = data; struct compound_hdr hdr = { .minorversion = nfs4_xdr_minorversion(&args->seq_args), }; encode_compound_hdr(xdr, req, &hdr); encode_sequence...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
339,721,391,102,150,700,000,000,000,000,000,000,000
17
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static void test_lsi_do_msgout_cancel_req(void) { QTestState *s; if (sizeof(void *) == 4) { g_test_skip("memory size too big for 32-bit build"); return; } s = qtest_init("-M q35 -m 4G -display none -nodefaults " "-device lsi53c895a,id=scsi " "-devi...
0
[]
qemu
4367a20cc442c56b05611b4224de9a61908f9eac
81,503,693,573,286,045,000,000,000,000,000,000,000
68
scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216) Set current_req to NULL, not current_req->req, to prevent reusing a free'd buffer in case of repeated SCSI cancel requests. Also apply the fix to CLEAR QUEUE and BUS DEVICE RESET messages as well, since they also cancel the request. Thanks t...
xsltNumberFormatGetMultipleLevel(xsltTransformContextPtr context, xmlNodePtr node, xsltCompMatchPtr countPat, xsltCompMatchPtr fromPat, double *array, int max) { int amount = 0; int cnt; xmlNodePtr ancestor; xmlNodePtr preceding; xmlXPathParserContextPtr parser; context...
1
[ "CWE-119" ]
libxslt
d182d8f6ba3071503d96ce17395c9d55871f0242
18,111,487,618,614,620,000,000,000,000,000,000,000
59
Fix xsltNumberFormatGetMultipleLevel Namespace nodes are actually an xmlNs, not an xmlNode. They must be special-cased in xsltNumberFormatGetMultipleLevel to avoid an out-of-bounds heap access. Move the test whether a node matches the "count" pattern to a separate function to make the code more readable. As a side ef...
static int vmw_gb_surface_unbind(struct vmw_resource *res, bool readback, struct ttm_validate_buffer *val_buf) { struct vmw_private *dev_priv = res->dev_priv; struct ttm_buffer_object *bo = val_buf->bo; struct vmw_fence_obj *fence; struct { SVGA3dCmdHeader header; SVGA3dCmdReadbackGBSurface body; } ...
0
[ "CWE-20" ]
linux
ee9c4e681ec4f58e42a83cb0c22a0289ade1aacf
117,341,739,644,669,350,000,000,000,000,000,000,000
69
drm/vmwgfx: limit the number of mip levels in vmw_gb_surface_define_ioctl() The 'req->mip_levels' parameter in vmw_gb_surface_define_ioctl() is a user-controlled 'uint32_t' value which is used as a loop count limit. This can lead to a kernel lockup and DoS. Add check for 'req->mip_levels'. References: https://bugzill...
strv_contains_prefix (const gchar * const *strv, const gchar *str) { g_return_val_if_fail (strv != NULL, FALSE); g_return_val_if_fail (str != NULL, FALSE); for (; *strv != NULL; strv++) { if (g_str_has_prefix (str, *strv)) return TRUE; } return FALSE; }
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
3,539,686,262,817,668,000,000,000,000,000,000,000
14
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...
get_loop_line(int c, void *cookie, int indent, getline_opt_T options) { struct loop_cookie *cp = (struct loop_cookie *)cookie; wcmd_T *wp; char_u *line; if (cp->current_line + 1 >= cp->lines_gap->ga_len) { if (cp->repeating) return NULL; // trying to read past ":endwhile"/":endfor" // Fir...
0
[ "CWE-125" ]
vim
d3a117814d6acbf0dca3eff1a7626843b9b3734a
327,414,728,769,027,400,000,000,000,000,000,000,000
28
patch 8.2.4009: reading one byte beyond the end of the line Problem: Reading one byte beyond the end of the line. Solution: Check for NUL byte first.
get_register_name(int num) { if (num == -1) return '"'; else if (num < 10) return num + '0'; else if (num == DELETION_REGISTER) return '-'; #ifdef FEAT_CLIPBOARD else if (num == STAR_REGISTER) return '*'; else if (num == PLUS_REGISTER) return '+'; #endif else return num + 'a' - 10; }
0
[ "CWE-122", "CWE-787" ]
vim
d25f003342aca9889067f2e839963dfeccf1fe05
11,495,183,824,237,785,000,000,000,000,000,000,000
17
patch 9.0.0011: reading beyond the end of the line with put command Problem: Reading beyond the end of the line with put command. Solution: Adjust the end mark position.
int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) { struct inet_sock *isk = inet_sk(sk); unsigned short snum; int err; int dif = sk->sk_bound_dev_if; err = ping_check_bind_addr(sk, isk, uaddr, addr_len); if (err) return err; lock_sock(sk); err = -EINVAL; if (isk->inet_num != 0) goto o...
0
[]
net
43a6684519ab0a6c52024b5e25322476cabad893
287,157,841,215,267,660,000,000,000,000,000,000,000
54
ping: implement proper locking We got a report of yet another bug in ping http://www.openwall.com/lists/oss-security/2017/03/24/6 ->disconnect() is not called with socket lock held. Fix this by acquiring ping rwlock earlier. Thanks to Daniel, Alexander and Andrey for letting us know this problem. Fixes: c319b4d76...
void CL_Connect_f( void ) { char *server; const char *serverString; int argc = Cmd_Argc(); netadrtype_t family = NA_UNSPEC; if ( argc != 2 && argc != 3 ) { Com_Printf( "usage: connect [-4|-6] server\n"); return; } if(argc == 2) server = Cmd_Argv(1); else { if(!strcmp(Cmd_Argv(1), "-4")) family =...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
78,532,543,356,853,920,000,000,000,000,000,000,000
88
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
int cap_bprm_set_security (struct linux_binprm *bprm) { int ret; ret = get_file_caps(bprm); if (!issecure(SECURE_NOROOT)) { /* * To support inheritance of root-permissions and suid-root * executables under compatibility mode, we override the * capability sets for the file. * * If only the real uid...
0
[]
linux-2.6
3318a386e4ca68c76e0294363d29bdc46fcad670
180,666,316,448,388,860,000,000,000,000,000,000,000
27
file caps: always start with clear bprm->caps_* While Linux doesn't honor setuid on scripts. However, it mistakenly behaves differently for file capabilities. This patch fixes that behavior by making sure that get_file_caps() begins with empty bprm->caps_*. That way when a script is loaded, its bprm->caps_* may be ...
GF_Box *mdia_New() { ISOM_DECL_BOX_ALLOC(GF_MediaBox, GF_ISOM_BOX_TYPE_MDIA); return (GF_Box *)tmp; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
246,172,599,026,583,330,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static TPM_RESULT SWTPM_NVRAM_Lock_Lockfile(const char *directory, int *fd) { TPM_RESULT rc = 0; char *lockfile = NULL; struct flock flock = { .l_type = F_WRLCK, .l_whence = SEEK_SET, .l_start = 0, .l_len = 0, }; if (asprin...
0
[]
swtpm
cae5991423826f21b11f7a5bc7f7b2b538bde2a2
227,292,187,414,569,750,000,000,000,000,000,000,000
40
swtpm: Do not follow symlinks when opening lockfile (CVE-2020-28407) This patch addresses CVE-2020-28407. Prevent us from following symliks when we open the lockfile for writing. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
gdm_session_handle_client_select_session (GdmDBusGreeter *greeter_interface, GDBusMethodInvocation *invocation, const char *session, GdmSession *self) { ...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
217,384,552,379,972,230,000,000,000,000,000,000,000
12
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data) { struct kvm *kvm = vcpu->kvm; u64 offset, ns, elapsed; unsigned long flags; s64 nsdiff; raw_spin_lock_irqsave(&kvm->arch.tsc_write_lock, flags); offset = kvm_x86_ops->compute_tsc_offset(vcpu, data); ns = get_kernel_ns(); elapsed = ns - kvm->arch.last_tsc_nse...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
326,380,047,555,462,740,000,000,000,000,000,000,000
85
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
_handle_carbons(xmpp_stanza_t *const stanza) { xmpp_stanza_t *carbons = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_CARBONS); if (!carbons) { return FALSE; } const char *name = xmpp_stanza_get_name(carbons); if (!name) { log_error("Unable to retrieve stanza name for Carbon"); ...
0
[ "CWE-20", "CWE-346" ]
profanity
8e75437a7e43d4c55e861691f74892e666e29b0b
7,782,678,584,996,571,000,000,000,000,000,000,000
84
Add carbons from check
int bzrtp_sendData(void *clientData, const uint8_t *packetString, uint16_t packetLength) { /* get the client Data */ my_Context_t *contexts = (my_Context_t *)clientData; /* bzrtp_message ("%s sends a message!\n", contexts->nom); int retval; bzrtpPacket_t *zrtpPacket = bzrtp_packetCheck(packetString, packetLength, ...
0
[ "CWE-254", "CWE-787" ]
bzrtp
bbb1e6e2f467ee4bd7b9a8c800e4f07343d7d99b
304,376,121,973,598,500,000,000,000,000,000,000,000
37
Add ZRTP Commit packet hvi check on DHPart2 packet reception
save_dialog (void) { GtkWidget *dialog; GtkWidget *frame; gint run; dialog = gimp_export_dialog_new (_("PSP"), PLUG_IN_BINARY, SAVE_PROC); /* file save type */ frame = gimp_int_radio_group_new (TRUE, _("Data Compression"), G_CALLBACK (gimp_radio_button_update), ...
0
[ "CWE-787" ]
gimp
48ec15890e1751dede061f6d1f469b6508c13439
234,451,867,814,733,220,000,000,000,000,000,000,000
32
file-psp: fix for bogus input data. Fixes bug #639203
void x25_kill_by_neigh(struct x25_neigh *nb) { struct sock *s; write_lock_bh(&x25_list_lock); sk_for_each(s, &x25_list) if (x25_sk(s)->neighbour == nb) x25_disconnect(s, ENETUNREACH, 0, 0); write_unlock_bh(&x25_list_lock); /* Remove any related forwards */ x25_clear_forward_by_dev(nb->dev); }
1
[]
net
7781607938c8371d4c2b243527430241c62e39c2
152,476,397,782,506,940,000,000,000,000,000,000,000
15
net/x25: Fix null-ptr-deref caused by x25_disconnect When the link layer is terminating, x25->neighbour will be set to NULL in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is shown below. (Thread 1) | (Thread 2...
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { if(!p || !g) /* q is optional */ return 0; BN_free(dh->p); BN_free(dh->q); BN_free(dh->g); dh->p = p; dh->q = q; dh->g = g; if(q) dh->length = BN_num_bits(q); return 1; }
1
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
305,990,070,437,848,820,000,000,000,000,000,000,000
13
stunnel-5.57
static void __init sun4i_pll6_clk_setup(struct device_node *node) { sunxi_divs_clk_setup(node, &pll6_divs_data); }
0
[ "CWE-476" ]
linux
fcdf445ff42f036d22178b49cf64e92d527c1330
230,069,989,884,505,300,000,000,000,000,000,000,000
4
clk-sunxi: fix a missing-check bug in sunxi_divs_clk_setup() In sunxi_divs_clk_setup(), 'derived_name' is allocated by kstrndup(). It returns NULL when fails. 'derived_name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
unsigned long thp_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { loff_t off = (loff_t)pgoff << PAGE_SHIFT; if (addr) goto out; if (!IS_DAX(filp->f_mapping->host) || !IS_ENABLED(CONFIG_FS_DAX_PMD)) goto out; addr = __thp_get_unmapped_ar...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
194,043,780,404,015,070,000,000,000,000,000,000,000
17
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...
xps_write_profile(const gs_gstate *pgs, char *name, cmm_profile_t *profile, gx_device_xps *xps_dev) { byte *profile_buffer; int size; /* Need V2 ICC Profile */ profile_buffer = gsicc_create_getv2buffer(pgs, profile, &size); /* Now go ahead and add to the zip archive */ return add_data_to_zip_f...
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
296,525,787,778,614,470,000,000,000,000,000,000,000
11
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static int dcbnl_cee_pg_fill(struct sk_buff *skb, struct net_device *dev, int dir) { u8 pgid, up_map, prio, tc_pct; const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops; int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG; struct nlattr *pg = nla_nest_start(skb, i); if (!pg) return -EMSGSIZE; for (i = ...
0
[ "CWE-399" ]
linux-2.6
29cd8ae0e1a39e239a3a7b67da1986add1199fc0
12,692,788,415,423,350,000,000,000,000,000,000,000
52
dcbnl: fix various netlink info leaks The dcb netlink interface leaks stack memory in various places: * perm_addr[] buffer is only filled at max with 12 of the 32 bytes but copied completely, * no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand, so we're leaking up to 58 bytes for ieee_ets structs...
composite_pixel_color (guchar *dest, int dest_x, int dest_channels, int dest_has_alpha, int src_has_alpha, int check_size, guint32 color1, guint32 color2, guint r, guint g, guint b, guint a) { int dest_r, dest_g, dest_b; int check_shift = get_check_shift (check_size); if ((dest_x >> ch...
0
[]
gdk-pixbuf
ffec86ed5010c5a2be14f47b33bcf4ed3169a199
237,368,628,456,627,900,000,000,000,000,000,000,000
30
pixops: Be more careful about integer overflow Our loader code is supposed to handle out-of-memory and overflow situations gracefully, reporting errors instead of aborting. But if you load an image at a specific size, we also execute our scaling code, which was not careful enough about overflow in some places. This c...
TEST_F(SQLiteUtilTests, test_aggregate_query) { auto dbc = getTestDBC(); QueryDataTyped results; auto status = queryInternal(kTestQuery, results, dbc); EXPECT_TRUE(status.ok()); EXPECT_EQ(results, getTestDBExpectedResults()); }
0
[ "CWE-77", "CWE-295" ]
osquery
c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c
75,322,544,550,480,430,000,000,000,000,000,000,000
7
Merge pull request from GHSA-4g56-2482-x7q8 * Proposed fix for attach tables vulnerability * Add authorizer to ATC tables and cleanups - Add unit test for authorizer function
static bool tsk_conn_cong(struct tipc_sock *tsk) { return tsk->snt_unacked >= tsk->snd_win; }
0
[ "CWE-703" ]
linux
45e093ae2830cd1264677d47ff9a95a71f5d9f9c
92,161,295,662,863,010,000,000,000,000,000,000,000
4
tipc: check nl sock before parsing nested attributes Make sure the socket for which the user is listing publication exists before parsing the socket netlink attributes. Prior to this patch a call without any socket caused a NULL pointer dereference in tipc_nl_publ_dump(). Tested-and-reported-by: Baozeng Ding <splovi...
int8_t udf_delete_aext(struct inode *inode, struct extent_position epos) { struct extent_position oepos; int adsize; int8_t etype; struct allocExtDesc *aed; struct udf_inode_info *iinfo; struct kernel_lb_addr eloc; uint32_t elen; if (epos.bh) { get_bh(epos.bh); get_bh(epos.bh); } iinfo = UDF_I(inode); ...
0
[ "CWE-476" ]
linux
7fc3b7c2981bbd1047916ade327beccb90994eee
317,992,776,868,330,300,000,000,000,000,000,000,000
83
udf: Fix NULL ptr deref when converting from inline format udf_expand_file_adinicb() calls directly ->writepage to write data expanded into a page. This however misses to setup inode for writeback properly and so we can crash on inode->i_wb dereference when submitting page for IO like: BUG: kernel NULL pointer dere...
static int receive_filter(VirtIONet *n, const uint8_t *buf, int size) { static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const uint8_t vlan[] = {0x81, 0x00}; uint8_t *ptr = (uint8_t *)buf; int i; if (n->promisc) return 1; ptr += n->host_hdr_len; if (!mem...
0
[ "CWE-119" ]
qemu
98f93ddd84800f207889491e0b5d851386b459cf
97,986,899,830,425,000,000,000,000,000,000,000,000
50
virtio-net: out-of-bounds buffer write on load CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in virtio_net_load()@hw/net/virtio-net.c > } else if (n->mac_table.in_use) { > uint8_t *buf = g_malloc0(n->mac_table.in_use); We are allocating buffer of size n->mac_table.in_use > qemu...
_equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b) { COMPARE_SCALAR_FIELD(phid); COMPARE_NODE_FIELD(ph_var); /* should be redundant */ COMPARE_BITMAPSET_FIELD(ph_eval_at); COMPARE_BITMAPSET_FIELD(ph_lateral); COMPARE_BITMAPSET_FIELD(ph_needed); COMPARE_SCALAR_FIELD(ph_width); return true;...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
149,832,551,842,163,330,000,000,000,000,000,000,000
11
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...
bool is_plane() const /*{\Mop returns true if |\Mvar| is the whole plane, false otherwise.}*/ { Const_decorator D(pm()); Face_const_iterator f = D.faces_begin(); if(check_tag(typename Is_extended_kernel<Extended_kernel>:: value_type())) return (D.number_of_vertices()==4 && D.n...
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
221,426,436,976,475,900,000,000,000,000,000,000,000
16
Fix Nef_2 and Nef_S2 IO
GF_Err iprp_dump(GF_Box *a, FILE * trace) { GF_ItemPropertiesBox *ptr = (GF_ItemPropertiesBox *)a; gf_isom_box_dump_start(a, "ItemPropertiesBox", trace); fprintf(trace, ">\n"); if (ptr->property_container) gf_isom_box_dump(ptr->property_container, trace); if (ptr->property_association) gf_isom_box_dump(ptr->proper...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
153,965,766,012,865,180,000,000,000,000,000,000,000
10
fixed 2 possible heap overflows (inc. #1088)
striter_next(striterobject *it) { PyBytesObject *seq; PyObject *item; assert(it != NULL); seq = it->it_seq; if (seq == NULL) return NULL; assert(PyBytes_Check(seq)); if (it->it_index < PyBytes_GET_SIZE(seq)) { item = PyLong_FromLong( (unsigned char)seq->ob_sval[...
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
300,204,973,408,173,100,000,000,000,000,000,000,000
23
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
static int usbhid_set_raw_report(struct hid_device *hid, unsigned int reportnum, __u8 *buf, size_t count, unsigned char rtype) { struct usbhid_device *usbhid = hid->driver_data; struct usb_device *dev = hid_to_usb_dev(hid); struct usb_interface *intf = usbhid->intf; struct usb_host_interface *interface = intf-...
0
[ "CWE-125", "CWE-787" ]
linux
f043bfc98c193c284e2cd768fefabe18ac2fed9b
87,251,539,598,526,490,000,000,000,000,000,000,000
35
HID: usbhid: fix out-of-bounds bug The hid descriptor identifies the length and type of subordinate descriptors for a device. If the received hid descriptor is smaller than the size of the struct hid_descriptor, it is possible to cause out-of-bounds. In addition, if bNumDescriptors of the hid descriptor have an incor...
bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, Sql_condition::enum_warning_level *level, const char* msg, Sql_condition ** cond_hdl) { /* Ignore error */ return TRUE...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
91,774,177,898,056,850,000,000,000,000,000,000,000
10
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
197,443,908,418,638,030,000,000,000,000,000,000,000
4
- 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
ippFirstAttribute(ipp_t *ipp) /* I - IPP message */ { /* * Range check input... */ if (!ipp) return (NULL); /* * Return the first attribute... */ return (ipp->current = ipp->attrs); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
80,409,723,830,965,940,000,000,000,000,000,000,000
15
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
ChooseExtendedStatisticNameAddition(List *exprs) { char buf[NAMEDATALEN * 2]; int buflen = 0; ListCell *lc; buf[0] = '\0'; foreach(lc, exprs) { ColumnRef *cref = (ColumnRef *) lfirst(lc); const char *name; /* It should be one of these, but just skip if it happens not to be */ if (!IsA(cref, Column...
0
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
107,742,029,365,319,310,000,000,000,000,000,000,000
32
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
/* Must be called under cpus_read_lock */ int __netif_set_xps_queue(struct net_device *dev, const unsigned long *mask, u16 index, bool is_rxqs_map) { const unsigned long *online_mask = NULL, *possible_mask = NULL; struct xps_dev_maps *dev_maps, *new_dev_maps = NULL; int i, j, tci, numa_node_id = -2; int maps_s...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
71,483,233,898,877,740,000,000,000,000,000,000,000
196
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
int inet_csk_bind_conflict(const struct sock *sk, const struct inet_bind_bucket *tb) { struct sock *sk2; struct hlist_node *node; int reuse = sk->sk_reuse; /* * Unlike other sk lookup places we do not check * for sk_net here, since _all_ the socks listed * in tb->owners list belong to the same net - th...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
122,257,618,531,069,040,000,000,000,000,000,000,000
31
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), void *from, int length, int transhdrlen, int hlimit, int tclass, struct ipv6_txoptions *opt, struct flowi6 *fl6, struct rt6_info *rt, unsigned int flags, int dontfrag) { struct inet_sock *inet...
0
[ "CWE-703" ]
linux
87c48fa3b4630905f98268dde838ee43626a060c
34,332,695,106,719,590,000,000,000,000,000,000,000
345
ipv6: make fragment identifications less predictable IPv6 fragment identification generation is way beyond what we use for IPv4 : It uses a single generator. Its not scalable and allows DOS attacks. Now inetpeer is IPv6 aware, we can use it to provide a more secure and scalable frag ident generator (per destination, ...
int netsnmp_query_getnext(netsnmp_variable_list *list, netsnmp_session *session){ return _query( list, SNMP_MSG_GETNEXT, session ); }
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
125,720,895,941,252,100,000,000,000,000,000,000,000
4
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
static int ptype_seq_open(struct inode *inode, struct file *file) { return seq_open_net(inode, file, &ptype_seq_ops, sizeof(struct seq_net_private)); }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
36,306,262,169,524,574,000,000,000,000,000,000,000
5
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
choose_classes_menu(prompt, category, way, class_list, class_select) const char *prompt; int category; boolean way; char *class_list; char *class_select; { menu_item *pick_list = (menu_item *)0; winid win; anything any; char buf[BUFSZ]; int i, n; int ret; int next_accelerator, accelerator; ...
0
[ "CWE-269" ]
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
72,187,468,549,567,920,000,000,000,000,000,000,000
74
escapes() revamp Partial rewrite of escapes(), mostly changing its if-then-else logic so that end-of-string can be checked once instead for each case. The previous version had a bug if the input string ended with backslash and one decimal digit (due to being lumped together with the handling for trailing \X or \O...
static void splashOutBlendOverlay(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { int i; #ifdef SPLASH_CMYK if (cm == splashModeCMYK8 || cm == splashModeDeviceN8) { for (i = 0; i < splashColorModeNComps[cm]; ++i) { dest[i] = 255 - dest[i]; src[i] = 255 - s...
0
[ "CWE-369" ]
poppler
b224e2f5739fe61de9fa69955d016725b2a4b78d
83,820,345,922,341,070,000,000,000,000,000,000,000
29
SplashOutputDev::tilingPatternFill: Fix crash on broken file Issue #802
rsvg_extra_handler_free (RsvgSaxHandler * self) { RsvgSaxHandlerExtra *z = (RsvgSaxHandlerExtra *) self; if (z->stringptr) { if (*z->stringptr) g_string_free (*z->stringptr, TRUE); *z->stringptr = z->string; } else if (z->string) { g_string_free (z->string, TRUE); } ...
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
284,017,951,048,629,130,000,000,000,000,000,000,000
14
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
PHP_MINIT_FUNCTION(spl_directory) { REGISTER_SPL_STD_CLASS_EX(SplFileInfo, spl_filesystem_object_new, spl_SplFileInfo_functions); memcpy(&spl_filesystem_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); spl_filesystem_object_handlers.clone_obj = spl_filesystem_object_clone; spl_f...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
61,671,883,108,780,010,000,000,000,000,000,000,000
56
Fix bug #72262 - do not overflow int
static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager) { OPJ_UINT32 i, l_ppt_data_size; /* preconditions */ assert(p_tcp != 00); assert(p_manager != 00); assert(p_tcp->ppt_buffer == NULL); if (p_tcp->ppt == 0U) { return OPJ_TRUE; } l_ppt_data_size = 0U; for (i = 0U; i < p_tcp->p...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
206,248,608,659,759,200,000,000,000,000,000,000,000
43
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
e_ews_connection_utils_prepare_auth_method (SoupSession *soup_session, EwsAuthType auth_method) { /* We used to disable Basic auth to avoid it getting in the way of * our GSSAPI hacks. But leave it enabled in the case where NTLM is * enabled, which is the default configuration. It's a useful fallback * ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
129,381,991,246,190,240,000,000,000,000,000,000,000
17
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void OSDService::start_recovery_op(PG *pg, const hobject_t& soid) { Mutex::Locker l(recovery_lock); dout(10) << "start_recovery_op " << *pg << " " << soid << " (" << recovery_ops_active << "/" << cct->_conf->osd_recovery_max_active << " rops)" << dendl; recovery_ops_active++; #ifdef DEBUG_RECOVERY_OI...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
67,759,951,554,600,030,000,000,000,000,000,000,000
15
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
return empty.eval(expression,x,y,z,c); } template<typename t>
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
15,607,365,892,971,365,000,000,000,000,000,000,000
4
.
static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) { struct ddpehdr *ddp = ddp_hdr(skb); struct sock *sock; struct atalk_iface *atif; struct sockaddr_at tosat; int origlen; struct ddpebits ddphv; /* Size check */ if (skb->len < sizeof(*ddp)) goto fr...
1
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
72,319,509,895,917,340,000,000,000,000,000,000,000
84
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
int ar6000_init(struct net_device *dev) { struct ar6_softc *ar; int status; s32 timeleft; s16 i; int ret = 0; if((ar = ar6k_priv(dev)) == NULL) { return -EIO; } if (wlaninitmode == WLAN_INIT_MODE_USR || wlaninitmode == WLAN_INIT_MODE_DRV) { ar6000_up...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
15,437,000,721,433,668,000,000,000,000,000,000,000
321
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
xmlXIncludeErrMemory(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node, const char *extra) { if (ctxt != NULL) ctxt->nbErrors++; __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE, XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, extra, NULL, NULL, 0, 0, "Memo...
0
[ "CWE-416" ]
libxml2
1098c30a040e72a4654968547f415be4e4c40fe7
330,502,740,325,413,730,000,000,000,000,000,000,000
10
Fix user-after-free with `xmllint --xinclude --dropdtd` The --dropdtd option can leave dangling pointers in entity reference nodes. Make sure to skip these nodes when processing XIncludes. This also avoids scanning entity declarations and even modifying them inadvertently during XInclude processing. Move from a bloc...
static void dp_unregister_genl(int n_families) { int i; for (i = 0; i < n_families; i++) genl_unregister_family(dp_genl_families[i].family); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
174,994,222,968,133,770,000,000,000,000,000,000,000
7
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static void __wait_discard_cmd(struct f2fs_sb_info *sbi, bool wait_cond) { struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info; struct list_head *wait_list = &(dcc->wait_list); struct discard_cmd *dc, *tmp; bool need_wait; next: need_wait = false; mutex_lock(&dcc->cmd_lock); list_for_each_entry_safe(dc, tmp,...
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
148,345,754,123,655,240,000,000,000,000,000,000,000
28
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...