func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
e_ews_indexed_field_uri_new (const gchar *uri, const gchar *index) { EEwsIndexedFieldURI *furi; furi = g_new0 (EEwsIndexedFieldURI, 1); furi->field_uri = g_strdup (uri); furi->field_index = g_strdup (index); return furi; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
24,140,432,842,439,376,000,000,000,000,000,000,000
11
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
OFCondition WlmActivityManager::StartProvidingService() // Date : December 10, 2001 // Author : Thomas Wilkens // Task : Starts providing the implemented service for calling SCUs. // After having created an instance of this class, this function // shall be called from...
1
[ "CWE-264" ]
dcmtk
beaf5a5c24101daeeafa48c375120b16197c9e95
165,167,482,488,951,800,000,000,000,000,000,000,000
101
Make sure to handle setuid() return code properly. In some tools the return value of setuid() is not checked. In the worst case this could lead to privilege escalation since the process does not give up its root privileges and continue as root.
RangeVarCallbackForRenameAttribute(const RangeVar *rv, Oid relid, Oid oldrelid, void *arg) { HeapTuple tuple; Form_pg_class form; tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(tuple)) return; /* concurrently dropped */ form = (Form_pg_class) GETSTRUCT(tuple); re...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
59,881,747,671,587,400,000,000,000,000,000,000,000
13
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...
proxy_C_GetMechanismInfo (CK_X_FUNCTION_LIST *self, CK_SLOT_ID id, CK_MECHANISM_TYPE type, CK_MECHANISM_INFO_PTR info) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_slot_to_real (state->px, &id, &map); if (rv != CKR_OK...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
245,528,749,906,340,700,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
proc_map_files_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) { if (!capable(CAP_SYS_ADMIN)) return ERR_PTR(-EPERM); return proc_pid_get_link(dentry, inode, done); }
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
327,005,708,183,521,960,000,000,000,000,000,000,000
9
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
static void cil_reset_classpermission(struct cil_classpermission *cp) { if (cp == NULL) { return; } cil_reset_classperms_list(cp->classperms); }
1
[ "CWE-416" ]
selinux
f34d3d30c8325e4847a6b696fe7a3936a8a361f3
165,763,291,998,947,870,000,000,000,000,000,000,000
8
libsepol/cil: Destroy classperms list when resetting classpermission Nicolas Iooss reports: A few months ago, OSS-Fuzz found a crash in the CIL compiler, which got reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title is misleading, or is caused by another issue that conflicts with...
do_make_directory (GVfsBackend *backend, GVfsJobMakeDirectory *mkdir_job, const char *filename) { GVfsBackendAdmin *self = G_VFS_BACKEND_ADMIN (backend); GVfsJob *job = G_VFS_JOB (mkdir_job); GError *error = NULL; GFile *file; if (!check_permission (self, job)) retur...
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
65,056,085,793,218,440,000,000,000,000,000,000,000
19
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
gimp_channel_shrink (GimpChannel *channel, gint radius_x, gint radius_y, gboolean edge_lock, gboolean push_undo) { g_return_if_fail (GIMP_IS_CHANNEL (channel)); if (! gimp_item_is_attached (GIMP_ITEM (c...
0
[ "CWE-703" ]
gimp
6ab90ecbbd7cc95901933f62227fd140c0576d55
47,503,123,911,891,230,000,000,000,000,000,000,000
14
app: fix #8230 crash in gimp_layer_invalidate_boundary when channel is NULL gimp_channel_is_empty returns FALSE if channel is NULL. This causes gimp_layer_invalidate_boundary to crash if the mask channel is NULL. With a NULL channel gimp_channel_is_empty should return TRUE, just like the similar gimp_image_is_empty d...
CImg<T>& load_parrec(const char *const filename, const char axis='c', const float align=0) { CImgList<T> list; list.load_parrec(filename); if (list._width==1) return list[0].move_to(*this); return assign(list.get_append(axis,align)); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
45,990,081,266,415,500,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
gboolean rtps_util_add_entity_id(proto_tree *tree, tvbuff_t *tvb, gint offset, int hf_item, int hf_item_entity_key, int hf_item_entity_kind, int subtree_entity_id, const char *label, guint32 *entity_id_out) { guint32 entity_id = tvb_get_ntohl(tvb, offset); g...
0
[ "CWE-401" ]
wireshark
33e63d19e5496c151bad69f65cdbc7cba2b4c211
99,357,853,233,016,140,000,000,000,000,000,000,000
43
RTPS: Fixup our coherent set map. coherent_set_tracking.coherent_set_registry_map uses a struct as a key, but the hash and comparison routines treat keys as a sequence of bytes. Make sure every key byte is initialized. Fixes #16994. Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead of creating ...
xfs_imap_valid( struct inode *inode, struct xfs_bmbt_irec *imap, xfs_off_t offset) { offset >>= inode->i_blkbits; return offset >= imap->br_startoff && offset < imap->br_startoff + imap->br_blockcount; }
0
[ "CWE-362" ]
linux
04197b341f23b908193308b8d63d17ff23232598
265,410,265,575,041,440,000,000,000,000,000,000,000
10
xfs: don't BUG() on mixed direct and mapped I/O We've had reports of generic/095 causing XFS to BUG() in __xfs_get_blocks() due to the existence of delalloc blocks on a direct I/O read. generic/095 issues a mix of various types of I/O, including direct and memory mapped I/O to a single file. This is clearly not suppor...
void RemoteFsDevice::load() { if (RemoteFsDevice::constSambaAvahiProtocol==details.url.scheme()) { // Start Avahi listener... Avahi::self(); QUrlQuery q(details.url); if (q.hasQueryItem(constServiceNameQuery)) { details.serviceName=q.queryItemValue(constServiceNameQuery);...
1
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
9,088,709,630,053,808,000,000,000,000,000,000,000
28
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
basicAuthHandler(struct mg_connection *conn, void *cbdata) { const instanceConf_t* inst = (const instanceConf_t*) cbdata; char errStr[512]; FILE *fp = NULL; int ret = 1; if (!inst->pszBasicAuthFile) { mg_cry(conn, "warning: 'BasicAuthFile' not configured.\n"); ret = 0; goto finalize; } fp = fopen((const ...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
330,199,973,878,507,900,000,000,000,000,000,000,000
39
net bugfix: potential buffer overrun
static ssize_t cgroup_freeze_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { struct cgroup *cgrp; ssize_t ret; int freeze; ret = kstrtoint(strstrip(buf), 0, &freeze); if (ret) return ret; if (freeze < 0 || freeze > 1) return -ERANGE; cgrp = cgroup_kn_lock_live(of->kn, fal...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
313,696,182,402,057,460,000,000,000,000,000,000,000
24
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...
int ha_myisam::indexes_are_disabled(void) { return mi_indexes_are_disabled(file); }
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
184,790,811,631,123,640,000,000,000,000,000,000,000
5
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
void HttpIntegrationTest::testRouterNotFound() { config_helper_.setDefaultHostAndRoute("foo.com", "/found"); initialize(); BufferingStreamDecoderPtr response = IntegrationUtil::makeSingleRequest( lookupPort("http"), "GET", "/notfound", "", downstream_protocol_, version_); ASSERT_TRUE(response->complete()...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
328,060,801,267,888,000,000,000,000,000,000,000,000
9
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
e_ews_connection_get_free_busy_sync (EEwsConnection *cnc, gint pri, EEwsRequestCreationCallback free_busy_cb, gpointer free_busy_user_data, GSList **free_busy, ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
218,035,821,690,000,140,000,000,000,000,000,000,000
30
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
static int sg_check_file_access(struct file *filp, const char *caller) { if (filp->f_cred != current_real_cred()) { pr_err_once("%s: process %d (%s) changed security contexts after opening file descriptor, this is not allowed.\n", caller, task_tgid_vnr(current), current->comm); return -EPERM; } if (uaccess_ke...
0
[ "CWE-732" ]
linux
26b5b874aff5659a7e26e5b1997e3df2c41fa7fd
33,554,217,256,321,620,000,000,000,000,000,000,000
14
scsi: sg: mitigate read/write abuse As Al Viro noted in commit 128394eff343 ("sg_write()/bsg_write() is not fit to be called under KERNEL_DS"), sg improperly accesses userspace memory outside the provided buffer, permitting kernel memory corruption via splice(). But it doesn't just do it on ->write(), also on ->read(...
static bool cgm_setup_limits(void *hdata, struct lxc_list *cgroup_settings, bool do_devices) { struct cgm_data *d = hdata; struct lxc_list *iterator, *sorted_cgroup_settings, *next; struct lxc_cgroup *cg; bool ret = false; if (lxc_list_empty(cgroup_settings)) return true; if (!d || !d->cgroup_path) return f...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
161,267,311,766,303,000,000,000,000,000,000,000,000
59
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
decode_row(const gx_image_enum *penum, const byte *psrc, int spp, byte *pdes, byte *bufend) { byte *curr_pos = pdes; int k; float temp; while ( curr_pos < bufend ) { for ( k = 0; k < spp; k ++ ) { switch ( penum->map[k].decoding ) { case sd_none: ...
0
[ "CWE-787" ]
ghostpdl
027c546e0dd11e0526f1780a7f3c2c66acffe209
196,358,379,399,554,100,000,000,000,000,000,000,000
34
Bug 701842: Fix misindexing in gxicolor.c We were incorrectly decrementing position per-component, rather than per-pixel (in 2 places). Also, take care of some whitespace oddities.
int WebContents::GetFrameRate() const { auto* osr_wcv = GetOffScreenWebContentsView(); return osr_wcv ? osr_wcv->GetFrameRate() : 0; }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
62,949,240,192,812,890,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
int DxfData::addPoint(double x, double y) { this->points.emplace_back(x, y); return this->points.size() - 1; }
0
[ "CWE-703" ]
openscad
770e3234cbfe66edbc0333f796b46d36a74aa652
175,472,769,712,655,550,000,000,000,000,000,000,000
5
add safety to line lookups in DXF import, fixes #4037 Add safety (test for, and continue past, bad indices). Report warnings about bad indices Add variables just to make the array indices easier to read and debug.
status WAVEFile::parseINFOSubChunk(const Tag &id, uint32_t size) { AFfileoffset endPos = m_fh->tell() + size; while (m_fh->tell() < endPos) { int misctype = AF_MISC_UNRECOGNIZED; Tag miscid; uint32_t miscsize; readTag(&miscid); readU32(&miscsize); if (miscid == "IART") misctype = AF_MISC_AUTH; el...
0
[ "CWE-119", "CWE-284" ]
audiofile
a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6
108,011,314,663,457,950,000,000,000,000,000,000,000
52
Actually fail when error occurs in parseFormat When there's an unsupported number of bits per sample or an invalid number of samples per block, don't only print an error message using the error handler, but actually stop parsing the file. This fixes #35 (also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=...
update_geometry (GSWindow *window) { GdkRectangle geometry; cairo_region_t *outside_region; cairo_region_t *monitor_region; outside_region = get_outside_region (window); gdk_screen_get_monitor_geometry (gtk_window_get_screen (GTK_WINDOW (window)), ...
0
[ "CWE-284" ]
cinnamon-screensaver
da7af55f1fa966c52e15cc288d4f8928eca8cc9f
318,779,549,849,969,500,000,000,000,000,000,000,000
36
Workaround gtk3 bug, don't allow GtkWindow to handle popup_menu.
void IOBuf::appendToIov(folly::fbvector<struct iovec>* iov) const { IOBuf const* p = this; do { // some code can get confused by empty iovs, so skip them if (p->length() > 0) { iov->push_back({(void*)p->data(), folly::to<size_t>(p->length())}); } p = p->next(); } while (p != this); }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
151,249,484,042,185,640,000,000,000,000,000,000,000
10
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
gdm_display_get_session_id (GdmDisplay *self) { GdmDisplayPrivate *priv; priv = gdm_display_get_instance_private (self); return priv->session_id; }
0
[ "CWE-754" ]
gdm
4e6e5335d29c039bed820c43bfd1c19cb62539ff
35,456,625,665,675,307,000,000,000,000,000,000,000
7
display: Use autoptr to handle errors in look for existing users It will make things just cleaner
static int allocate_cmdlines_buffer(unsigned int val, struct saved_cmdlines_buffer *s) { s->map_cmdline_to_pid = kmalloc(val * sizeof(*s->map_cmdline_to_pid), GFP_KERNEL); if (!s->map_cmdline_to_pid) return -ENOMEM; s->saved_cmdlines = kmalloc(val * TASK_COMM_LEN, GFP_KERNEL); if (!s->saved_cmdlines...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
295,365,832,150,213,440,000,000,000,000,000,000,000
23
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...
AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel) { return hwaccel ? hwaccel->next : first_hwaccel; }
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
202,720,115,545,532,800,000,000,000,000,000,000,000
4
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, OPJ_BOOL isEncoder, OPJ_FLOAT32 fraction, OPJ_SIZE_T sizeof_block, opj_event_mgr_t* manager) { OPJ_UINT32(*l_gain_ptr)(OPJ_UINT32) = 00; OPJ_UINT32 compno, resno, bandno, precno, cblkno; opj_tcp_t * l_tcp = 00; ...
0
[ "CWE-119", "CWE-787" ]
openjpeg
397f62c0a838e15d667ef50e27d5d011d2c79c04
159,577,485,323,279,560,000,000,000,000,000,000,000
435
Fix write heap buffer overflow in opj_mqc_byteout(). Discovered by Ke Liu of Tencent's Xuanwu LAB (#835)
int ClientHandler::upstream_write() { assert(upstream_); if (upstream_->on_write() != 0) { return -1; } if (get_should_close_after_write() && upstream_->response_empty()) { return -1; } return 0; }
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
172,192,345,674,168,070,000,000,000,000,000,000,000
12
Don't read too greedily
static void print_guid(ff_asf_guid *g) { int i; PRINT_IF_GUID(g, ff_asf_header); else PRINT_IF_GUID(g, ff_asf_file_header); else PRINT_IF_GUID(g, ff_asf_stream_header); else PRINT_IF_GUID(g, ff_asf_audio_stream); else PRINT_IF_GUID(g, ff_asf_audio_conceal_none); else PRINT_IF_GUID(g, ff_asf_...
0
[ "CWE-400", "CWE-399", "CWE-703" ]
FFmpeg
afc9c683ed9db01edb357bc8c19edad4282b3a97
281,834,329,136,948,670,000,000,000,000,000,000,000
34
avformat/asfdec: Fix DoS in asf_build_simple_index() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb) { unsigned char *p; u8 addr; u8 ctrl; u16 type; if (skb->len < 4) goto out_free; p = skb->data; p += get_u8 (p, &addr); p += get_u8 (p, &ctrl); p += get_u16(p, &type); skb_pull(skb, 4); if (addr != CISCO_ADDR_UNICAST && addr != CI...
0
[ "CWE-119" ]
linux-2.6
0f13864e5b24d9cbe18d125d41bfa4b726a82e40
185,834,889,679,916,050,000,000,000,000,000,000,000
47
isdn: avoid copying overly-long strings Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416 Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
resolv_conf_parse_line(struct evdns_base *base, char *const start, int flags) { char *strtok_state; static const char *const delims = " \t"; #define NEXT_TOKEN strtok_r(NULL, delims, &strtok_state) char *const first_token = strtok_r(start, delims, &strtok_state); ASSERT_LOCKED(base); if (!first_token) return; ...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
272,771,397,366,218,000,000,000,000,000,000,000,000
38
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
static void phy_update_link(CadenceGEMState *s) { DB_PRINT("down %d\n", qemu_get_queue(s->nic)->link_down); /* Autonegotiation status mirrors link status. */ if (qemu_get_queue(s->nic)->link_down) { s->phy_regs[PHY_REG_STATUS] &= ~(PHY_REG_STATUS_ANEGCMPL | ...
0
[ "CWE-835" ]
qemu
e73adfbeec9d4e008630c814759052ed945c3fed
241,142,234,205,823,430,000,000,000,000,000,000,000
17
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...
static int jpc_dec_process_ppt(jpc_dec_t *dec, jpc_ms_t *ms) { jpc_ppt_t *ppt = &ms->parms.ppt; jpc_dec_tile_t *tile; jpc_ppxstabent_t *pptstabent; tile = dec->curtile; if (!tile->pptstab) { if (!(tile->pptstab = jpc_ppxstab_create())) { return -1; } } if (!(pptstabent = jpc_ppxstabent_create())) { ret...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
110,122,781,081,095,960,000,000,000,000,000,000,000
24
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
xmlReadFd(int fd, const char *URL, const char *encoding, int options) { xmlParserCtxtPtr ctxt; xmlParserInputBufferPtr input; xmlParserInputPtr stream; if (fd < 0) return (NULL); input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE); if (input == NULL) return (NULL);...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
267,750,726,970,623,900,000,000,000,000,000,000,000
27
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
construct_data_tlv(struct sc_card *card, struct sc_apdu *apdu, unsigned char *apdu_buf, unsigned char *data_tlv, size_t * data_tlv_len, const unsigned char key_type) { size_t block_size = (KEY_TYPE_AES == key_type ? 16 : 8); unsigned char pad[4096] = { 0 }; size_t pad_len; size_t tlv_more; /* increased tlv length...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
282,504,181,928,620,430,000,000,000,000,000,000,000
50
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
int wc_ecc_check_key(ecc_key* key) { int err; #ifndef WOLFSSL_SP_MATH #ifndef WOLFSSL_ATECC508A mp_int* b; #ifdef USE_ECC_B_PARAM DECLARE_CURVE_SPECS(4) #else mp_int b_lcl; DECLARE_CURVE_SPECS(3) b = &b_lcl; XMEMSET(b, 0, sizeof(mp_int)); #endif #endif /* WOLFSSL_ATECC508A */ if (key...
0
[ "CWE-200" ]
wolfssl
9b9568d500f31f964af26ba8d01e542e1f27e5ca
217,319,432,898,386,420,000,000,000,000,000,000,000
93
Change ECDSA signing to use blinding.
f_fmod(typval_T *argvars, typval_T *rettv) { float_T fx = 0.0, fy = 0.0; rettv->v_type = VAR_FLOAT; if (get_float_arg(argvars, &fx) == OK && get_float_arg(&argvars[1], &fy) == OK) rettv->vval.v_float = fmod(fx, fy); else rettv->vval.v_float = 0.0; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
5,305,676,079,086,032,600,000,000,000,000,000,000
11
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
PackLinuxElf64::PackLinuxElf64(InputFile *f) : super(f), phdri(NULL), shdri(NULL), gnu_stack(NULL), note_body(NULL), page_mask(~0ull<<lg2_page), dynseg(NULL), hashtab(NULL), gashtab(NULL), dynsym(NULL), jni_onload_sym(NULL), shstrtab(NULL), sec_strndx(NULL), sec_dynsym(NULL), sec_dynstr(NULL) { ...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
301,953,994,611,307,400,000,000,000,000,000,000,000
14
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
open_tempfile(char *filename) { FILE *result = 0; _nc_STRCPY(filename, "/tmp/XXXXXX", PATH_MAX); #if HAVE_MKSTEMP { int oldmask = (int) umask(077); int fd = mkstemp(filename); if (fd >= 0) result = fdopen(fd, "w"); umask((mode_t) oldmask); } #else if (tmpnam(filename) != 0) result = fopen...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
159,546,977,559,639,370,000,000,000,000,000,000,000
19
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
SSL_SESSION *SSL_SESSION_new(void) { SSL_SESSION *ss; ss=(SSL_SESSION *)OPENSSL_malloc(sizeof(SSL_SESSION)); if (ss == NULL) { SSLerr(SSL_F_SSL_SESSION_NEW,ERR_R_MALLOC_FAILURE); return(0); } memset(ss,0,sizeof(SSL_SESSION)); ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */ ss->reference...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
256,727,485,751,326,200,000,000,000,000,000,000,000
35
Add SRP support.
gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf) { g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), -1); return pixbuf->n_channels; }
0
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
87,968,039,363,884,500,000,000,000,000,000,000,000
6
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
change_dir () { if (change_directory_option && chdir (change_directory_option)) { if (errno == ENOENT && create_dir_flag) { if (make_path (change_directory_option, -1, -1, (warn_option & CPIO_WARN_INTERDIR) ? _("Creating directory `%s'") : NULL)) exit (PAXEXIT_FAILURE); if (chdir (chang...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
58,047,264,217,225,740,000,000,000,000,000,000,000
18
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
void test_nghttp2_session_flow_control(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; my_user_data ud; nghttp2_data_provider data_prd; nghttp2_frame frame; nghttp2_stream *stream; int32_t new_initial_window_size; nghttp2_settings_entry iv[1]; nghttp2_frame settings_frame; ngh...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
303,224,843,780,770,320,000,000,000,000,000,000,000
115
Add nghttp2_option_set_max_outbound_ack
static void InitPSDInfo(const Image *image,PSDInfo *info) { info->version=1; info->columns=image->columns; info->rows=image->rows; info->mode=10; /* Set the mode to a value that won't change the colorspace */ info->channels=1U; info->min_channels=1U; if (image->storage_class == PseudoClass) info->mode...
0
[ "CWE-125" ]
ImageMagick
b0fe1aa7c2ed7becb892f121abdd68a6e6e0ce0b
107,760,693,484,112,420,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/1532
static int sock_close(struct inode *inode, struct file *filp) { sock_release(SOCKET_I(inode)); return 0; }
1
[ "CWE-362" ]
linux
6d8c50dcb029872b298eea68cc6209c866fd3e14
136,794,333,495,586,210,000,000,000,000,000,000,000
5
socket: close race condition between sock_close() and sockfs_setattr() fchownat() doesn't even hold refcnt of fd until it figures out fd is really needed (otherwise is ignored) and releases it after it resolves the path. This means sock_close() could race with sockfs_setattr(), which leads to a NULL pointer dereferenc...
Returns the name of the timezone. */ PHP_FUNCTION(timezone_name_get) { zval *object; php_timezone_obj *tzobj; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, date_ce_timezone) == FAILURE) { RETURN_FALSE; } tzobj = (php_timezone_obj *) zend_object_store_get_obj...
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
321,502,893,885,752,500,000,000,000,000,000,000,000
32
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
static bool GetAttributeForAllPoints(draco::Mesh *mesh, const draco::PointAttribute *pAttribute, std::vector<uint8_t> &outBuffer) { size_t byteOffset = 0; T values[4] = {0, 0, 0, 0}; for (draco::PointIndex i(0); i < mesh->num_points(); ++i)...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
17,130,603,205,225,737,000,000,000,000,000,000,000
18
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
hexdigest_to_digest(const char *hexdigest, char *digest) { if (hexdigest[0]=='$') ++hexdigest; if (strlen(hexdigest) < HEX_DIGEST_LEN || base16_decode(digest,DIGEST_LEN,hexdigest,HEX_DIGEST_LEN) < 0) return -1; return 0; }
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
212,017,137,647,018,200,000,000,000,000,000,000,000
9
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
load_counted_binstring(UnpicklerObject *self, int nbytes) { PyObject *obj; Py_ssize_t size; char *s; if (_Unpickler_Read(self, &s, nbytes) < 0) return -1; size = calc_binsize(s, nbytes); if (size < 0) { PickleState *st = _Pickle_GetGlobalState(); PyErr_Format(st->Unpick...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
336,335,796,462,983,570,000,000,000,000,000,000,000
36
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
virSecuritySELinuxRestoreChardevLabel(virSecurityManager *mgr, virDomainDef *def, virDomainChrSourceDef *dev_source, bool chardevStdioLogd) { virSecurityLabelDef *seclabel; virSecurityDeviceLabelDe...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
325,625,664,029,635,500,000,000,000,000,000,000,000
71
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
void RGWDeleteBucketPolicy::execute() { op_ret = retry_raced_bucket_write(store, s, [this] { auto attrs = s->bucket_attrs; attrs.erase(RGW_ATTR_IAM_POLICY); op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs, &s->bucket_info.objv_tracker); return op_ret; }); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
272,313,485,347,598,400,000,000,000,000,000,000,000
10
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
void Ogg::XiphComment::removeField(const String &key, const String &value) { if(!value.isNull()) { StringList::Iterator it = d->fieldListMap[key].begin(); while(it != d->fieldListMap[key].end()) { if(value == *it) it = d->fieldListMap[key].erase(it); else it++; } } else ...
0
[ "CWE-20" ]
taglib
ab8a0ee8937256311e649a88e8ddd7c7f870ad59
268,908,090,215,937,940,000,000,000,000,000,000,000
14
Don't store the output of ByteVector::toUInt() in int, use uint instead
hgr_search_in_rtp(qf_list_T *qfl, regmatch_T *p_regmatch, char_u *lang) { char_u *p; vimconv_T vc; // Help files are in utf-8 or latin1, convert lines when 'encoding' // differs. vc.vc_type = CONV_NONE; if (!enc_utf8) convert_setup(&vc, (char_u *)"utf-8", p_enc); // Go through all the di...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
200,463,827,110,477,670,000,000,000,000,000,000,000
28
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
int RGWOp::init_quota() { /* no quota enforcement for system requests */ if (s->system_request) return 0; /* init quota related stuff */ if (!(s->user->op_mask & RGW_OP_TYPE_MODIFY)) { return 0; } /* only interested in object related ops */ if (s->object.empty()) { return 0; } RGWUserIn...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
76,197,143,586,955,050,000,000,000,000,000,000,000
44
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
QPDFFormFieldObjectHelper::getValue() { return getInheritableFieldValue("/V"); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
20,167,124,181,183,894,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static uint32_t MapElement(uint16_t Type, uint16_t Length, uint32_t order) { int index; cache.input_order[order].type = Type; cache.input_order[order].length = Length; index = cache.lookup_info[Type].index; if ( index ) { while ( index && ipfix_element_map[index].id == Type ) { if ( Length == ipfix_element_m...
0
[ "CWE-190" ]
nfdump
3b006ededaf351f1723aea6c727c9edd1b1fff9b
162,722,716,285,732,660,000,000,000,000,000,000,000
29
Fix potential unsigned integer underflow
static int snd_seq_ioctl_delete_port(struct snd_seq_client *client, void __user *arg) { struct snd_seq_port_info info; int err; /* set passed parameters */ if (copy_from_user(&info, arg, sizeof(info))) return -EFAULT; /* it is not allowed to remove the port for an another client */ if (info.addr.cli...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
163,265,750,118,761,390,000,000,000,000,000,000,000
19
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
static void ___xfrm_state_destroy(struct xfrm_state *x) { tasklet_hrtimer_cancel(&x->mtimer); del_timer_sync(&x->rtimer); kfree(x->aead); kfree(x->aalg); kfree(x->ealg); kfree(x->calg); kfree(x->encap); kfree(x->coaddr); kfree(x->replay_esn); kfree(x->preplay_esn); if (x->inner_mode) xfrm_put_mode(x->inner...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
261,088,873,269,827,380,000,000,000,000,000,000,000
28
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static void rmem_cma_device_release(struct reserved_mem *rmem, struct device *dev) { dev_set_cma_area(dev, NULL); }
0
[ "CWE-682" ]
linux
67a2e213e7e937c41c52ab5bc46bf3f4de469f6e
143,824,673,194,597,530,000,000,000,000,000,000,000
5
mm: cma: fix incorrect type conversion for size during dma allocation This was found during userspace fuzzing test when a large size dma cma allocation is made by driver(like ion) through userspace. show_stack+0x10/0x1c dump_stack+0x74/0xc8 kasan_report_error+0x2b0/0x408 kasan_report+0x34/0x40 __asan_storeN...
Value ExpressionNary::serialize(bool explain) const { const size_t nOperand = _children.size(); vector<Value> array; /* build up the array */ for (size_t i = 0; i < nOperand; i++) array.push_back(_children[i]->serialize(explain)); return Value(DOC(getOpName() << array)); }
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
217,899,546,600,095,000,000,000,000,000,000,000,000
9
SERVER-49404 Enforce additional checks in $arrayToObject
unlock_mtab (void) { if (we_created_lockfile) { close(lockfile_fd); lockfile_fd = -1; unlink (_PATH_MOUNTED_LOCK); we_created_lockfile = 0; } #ifdef HAVE_LIBMOUNT_MOUNT if (libmount_lock) mnt_unlock_file(libmount_lock); #endif }
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
161,965,778,667,699,110,000,000,000,000,000,000,000
12
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
TransposerBase *TransposerBase::newInstance() { #ifdef SOUNDTOUCH_INTEGER_SAMPLES // Notice: For integer arithmetics support only linear algorithm (due to simplest calculus) return ::new InterpolateLinearInteger; #else switch (algorithm) { case LINEAR: return new Interpolate...
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
203,618,293,902,522,300,000,000,000,000,000,000,000
23
Replaced illegal-number-of-channel assertions with run-time exception
asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags) { struct file *in; int error, fput_in; if (unlikely(!len)) return 0; error = -EBADF; in = fget_light(fdin, &fput_in); if (in) { if (in->f_mode & FMODE_READ) { int fput_out; struct file *out = fget_light(fdout, &fput_out); ...
0
[ "CWE-94" ]
linux-2.6
8811930dc74a503415b35c4a79d14fb0b408a361
219,533,414,637,333,200,000,000,000,000,000,000,000
26
splice: missing user pointer access verification vmsplice_to_user() must always check the user pointer and length with access_ok() before copying. Likewise, for the slow path of copy_from_user_mmap_sem() we need to check that we may read from the user region. Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Cc: Wojc...
findFkeyCast(Oid targetTypeId, Oid sourceTypeId, Oid *funcid) { CoercionPathType ret; if (targetTypeId == sourceTypeId) { ret = COERCION_PATH_RELABELTYPE; *funcid = InvalidOid; } else { ret = find_coercion_pathway(targetTypeId, sourceTypeId, COERCION_IMPLICIT, funcid); if (ret == COERCION_PATH_N...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
6,416,846,189,451,952,000,000,000,000,000,000,000
21
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...
static usec_t transaction_get_resend_timeout(DnsTransaction *t) { assert(t); assert(t->scope); switch (t->scope->protocol) { case DNS_PROTOCOL_DNS: /* When we do TCP, grant a much longer timeout, as in this case there's no need for us to quickly * rese...
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
162,864,783,774,815,190,000,000,000,000,000,000,000
30
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
static inline PixelTrait GetPixelRedTraits(const Image *magick_restrict image) { return(image->channel_map[RedPixelChannel].traits); }
0
[ "CWE-20", "CWE-125" ]
ImageMagick
8187d2d8fd010d2d6b1a3a8edd935beec404dddc
17,874,156,383,993,059,000,000,000,000,000,000,000
4
https://github.com/ImageMagick/ImageMagick/issues/1610
inline uint8_t* WireFormatLite::WriteSInt32NoTagToArray( const RepeatedField<int32_t>& value, uint8_t* target) { return WritePrimitiveNoTagToArray(value, WriteSInt32NoTagToArray, target); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
107,379,450,951,249,660,000,000,000,000,000,000,000
4
Apply patch
e_ews_connection_get_server_time_zones_finish (EEwsConnection *cnc, GAsyncResult *result, GSList **tzds, /*EEwsCalendarTimeZoneDefinition */ GError **error) { GSimpleAsyncResult *simple; EwsAsyncData *async_data; g_return_val_if_fail (cnc != NULL, FALSE); g_return_val_if_fail ( ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
5,734,949,848,213,516,000,000,000,000,000,000,000
31
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
bool can_optimize_range(const Item_bool_func *cond, const Item *item, bool is_eq_func) const { return can_optimize_range_or_keypart_ref(cond, item); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
43,313,572,793,901,080,000,000,000,000,000,000,000
6
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
int allow_signal(int sig) { if (!valid_signal(sig) || sig < 1) return -EINVAL; spin_lock_irq(&current->sighand->siglock); /* This is only needed for daemonize()'ed kthreads */ sigdelset(&current->blocked, sig); /* * Kernel threads handle their own signals. Let the signal code * know it'll be handled, so tha...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
linux
b69f2292063d2caf37ca9aec7d63ded203701bf3
155,608,257,345,437,870,000,000,000,000,000,000,000
18
block: Fix io_context leak after failure of clone with CLONE_IO With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents exit_io_context() from calling IO schedulers exit functions. Give a task_struct to exit_io_context(), and call exi...
MemIo::~MemIo() { if (p_->isMalloced_) { std::free(p_->data_); } }
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
147,882,576,895,088,740,000,000,000,000,000,000,000
6
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
static void gf_m2ts_metadata_pointer_descriptor_del(GF_M2TS_MetadataPointerDescriptor *metapd) { if (metapd) { if (metapd->locator_data) gf_free(metapd->locator_data); if (metapd->data) gf_free(metapd->data); gf_free(metapd); } }
0
[ "CWE-416", "CWE-125" ]
gpac
1ab4860609f2e7a35634930571e7d0531297e090
131,814,950,725,597,190,000,000,000,000,000,000,000
8
fixed potential crash on PMT IOD parse - cf #1268 #1269
static bool Run(OpKernelContext* ctx, const Tensor& input, const Tensor& filter, int batch, int input_rows, int input_cols, int in_depth, int filter_rows, int filter_cols, int pad_rows, int pad_cols, int out_rows, int out_cols, int out_depth, int...
0
[ "CWE-369" ]
tensorflow
b12aa1d44352de21d1a6faaf04172d8c2508b42b
335,541,604,954,393,100,000,000,000,000,000,000,000
9
Fix one more FPE. PiperOrigin-RevId: 369346568 Change-Id: I840fd575962adc879713a4c9cc59e6da3331caa7
init_syntax_once () { register int c; static int done = 0; if (done) return; bzero (re_syntax_table, sizeof re_syntax_table); for (c = 0; c < CHAR_SET_SIZE; ++c) if (ISALNUM (c)) re_syntax_table[c] = Sword; re_syntax_table['_'] = Sword; done = 1; }
0
[ "CWE-190", "CWE-252" ]
glibc
2864e767053317538feafa815046fff89e5a16be
262,632,301,809,043,600,000,000,000,000,000,000,000
17
Update. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp ...
alloc_sock(sa_family_t family, list l, int proto, ifindex_t ifindex, bool unicast) { sock_t *new; new = (sock_t *)MALLOC(sizeof (sock_t)); new->family = family; new->proto = proto; new->ifindex = ifindex; new->unicast = unicast; new->rb_vrid = RB_ROOT; new->rb_sands = RB_ROOT_CACHED; list_add(l, new); retu...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
120,934,970,451,905,680,000,000,000,000,000,000,000
16
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static struct sock *dn_socket_get_next(struct seq_file *seq, struct sock *n) { struct dn_iter_state *state = seq->private; n = sk_next(n); try_again: if (n) goto out; if (++state->bucket >= DN_SK_HASH_SIZE) goto out; n = sk_head(&dn_sk_hash[state->bucket]); goto try_again; out: return n; }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
142,185,038,226,661,650,000,000,000,000,000,000,000
16
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
dns_zone_getxfracl(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); return (zone->xfr_acl); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
299,222,212,980,150,200,000,000,000,000,000,000,000
6
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static inline int __bpf_rx_skb_no_mac(struct net_device *dev, struct sk_buff *skb) { int ret = ____dev_forward_skb(dev, skb); if (likely(!ret)) { skb->dev = dev; ret = netif_rx(skb); } return ret; }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
8,199,042,028,688,144,000,000,000,000,000,000,000
12
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...
static struct file *do_open(struct path *path, int oflag) { static const int oflag2acc[O_ACCMODE] = { MAY_READ, MAY_WRITE, MAY_READ | MAY_WRITE }; int acc; if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY)) return ERR_PTR(-EINVAL); acc = oflag2acc[oflag & O_ACCMODE]; if (inode_permission(d_inode(path->dentr...
0
[ "CWE-416" ]
linux
f991af3daabaecff34684fd51fac80319d1baad1
283,436,728,466,366,160,000,000,000,000,000,000,000
12
mqueue: fix a use-after-free in sys_mq_notify() The retry logic for netlink_attachskb() inside sys_mq_notify() is nasty and vulnerable: 1) The sock refcnt is already released when retry is needed 2) The fd is controllable by user-space because we already release the file refcnt so we when retry but the fd has bee...
static int nf_tables_getset(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { const struct nfgenmsg *nfmsg = nlmsg_data(info->nlh); struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_cur(info->net); struct net *net = info->net; const struct nft_set ...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
249,395,477,812,178,300,000,000,000,000,000,000,000
54
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static void process_stat_settings(ADD_STAT add_stats, void *c) { assert(add_stats); APPEND_STAT("maxbytes", "%llu", (unsigned long long)settings.maxbytes); APPEND_STAT("maxconns", "%d", settings.maxconns); APPEND_STAT("tcpport", "%d", settings.port); APPEND_STAT("udpport", "%d", settings.udpport); ...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
116,972,450,354,547,140,000,000,000,000,000,000,000
47
CVE reported by cisco talos
ieee80211_get_ftm_responder_stats(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ftm_responder_stats *ftm_stats) { struct ieee80211_local *local = wiphy_priv(wiphy); struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); return drv_get_ftm_responder_stats(local, sdata, ftm_sta...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
258,224,440,979,341,730,000,000,000,000,000,000,000
9
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static void submodule_cache_clear(struct submodule_cache *cache) { struct hashmap_iter iter; struct submodule_entry *entry; if (!cache->initialized) return; /* * We iterate over the name hash here to be symmetric with the * allocation of struct submodule entries. Each is allocated by * their .gitmodule bl...
0
[ "CWE-88" ]
git
f6adec4e329ef0e25e14c63b735a5956dc67b8bc
141,981,588,241,811,880,000,000,000,000,000,000,000
21
submodule-config: ban submodule urls that start with dash The previous commit taught the submodule code to invoke our "git clone $url $path" with a "--" separator so that we aren't confused by urls or paths that start with dashes. However, that's just one code path. It's not clear if there are others, and it would be...
ofputil_decode_queue_get_config_request(const struct ofp_header *oh, ofp_port_t *port, uint32_t *queue) { const struct ofp10_queue_get_config_request *qgcr10; const struct ofp11_queue_get_config_request *qgcr11; const struct ofp14_queue_desc_request *qdr14; struct...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
148,457,524,350,573,720,000,000,000,000,000,000,000
38
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
ResponseHeaderMapOptRef ActiveStreamDecoderFilter::responseHeaders() const { return parent_.filter_manager_callbacks_.responseHeaders(); }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
264,216,310,700,099,030,000,000,000,000,000,000,000
3
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
JOIN::reoptimize(Item *added_where, table_map join_tables, Join_plan_state *save_to) { DYNAMIC_ARRAY added_keyuse; SARGABLE_PARAM *sargables= 0; /* Used only as a dummy parameter. */ uint org_keyuse_elements; /* Re-run the REF optimizer to take into account the new conditions. */ if (update_...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
75,666,197,854,928,190,000,000,000,000,000,000,000
68
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static int build_acquire(struct sk_buff *skb, struct xfrm_state *x, struct xfrm_tmpl *xt, struct xfrm_policy *xp) { __u32 seq = xfrm_get_acqseq(); struct xfrm_user_acquire *ua; struct nlmsghdr *nlh; int err; nlh = nlmsg_put(skb, 0, 0, XFRM_MSG_ACQUIRE, sizeof(*ua), 0); if (nlh == NULL) return -EMSGSIZE; ...
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
147,625,439,727,397,770,000,000,000,000,000,000,000
37
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
static void cassignop1(JF, js_Ast *lhs) { switch (lhs->type) { case EXP_IDENTIFIER: emitlocal(J, F, OP_GETLOCAL, OP_GETVAR, lhs); break; case EXP_INDEX: cexp(J, F, lhs->a); cexp(J, F, lhs->b); emit(J, F, OP_DUP2); emit(J, F, OP_GETPROP); break; case EXP_MEMBER: cexp(J, F, lhs->a); emit(J, F, OP_DU...
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
127,482,557,869,886,500,000,000,000,000,000,000,000
21
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
~PyTapeTensor() { if (shape_.index() == 1) { Py_DECREF(absl::get<1>(shape_)); } }
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
312,002,721,755,479,750,000,000,000,000,000,000,000
5
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
SRC_ReselectSource(void) { selected_source_index = INVALID_SOURCE; SRC_SelectSource(NULL); }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
148,049,550,346,202,610,000,000,000,000,000,000,000
5
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
l2tp_proxy_auth_id_print(netdissect_options *ndo, const u_char *dat, u_int length) { const uint16_t *ptr = (const uint16_t *)dat; if (length < 2) { ND_PRINT((ndo, "AVP too short")); return; } ND_PRINT((ndo, "%u", EXTRACT_16BITS(ptr) & L2TP_PROXY_AUTH_ID_MASK)); }
0
[ "CWE-125", "CWE-787" ]
tcpdump
cc4a7391c616be7a64ed65742ef9ed3f106eb165
257,961,691,702,231,720,000,000,000,000,000,000,000
10
CVE-2017-13006/L2TP: Check whether an AVP's content exceeds the AVP length. It's not good enough to check whether all the data specified by the AVP length was captured - you also have to check whether that length is large enough for all the required data in the AVP. This fixes a buffer over-read discovered by Yannick...
static void xennet_disconnect_backend(struct netfront_info *info) { unsigned int i = 0; unsigned int num_queues = info->netdev->real_num_tx_queues; netif_carrier_off(info->netdev); for (i = 0; i < num_queues && info->queues; ++i) { struct netfront_queue *queue = &info->queues[i]; del_timer_sync(&queue->rx_re...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
273,410,027,502,848,200,000,000,000,000,000,000,000
41
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
static int io_unregister_iowq_aff(struct io_ring_ctx *ctx) { struct io_uring_task *tctx = current->io_uring; if (!tctx || !tctx->io_wq) return -EINVAL; return io_wq_cpu_affinity(tctx->io_wq, NULL);
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
97,044,011,352,394,240,000,000,000,000,000,000,000
9
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
virtual void save_org_in_field(Field *field, fast_field_copier data __attribute__ ((__unused__))) { (void) save_in_field(field, 1); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
301,993,451,284,057,640,000,000,000,000,000,000,000
4
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static int rtnl_fill_link_af(struct sk_buff *skb, const struct net_device *dev, u32 ext_filter_mask) { const struct rtnl_af_ops *af_ops; struct nlattr *af_spec; af_spec = nla_nest_start(skb, IFLA_AF_SPEC); if (!af_spec) return -EMSGSIZE; list_for_each_entry_rcu(af_ops, &rtnl_af_ops, list) { s...
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
326,361,616,674,647,200,000,000,000,000,000,000,000
40
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...
static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) { /* Initial reset is a superset of the normal reset */ kvm_arch_vcpu_ioctl_normal_reset(vcpu); /* this equals initial cpu reset in pop, but we don't switch to ESA */ vcpu->arch.sie_block->gpsw.mask = 0; vcpu->arch.sie_block->gpsw.addr = 0; kvm...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
475,470,827,689,157,000,000,000,000,000,000,000
27
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static int zipfileDeflate( const u8 *aIn, int nIn, /* Input */ u8 **ppOut, int *pnOut, /* Output */ char **pzErr /* OUT: Error message */ ){ int rc = SQLITE_OK; sqlite3_int64 nAlloc; z_stream str; u8 *aOut; memset(&str, 0, sizeof(str)); str.next_in = (Bytef*)aIn; ...
0
[ "CWE-434" ]
sqlite
54d501092d88c0cf89bec4279951f548fb0b8618
326,633,252,786,600,560,000,000,000,000,000,000,000
38
Fix the zipfile extension so that INSERT works even if the pathname of the file being inserted is a NULL. Bug discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
R_API ut64 r_core_get_asmqjmps(RCore *core, const char *str) { if (!core->asmqjmps) { return UT64_MAX; } if (core->is_asmqjmps_letter) { int i, pos = 0; int len = strlen (str); for (i = 0; i < len - 1; i++) { if (!isupper ((ut8)str[i])) { return UT64_MAX; } pos *= R_CORE_ASMQJMPS_LETTERS; pos...
0
[ "CWE-415", "CWE-703" ]
radare2
cb8b683758edddae2d2f62e8e63a738c39f92683
262,369,379,243,620,950,000,000,000,000,000,000,000
30
Fix #16303 - c->table_query double free (#16318)