func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
_dwarf_internal_printlines(Dwarf_Die die, int * err_count_out, int only_line_header, Dwarf_Error * error) { /* This pointer is used to scan the portion of the .debug_line section for the current cu. */ Dwarf_Small *line_ptr = 0; Dwarf_Small *orig_line_ptr = 0; /* Pointer to a DW_A...
0
[]
libdwarf-code
faf99408e3f9f706fc3809dd400e831f989778d3
322,447,398,387,659,550,000,000,000,000,000,000,000
195
modified: libdwarf/dwarf_print_lines.c * dwarf_print_lines.c: In case of corrupted DWARF5 line header the fi_file_name field for a file entry can be null. Now we print a <no file name> string in that case to avoid passing a null to dwarfstring_append. Dwarfbug DW202010-003. Als...
server_client_handle_key(struct client *c, key_code key) { struct mouse_event *m = &c->tty.mouse; struct session *s = c->session; struct window *w; struct window_pane *wp; struct timeval tv; struct key_table *table, *first; struct key_binding *bd; int xtimeout, flags; struct cmd_find_state fs; key_cod...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
14,183,682,643,772,460,000,000,000,000,000,000,000
209
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
wl_array_init(struct wl_array *array) { memset(array, 0, sizeof *array); }
0
[]
wayland
b19488c7154b902354cb26a27f11415d7799b0b2
314,369,231,401,942,780,000,000,000,000,000,000,000
4
util: Limit size of wl_map Since server IDs are basically indistinguishable from really big client IDs at many points in the source, it's theoretically possible to overflow a map and either overflow server IDs into the client ID space, or grow client IDs into the server ID space. This would currently take a massive am...
PHPAPI char *php_lookup_class_name(zval *object, zend_uint *nlen) { zval **val; char *retval = NULL; HashTable *object_properties; TSRMLS_FETCH(); object_properties = Z_OBJPROP_P(object); if (zend_hash_find(object_properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), (void **) &val) == SUCCESS && Z_TYPE_PP(val) == IS...
0
[]
php-src
fb83c76deec58f1fab17c350f04c9f042e5977d1
68,979,742,263,525,020,000,000,000,000,000,000,000
19
Check that the type is correct
static int hidpp10_set_register(struct hidpp_device *hidpp_dev, u8 register_address, u8 byte, u8 mask, u8 value) { struct hidpp_report response; int ret; u8 params[3] = { 0 }; ret = hidpp_send_rap_command_sync(hidpp_dev, REPORT_ID_HIDPP_SHORT, HIDPP_GET_REGISTER, register_address, NULL...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
235,960,795,032,462,500,000,000,000,000,000,000,000
26
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
libssh2_channel_wait_closed(LIBSSH2_CHANNEL *channel) { int rc; if(!channel) return LIBSSH2_ERROR_BAD_USE; BLOCK_ADJUST(rc, channel->session, channel_wait_closed(channel)); return rc; }
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
53,746,924,929,131,340,000,000,000,000,000,000,000
10
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static void php_libxml_node_free(xmlNodePtr node) { if(node) { if (node->_private != NULL) { ((php_libxml_node_ptr *) node->_private)->node = NULL; } switch (node->type) { case XML_ATTRIBUTE_NODE: xmlFreeProp((xmlAttrPtr) node); break; case XML_ENTITY_DECL: case XML_ELEMENT_DECL: case XML_...
0
[ "CWE-200" ]
php-src
8e76d0404b7f664ee6719fd98f0483f0ac4669d6
34,664,615,827,920,190,000,000,000,000,000,000,000
38
Fixed external entity loading
static Image *ReadWPGImage(const ImageInfo *image_info, ExceptionInfo *exception) { typedef struct { size_t FileId; MagickOffsetType DataOffset; unsigned int ProductType; unsigned int FileType; unsigned char MajorVersion; unsigned char MinorVersion; unsigned int EncryptKey; unsigne...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
62,659,994,736,884,050,000,000,000,000,000,000,000
617
Set pixel cache to undefined if any resource limit is exceeded
static int handle_rmode_exception(struct kvm_vcpu *vcpu, int vec, u32 err_code) { /* * Instruction with address size override prefix opcode 0x67 * Cause the #SS fault with 0 error code in VM86 mode. */ if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0) { if (emulate_instruction(vcpu, 0) ==...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
37,821,113,098,908,926,000,000,000,000,000,000,000
26
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
void* hashbin_find( hashbin_t* hashbin, long hashv, const char* name ) { int bin; irda_queue_t* entry; pr_debug("hashbin_find()\n"); IRDA_ASSERT( hashbin != NULL, return NULL;); IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); /* * Locate hashbin */ if ( name ) hashv = hash( name ); bin = GET_HA...
0
[ "CWE-200" ]
linux
4c03b862b12f980456f9de92db6d508a4999b788
246,105,532,694,374,600,000,000,000,000,000,000,000
44
irda: Fix lockdep annotations in hashbin_delete(). A nested lock depth was added to the hasbin_delete() code but it doesn't actually work some well and results in tons of lockdep splats. Fix the code instead to properly drop the lock around the operation and just keep peeking the head of the hashbin queue. Reported-...
void OSD::check_osdmap_features(ObjectStore *fs) { // adjust required feature bits? // we have to be a bit careful here, because we are accessing the // Policy structures without taking any lock. in particular, only // modify integer values that can safely be read by a racing CPU. // since we are only acces...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
102,341,393,851,896,000,000,000,000,000,000,000,000
57
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 ...
static inline unsigned rx_desc_get_ownership(uint32_t *desc) { return desc[0] & DESC_0_RX_OWNERSHIP ? 1 : 0; }
0
[ "CWE-835" ]
qemu
e73adfbeec9d4e008630c814759052ed945c3fed
247,430,588,603,436,700,000,000,000,000,000,000,000
4
cadence_gem: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redha...
int irssi_ssl_handshake(GIOChannel *handle) { GIOSSLChannel *chan = (GIOSSLChannel *)handle; int ret, err; X509 *cert; const char *errstr; ret = SSL_connect(chan->ssl); if (ret <= 0) { err = SSL_get_error(chan->ssl, ret); switch (err) { case SSL_ERROR_WANT_READ: return 1; case SSL_ERROR_WANT_WRITE:...
1
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
128,622,294,883,219,280,000,000,000,000,000,000,000
40
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
archive_read_format_zip_streamable_read_header(struct archive_read *a, struct archive_entry *entry) { struct zip *zip; a->archive.archive_format = ARCHIVE_FORMAT_ZIP; if (a->archive.archive_format_name == NULL) a->archive.archive_format_name = "ZIP"; zip = (struct zip *)(a->format->data); /* * It should...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
252,223,735,130,400,370,000,000,000,000,000,000,000
92
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
ssize_t gunzip(void *dst, size_t dstlen, uint8_t *src, size_t srclen) { z_stream s; ssize_t dstbytes; int r, i, flags; /* skip header */ i = 10; flags = src[3]; if (src[2] != DEFLATED || (flags & RESERVED) != 0) { puts ("Error: Bad gzipped data\n"); return -1; } if (...
0
[ "CWE-787" ]
qemu
e423455c4f23a1a828901c78fe6d03b7dde79319
80,222,739,101,566,140,000,000,000,000,000,000,000
50
hw/core/loader: Fix possible crash in rom_copy() Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel ima...
static int parse_RowsBufferCol(tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 row, guint32 col, struct CPMSetBindingsIn *bindingsin, struct rows_data *rowsin, gboolean b_is_64bit, proto_tree *parent_tree, const char *fmt, ...) { proto_tree *tree; proto_item *item; guint32 buf_start = offset; guint32 buf_off...
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
151,141,910,432,995,560,000,000,000,000,000,000,000
47
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
static int check_subprogs(struct bpf_verifier_env *env) { int i, subprog_start, subprog_end, off, cur_subprog = 0; struct bpf_subprog_info *subprog = env->subprog_info; struct bpf_insn *insn = env->prog->insnsi; int insn_cnt = env->prog->len; /* now check that all jumps are within the same subprog */ subprog_sta...
0
[ "CWE-125" ]
bpf
049c4e13714ecbca567b4d5f6d563f05d431c80e
171,399,104,616,662,800,000,000,000,000,000,000,000
48
bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will...
_asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len, char *str, int str_size) { int len_len, len, k; int leading; char temp[LTOSTR_MAX_SIZE]; unsigned long val, val1; *ret_len = 0; if (str && str_size > 0) str[0] = 0; /* no oid */ if (str == NULL || der_len <= 0) ret...
0
[ "CWE-476" ]
libtasn1
53958290ab731c8486531a3bdef54a933533579d
195,350,077,820,099,280,000,000,000,000,000,000,000
60
Allow a NULL value in asn1_read_value() for all types.
static int jpc_com_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_com_t *com = &ms->parms.com; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_putuint16(out, com->regid)) { return -1; } if (jas_stream_write(out, com->data, com->len) != JAS_CAST(int, com->len...
0
[]
jasper
4031ca321d8cb5798c316ab39c7a5dc88a61fdd7
232,820,046,303,235,630,000,000,000,000,000,000,000
15
Incorporated changes from patch jasper-1.900.3-libjasper-stepsizes-overflow.patch
void lua_push_float_table_entry(lua_State *L, const char *key, float value) { if(L) { lua_pushstring(L, key); lua_pushnumber(L, value); lua_settable(L, -3); } }
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
251,361,570,394,865,360,000,000,000,000,000,000,000
7
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
output_buffer& ServerHelloDone::get(output_buffer& out) const { return out; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
213,502,562,561,712,100,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static int cm_rep_handler(struct cm_work *work) { struct cm_id_private *cm_id_priv; struct cm_rep_msg *rep_msg; int ret; rep_msg = (struct cm_rep_msg *)work->mad_recv_wc->recv_buf.mad; cm_id_priv = cm_acquire_id(rep_msg->remote_comm_id, 0); if (!cm_id_priv) { cm_dup_rep_handler(work); return -EINVAL; } cm...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
335,392,803,530,728,800,000,000,000,000,000,000,000
86
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
static LPCSTR __inline GetXxpCSCase(tTcpIpPacketParsingResult res) { static const char *const CSCaseName[4] = { "-", "PCS", "CS", "Bad" }; return CSCaseName[res.xxpCheckSum]; }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
11,613,901,361,308,954,000,000,000,000,000,000,000
5
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static void coroutine_fn mirror_wait_on_conflicts(MirrorOp *self, MirrorBlockJob *s, uint64_t offset, uint64_t bytes) { uint64_t self_start_chunk = offset / s->granul...
0
[ "CWE-476" ]
qemu
66fed30c9cd11854fc878a4eceb507e915d7c9cd
304,011,497,434,879,180,000,000,000,000,000,000,000
52
block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts() In mirror_iteration() we call mirror_wait_on_conflicts() with `self` parameter set to NULL. Starting from commit d44dae1a7c we dereference `self` pointer in mirror_wait_on_conflicts() without checks if it is not NULL. Backtrace: Program termi...
gql_extract_arg(agooErr err, gqlField field, gqlSel sel, const char *key) { if (NULL != sel->args) { gqlSelArg sa; gqlValue v = NULL; for (sa = sel->args; NULL != sa; sa = sa->next) { if (0 != strcmp(sa->name, key)) { continue; } if (NULL != sa->var) { v = sa->var->value; } else { v = ...
0
[ "CWE-703" ]
agoo
ecb72fa66f3d846b724b4fa1d7648669cebabe0c
337,411,723,564,425,180,000,000,000,000,000,000,000
33
Protect against recursive fragment in schema Really a error on the developers part but this catches the error.
DLLIMPORT int cfg_include(cfg_t *cfg, cfg_opt_t *opt, int argc, const char **argv) { (void)opt; /* Unused in this predefined include FUNC */ if (!cfg || !argv) { errno = EINVAL; return CFG_FAIL; } if (argc != 1) { cfg_error(cfg, _("wrong number of arguments to cfg_include()")); return 1; } return cfg_...
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
248,619,519,286,132,100,000,000,000,000,000,000,000
16
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out) { or_options_t *options = get_options(); tor_assert(timing_out); timing_out->vote_interval = options->V3AuthVotingInterval; timing_out->n_intervals_valid = options->V3AuthNIntervalsValid; timing_out->vote_delay = options->V3AuthVoteDelay; t...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
21,149,995,004,776,426,000,000,000,000,000,000,000
11
Fix assertion failure in tor_timegm. Fixes bug 6811.
void TestJlCompress::compressFile() { QFETCH(QString, zipName); QFETCH(QString, fileName); QDir curDir; if (curDir.exists(zipName)) { if (!curDir.remove(zipName)) QFAIL("Can't remove zip file"); } if (!createTestFiles(QStringList() << fileName)) { QFAIL("Can't create ...
0
[ "CWE-22" ]
quazip
5d2fc16a1976e5bf78d2927b012f67a2ae047a98
262,363,990,867,014,700,000,000,000,000,000,000,000
27
Fixed the Zip Slip vulnerability in JlCompress When extracting a file with a dangerous path like "../evil.exe" from a ZIP archive with JlCompress::extractDir(), the target file would be created outside of the target directory, potentially even overwriting an existing file there.
int iniparser_getnsec(const dictionary * d) { int i ; int nsec ; if (d==NULL) return -1 ; nsec=0 ; for (i=0 ; i<d->size ; i++) { if (d->key[i]==NULL) continue ; if (strchr(d->key[i], ':')==NULL) { nsec ++ ; } } return nsec ; }
0
[]
iniparser
4f870752abbb756911d7b11405d49e9769d082bd
329,762,718,677,641,780,000,000,000,000,000,000,000
16
Fix #68 when reading file with only \0 char
char *recode_in(const SERVER_REC *server, const char *str, const char *target) { const char *from = NULL; const char *to = translit_charset; char *recoded = NULL; gboolean str_is_utf8, recode, autodetect; int len; if (!str) return NULL; recode = settings_get_bool("recode"); if (!recode) return g_strdup(st...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
86,576,932,210,887,930,000,000,000,000,000,000,000
56
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
parse_sort (short *val, const char *s, const struct mapping_t *map, BUFFER *err) { int i, flags = 0; if (mutt_strncmp ("reverse-", s, 8) == 0) { s += 8; flags = SORT_REVERSE; } if (mutt_strncmp ("last-", s, 5) == 0) { s += 5; flags |= SORT_LAST; } if ((i = mutt_getvaluebyname (s, ma...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
292,582,077,715,897,250,000,000,000,000,000,000,000
26
use a 64-bit random value in temporary filenames. closes #3158
resolve_uses_schema_nodeid(const char *nodeid, const struct lys_node *start, const struct lys_node_grp **ret) { const struct lys_module *module; const char *mod_prefix, *name; int i, mod_prefix_len, nam_len; /* parse the identifier, it must be parsed on one call */ if (((i = parse_node_identifier(n...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
230,027,601,136,276,700,000,000,000,000,000,000,000
23
schema tree BUGFIX do not check features while still resolving schema Fixes #723
static struct io_kiocb *__io_queue_async_work(struct io_kiocb *req) { struct io_ring_ctx *ctx = req->ctx; struct io_kiocb *link = io_prep_linked_timeout(req); struct io_uring_task *tctx = req->task->io_uring; BUG_ON(!tctx); BUG_ON(!tctx->io_wq); trace_io_uring_queue_async_work(ctx, io_wq_is_hashed(&req->work), ...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
172,347,253,683,742,000,000,000,000,000,000,000,000
14
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
static void finalize_target_page_bits(void) { #ifdef TARGET_PAGE_BITS_VARY if (target_page_bits == 0) { target_page_bits = TARGET_PAGE_BITS_MIN; } target_page_bits_decided = true; #endif }
0
[ "CWE-125" ]
qemu
04bf2526ce87f21b32c9acba1c5518708c243ad0
108,016,192,870,004,530,000,000,000,000,000,000,000
9
exec: use qemu_ram_ptr_length to access guest ram When accessing guest's ram block during DMA operation, use 'qemu_ram_ptr_length' to get ram block pointer. It ensures that DMA operation of given length is possible; And avoids any OOB memory access situations. Reported-by: Alex <broscutamaker@gmail.com> Signed-off-by...
void __fastcall TSCPFileSystem::Source( TLocalFileHandle & /*Handle*/, const UnicodeString & /*TargetDir*/, UnicodeString & /*DestFileName*/, const TCopyParamType * /*CopyParam*/, int /*Params*/, TFileOperationProgressType * /*OperationProgress*/, unsigned int /*Flags*/, TUploadSessionAction & /*Action*/, b...
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
314,360,281,491,746,670,000,000,000,000,000,000,000
8
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
static BOOL update_send_surface_frame_marker(rdpContext* context, const SURFACE_FRAME_MARKER* surfaceFrameMarker) { wStream* s; rdpRdp* rdp = context->rdp; BOOL ret = FALSE; update_force_flush(context); s = fastpath_update_pdu_init(rdp->fastpath); if (!s) return FALSE; if (!update_write_surfcmd_frame...
0
[ "CWE-119", "CWE-787" ]
FreeRDP
445a5a42c500ceb80f8fa7f2c11f3682538033f3
322,062,933,607,964,600,000,000,000,000,000,000,000
24
Fixed CVE-2018-8786 Thanks to Eyal Itkin from Check Point Software Technologies.
gdm_session_handle_get_timed_login_details (GdmDBusGreeter *greeter_interface, GDBusMethodInvocation *invocation, GdmSession *self) { if (self->priv->greeter_interface != NULL) { gdm_dbus_g...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
179,030,196,750,838,950,000,000,000,000,000,000,000
19
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
get_from_block_data(struct block_cursor *cursor, size_t chunk_size, char *errbuf) { void *data; /* * Make sure we have the specified amount of data remaining in * the block data. */ if (cursor->data_remaining < chunk_size) { pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "block of type %u in pcapng dump ...
0
[ "CWE-20", "CWE-703", "CWE-770" ]
libpcap
87d6bef033062f969e70fa40c43dfd945d5a20ab
109,053,054,925,879,900,000,000,000,000,000,000,000
24
do sanity checks on PHB header length before allocating memory. There was no fault; but doing the check results in a more consistent error
FLAC__bool read_zero_padding_(FLAC__StreamDecoder *decoder) { if(!FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)) { FLAC__uint32 zero = 0; if(!FLAC__bitreader_read_raw_uint32(decoder->private_->input, &zero, FLAC__bitreader_bits_left_for_byte_alignment(decoder->private_->input))) return fals...
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
199,409,267,809,653,200,000,000,000,000,000,000,000
13
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
flatpak_dir_remove_remote (FlatpakDir *self, gboolean force_remove, const char *remote_name, GCancellable *cancellable, GError **error) { g_autofree char *prefix = NULL; g_autoptr(GHashTable) r...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
109,309,074,225,976,930,000,000,000,000,000,000,000
105
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
HTTP_Dup(struct http *to, const struct http * const fm) { assert(fm->nhd <= to->shd); memcpy(to->hd, fm->hd, fm->nhd * sizeof *to->hd); memcpy(to->hdf, fm->hdf, fm->nhd * sizeof *to->hdf); to->nhd = fm->nhd; to->logtag = fm->logtag; to->status = fm->status; to->protover = fm->protover; }
0
[ "CWE-703" ]
varnish-cache
c5fd097e5cce8b461c6443af02b3448baef2491d
314,457,079,952,763,840,000,000,000,000,000,000,000
11
Do not call http_hdr_flags() on pseudo-headers In http_EstimateWS(), all headers are passed to the http_isfiltered() function to calculate how many bytes is needed to serialize the entire struct http. http_isfiltered() will check the headers for whether they are going to be filtered out later and if so skip them. How...
static void copy_mail_to_uri_cb (GtkAction *action, TextView *textview) { ClickableText *uri = g_object_get_data(G_OBJECT(textview->mail_popup_menu), "menu_button"); if (uri == NULL) return; gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri +7, -1); gtk_clipboard_set_text(gtk_clip...
0
[ "CWE-601" ]
claws
ac286a71ed78429e16c612161251b9ea90ccd431
185,028,204,175,213,200,000,000,000,000,000,000,000
12
harden link checker before accepting click
DisplaySurface *qemu_create_displaysurface(int width, int height) { DisplaySurface *surface = g_new0(DisplaySurface, 1); trace_displaysurface_create(surface, width, height); qemu_alloc_display(surface, width, height); return surface; }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
214,588,490,877,844,030,000,000,000,000,000,000,000
8
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
close_devices (u2fh_devs * devs) { struct u2fdevice *dev; if (devs == NULL) { return; } dev = devs->first; while (dev) { dev = close_device (devs, dev); } }
0
[ "CWE-119", "CWE-908", "CWE-22" ]
libu2f-host
e4bb58cc8b6202a421e65f8230217d8ae6e16eb5
146,022,136,135,915,070,000,000,000,000,000,000,000
14
fix filling out of initresp
static int addBitToStream(size_t* bitpointer, ucvector* bitstream, unsigned char bit) { /*add a new byte at the end*/ if(((*bitpointer) & 7) == 0) { if (!ucvector_push_back(bitstream, (unsigned char)0)) return 83; } /*earlier bit of huffman code is in a lesser significant bit of an earlier byte*/ (bits...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
59,208,200,405,548,940,000,000,000,000,000,000,000
14
Fixed #5645: realloc return handling
vmod_remove(VRT_CTX, VCL_HEADER hdr, VCL_REGEX re) { struct http *hp; CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); AN(re); hp = VRT_selecthttp(ctx, hdr->where); header_http_Unset(ctx, hp, hdr->what, re); }
0
[ "CWE-476" ]
varnish-modules
2c120e576ebb73bc247790184702ba58dc0afc39
143,566,956,503,109,770,000,000,000,000,000,000,000
10
Check VRT_StrandsWS() return value Fixes: VSV00006
static void i40e_vsi_free_q_vectors(struct i40e_vsi *vsi) { int v_idx; for (v_idx = 0; v_idx < vsi->num_q_vectors; v_idx++) i40e_free_q_vector(vsi, v_idx); }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
276,023,873,012,968,040,000,000,000,000,000,000,000
7
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
load_extension(UnpicklerObject *self, int nbytes) { char *codebytes; /* the nbytes bytes after the opcode */ long code; /* calc_binint returns long */ PyObject *py_code; /* code as a Python int */ PyObject *obj; /* the object to push */ PyObject *pai...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
36,919,324,797,814,850,000,000,000,000,000,000,000
73
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
void CLASS nikon_3700() { int bits, i; uchar dp[24]; static const struct { int bits; char t_make[12], t_model[15]; } table[] = { {0x00, "Pentax", "Optio 33WR"}, {0x03, "Nikon", "E3200"}, {0x32, "Nikon", "E3700"}, {0x33, "Olympus", "C740UZ"}}; fseek(ifp, 3072, SEEK_SET); fread(dp, 1, 24, ifp...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
216,257,571,554,007,800,000,000,000,000,000,000,000
21
Secunia SA75000 advisory: several buffer overruns
njs_array_handler_includes(njs_vm_t *vm, njs_iterator_args_t *args, njs_value_t *entry, int64_t n) { if (!njs_is_valid(entry)) { entry = njs_value_arg(&njs_value_undefined); } if (njs_values_same_zero(args->argument, entry)) { njs_set_true(&vm->retval); return NJS_DONE; } ...
0
[ "CWE-703" ]
njs
2e00e95473861846aa8538be87db07699d9f676d
8,244,508,801,279,471,000,000,000,000,000,000,000
15
Fixed Array.prototype.slice() with slow "this" argument. Previously, when "this" argument was not a fast array, but the "deleted" array was a fast array, the "deleted" array may be left in uninitialized state if "this" argument had gaps. This fix is to ensure that "deleted" is properly initialized. This fixes #485 i...
static void ecryptfs_set_default_crypt_stat_vals( struct ecryptfs_crypt_stat *crypt_stat, struct ecryptfs_mount_crypt_stat *mount_crypt_stat) { ecryptfs_copy_mount_wide_flags_to_inode_flags(crypt_stat, mount_crypt_stat); ecryptfs_set_default_sizes(crypt_stat); strcpy(crypt_stat->cipher, ECRYPTFS_DEFAUL...
0
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
56,545,942,953,424,990,000,000,000,000,000,000,000
13
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition, gpointer data) { Session *session = SESSION(data); GByteArray *data_buf; gint terminator_len; gboolean complete = FALSE; guint data_len; gint ret; cm_return_val_if_fail(condition == G_IO_IN, FALSE); session_set_timeout(ses...
0
[]
claws
fcc25329049b6f9bd8d890f1197ed61eb12e14d5
9,415,316,990,367,265,000,000,000,000,000,000,000
104
fix STARTTLS protocol violation with thanks to, and patch by Damian Poddebniak and Hanno Böck
TEST_P(DownstreamProtocolIntegrationTest, RetryAttemptCountHeader) { auto host = config_helper_.createVirtualHost("host", "/test_retry"); host.set_include_request_attempt_count(true); host.set_include_attempt_count_in_response(true); config_helper_.addVirtualHost(host); initialize(); codec_client_ = makeHtt...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
121,964,470,259,465,260,000,000,000,000,000,000,000
40
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static const char *battery_status_to_str(uint8_t status) { switch (status) { case AVRCP_BATTERY_STATUS_NORMAL: return "normal"; case AVRCP_BATTERY_STATUS_WARNING: return "warning"; case AVRCP_BATTERY_STATUS_CRITICAL: return "critical"; case AVRCP_BATTERY_STATUS_EXTERNAL: return "external"; case AVRCP_BATT...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
201,906,743,257,723,130,000,000,000,000,000,000,000
17
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
int ioat2_quiesce(struct ioat_chan_common *chan, unsigned long tmo) { unsigned long end = jiffies + tmo; int err = 0; u32 status; status = ioat_chansts(chan); if (is_ioat_active(status) || is_ioat_idle(status)) ioat_suspend(chan); while (is_ioat_active(status) || is_ioat_idle(status)) { if (tmo && time_after...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
81,652,187,259,997,840,000,000,000,000,000,000,000
20
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static int ext4_split_extent_at(handle_t *handle, struct inode *inode, struct ext4_ext_path *path, ext4_lblk_t split, int split_flag, int flags) { ext4_fsblk_t newblock; ext4_lblk_t ee_block; struct ext4_extent *ex, newex, orig_ex; struct ext4_extent *ex2 = NULL; unsigned in...
0
[ "CWE-362" ]
linux-2.6
dee1f973ca341c266229faa5a1a5bb268bed3531
170,443,195,229,254,300,000,000,000,000,000,000,000
102
ext4: race-condition protection for ext4_convert_unwritten_extents_endio We assumed that at the time we call ext4_convert_unwritten_extents_endio() extent in question is fully inside [map.m_lblk, map->m_len] because it was already split during submission. But this may not be true due to a race between writeback vs fa...
ofputil_put_ofp14_port(const struct ofputil_phy_port *pp, struct ofpbuf *b) { struct ofp14_port *op; struct ofp14_port_desc_prop_ethernet *eth; ofpbuf_prealloc_tailroom(b, sizeof *op + sizeof *eth); op = ofpbuf_put_zeros(b, sizeof *op); op->port_no = ofputil_port_to_ofp11(pp...
0
[ "CWE-617", "CWE-703" ]
ovs
4af6da3b275b764b1afe194df6499b33d2bf4cde
48,523,429,224,266,720,000,000,000,000,000,000,000
24
ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command. When decoding a group mod, the current code validates the group type and command after the whole group mod has been decoded. The OF1.5 decoder, however, tries to use the type and command earlier, when it might still be invalid. This caused an...
size_t parse_core(const char *s, size_t n, SemanticValues &sv, Context &c, any &dt) const override { size_t count = 0; size_t i = 0; while (count < min_) { c.push_capture_scope(); auto se = make_scope_exit([&]() { c.pop_capture_scope(); }); const auto &rule = *ope_; ...
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
251,470,940,132,511,100,000,000,000,000,000,000,000
46
Fix #122
static int ps3remote_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { unsigned int key = usage->hid & HID_USAGE; if ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON) return -1; switch (usage->collection_index)...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
222,554,632,536,137,370,000,000,000,000,000,000,000
33
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
GF_Box *bloc_box_new() { ISOM_DECL_BOX_ALLOC(GF_BaseLocationBox, GF_ISOM_BOX_TYPE_TRIK); return (GF_Box *)tmp;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
215,149,011,511,462,630,000,000,000,000,000,000,000
5
fixed #1587
mcs_connect_start(char *server, char *username, char *domain, char *password, RD_BOOL reconnect, uint32 * selected_protocol) { logger(Protocol, Debug, "%s()", __func__); return iso_connect(server, username, domain, password, reconnect, selected_protocol); }
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
162,746,826,789,319,820,000,000,000,000,000,000,000
6
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
static int mwifiex_get_common_rates(struct mwifiex_private *priv, u8 *rate1, u32 rate1_size, u8 *rate2, u32 rate2_size) { int ret; u8 *ptr = rate1, *tmp; u32 i, j; tmp = kmemdup(rate1, rate1_size, GFP_KERNEL); if (!tmp) { mwifiex_dbg(priv->adapter, ERROR, "failed to alloc tmp buf\n"); return -ENOMEM; ...
0
[ "CWE-120", "CWE-787" ]
linux
5c455c5ab332773464d02ba17015acdca198f03d
176,960,634,310,858,640,000,000,000,000,000,000,000
51
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start mwifiex_cmd_802_11_ad_hoc_start() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length chec...
static inline void sock_diag_unlock_handler(const struct sock_diag_handler *h) { mutex_unlock(&sock_diag_table_mutex); }
0
[ "CWE-20" ]
linux
6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0
58,156,008,966,870,700,000,000,000,000,000,000,000
4
sock_diag: Fix out-of-bounds access to sock_diag_handlers[] Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY with a family greater or equal then AF_MAX -- the array size of sock_diag_handlers[]. The current code does not test for this condition therefore is vulnerable to an out-of-bound access openin...
_dbus_marshal_validate_test (void) { DBusString str; int i; const char *valid_paths[] = { "/", "/foo/bar", "/foo", "/foo/bar/baz" }; const char *invalid_paths[] = { "bar", "bar/baz", "/foo/bar/", "/foo/" "foo/", "boo//blah", "//", "///", "foo///blah/", ...
1
[ "CWE-20" ]
dbus
7b10b46c5c8658449783ce45f1273dd35c353bce
213,135,535,826,009,350,000,000,000,000,000,000,000
478
Bug 17803: Panic from dbus_signature_validate * dbus/dbus-marshal-validate.c: Ensure we validate a basic type before calling is_basic on it. * dbus-marshal-validate-util.c: Test.
*/ static inline struct sk_buff *skb_share_check(struct sk_buff *skb, gfp_t pri) { might_sleep_if(gfpflags_allow_blocking(pri)); if (skb_shared(skb)) { struct sk_buff *nskb = skb_clone(skb, pri); if (likely(nskb)) consume_skb(skb); else kfree_skb(skb); skb = nskb; } return skb;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
1,595,665,610,073,855,800,000,000,000,000,000,000
14
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static int em_test(struct x86_emulate_ctxt *ctxt) { emulate_2op_SrcV(ctxt, "test"); /* Disable writeback. */ ctxt->dst.type = OP_NONE; return X86EMUL_CONTINUE; }
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
221,473,568,137,890,870,000,000,000,000,000,000,000
7
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
comics_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, EvRenderContext *rc, gboolean border) { GdkPixbuf *thumbnail; thumbnail = comics_document_render_pixbuf (EV_DOCUMENT (document), rc); if (border) { GdkPixbuf *tmp_pixbuf = thumbnail; thum...
0
[]
atril
f4291fd62f7dfe6460d2406a979ccfac0c68dd59
290,277,178,845,990,120,000,000,000,000,000,000,000
17
comics: make the files containing "--checkpoint-action=" unsupported Fixes #257
fst_closeport(struct fst_port_info *port) { if (port->card->state == FST_RUNNING) { if (port->run) { port->run = 0; fst_op_lower(port, OPSTS_RTS | OPSTS_DTR); fst_issue_cmd(port, STOPPORT); } else { dbg(DBG_OPEN, "close: port not running\n"); } } }
0
[ "CWE-399" ]
linux
96b340406724d87e4621284ebac5e059d67b2194
77,737,824,181,930,550,000,000,000,000,000,000,000
13
farsync: fix info leak in ioctl The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. ...
static void handle_PASV(ctrl_t *ctrl, char *arg) { struct sockaddr_in data; socklen_t len = sizeof(data); char *msg, *p, buf[200]; int port; if (do_PASV(ctrl, arg, (struct sockaddr *)&data, &len)) return; /* Convert server IP address and port to comma separated list */ msg = strdup(ctrl->serveraddr); if (!m...
0
[ "CWE-120", "CWE-787" ]
uftpd
0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd
253,804,883,342,083,630,000,000,000,000,000,000,000
27
FTP: Fix buffer overflow in PORT parser, reported by Aaron Esau Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
void idr_remove(struct idr *idp, int id) { struct idr_layer *p; struct idr_layer *to_free; /* Mask off upper bits we don't use for the search. */ id &= MAX_ID_MASK; sub_remove(idp, (idp->layers - 1) * IDR_BITS, id); if (idp->top && idp->top->count == 1 && (idp->layers > 1) && idp->top->ary[0]) { /* * ...
0
[]
linux
2dcb22b346be7b7b7e630a8970d69cf3f1111ec1
241,113,333,948,907,430,000,000,000,000,000,000,000
35
idr: fix backtrack logic in idr_remove_all Currently idr_remove_all will fail with a use after free error if idr::layers is bigger than 2, which on 32 bit systems corresponds to items more than 1024. This is due to stepping back too many levels during backtracking. For simplicity let's assume that IDR_BITS=1 -> we h...
bool kvm_vcpu_wake_up(struct kvm_vcpu *vcpu) { struct swait_queue_head *wqp; wqp = kvm_arch_vcpu_wq(vcpu); if (swq_has_sleeper(wqp)) { swake_up_one(wqp); ++vcpu->stat.halt_wakeup; return true; } return false; }
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
297,042,889,218,697,280,000,000,000,000,000,000,000
13
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
int nfcmrvl_parse_dt(struct device_node *node, struct nfcmrvl_platform_data *pdata) { int reset_n_io; reset_n_io = of_get_named_gpio(node, "reset-n-io", 0); if (reset_n_io < 0) { pr_info("no reset-n-io config\n"); } else if (!gpio_is_valid(reset_n_io)) { pr_err("invalid reset-n-io GPIO\n"); return res...
0
[ "CWE-416" ]
linux
d270453a0d9ec10bb8a802a142fb1b3601a83098
268,317,162,873,312,460,000,000,000,000,000,000,000
21
nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs There are destructive operations such as nfcmrvl_fw_dnld_abort and gpio_free in nfcmrvl_nci_unregister_dev. The resources such as firmware, gpio and so on could be destructed while the upper layer functions such as nfcmrvl_f...
void change_file_owner_to_parent(connection_struct *conn, const char *inherit_from_dir, files_struct *fsp) { struct smb_filename *smb_fname_parent; int ret; smb_fname_parent = synthetic_smb_fname(talloc_tos(), inherit_from_dir, NULL, NULL); if (smb_fname_parent == NULL) { return; } ret =...
0
[]
samba
60f922bf1bd8816eacbb32c24793ad1f97a1d9f2
241,839,749,112,425,540,000,000,000,000,000,000,000
52
Fix bug #10229 - No access check verification on stream files. https://bugzilla.samba.org/show_bug.cgi?id=10229 We need to check if the requested access mask could be used to open the underlying file (if it existed), as we're passing in zero for the access mask to the base filename. Signed-off-by: Jeremy Allison <jr...
static void rebase_info3_free(RzDyldRebaseInfo3 *rebase_info) { if (!rebase_info) { return; } free(rebase_info->page_starts); free(rebase_info); }
0
[ "CWE-787" ]
rizin
556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810
42,899,031,121,908,960,000,000,000,000,000,000,000
7
Fix oob write in dyldcache When the individual n_slide_infos were too high, the sum would overflow and too few entries would be allocated.
size_t WireFormat::MessageSetItemByteSize(const FieldDescriptor* field, const Message& message) { const Reflection* message_reflection = message.GetReflection(); size_t our_size = WireFormatLite::kMessageSetItemTagsSize; // type_id our_size += io::CodedOutputStream::V...
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
122,874,140,194,997,040,000,000,000,000,000,000,000
18
Apply patch
static int hns_roce_register_device(struct hns_roce_dev *hr_dev) { int ret; struct hns_roce_ib_iboe *iboe = NULL; struct ib_device *ib_dev = NULL; struct device *dev = hr_dev->dev; iboe = &hr_dev->iboe; spin_lock_init(&iboe->lock); ib_dev = &hr_dev->ib_dev; strlcpy(ib_dev->name, "hns_%d", IB_DEVICE_NAME_MAX);...
0
[ "CWE-665" ]
kernel
72be029e947510dd6cbbbaf51879622af26e4200
117,478,867,142,496,600,000,000,000,000,000,000,000
114
RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427 FATE#326416). suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a
bool bpf_helper_changes_pkt_data(void *func) { if (func == bpf_skb_vlan_push || func == bpf_skb_vlan_pop || func == bpf_skb_store_bytes || func == bpf_skb_change_proto || func == bpf_skb_change_head || func == bpf_skb_change_tail || func == bpf_skb_adjust_room || func == bpf_skb_pull...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
101,870,519,616,161,040,000,000,000,000,000,000,000
20
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
size_t ZSTD_CCtx_resetParameters(ZSTD_CCtx* cctx) { if (cctx->streamStage != zcss_init) return ERROR(stage_wrong); cctx->cdict = NULL; return ZSTD_CCtxParams_reset(&cctx->requestedParams); }
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
277,639,285,532,554,980,000,000,000,000,000,000,000
6
fixed T36302429
static SQInteger container_rawexists(HSQUIRRELVM v) { if(SQ_SUCCEEDED(sq_rawget(v,-2))) { sq_pushbool(v,SQTrue); return 1; } sq_pushbool(v,SQFalse); return 1; }
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
150,966,802,692,182,830,000,000,000,000,000,000,000
9
fix in thread.call
sprint_realloc_value(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, const oid * objid, size_t objidlen, const netsnmp_variable_list * variable) { if (variable->type == SNMP_NOSUCHOBJECT) { return snmp_strcat(buf, buf_len, ...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
241,014,578,801,511,660,000,000,000,000,000,000,000
45
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
static void cgroup_fs_context_free(struct fs_context *fc) { struct cgroup_fs_context *ctx = cgroup_fc2context(fc); kfree(ctx->name); kfree(ctx->release_agent); put_cgroup_ns(ctx->ns); kernfs_free_fs_context(fc); kfree(ctx); }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
80,371,461,699,239,190,000,000,000,000,000,000,000
10
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
void tracing_reset_online_cpus(struct trace_buffer *buf) { struct ring_buffer *buffer = buf->buffer; int cpu; if (!buffer) return; ring_buffer_record_disable(buffer); /* Make sure all commits have finished */ synchronize_sched(); buf->time_start = buffer_ftrace_now(buf, buf->cpu); for_each_online_cpu(cpu...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
82,857,587,451,535,510,000,000,000,000,000,000,000
20
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
open_files_data_ref (OpenFilesData *odata) { g_return_if_fail (odata != NULL); odata->ref_count++; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
26,123,509,746,536,174,000,000,000,000,000,000,000
5
libarchive: sanitize filenames before extracting
static int check_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size, bool strict_alignment_once) { bool strict = env->strict_alignment || strict_alignment_once; const char *pointer_desc = ""; switch (reg->type) { case PTR_TO_PACKET: case PTR_TO_PACKE...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
154,642,308,440,566,200,000,000,000,000,000,000,000
49
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
void CLASS bad_pixels (const char *cfname) { FILE *fp=NULL; #ifndef LIBRAW_LIBRARY_BUILD char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; #else char *cp, line[128]; int time, row, col, r, c, rad, tot, n; #ifdef DCRAW_VERBOSE int fixed = 0; #endif #endif if (!filters) retu...
0
[ "CWE-189" ]
LibRaw
4606c28f494a750892c5c1ac7903e62dd1c6fdb5
254,657,797,464,492,180,000,000,000,000,000,000,000
59
0.16.1: fix for dcraw ljpeg_start() vulnerability
static int doinitsupgroups(const char *user, const uid_t uid, const gid_t gid) { #ifndef NON_ROOT_FTP # ifdef HAVE_SETGROUPS if (setgroups(1U, &gid) != 0) { return -1; } # else (void) gid; # endif # ifdef HAVE_INITGROUPS if (user == NULL) { const struct passwd * const lpwd = getpwuid(uid...
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
307,989,127,572,444,340,000,000,000,000,000,000,000
32
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
static void write_and_free(conn *c, char *buf, int bytes) { if (buf) { mc_resp *resp = c->resp; resp->write_and_free = buf; resp_add_iov(resp, buf, bytes); conn_set_state(c, conn_new_cmd); } else { out_of_memory(c, "SERVER_ERROR out of memory writing stats"); } }
0
[]
memcached
f249724cedcab6605ca8a0769ac4b356a8124f63
218,629,299,194,698,470,000,000,000,000,000,000,000
10
crash fix: errstr wasn't initialized in metaget if meta_flag_preparse bailed out early it would try to read uninitialized memory.
struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmd, unsigned int flags) { struct mm_struct *mm = vma->vm_mm; struct page *page = NULL; assert_spin_locked(pmd_lockptr(mm, pmd)); if (flags & FOLL_WRITE && !can_follow_write_pmd(*pmd, flags)) goto out;...
0
[ "CWE-362" ]
linux
c444eb564fb16645c172d550359cb3d75fe8a040
100,168,424,101,257,630,000,000,000,000,000,000,000
70
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked() Write protect anon page faults require an accurate mapcount to decide if to break the COW or not. This is implemented in the THP path with reuse_swap_page() -> page_trans_huge_map_swapcount()/page_trans_huge_mapcount(). If the COW triggers while ...
has_type_privilege_name_id(PG_FUNCTION_ARGS) { Name username = PG_GETARG_NAME(0); Oid typeoid = PG_GETARG_OID(1); text *priv_type_text = PG_GETARG_TEXT_P(2); Oid roleid; AclMode mode; AclResult aclresult; roleid = get_role_oid_or_public(NameStr(*username)); mode = convert_type_priv_string(priv_type_te...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
192,957,912,277,852,420,000,000,000,000,000,000,000
19
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
virtual void expectWriteNewSessionTicket() { server->setEarlyDataAppParamsFunctions( [](const folly::Optional<std::string>&, const Buf&) { return false; }, []() -> Buf { // This function shouldn't be called EXPECT_TRUE(false); return nullptr; }); EXPECT_CA...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
84,188,187,159,348,030,000,000,000,000,000,000,000
10
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
virtual void endString(GfxState * /*state*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
109,520,957,120,812,270,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
path_isclosed(PG_FUNCTION_ARGS) { PATH *path = PG_GETARG_PATH_P(0); PG_RETURN_BOOL(path->closed); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
13,362,873,171,905,924,000,000,000,000,000,000,000
6
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static int afiucv_hs_callback_synack(struct sock *sk, struct sk_buff *skb) { struct iucv_sock *iucv = iucv_sk(sk); struct af_iucv_trans_hdr *trans_hdr = (struct af_iucv_trans_hdr *)skb->data; if (!iucv) goto out; if (sk->sk_state != IUCV_BOUND) goto out; bh_lock_sock(sk); iucv->msglimit_peer = trans_hdr...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
185,475,144,635,270,780,000,000,000,000,000,000,000
19
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
SYSCALL_DEFINE5(64_mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr) { unsigned long ret = -EINVAL; if (test_thread_flag(TIF_32BIT)) goto out; down_write(&current->mm->mmap_sem); ret = do_mremap(addr, old_len, new_len, flags, new_addr...
0
[]
linux
5a0efea09f42f7c92bd98a38d66b4dff9589266b
138,728,041,673,115,800,000,000,000,000,000,000,000
15
sparc64: Sharpen address space randomization calculations. A recent patch to the x86 randomization code caused me to take a quick look at what we do on sparc64, and in doing so I noticed that we sometimes calculate a non-page-aligned randomization value and stick it into mmap_base. I also noticed that since I copied ...
mrb_io_set_close_on_exec(mrb_state *mrb, mrb_value self) { #if defined(F_GETFD) && defined(F_SETFD) && defined(FD_CLOEXEC) struct mrb_io *fptr; int flag, ret; mrb_bool b; fptr = io_get_open_fptr(mrb, self); mrb_get_args(mrb, "b", &b); flag = b ? FD_CLOEXEC : 0; if (fptr->fd2 >= 0) { if ((ret = fcntl...
0
[ "CWE-416", "CWE-787" ]
mruby
b51b21fc63c9805862322551387d9036f2b63433
224,856,548,355,520,300,000,000,000,000,000,000,000
34
Fix `use after free in File#initilialize_copy`; fix #4001 The bug and the fix were reported by https://hackerone.com/pnoltof
static int multissl_init(void) { if(multissl_setup(NULL)) return 1; return Curl_ssl->init(); }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
143,450,162,280,932,400,000,000,000,000,000,000,000
6
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
TIFFGetField(TIFF* tif, uint32 tag, ...) { int status; va_list ap; va_start(ap, tag); status = TIFFVGetField(tif, tag, ap); va_end(ap); return (status); }
0
[ "CWE-20" ]
libtiff
3144e57770c1e4d26520d8abee750f8ac8b75490
205,943,056,515,901,030,000,000,000,000,000,000,000
10
* libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings of double to other data types to avoid undefined behaviour if the output range isn't big enough to hold the input value. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643 http://bugzilla.maptools.org/show_bug.cgi?id=2642 http://bugzil...
bool subselect_hash_sj_engine::init(List<Item> *tmp_columns, uint subquery_id) { THD *thd= get_thd(); select_union *result_sink; /* Options to create_tmp_table. */ ulonglong tmp_create_options= thd->variables.option_bits | TMP_TABLE_ALL_COLUMNS; /* | TMP_TABLE_FORCE_MYISAM; TIMOUR: ...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
289,066,082,569,498,400,000,000,000,000,000,000,000
112
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
TEST_F(RouterTest, HedgedPerTryTimeoutThirdRequestSucceeds) { enableHedgeOnPerTryTimeout(); NiceMock<Http::MockRequestEncoder> encoder1; Http::ResponseDecoder* response_decoder1 = nullptr; EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _)) .WillOnce(Invoke( [&](Http::ResponseDec...
0
[ "CWE-703" ]
envoy
18871dbfb168d3512a10c78dd267ff7c03f564c6
305,998,331,962,917,600,000,000,000,000,000,000,000
106
[1.18] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
static void set_iommu_domain(struct intel_iommu *iommu, u16 did, struct dmar_domain *domain) { struct dmar_domain **domains; int idx = did >> 8; if (!iommu->domains[idx]) { size_t size = 256 * sizeof(struct dmar_domain *); iommu->domains[idx] = kzalloc(size, GFP_ATOMIC); } domains = iommu->domains[id...
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
59,891,842,636,499,990,000,000,000,000,000,000,000
17
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...