func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void Show_Node( TidyDocImpl* doc, const char *msg, Node *node ) { Lexer* lexer = doc->lexer; Bool lex = ((msg[0] == 'l')&&(msg[1] == 'e')) ? yes : no; int line = ( doc->lexer ? doc->lexer->lines : 0 ); int col = ( doc->lexer ? doc->lexer->columns : 0 ); SPRTF("R=%d C=%d: ", line, col ); ...
0
[ "CWE-119" ]
tidy-html5
c18f27a58792f7fbd0b30a0ff50d6b40a82f940d
290,223,573,130,901,770,000,000,000,000,000,000,000
43
Issue #217 - avoid len going negative, ever...
static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param) { NET *net= &stmt->mysql->net; DBUG_ENTER("store_param"); DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d", param->buffer_type, (long) (param->buffer ? param->buffer : NullS), *param->lengt...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
125,071,129,307,502,170,000,000,000,000,000,000,000
26
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
static int mp_wait_modem_status(struct sb_uart_state *state, unsigned long arg) { struct sb_uart_port *port = state->port; DECLARE_WAITQUEUE(wait, current); struct sb_uart_icount cprev, cnow; int ret; spin_lock_irq(&port->lock); memcpy(&cprev, &port->icount, sizeof(struct sb_uart_icount)); port->ops->enable_ms...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
75,753,161,655,204,220,000,000,000,000,000,000,000
44
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
int fchmod_acl(files_struct *fsp, mode_t mode) { connection_struct *conn = fsp->conn; SMB_ACL_T posix_acl = NULL; int ret = -1; if ((posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp)) == NULL) return -1; if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1) goto done; ret = SMB_VFS_SYS_ACL_SET_FD(fsp, posix_...
0
[ "CWE-264" ]
samba
d6c28913f3109d1327a3d1369b6eafd3874b2dca
271,999,208,395,655,340,000,000,000,000,000,000,000
19
Bug 6488: acl_group_override() call in posix acls references an uninitialized variable. (cherry picked from commit f92195e3a1baaddda47a5d496f9488c8445b41ad)
putstr(int d) { addbufspc(1); pputc(d); return 0; }
0
[ "CWE-476" ]
zsh
c187154f47697cdbf822c2f9d714d570ed4a0fd1
145,305,313,661,837,380,000,000,000,000,000,000,000
6
security/41: Don't perform PROMPT_SUBST evaluation on %F/%K arguments Mitigates CVE-2021-45444
ikev2_n_print(netdissect_options *ndo, u_char tpay _U_, const struct isakmp_gen *ext, u_int item_len, const u_char *ep, uint32_t phase _U_, uint32_t doi _U_, uint32_t proto _U_, int depth _U_) { const struct ikev2_n *p; struct ikev2_n n; const u_char *cp; u_char showspi, showdata, showsomedata; const char ...
1
[ "CWE-399", "CWE-835" ]
tcpdump
c2ef693866beae071a24b45c49f9674af1df4028
120,280,305,026,129,860,000,000,000,000,000,000,000
206
CVE-2017-12990/Fix printing of ISAKMPv1 Notification payload data. The closest thing to a specification for the contents of the payload data is draft-ietf-ipsec-notifymsg-04, and nothing in there says that it is ever a complete ISAKMP message, so don't dissect types we don't have specific code for as a complete ISAKMP...
TEST_P(ProtocolIntegrationTest, RetryStreamingCancelDueToBufferOverflow) { config_helper_.addConfigModifier( [](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) { auto* route = hcm.mutable_route_config()->mutable_virtual_hosts(0)->mutable_routes(...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
136,960,544,658,971,360,000,000,000,000,000,000,000
57
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
validate_addr_policies(const or_options_t *options, char **msg) { /* XXXX Maybe merge this into parse_policies_from_options, to make sure * that the two can't go out of sync. */ smartlist_t *addr_policy=NULL; *msg = NULL; if (policies_parse_exit_policy_from_options(options,0,NULL,&addr_policy)) { REJEC...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
83,228,811,239,821,290,000,000,000,000,000,000,000
70
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
static int selinux_quota_on(struct dentry *dentry) { const struct cred *cred = current_cred(); return dentry_has_perm(cred, dentry, FILE__QUOTAON); }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
297,395,742,595,655,970,000,000,000,000,000,000,000
6
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
TypeAdaptor_sv_dt(std::function<R(SemanticValues &sv, any &dt)> fn) : fn_(fn) {}
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
285,700,108,473,048,000,000,000,000,000,000,000,000
2
Fix #122
free_all_allocator(clump_t *cp, void *arg) { struct free_data *fd = (struct free_data *)arg; if (cp->cbase + sizeof(obj_header_t) != (byte *)fd->imem) return SPLAY_APP_CONTINUE; fd->allocator = cp; alloc_free_clump(cp, fd->imem); return SPLAY_APP_STOP; }
0
[ "CWE-190" ]
ghostpdl
cfde94be1d4286bc47633c6e6eaf4e659bd78066
323,598,935,802,457,900,000,000,000,000,000,000,000
11
Bug 697985: bounds check the array allocations methods The clump allocator has four allocation functions that use 'number of elements' and 'size of elements' parameters (rather than a simple 'number of bytes'). Those need specific bounds checking.
static void ahci_write_fis_pio(AHCIDevice *ad, uint16_t len) { AHCIPortRegs *pr = &ad->port_regs; uint8_t *pio_fis; IDEState *s = &ad->port.ifs[0]; if (!ad->res_fis || !(pr->cmd & PORT_CMD_FIS_RX)) { return; } pio_fis = &ad->res_fis[RES_FIS_PSFIS]; pio_fis[0] = SATA_FIS_TYPE_PIO_S...
0
[ "CWE-772", "CWE-401" ]
qemu
d68f0f778e7f4fbd674627274267f269e40f0b04
210,121,648,106,192,680,000,000,000,000,000,000,000
44
ide: ahci: call cleanup function in ahci unit This can avoid memory leak when hotunplug the ahci device. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn Signed-off-by: John Snow <jsnow@redhat.com>
load_setitems(UnpicklerObject *self) { Py_ssize_t i = marker(self); if (i < 0) return -1; return do_setitems(self, i); }
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
220,235,980,086,313,060,000,000,000,000,000,000,000
7
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
void vivid_fb_release_buffers(struct vivid_dev *dev) { if (dev->video_vbase == NULL) return; /* Release cmap */ if (dev->fb_info.cmap.len) fb_dealloc_cmap(&dev->fb_info.cmap); /* Release pseudo palette */ kfree(dev->fb_info.pseudo_palette); kfree((void *)dev->video_vbase); }
0
[ "CWE-200" ]
linux-next
eda98796aff0d9bf41094b06811f5def3b4c333c
133,639,845,842,902,480,000,000,000,000,000,000,000
13
[media] media/vivid-osd: fix info leak in ioctl The vivid_fb_ioctl() code fails to initialize the 16 _reserved bytes of struct fb_vblank after the ->hcount member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speirofr@gmail.com> Signed-off-by: Hans Verkuil...
information_schema_numeric_attributes() const { return Information_schema_numeric_attributes(field_length); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
204,300,333,846,309,230,000,000,000,000,000,000,000
4
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...
void mp_encode_lua_table_as_map(lua_State *L, mp_buf *buf, int level) { size_t len = 0; /* First step: count keys into table. No other way to do it with the * Lua API, we need to iterate a first time. Note that an alternative * would be to do a single run, and then hack the buffer to insert the ...
1
[ "CWE-119", "CWE-787" ]
redis
5ccb6f7a791bf3490357b00a898885759d98bab0
253,297,826,898,312,300,000,000,000,000,000,000,000
23
Security: more cmsgpack fixes by @soloestoy. @soloestoy sent me this additional fixes, after searching for similar problems to the one reported in mp_pack(). I'm committing the changes because it was not possible during to make a public PR to protect Redis users and give Redis providers some time to patch their system...
RList *r_bin_le_get_sections(r_bin_le_obj_t *bin) { RList *l = r_list_newf ((RListFree)r_bin_section_free); if (!l) { return NULL; } LE_image_header *h = bin->header; ut32 pages_start_off = h->datapage; int i; for (i = 0; i < h->objcnt; i++) { RBinSection *sec = R_NEW0 (RBinSection); if (!sec) { return ...
0
[ "CWE-252" ]
radare2
d7ea20fb2e1433ebece9f004d87ad8f2377af23d
144,110,085,793,817,380,000,000,000,000,000,000,000
100
Fix #18923 - Fix resource exhaustion bug in LE binary (#18926)
void kernel_restart(char *cmd) { kernel_restart_prepare(cmd); if (!cmd) printk(KERN_EMERG "Restarting system.\n"); else printk(KERN_EMERG "Restarting system with command '%s'.\n", cmd); kmsg_dump(KMSG_DUMP_RESTART); machine_restart(cmd); }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
94,725,325,459,348,990,000,000,000,000,000,000,000
10
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static u8 tdme_settxpower(u8 txp, void *device_ref) { u8 status; s8 txp_val; u8 txp_ext; union pa_cfg_sfr pa_cfg_val; /* extend from 6 to 8 bit */ txp_ext = 0x3F & txp; if (txp_ext & 0x20) txp_ext += 0xC0; txp_val = (s8)txp_ext; if (CA8210_MAC_MPW) { if (txp_val > 0) { /* 8 dBm: ptrim = 5, itrim = +3 ...
0
[ "CWE-400", "CWE-401" ]
linux
6402939ec86eaf226c8b8ae00ed983936b164908
221,334,507,579,929,360,000,000,000,000,000,000,000
70
ieee802154: ca8210: prevent memory leak In ca8210_probe the allocated pdata needs to be assigned to spi_device->dev.platform_data before calling ca8210_get_platform_data. Othrwise when ca8210_get_platform_data fails pdata cannot be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lor...
_nc_has_mouse(SCREEN *sp) { return (((0 == sp) || (sp->_mouse_type == M_NONE)) ? FALSE : TRUE); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
218,608,588,360,649,100,000,000,000,000,000,000,000
4
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...
GetAdsInformation ( IN VOID *FileEntryData, IN UINTN FileEntrySize, OUT VOID **AdsData, OUT UINT64 *Length ) { UDF_DESCRIPTOR_TAG *DescriptorTag; UDF_EXTENDED_FILE_ENTRY *ExtendedFileEntry; UDF_FILE_ENTRY *FileEntry; DescriptorTag = FileEntryData; if (D...
0
[]
edk2
5c0748f43f4e1cc15fdd0be64a764eacd7df92f6
281,191,090,208,061,040,000,000,000,000,000,000,000
34
MdeModulePkg/UdfDxe: Add boundary check the read of FE/EFE REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828 Within ReadFile(): Add checks to ensure that when getting the raw data or the Allocation Descriptors' data from a FE/EFE, it will not consume data beyond the size of a FE/EFE. Cc: Ruiyu Ni <ruiyu.ni@int...
static ext4_fsblk_t descriptor_loc(struct super_block *sb, ext4_fsblk_t logical_sb_block, int nr) { struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_group_t bg, first_meta_bg; int has_super = 0; first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg); if (!ext4_has_feature_meta_bg(sb) || nr < first_meta_bg) ...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
152,667,334,232,156,450,000,000,000,000,000,000,000
27
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static void ov511_i2c_w(struct sd *sd, u8 reg, u8 value) { struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; int rc, retries; gspca_dbg(gspca_dev, D_USBO, "ov511_i2c_w %02x %02x\n", reg, value); /* Three byte write cycle */ for (retries = 6; ; ) { /* Select camera register */ reg_w(sd, R51x_I2C_SADDR_3, ...
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
315,245,518,809,356,800,000,000,000,000,000,000,000
33
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
AsyncConnection::AsyncConnection(CephContext *cct, AsyncMessenger *m, DispatchQueue *q, Worker *w) : Connection(cct, m), delay_state(NULL), async_msgr(m), conn_id(q->get_id()), logger(w->get_perf_counter()), global_seq(0), connect_seq(0), peer_global_seq(0), state(STATE_NONE),...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
135,442,481,557,645,460,000,000,000,000,000,000,000
25
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 ...
int LibRaw_bigfile_datastream::read(void * ptr,size_t size, size_t nmemb) { LR_BF_CHK(); return substream?substream->read(ptr,size,nmemb):int(fread(ptr,size,nmemb,f)); }
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
100,567,701,774,601,090,000,000,000,000,000,000,000
5
cumulated data checks patch
int tc_setup_offload_action(struct flow_action *flow_action, const struct tcf_exts *exts) { #ifdef CONFIG_NET_CLS_ACT if (!exts) return 0; return tc_setup_action(flow_action, exts->actions); #else return 0; #endif }
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
189,277,200,034,384,770,000,000,000,000,000,000,000
12
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
dp_packet_get_sctp_payload(const struct dp_packet *b) { return OVS_LIKELY(dp_packet_l4_size(b) >= SCTP_HEADER_LEN) ? (const char *)dp_packet_l4(b) + SCTP_HEADER_LEN : NULL; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
142,031,491,557,800,520,000,000,000,000,000,000,000
5
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
reinit_dbus (GSListener *listener) { gboolean initialized; gboolean try_again; initialized = gs_listener_dbus_init (listener); /* if we didn't initialize then try again */ /* FIXME: Should we keep trying forever? If we fail more than once or twice then the session b...
0
[]
gnome-screensaver
284c9924969a49dbf2d5fae1d680d3310c4df4a3
102,414,679,519,253,690,000,000,000,000,000,000,000
16
Remove session inhibitors if the originator falls of the bus This fixes a problem where totem leaves inhibitors behind, see bug 600488.
CNF_AddBroadcasts(void) { unsigned int i; NTP_Broadcast_Destination *destination; for (i = 0; i < ARR_GetSize(broadcasts); i++) { destination = (NTP_Broadcast_Destination *)ARR_GetElement(broadcasts, i); NCR_AddBroadcastDestination(&destination->addr, destination->port, de...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
317,393,486,287,802,240,000,000,000,000,000,000,000
13
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
RGWPutObjProcessor *RGWPutObj::select_processor(RGWObjectCtx& obj_ctx, bool *is_multipart) { RGWPutObjProcessor *processor; bool multipart = s->info.args.exists("uploadId"); uint64_t part_size = s->cct->_conf->rgw_obj_stripe_size; if (!multipart) { processor = new RGWPutObjProcessor_Atomic(obj_ctx, s->bu...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
1,894,666,742,317,571,700,000,000,000,000,000,000
22
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 <...
static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags) { const struct io_op_def *def = &io_op_defs[req->opcode]; const struct cred *creds = NULL; int ret; if (unlikely(!io_assign_file(req, issue_flags))) return -EBADF; if (unlikely((req->flags & REQ_F_CREDS) && req->creds != current_cred())) ...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
223,336,065,837,126,360,000,000,000,000,000,000,000
164
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf, size_t _count, loff_t *pos) { struct task_struct *tsk; struct mm_struct *mm; char *page; unsigned long count = _count; unsigned long arg_start, arg_end, env_start, env_end; unsigned long len1, len2, len; unsigned long p; char c; ...
1
[ "CWE-119" ]
linux
7f7ccc2ccc2e70c6054685f5e3522efa81556830
154,475,328,534,594,680,000,000,000,000,000,000,000
166
proc: do not access cmdline nor environ from file-backed areas proc_pid_cmdline_read() and environ_read() directly access the target process' VM to retrieve the command line and environment. If this process remaps these areas onto a file via mmap(), the requesting process may experience various issues such as extra de...
static void test_throughput(struct config config) { redisContext *c = do_connect(config); redisReply **replies; int i, num; long long t1, t2; test("Throughput:\n"); for (i = 0; i < 500; i++) freeReplyObject(redisCommand(c,"LPUSH mylist foo")); num = 1000; replies = hi_malloc_sa...
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
260,687,135,369,382,000,000,000,000,000,000,000,000
88
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
static void test_bug4172() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[3]; const char *stmt_text; MYSQL_RES *res; MYSQL_ROW row; int rc; char f[100], d[100], e[100]; ulong f_len, d_len, e_len; myheader("test_bug4172"); mysql_query(mysql, "DROP TABLE IF EXISTS t1"); mysql_query(mysql, "CREATE TABLE t1...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
133,996,702,021,746,800,000,000,000,000,000,000,000
63
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
static int snd_info_seq_show(struct seq_file *seq, void *p) { struct snd_info_private_data *data = seq->private; struct snd_info_entry *entry = data->entry; if (!entry->c.text.read) { return -EIO; } else { data->rbuffer->buffer = (char *)seq; /* XXX hack! */ entry->c.text.read(entry, data->rbuffer); } retu...
0
[ "CWE-416" ]
linux
8c2f870890fd28e023b0fcf49dcee333f2c8bad7
303,096,289,545,431,060,000,000,000,000,000,000,000
13
ALSA: info: Fix racy addition/deletion of nodes The ALSA proc helper manages the child nodes in a linked list, but its addition and deletion is done without any lock. This leads to a corruption if they are operated concurrently. Usually this isn't a problem because the proc entries are added sequentially in the driv...
void nego_set_preconnection_blob(rdpNego* nego, char* PreconnectionBlob) { nego->PreconnectionBlob = PreconnectionBlob; }
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
271,995,724,347,392,700,000,000,000,000,000,000,000
4
Fixed oob read in irp_write and similar
int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, STACK_OF(X509) *chain) { int ret = 1; ctx->ctx = store; ctx->current_method = 0; ctx->cert = x509; ctx->untrusted = chain; ctx->crls = NULL; ctx->last_untrusted = 0; ctx->other_ctx = NULL;...
0
[]
openssl
a3baa171053547488475709c7197592c66e427cf
190,609,232,929,281,770,000,000,000,000,000,000,000
121
Fix missing ok=0 with locally blacklisted CAs Also in X509_verify_cert() avoid using "i" not only as a loop counter, but also as a trust outcome and as an error ordinal. Finally, make sure that all "goto end" jumps return an error, with "end" renamed to "err" accordingly. [ The 1.1.0 version of X509_verify_cert() is...
static void opj_j2k_write_float_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem) { OPJ_BYTE * l_dest_data = (OPJ_BYTE *) p_dest_data; OPJ_FLOAT32 * l_src_data = (OPJ_FLOAT32 *) p_src_data; OPJ_UINT32 i; OPJ_FLOAT32 l_temp; for (i=0;i<p_nb_elem;++i) {...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
302,319,410,058,718,800,000,000,000,000,000,000,000
15
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static struct sock *nr_find_socket(unsigned char index, unsigned char id) { struct sock *s; struct hlist_node *node; spin_lock_bh(&nr_list_lock); sk_for_each(s, node, &nr_list) { struct nr_sock *nr = nr_sk(s); if (nr->my_index == index && nr->my_id == id) { bh_lock_sock(s); goto found; } } s = NULL;...
0
[ "CWE-200" ]
linux-2.6
f6b97b29513950bfbf621a83d85b6f86b39ec8db
163,018,613,188,363,060,000,000,000,000,000,000,000
19
netrom: Fix nr_getname() leak nr_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static __inline__ int sk_del_node_init(struct sock *sk) { int rc = __sk_del_node_init(sk); if (rc) { /* paranoid for a while -acme */ WARN_ON(atomic_read(&sk->sk_refcnt) == 1); __sock_put(sk); } return rc; }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
5,610,321,729,156,019,000,000,000,000,000,000,000
11
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec) { int i; int clientIndex; int rc; void *value; for (i = 0; i < nspecs; i++) { if (clientspecs[i] == XRecordCurrentClients || clientspecs[i] == XReco...
0
[ "CWE-191" ]
xserver
2902b78535ecc6821cc027351818b28a5c7fdbdc
279,206,797,954,590,070,000,000,000,000,000,000,000
30
Fix XRecordRegisterClients() Integer underflow CVE-2020-14362 ZDI-CAN-11574 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
free_mysql_variables(mysql_variable *vars) { mysql_variable *var; for (var = vars; var->name; var++) { free(*(var->value)); *var->value = NULL; } }
0
[ "CWE-200" ]
percona-xtrabackup
7742f875bb289a874246fb4653b7cd9f14b588fe
68,300,393,343,714,620,000,000,000,000,000,000,000
9
PXB-2722 password is written into xtrabackup_info https://jira.percona.com/browse/PXB-2722 Analysis: password passed with -p option is written into backup tool_command in xtrabackup_info Fix: mask password before writting into xtrabackup_info
static int disk_events_set_dfl_poll_msecs(const char *val, const struct kernel_param *kp) { struct disk_events *ev; int ret; ret = param_set_ulong(val, kp); if (ret < 0) return ret; mutex_lock(&disk_events_mutex); list_for_each_entry(ev, &disk_events, node) disk_flush_events(ev->disk, 0); mutex_un...
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
177,969,682,017,675,050,000,000,000,000,000,000,000
19
block: fix use-after-free in seq file I got a KASAN report of use-after-free: ================================================================== BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508 Read of size 8 by task trinity-c1/315 ======================================...
MagickBooleanType ListThresholdMapFile(FILE *file,const char *xml, const char *filename,ExceptionInfo *exception) { XMLTreeInfo *thresholds,*threshold,*description; const char *map,*alias,*content; assert( xml != (char *) NULL ); assert( file != (FILE *) NULL ); (void) LogMagickEvent(ConfigureEvent,GetMag...
0
[ "CWE-125" ]
ImageMagick6
35c7032723d85eee7318ff6c82f031fa2666b773
254,673,578,055,853,670,000,000,000,000,000,000,000
52
https://github.com/ImageMagick/ImageMagick/issues/1609
R_API RBinFile *r_bin_file_new_from_bytes(RBin *bin, const char *file, const ut8 *bytes, ut64 sz, ut64 file_sz, int rawstr, ut64 baseaddr, ut64 loadaddr, int fd, const char *pluginname, const char *xtrname, ut64 offset, bool steal_ptr) { ut8 binfile_created = false; RBinPlugin *plugin = NULL; RBinXtrPlugin *xtr = NU...
0
[ "CWE-125" ]
radare2
3fcf41ed96ffa25b38029449520c8d0a198745f3
90,325,225,715,509,280,000,000,000,000,000,000,000
67
Fix #9902 - Fix oobread in RBin.string_scan_range
*/ static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) { return __skb_cow(skb, headroom, skb_cloned(skb));
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
122,604,047,857,078,430,000,000,000,000,000,000,000
4
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 void ff_layout_encode_iostats_array(struct xdr_stream *xdr, const struct nfs4_layoutreturn_args *args, struct nfs4_flexfile_layoutreturn_args *ff_args) { __be32 *p; int i; p = xdr_reserve_space(xdr, 4); *p = cpu_to_be32(ff_args->num_dev); for (i = 0; i < ff_args->num_dev; i++) ff_layout_encode_ff_ios...
0
[ "CWE-787" ]
linux
ed34695e15aba74f45247f1ee2cf7e09d449f925
89,477,345,508,837,770,000,000,000,000,000,000,000
14
pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsi...
int dsdb_replace(struct ldb_context *ldb, struct ldb_message *msg, uint32_t dsdb_flags) { unsigned int i; /* mark all the message elements as LDB_FLAG_MOD_REPLACE */ for (i=0;i<msg->num_elements;i++) { msg->elements[i].flags = LDB_FLAG_MOD_REPLACE; } return dsdb_modify(ldb, msg, dsdb_flags); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
337,386,355,181,605,300,000,000,000,000,000,000,000
11
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb) { if ((cb->flags & EVBUFFER_CB_SUSPENDED)) { unsigned call = (cb->flags & EVBUFFER_CB_CALL_ON_UNSUSPEND); size_t sz = cb->size_before_suspend; cb->flags &= ~(EVBUFFER_CB_SUSPENDED| EVBUFFER_CB_CALL_ON_UNSUSPEND); cb->size_be...
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
323,719,659,181,527,480,000,000,000,000,000,000,000
13
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
static struct sk_filter *__sk_migrate_realloc(struct sk_filter *fp, struct sock *sk, unsigned int len) { struct sk_filter *fp_new; if (sk == NULL) return krealloc(fp, len, GFP_KERNEL); fp_new = sock_kmalloc(sk, len, GFP_KERNEL); if (fp_new) { memcpy(fp_new, fp, sizeof(struct sk_filter));...
0
[ "CWE-416", "CWE-125", "CWE-189" ]
linux
05ab8f2647e4221cbdb3856dd7d32bd5407316b3
83,592,806,155,364,570,000,000,000,000,000,000,000
22
filter: prevent nla extensions to peek beyond the end of the message The BPF_S_ANC_NLATTR and BPF_S_ANC_NLATTR_NEST extensions fail to check for a minimal message length before testing the supplied offset to be within the bounds of the message. This allows the subtraction of the nla header to underflow and therefore -...
static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev, const struct in6_addr *addr, unsigned int mode) { struct ifmcaddr6 *mc; mc = kzalloc(sizeof(*mc), GFP_KERNEL); if (!mc) return NULL; INIT_DELAYED_WORK(&mc->mca_work, mld_mca_work); mc->mca_addr = *addr; mc->idev = idev; /* reference tak...
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
324,995,097,493,623,960,000,000,000,000,000,000,000
28
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
set_bufref(bufref_T *bufref, buf_T *buf) { bufref->br_buf = buf; bufref->br_fnum = buf == NULL ? 0 : buf->b_fnum; bufref->br_buf_free_count = buf_free_count; }
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
70,856,465,668,703,440,000,000,000,000,000,000,000
6
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
static void FVMenuCanonicalContours(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FVCanonicalContours( (FontViewBase *) GDrawGetUserData(gw) ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
293,358,232,691,480,700,000,000,000,000,000,000,000
3
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
pixWriteStreamTiff(FILE *fp, PIX *pix, l_int32 comptype) { return pixWriteStreamTiffWA(fp, pix, comptype, "w"); }
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
103,440,955,673,426,950,000,000,000,000,000,000,000
6
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) { int i, j; BIO *out = NULL, *btmp = NULL, *etmp = NULL, *bio = NULL; X509_ALGOR *xa; ASN1_OCTET_STRING *data_body = NULL; const EVP_MD *evp_md; const EVP_CIPHER *evp_cipher = NULL; EVP_CIPHER_CTX *evp_ctx = NULL; ...
1
[]
openssl
5fbc59cac60db4d7c3172152b8bdafe0c675fabd
28,643,171,687,418,374,000,000,000,000,000,000,000
259
PKCS#7: Fix NULL dereference with missing EncryptedContent. CVE-2015-1790 Reviewed-by: Rich Salz <rsalz@openssl.org>
bool SFD_GetFontMetaData( FILE *sfd, char *tok, SplineFont *sf, SFD_GetFontMetaDataData* d ) { int ch; int i; KernClass* kc = 0; int old; char val[2000]; // This allows us to assume we can dereference d // at all times static SFD_GetFontMetaDataData my_static_d; stati...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
325,003,590,001,280,440,000,000,000,000,000,000,000
828
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
static uint64_t lan9118_16bit_mode_read(void *opaque, hwaddr offset, unsigned size) { switch (size) { case 2: return lan9118_readw(opaque, offset); case 4: return lan9118_readl(opaque, offset, size); } hw_error("lan9118_read: Bad size 0x%x\n",...
0
[ "CWE-835" ]
qemu
37cee01784ff0df13e5209517e1b3594a5e792d1
207,969,952,360,452,320,000,000,000,000,000,000,000
13
lan9118: 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@redhat.co...
xmlRelaxNGCheckChoiceDeterminism(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def) { xmlRelaxNGDefinePtr **list; xmlRelaxNGDefinePtr cur; int nbchild = 0, i, j, ret; int is_nullable = 0; int is_indeterminist = 0; xmlHashTablePtr triage = NULL; int is_tri...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
113,530,513,218,976,150,000,000,000,000,000,000,000
127
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
static size_t exif_convert_any_to_int(void *value, int format, int motorola_intel TSRMLS_DC) { int s_den; unsigned u_den; switch(format) { case TAG_FMT_SBYTE: return *(signed char *)value; case TAG_FMT_BYTE: return *(uchar *)value; case TAG_FMT_USHORT: return php_ifd_get16u(value, motorola_int...
0
[ "CWE-703", "CWE-189" ]
php-src
1cda0d7c2ffb62d8331c64e703131d9cabdc03ea
321,326,907,954,975,380,000,000,000,000,000,000,000
45
Fix bug #73737 FPE when parsing a tag format
static int update_sched_domains(struct notifier_block *nfb, unsigned long action, void *hcpu) { switch (action) { case CPU_UP_PREPARE: case CPU_UP_PREPARE_FROZEN: case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE_FROZEN: detach_destroy_domains(&cpu_online_map); return NOTIFY_OK; case CPU_UP_CANCELED: case CP...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
281,283,389,645,374,600,000,000,000,000,000,000,000
32
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
static void fwnet_fifo_stop(struct fwnet_device *dev) { if (dev->local_fifo == FWNET_NO_FIFO_ADDR) return; fw_core_remove_address_handler(&dev->handler); dev->local_fifo = FWNET_NO_FIFO_ADDR; }
0
[ "CWE-119", "CWE-284", "CWE-787" ]
linux
667121ace9dbafb368618dbabcf07901c962ddac
56,208,285,575,470,930,000,000,000,000,000,000,000
8
firewire: net: guard against rx buffer overflows The IP-over-1394 driver firewire-net lacked input validation when handling incoming fragmented datagrams. A maliciously formed fragment with a respectively large datagram_offset would cause a memcpy past the datagram buffer. So, drop any packets carrying a fragment wi...
static unsigned uv__utf8_decode1_slow(const char** p, const char* pe, unsigned a) { unsigned b; unsigned c; unsigned d; unsigned min; if (a > 0xF7) return -1; switch (pe - *p) { default: if (a > 0xEF) { min = 0x100...
0
[ "CWE-125" ]
libuv
b7466e31e4bee160d82a68fca11b1f61d46debae
72,519,685,169,788,060,000,000,000,000,000,000,000
65
idna: fix OOB read in punycode decoder libuv was vulnerable to out-of-bounds reads in the uv__idna_toascii() function which is used to convert strings to ASCII. This is called by the DNS resolution function and can lead to information disclosures or crashes. Reported by Eric Sesterhenn in collaboration with Cure53 an...
int SSL_get_quiet_shutdown(const SSL *s) { return (s->quiet_shutdown); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
123,619,992,266,423,700,000,000,000,000,000,000,000
4
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
static NTSTATUS dcesrv_lsa_LSARADTREPORTSECURITYEVENT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_LSARADTREPORTSECURITYEVENT *r) { DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
103,439,279,183,004,700,000,000,000,000,000,000,000
5
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
bool test_oom_random(void) { umm_init(); corruption_cnt = 0; void *ptrs[OOM_PTRS_CNT]; size_t size = 100; while (1) { size_t i; for (i = 0; i < OOM_PTRS_CNT; i++) { size += rand() % 40 - 10; ptrs[i] = wrap_malloc(size); if (ptrs[i] == NULL) { goto out; } } /*...
0
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
324,435,381,707,461,750,000,000,000,000,000,000,000
33
Fix umm_malloc()
static MonoBoolean get_declsec_action (MonoImage *image, guint32 token, guint32 action, MonoDeclSecurityEntry *entry) { guint32 cols [MONO_DECL_SECURITY_SIZE]; MonoTableInfo *t; int i; int index = mono_metadata_declsec_from_index (image, token); if (index == -1) return FALSE; t = &image->tables [MONO_TABLE_D...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
63,512,146,000,083,180,000,000,000,000,000,000,000
28
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static void __exit afiucv_exit(void) { if (pr_iucv) { device_unregister(af_iucv_dev); driver_unregister(&af_iucv_driver); pr_iucv->iucv_unregister(&af_iucv_handler, 0); symbol_put(iucv_if); } else unregister_netdevice_notifier(&afiucv_netdev_notifier); dev_remove_pack(&iucv_packet_type); sock_unregister(P...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
149,742,609,857,054,170,000,000,000,000,000,000,000
13
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...
void uwsgi_close_request(struct wsgi_request *wsgi_req) { int waitpid_status; int tmp_id; uint64_t tmp_rt, rss = 0, vsz = 0; #ifdef __linux__ uint64_t uss = 0, pss = 0; #endif // apply transformations if (wsgi_req->transformations) { if (uwsgi_apply_final_transformations(wsgi_req) == 0) { if (wsgi_req->tra...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
189,683,404,269,881,870,000,000,000,000,000,000,000
220
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *first_table, TABLE_LIST *last_table, Item **ref, find_item_error_report_type report_error, bool check_privileges, bool register_tree_change) { Field *found=0; const char *db= item->db_name; const char *ta...
1
[]
server
0168d1eda30dad4b517659422e347175eb89e923
8,300,618,734,875,595,000,000,000,000,000,000,000
216
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
gst_asf_demux_process_object (GstASFDemux * demux, guint8 ** p_data, guint64 * p_size) { GstFlowReturn ret = GST_FLOW_OK; AsfObject obj; guint64 obj_data_size; if (*p_size < ASF_OBJECT_HEADER_SIZE) return ASF_FLOW_NEED_MORE_DATA; if (!asf_demux_peek_object (demux, *p_data, ASF_OBJECT_HEADER_SIZE, &o...
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
314,139,801,486,977,240,000,000,000,000,000,000,000
117
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
set_pipestatus_array (ps, nproc) int *ps; int nproc; { SHELL_VAR *v; ARRAY *a; ARRAY_ELEMENT *ae; register int i; char *t, tbuf[INT_STRLEN_BOUND(int) + 1]; v = find_variable ("PIPESTATUS"); if (v == 0) v = make_new_array_variable ("PIPESTATUS"); if (array_p (v) == 0) return; /* Do no...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
285,522,204,075,021,400,000,000,000,000,000,000,000
62
commit bash-20120224 snapshot
xmlSchemaPValAttr(xmlSchemaParserCtxtPtr ctxt, xmlSchemaBasicItemPtr ownerItem, xmlNodePtr ownerElem, const char *name, xmlSchemaTypePtr type, const xmlChar **value) { xmlAttrPtr attr; if ((ctxt == NULL) || (type == NULL)) { if (value != NULL) *value = NULL; ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
210,432,567,698,234,200,000,000,000,000,000,000,000
33
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
ZEND_VM_HOT_HANDLER(63, ZEND_RECV, NUM, UNUSED|CACHE_SLOT) { USE_OPLINE uint32_t arg_num = opline->op1.num; if (UNEXPECTED(arg_num > EX_NUM_ARGS())) { SAVE_OPLINE(); zend_missing_arg_error(execute_data); HANDLE_EXCEPTION(); } else { zval *param = EX_VAR(opline->result.var); SAVE_OPLINE(); if (UNEXPECT...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
250,680,822,892,631,500,000,000,000,000,000,000,000
20
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
uint64_to_str_back_len(char *ptr, guint64 value, int len) { char *new_ptr; new_ptr = uint64_to_str_back(ptr, value); /* substract from len number of generated characters */ len -= (int)(ptr - new_ptr); /* pad remaining with '0' */ while (len > 0) { *(--new_ptr) = '0'; len--; } return new_ptr; }
0
[ "CWE-125" ]
wireshark
d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1
221,749,908,945,827,070,000,000,000,000,000,000,000
18
epan: Limit our bits in decode_bits_in_field. Limit the number of bits we process in decode_bits_in_field, otherwise we'll overrun our buffer. Fixes #16958.
BGD_DECLARE(gdImagePtr) gdImageCropAuto(gdImagePtr im, const unsigned int mode) { const int width = gdImageSX(im); const int height = gdImageSY(im); int x,y; int color, match; gdRect crop; crop.x = 0; crop.y = 0; crop.width = 0; crop.height = 0; switch (mode) { case GD_CROP_TRANSPARENT: color = gdImageG...
0
[ "CWE-20" ]
libgd
1ccfe21e14c4d18336f9da8515cd17db88c3de61
256,490,558,138,512,800,000,000,000,000,000,000,000
87
fix php 72494, invalid color index not handled, can lead to crash
static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv) { int i; for (i = 0; i < s->nb_streams; i++) { MXFTrack *track = s->streams[i]->priv_data; /* SMPTE 379M 7.3 */ if (!memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number))) ...
0
[ "CWE-703" ]
FFmpeg
f173cdfe669556aa92857adafe60cbe5f2aa1210
76,778,385,351,651,800,000,000,000,000,000,000,000
13
avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array() Fixes: 20170829A.mxf Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com> Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 900f39692ca0337a98a7cf047e4e2611071810c...
static void rw_interrupt(void) { int eoc; int ssize; int heads; int nr_sectors; if (R_HEAD >= 2) { /* some Toshiba floppy controllers occasionnally seem to * return bogus interrupts after read/write operations, which * can be recognized by a bad head number (>= 2) */ return; } if (!DRS->first_read_da...
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
77,550,589,896,831,120,000,000,000,000,000,000,000
92
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
static double mp_da_remove(_cimg_math_parser& mp) { mp_check_list(mp,"da_remove"); const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); CImg<T> &img = mp.imglist[ind]; int siz = img?(int)img[img._height - 1]:0; if (img && (img._width!=1 || i...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
171,392,702,330,612,120,000,000,000,000,000,000,000
32
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int af_get_page_raw(AFFILE *af,int64_t pagenum,uint32_t *arg, unsigned char *data,size_t *bytes) { char segname[AF_MAX_NAME_LEN]; memset(segname,0,sizeof(segname)); sprintf(segname,AF_PAGE,pagenum); int r = af_get_seg(af,segname,arg,data,bytes); if(r < 0 && errno == ENOENT) { /* Couldn't...
0
[ "CWE-20", "CWE-295" ]
AFFLIBv3
435a2ca802358a3debb6d164d2c33049131df81c
321,429,339,600,135,020,000,000,000,000,000,000,000
20
Sanity check size passed to malloc... Add sanity check before calling malloc in af_get_page() function to avoid undefined behavior (e.g., seg fault) when dealing with a corrupt AFF image with an invalid pagesize. Issue found by Luis Rocha (luiscrocha@gmail.com).
compile_range_repeat_node(QuantNode* qn, int target_len, int emptiness, regex_t* reg, ScanEnv* env) { int r; int num_repeat = reg->num_repeat++; r = add_op(reg, qn->greedy ? OP_REPEAT : OP_REPEAT_NG); if (r != 0) return r; COP(reg)->repeat.id = num_repeat; COP(reg)->repeat.addr...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
159,700,968,136,810,490,000,000,000,000,000,000,000
25
#207: Out-of-bounds write
uint8 subselect_single_select_engine::uncacheable() { return select_lex->uncacheable; }
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
173,032,464,561,170,270,000,000,000,000,000,000,000
4
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...
int yyparse (void *yyscanner, HEX_LEX_ENVIRONMENT *lex_env) { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ YY_INITIAL_VALUE (static YYSTYPE yyval_default;) YYSTYPE yylval YY_...
1
[ "CWE-674", "CWE-787" ]
yara
10e8bd3071677dd1fa76beeef4bc2fc427cea5e7
1,882,100,023,184,426,800,000,000,000,000,000,000
808
Fix issue #674 for hex strings.
static int __init netback_init(void) { int rc = 0; if (!xen_domain()) return -ENODEV; if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) { pr_info("fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n", fatal_skb_slots, XEN_NETBK_LEGACY_SLOTS_MAX); fatal_skb_slots = XEN_NETBK_LEGACY...
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
144,878,647,286,001,960,000,000,000,000,000,000,000
24
xen-netback: disable rogue vif in kthread context When netback discovers frontend is sending malformed packet it will disables the interface which serves that frontend. However disabling a network interface involving taking a mutex which cannot be done in softirq context, so we need to defer this process to kthread c...
static int vmx_sync_pir_to_irr(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); int max_irr; bool got_posted_interrupt; if (KVM_BUG_ON(!enable_apicv, vcpu->kvm)) return -EIO; if (pi_test_on(&vmx->pi_desc)) { pi_clear_on(&vmx->pi_desc); /* * IOMMU can write to PID.ON, so the barrier matters ...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
73,963,167,727,623,080,000,000,000,000,000,000,000
45
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
int snd_timer_pause(struct snd_timer_instance * timeri) { return _snd_timer_stop(timeri, 0, SNDRV_TIMER_EVENT_PAUSE); }
1
[]
linux
c3b1681375dc6e71d89a3ae00cc3ce9e775a8917
309,753,732,038,942,100,000,000,000,000,000,000,000
4
ALSA: timer: Code cleanup This is a minor code cleanup without any functional changes: - Kill keep_flag argument from _snd_timer_stop(), as all callers pass only it false. - Remove redundant NULL check in _snd_timer_stop(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
static size_t h2s_frt_make_resp_headers(struct h2s *h2s, const struct buffer *buf, size_t ofs, size_t max) { struct http_hdr list[MAX_HTTP_HDR]; struct h2c *h2c = h2s->h2c; struct h1m *h1m = &h2s->h1m; struct buffer outbuf; union h1_sl sl; int es_now = 0; int ret = 0; int hdr; if (h2c_mux_busy(h2c, h2s)) { ...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
327,320,852,812,995,240,000,000,000,000,000,000,000
164
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
set_uri_encoding (struct iri *i, const char *charset, bool force) { DEBUGP (("URI encoding = %s\n", charset ? quote (charset) : "None")); if (!force && opt.encoding_remote) return; if (i->uri_encoding) { if (charset && !c_strcasecmp (i->uri_encoding, charset)) return; xfree (i->uri_enc...
0
[ "CWE-787" ]
wget
692d5c5215de0db482c252492a92fc424cc6a97c
52,097,918,642,383,700,000,000,000,000,000,000,000
14
Fix a buffer overflow vulnerability * src/iri.c(do_conversion): Reallocate the output buffer to a larger size if it is already full
void SSL::order_error() { SetError(out_of_order); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
75,819,478,380,823,570,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
cmd_spec_regex_type (const char *com, const char *val, void *place_ignored _GL_UNUSED) { static const struct decode_item choices[] = { { "posix", regex_type_posix }, #ifdef HAVE_LIBPCRE { "pcre", regex_type_pcre }, #endif }; int regex_type = regex_type_posix; int ok = decode_string (val, choices, count...
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
61,553,663,475,024,720,000,000,000,000,000,000,000
15
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
gdk_pixbuf_loader_new_with_type (const char *image_type, GError **error) { GdkPixbufLoader *retval; GError *tmp; retval = g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL); tmp = NULL; gdk_pixbuf_loader_load_module(retval, image_type, &tmp); if (tmp != NULL) { g_p...
0
[ "CWE-20" ]
gdk-pixbuf
3bac204e0d0241a0d68586ece7099e6acf0e9bea
181,991,837,125,833,670,000,000,000,000,000,000,000
19
Initial stab at getting the focus code to work. Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_c...
const char *am_add_cr(request_rec *r, const char *str) { char *output; const char *cp; apr_size_t xlen; apr_size_t i; xlen = 0; for (cp = str; *cp; cp++) if (*cp == '\n') xlen++; output = apr_palloc(r->pool, strlen(str) + xlen + 1); i = 0; for (cp = str; *cp; ...
0
[ "CWE-200" ]
mod_auth_mellon
47a767d5f37d1d3a1c004abbf8bb80d1b7eab328
148,220,702,982,625,530,000,000,000,000,000,000,000
26
Ensure that all generated session IDs are cryptographically strong. We used to call RAND_pseudo_bytes, which will generate cryptographically strong random bytes in most cases. Under memory pressure or other error conditions, it can return weak random bytes. It is unlikely that there is a way for an attacker to set up...
static void remove_port_data(struct port *port) { spin_lock_irq(&port->inbuf_lock); /* Remove unused data this port might have received. */ discard_port_data(port); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_buffers(port); spin_unlock_irq(&port->outvq_lock); }
0
[ "CWE-120" ]
linux
d00d8da5869a2608e97cfede094dfc5e11462a46
99,874,402,224,937,000,000,000,000,000,000,000,000
11
virtio_console: Assure used length from device is limited The buf->len might come from an untrusted device. This ensures the value would not exceed the size of the buffer to avoid data corruption or loss. Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://lore...
connection_remove_done (NMExportedConnection *exported, gboolean success, gpointer user_data) { if (success) { NMConnectionList *list = (NMConnectionList *) user_data; /* Close any open editor windows for this connection */ g_hash_table_remove (list->editors, exported); } }
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
43,827,422,914,084,365,000,000,000,000,000,000,000
11
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
u32 gf_isom_ctrn_field_size_bits(u32 field_idx) { if (field_idx==3) return 32; return field_idx*8; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
50,429,299,443,641,700,000,000,000,000,000,000,000
5
fixed #2255
network_connect_gnutls_handshake_timer_cb (void *arg_hook_connect, int remaining_calls) { struct t_hook *hook_connect; /* make C compiler happy */ (void) remaining_calls; hook_connect = (struct t_hook *)arg_hook_connect; HOOK_CONNECT(hook_con...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
215,259,950,812,461,940,000,000,000,000,000,000,000
22
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
void set_default_field(Field *field) { m_default_field= field; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
264,380,981,565,446,760,000,000,000,000,000,000,000
1
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
radix__arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; struct vm_unmapped_area_info info; if (unlikely(addr > mm->context.addr_limit && mm->context.add...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
229,784,900,387,875,300,000,000,000,000,000,000,000
38
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
previously_transported(address_item *addr, BOOL testing) { (void)string_format(big_buffer, big_buffer_size, "%s/%s", addr->unique + (testflag(addr, af_homonym)? 3:0), addr->transport->name); if (tree_search(tree_nonrecipients, big_buffer) != 0) { DEBUG(D_deliver|D_route|D_transport) debug_printf("%s was prev...
0
[ "CWE-78" ]
exim
d740d2111f189760593a303124ff6b9b1f83453d
199,163,671,065,979,860,000,000,000,000,000,000,000
16
Fix CVE-2019-10149
static void scsi_disk_register_types(void) { type_register_static(&scsi_disk_base_info); type_register_static(&scsi_hd_info); type_register_static(&scsi_cd_info); #ifdef __linux__ type_register_static(&scsi_block_info); #endif }
0
[ "CWE-193" ]
qemu
b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8
36,763,506,136,844,520,000,000,000,000,000,000,000
9
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands This avoids an off-by-one read of 'mode_sense_valid' buffer in hw/scsi/scsi-disk.c:mode_sense_page(). Fixes: CVE-2021-3930 Cc: qemu-stable@nongnu.org Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa...
void macio_ide_init_drives(MACIOIDEState *s, DriveInfo **hd_table) { int i; for (i = 0; i < 2; i++) { if (hd_table[i]) { ide_create_drive(&s->bus, i, hd_table[i]); } } }
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
250,598,385,775,580,500,000,000,000,000,000,000,000
10
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...