func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void audit_free_rule_rcu(struct rcu_head *head) { struct audit_entry *e = container_of(head, struct audit_entry, rcu); audit_free_rule(e); }
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
244,682,505,317,071,120,000,000,000,000,000,000,000
5
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
ConnStateData::requestTimeout(const CommTimeoutCbParams &io) { if (!Comm::IsConnOpen(io.conn)) return; const err_type error = receivedFirstByte_ ? ERR_REQUEST_PARSE_TIMEOUT : ERR_REQUEST_START_TIMEOUT; if (tunnelOnError(HttpRequestMethod(), error)) return; /* * Just close the conne...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
328,295,370,473,534,700,000,000,000,000,000,000,000
20
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
StatusWith<Message> MessageCompressorManager::decompressMessage(const Message& msg) { auto inputHeader = msg.header(); ConstDataRangeCursor input(inputHeader.data(), inputHeader.data() + inputHeader.dataLen()); if (input.length() < CompressionHeader::size()) { return {ErrorCodes::BadValue, "Invalid ...
0
[]
mongo
5ad69b851801edadbfde8fdf271f4ba7c21170b5
243,594,505,339,444,900,000,000,000,000,000,000,000
42
SERVER-31273 Use Source/Sink version of snappy functions (cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99)
int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon) { int rc; struct validate_negotiate_info_req *pneg_inbuf; struct validate_negotiate_info_rsp *pneg_rsp = NULL; u32 rsplen; u32 inbuflen; /* max of 4 dialects */ cifs_dbg(FYI, "validate negotiate\n"); /* In SMB3.11 preauth integrity sup...
0
[ "CWE-416", "CWE-200" ]
linux
6a3eb3360667170988f8a6477f6686242061488a
153,200,147,451,048,930,000,000,000,000,000,000,000
131
cifs: Fix use-after-free in SMB2_write There is a KASAN use-after-free: BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580 Read of size 8 at addr ffff8880b6a8e450 by task ln/4196 Should not release the 'req' because it will use in the trace. Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de...
static gboolean io_watch_poll_check(GSource *source) { return FALSE; }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
235,178,584,935,440,370,000,000,000,000,000,000,000
4
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static NEGOTIATE_CONTEXT* negotiate_ContextNew(NEGOTIATE_CONTEXT* init_context) { NEGOTIATE_CONTEXT* context = NULL; WINPR_ASSERT(init_context); context = calloc(1, sizeof(NEGOTIATE_CONTEXT)); if (!context) return NULL; if (init_context->spnego) { init_context->mechTypes.pvBuffer = malloc(init_context->mec...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
321,510,592,781,620,600,000,000,000,000,000,000,000
24
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
static int get_part_id_hash(uint num_parts, Item *part_expr, uint32 *part_id, longlong *func_value) { longlong int_hash_id; DBUG_ENTER("get_part_id_hash"); if (part_val_int(part_expr, func_value)) DBUG_RETURN(HA_ERR_NO_PARTIT...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
26,163,217,555,157,290,000,000,000,000,000,000,000
16
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
TEST(FormatTest, Enum) { EXPECT_EQ("0", fmt::format("{}", A)); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
62,930,322,863,953,800,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
static int gre_rcv(struct sk_buff *skb) { struct tnl_ptk_info tpi; bool csum_err = false; int hdr_len; hdr_len = gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IPV6), 0); if (hdr_len < 0) goto drop; if (iptunnel_pull_header(skb, hdr_len, tpi.proto, false)) goto drop; if (ip6gre_rcv(skb, &tpi) == PACKE...
0
[ "CWE-125" ]
net
7892032cfe67f4bde6fc2ee967e45a8fbaf33756
46,749,640,995,692,180,000,000,000,000,000,000,000
21
ip6_gre: fix ip6gre_err() invalid reads Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6 headers. Let's use a "struct ...
static int open_cred_file(char *file_name, struct parsed_mount_info *parsed_info) { char *line_buf = NULL; char *temp_val = NULL; FILE *fs = NULL; int i; const int line_buf_size = 4096; const int min_non_white = 10; i = toggle_dac_capability(0, 1); if (i) goto return_i; i = access(file_name, R_OK); if ...
0
[ "CWE-20" ]
cifs-utils
f6eae44a3d05b6515a59651e6bed8b6dde689aec
148,856,344,709,319,200,000,000,000,000,000,000,000
84
mtab: handle ENOSPC/EFBIG condition properly when altering mtab It's possible that when mount.cifs goes to append the mtab that there won't be enough space to do so, and the mntent won't be appended to the file in its entirety. Add a my_endmntent routine that will fflush and then fsync the FILE if that succeeds. If e...
static uint32_t tulip_csr9_read(TULIPState *s) { if (s->csr[9] & CSR9_SR) { if (eeprom93xx_read(s->eeprom)) { s->csr[9] |= CSR9_SR_DO; } else { s->csr[9] &= ~CSR9_SR_DO; } } tulip_mii(s); return s->csr[9]; }
0
[ "CWE-787" ]
qemu
8ffb7265af64ec81748335ec8f20e7ab542c3850
85,747,670,974,165,900,000,000,000,000,000,000,000
13
net: tulip: check frame size and r/w data length Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-...
static void http_vlog(const char *fmt, va_list vargs) { static int print_prefix = 1; char buf[32]; if (!logfile) return; if (print_prefix) { ctime1(buf, sizeof(buf)); fprintf(logfile, "%s ", buf); } print_prefix = strstr(fmt, "\n") != NULL; vfprintf(logfile, fmt, va...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
207,231,519,927,393,200,000,000,000,000,000,000,000
16
ffserver: Check chunk size Fixes out of array access Fixes: poc_ffserver.py Found-by: Paul Cher <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { struct sock *sk = sock->sk; long amount = 0; int err; switch (cmd) { case SIOCOUTQ: amount = unix_outq_len(sk); err = put_user(amount, (int __user *)arg); break; case SIOCINQ: amount = unix_inq_len(sk); if (amount < 0) ...
0
[ "CWE-287", "CWE-284" ]
linux
e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
245,224,483,567,628,500,000,000,000,000,000,000,000
24
af_netlink: force credentials passing [CVE-2012-3520] Pablo Neira Ayuso discovered that avahi and potentially NetworkManager accept spoofed Netlink messages because of a kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data to the receiver if the sender did not provide such data, instead of not includ...
append_entry_w(wchar_t **wp, const wchar_t *prefix, int type, int tag, int flags, const wchar_t *wname, int perm, int id) { int i; if (prefix != NULL) { wcscpy(*wp, prefix); *wp += wcslen(*wp); } switch (tag) { case ARCHIVE_ENTRY_ACL_USER_OBJ: wname = NULL; id = -1; if ((type & ARCHIVE_ENTRY_ACL_TYP...
0
[ "CWE-476" ]
libarchive
15bf44fd2c1ad0e3fd87048b3fcc90c4dcff1175
146,342,427,260,385,800,000,000,000,000,000,000,000
112
Skip 0-length ACL fields Currently, it is possible to create an archive that crashes bsdtar with a malformed ACL: Program received signal SIGSEGV, Segmentation fault. archive_acl_from_text_l (acl=<optimised out>, text=0x7e2e92 "", want_type=<optimised out>, sc=<optimised out>) at libarchive/archive_acl.c:1726 1726 ...
bool Item_field::fix_fields(THD *thd, Item **reference) { DBUG_ASSERT(fixed == 0); Field *from_field= (Field *)not_found_field; bool outer_fixed= false; SELECT_LEX *select= thd->lex->current_select; if (select && select->in_tvc) { my_error(ER_FIELD_REFERENCE_IN_TVC, MYF(0), full_name()); return(1);...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
276,802,489,560,719,040,000,000,000,000,000,000,000
260
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...
const char *gf_avc_hevc_get_chroma_format_name(u8 chroma_format) { switch (chroma_format) { case 1: return "YUV 4:2:0"; case 2: return "YUV 4:2:2"; case 3: return "YUV 4:4:4"; default: return "Unknown"; } }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
160,855,325,302,716,550,000,000,000,000,000,000,000
13
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static void calc_matrix(double mat[4][4], const double *mat_freq, const int *index) { for (int i = 0; i < 4; ++i) { mat[i][i] = mat_freq[2 * index[i]] + 3 * mat_freq[0] - 4 * mat_freq[index[i]]; for (int j = i + 1; j < 4; ++j) mat[i][j] = mat[j][i] = mat_freq[index[i] + i...
0
[ "CWE-119", "CWE-787" ]
libass
08e754612019ed84d1db0d1fc4f5798248decd75
102,034,867,088,279,780,000,000,000,000,000,000,000
28
Fix blur coefficient calculation buffer overflow Found by fuzzer test case id:000082,sig:11,src:002579,op:havoc,rep:8. Correctness should be checked, but this fixes the overflow for good.
static void do_check(QPDF& pdf, Options& o, int& exit_code) { // Code below may set okay to false but not to true. // We assume okay until we prove otherwise but may // continue to perform additional checks after finding // errors. bool okay = true; std::cout << "checking " << o.infilename << st...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
318,744,780,950,402,530,000,000,000,000,000,000,000
90
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
nautilus_file_get_date_as_string (NautilusFile *file, NautilusDateType date_type) { return nautilus_file_fit_date_as_string (file, date_type, 0, NULL, NULL, NULL); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
12,149,552,363,290,464,000,000,000,000,000,000,000
5
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
uint pack_length_from_metadata(uint field_metadata) { DBUG_PRINT("debug", ("field_metadata: 0x%04x", field_metadata)); if (field_metadata == 0) return row_pack_length(); return (((field_metadata >> 4) & 0x300) ^ 0x300) + (field_metadata & 0x00ff); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
54,249,206,940,444,330,000,000,000,000,000,000,000
7
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...
static int bond_ioctl_change_active(struct net_device *bond_dev, struct net_device *slave_dev) { struct bonding *bond = netdev_priv(bond_dev); struct slave *old_active = NULL; struct slave *new_active = NULL; int res = 0; if (!USES_PRIMARY(bond->params.mode)) return -EINVAL; /* Verify that master_dev is indee...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
207,451,289,751,806,960,000,000,000,000,000,000,000
46
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static noinline void submit_compressed_extents(struct inode *inode, struct async_cow *async_cow) { struct async_extent *async_extent; u64 alloc_hint = 0; struct btrfs_key ins; struct extent_map *em; struct btrfs_root *root = BTRFS_I(inode)->root; struct extent_map_tree *em_tree = &BTRFS_I(inode)->exten...
0
[ "CWE-200" ]
linux
0305cd5f7fca85dae392b9ba85b116896eb7c1c7
171,533,018,104,805,640,000,000,000,000,000,000,000
198
Btrfs: fix truncation of compressed and inlined extents When truncating a file to a smaller size which consists of an inline extent that is compressed, we did not discard (or made unusable) the data between the new file size and the old file size, wasting metadata space and allowing for the truncated data to be leaked...
static OPJ_BOOL opj_j2k_need_nb_tile_parts_correction(opj_stream_private_t *p_stream, OPJ_UINT32 tile_no, OPJ_BOOL* p_correction_needed, opj_event_mgr_t * p_manager) { OPJ_BYTE l_header_data[10]; OPJ_OFF_T l_stream_pos_backup; OPJ_UINT32 l_current_marker; OPJ_UINT32 l_marker_size; ...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
186,588,079,958,234,840,000,000,000,000,000,000,000
107
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
Bool gf_filter_forward_gf_event(GF_Filter *filter, GF_Event *evt, Bool consumed, Bool skip_user) { if (!filter) return GF_FALSE; return gf_fs_forward_gf_event(filter->session, evt, consumed, skip_user); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
129,371,250,276,832,600,000,000,000,000,000,000,000
6
fixed crashes for very long path - cf #1908
static const char *arcmsr_info(struct Scsi_Host *host) { struct AdapterControlBlock *acb = (struct AdapterControlBlock *) host->hostdata; static char buf[256]; char *type; int raid6 = 1; switch (acb->pdev->device) { case PCI_DEVICE_ID_ARECA_1110: case PCI_DEVICE_ID_ARECA_1200: case PCI_DEVICE_ID_ARECA_1202: ...
0
[ "CWE-119", "CWE-787" ]
linux
7bc2b55a5c030685b399bb65b6baa9ccc3d1f167
34,126,629,825,999,270,000,000,000,000,000,000,000
44
scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer() We need to put an upper bound on "user_len" so the memcpy() doesn't overflow. Cc: <stable@vger.kernel.org> Reported-by: Marco Grassi <marco.gra@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Sig...
static uint32 get_pai_entry_val(struct pai_entry *paie) { switch (paie->owner_type) { case UID_ACE: DEBUG(10,("get_pai_entry_val: uid = %u\n", (unsigned int)paie->unix_ug.uid )); return (uint32)paie->unix_ug.uid; case GID_ACE: DEBUG(10,("get_pai_entry_val: gid = %u\n", (unsigned int)paie->unix_ug.gid )); ...
0
[ "CWE-264" ]
samba
d6c28913f3109d1327a3d1369b6eafd3874b2dca
114,469,199,296,106,260,000,000,000,000,000,000,000
15
Bug 6488: acl_group_override() call in posix acls references an uninitialized variable. (cherry picked from commit f92195e3a1baaddda47a5d496f9488c8445b41ad)
static inline void hci_dev_put(struct hci_dev *d) { BT_DBG("%s orig refcnt %d", d->name, kref_read(&d->dev.kobj.kref)); put_device(&d->dev); }
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
277,559,195,802,082,570,000,000,000,000,000,000,000
7
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
void __init intel_ds_init(void) { /* * No support for 32bit formats */ if (!boot_cpu_has(X86_FEATURE_DTES64)) return; x86_pmu.bts = boot_cpu_has(X86_FEATURE_BTS); x86_pmu.pebs = boot_cpu_has(X86_FEATURE_PEBS); x86_pmu.pebs_buffer_size = PEBS_BUFFER_SIZE; if (x86_pmu.version <= 4) x86_pmu.pebs_no_isolati...
0
[ "CWE-755" ]
linux
d88d05a9e0b6d9356e97129d4ff9942d765f46ea
72,452,098,372,626,750,000,000,000,000,000,000,000
92
perf/x86/intel: Fix a crash caused by zero PEBS status A repeatable crash can be triggered by the perf_fuzzer on some Haswell system. https://lore.kernel.org/lkml/7170d3b-c17f-1ded-52aa-cc6d9ae999f4@maine.edu/ For some old CPUs (HSW and earlier), the PEBS status in a PEBS record may be mistakenly set to 0. To minimiz...
initable_iface_init (GInitableIface *initable_iface) { initable_iface->init = gxps_archive_initable_init; }
0
[ "CWE-125" ]
libgxps
b458226e162fe1ffe7acb4230c114a52ada5131b
166,398,464,051,840,530,000,000,000,000,000,000,000
4
gxps-archive: Ensure gxps_archive_read_entry() fills the GError in case of failure And fix the callers to not overwrite the GError.
int FS_FOpenFileByMode( const char *qpath, fileHandle_t *f, fsMode_t mode ) { int r; qboolean sync; sync = qfalse; switch( mode ) { case FS_READ: r = FS_FOpenFileRead( qpath, f, qtrue ); break; case FS_WRITE: *f = FS_FOpenFileWrite( qpath ); r = 0; if (*f == 0) { r = -1; } break; ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
5,396,254,069,434,445,000,000,000,000,000,000,000
47
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static inline bool ext4_is_quota_file(struct inode *inode) { return IS_NOQUOTA(inode) && !(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL);
0
[ "CWE-787" ]
linux
c37e9e013469521d9adb932d17a1795c139b36db
50,616,110,513,669,490,000,000,000,000,000,000,000
5
ext4: add more inode number paranoia checks If there is a directory entry pointing to a system inode (such as a journal inode), complain and declare the file system to be corrupted. Also, if the superblock's first inode number field is too small, refuse to mount the file system. This addresses CVE-2018-10882. https...
void fli_write_lc(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf) { unsigned long chunkpos; s_fli_chunk chunk; unsigned short yc, firstline, numline, lastline; unsigned char *linebuf, *old_linebuf; chunkpos=ftell(f); fseek(f, chunkpos+6, SEEK_SET); /* first check, how m...
0
[ "CWE-787" ]
GIMP
edb251a7ef1602d20a5afcbf23f24afb163de63b
255,974,586,650,916,800,000,000,000,000,000,000,000
86
Bug 739133 - (CVE-2017-17785) Heap overflow while parsing FLI files. It is possible to trigger a heap overflow while parsing FLI files. The RLE decoder is vulnerable to out of boundary writes due to lack of boundary checks. The variable "framebuf" points to a memory area which was allocated with fli_header->width * f...
virDomainGraphicsDefFormat(virBufferPtr buf, virDomainGraphicsDefPtr def, unsigned int flags) { virDomainGraphicsListenDefPtr glisten = virDomainGraphicsGetListen(def, 0); const char *type = virDomainGraphicsTypeToString(def->type); bool children = false...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
224,087,379,368,879,950,000,000,000,000,000,000,000
306
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
hostnames_matching (text) char *text; { register int i, len, nmatch, rsize; char **result; if (hostname_list_initialized == 0) initialize_hostname_list (); if (hostname_list_initialized == 0) return ((char **)NULL); /* Special case. If TEXT consists of nothing, then the whole list is wha...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
333,536,732,949,905,100,000,000,000,000,000,000,000
44
Bash-4.4 patch 7
QPDFPageDocumentHelper::flattenAnnotationsForPage( QPDFPageObjectHelper& page, QPDFObjectHandle& resources, QPDFAcroFormDocumentHelper& afdh, int required_flags, int forbidden_flags) { bool need_appearances = afdh.getNeedAppearances(); std::vector<QPDFAnnotationObjectHelper> annots = page.ge...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
140,718,974,662,967,920,000,000,000,000,000,000,000
112
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 ...
l2tp_proxy_auth_type_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, "%s", tok2str(l2tp_authentype2str, "AuthType-#%u", EXTRACT_16BITS(ptr)))); }
0
[ "CWE-125", "CWE-787" ]
tcpdump
cc4a7391c616be7a64ed65742ef9ed3f106eb165
262,691,072,362,024,670,000,000,000,000,000,000,000
11
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 updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros) { hash->val[wpos] = (int)hashval; if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval]; hash->head[hashval] = wpos; hash->zeros[wpos] = numzeros; if(hash->headz[numzeros] != -1) hash->chainz[wpos]...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
104,094,907,047,277,620,000,000,000,000,000,000,000
10
Fixed #5645: realloc return handling
static inline int oo_order(struct kmem_cache_order_objects x) { return x.x >> 16; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
133,442,675,601,144,710,000,000,000,000,000,000,000
4
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static int smack_sem_alloc_security(struct sem_array *sma) { struct kern_ipc_perm *isp = &sma->sem_perm; isp->security = current_security(); return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
132,572,170,416,333,050,000,000,000,000,000,000,000
7
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
int iwch_ep_disconnect(struct iwch_ep *ep, int abrupt, gfp_t gfp) { int ret=0; unsigned long flags; int close = 0; int fatal = 0; struct t3cdev *tdev; struct cxio_rdev *rdev; spin_lock_irqsave(&ep->com.lock, flags); PDBG("%s ep %p state %s, abrupt %d\n", __func__, ep, states[ep->com.state], abrupt); t...
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
229,781,866,165,227,500,000,000,000,000,000,000,000
70
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
HttpHeader::has(Http::HdrType id) const { assert(any_registered_header(id)); debugs(55, 9, this << " lookup for " << id); return CBIT_TEST(mask, id); }
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
41,972,168,203,686,860,000,000,000,000,000,000,000
6
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
uint Item::decimal_precision() const { Item_result restype= result_type(); if ((restype == DECIMAL_RESULT) || (restype == INT_RESULT)) { uint prec= my_decimal_length_to_precision(max_char_length(), decimals, unsigned_flag); return MY_MIN(prec, DECIMAL_MAX_PRECI...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
73,746,987,459,297,600,000,000,000,000,000,000,000
20
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
tty_cmd_clearline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; u_int nx; tty_default_attributes(tty, wp, ctx->bg); nx = screen_size_x(wp->screen); tty_clear_pane_line(tty, ctx, ctx->ocy, 0, nx, ctx->bg); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
60,139,064,532,149,595,000,000,000,000,000,000,000
10
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
R_API RList *r_core_anal_fcn_get_calls(RCore *core, RAnalFunction *fcn) { RAnalRef *refi; RListIter *iter, *iter2; // get all references from this function RList *refs = r_anal_function_get_refs (fcn); // sanity check if (!r_list_empty (refs)) { // iterate over all the references and remove these which aren't ...
0
[ "CWE-416" ]
radare2
10517e3ff0e609697eb8cde60ec8dc999ee5ea24
92,091,979,235,313,880,000,000,000,000,000,000,000
17
aaef on arm/thumb switches causes uaf ##crash * Reported by peacock-doris via huntr.dev * Reproducer: poc_uaf_r_reg_get
parser_check_left_hand_side_expression (parser_context_t *context_p, /**< context */ uint16_t opcode) /**< opcode to check */ { if (opcode == CBC_PUSH_LITERAL && context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL) { context_p->last_cbc_opcode = PARSER_CBC_UNAVA...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
122,536,473,930,165,770,000,000,000,000,000,000,000
43
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
int setup_tests(void) { #ifndef OPENSSL_NO_DEPRECATED_3_0 ADD_TEST(test_long_32bit); ADD_TEST(test_long_64bit); #endif ADD_TEST(test_int32); ADD_TEST(test_uint32); ADD_TEST(test_int64); ADD_TEST(test_uint64); return 1; }
1
[ "CWE-476" ]
openssl
22b88fc9c0e22545401c0b34d24843883ea73fec
286,805,226,998,210,640,000,000,000,000,000,000,000
12
Add a test for encoding/decoding using an invalid ASN.1 Template If you have a CHOICE type that it must use explicit tagging - otherwise the template is invalid. We add tests for this. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
static cac_private_data_t *cac_new_private_data(void) { cac_private_data_t *priv; priv = calloc(1, sizeof(cac_private_data_t)); if (!priv) return NULL; list_init(&priv->pki_list); list_attributes_comparator(&priv->pki_list, cac_list_compare_path); list_attributes_copy(&priv->pki_list, cac_list_meter, 1); list_...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
82,535,689,531,037,855,000,000,000,000,000,000,000
16
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
pre_config_init(ngx_conf_t *cf) { char *error_message; shutdown_watchdog(); ngx_memzero(&passenger_main_conf, sizeof(passenger_main_conf_t)); pp_schema_string.data = (u_char *) "passenger:"; pp_schema_string.len = sizeof("passenger:") - 1; pp_placeholder_upstream_address.data = (u_char *) "un...
0
[ "CWE-362" ]
passenger
207870f5b7f5cc240587ab0977d6046782ae1d86
84,929,119,880,148,380,000,000,000,000,000,000,000
23
Fix privilege escalation in the Nginx module The vulnerability is exploitable with a non-standard passenger_instance_registry_dir, via a race condition where after a file was created, it was chowned via the path not the file descriptor. The chown entered the code in 2010, so Passenger 4 + 5 all affected.
void Monitor::handle_mon_get_map(MonOpRequestRef op) { MMonGetMap *m = static_cast<MMonGetMap*>(op->get_req()); dout(10) << "handle_mon_get_map" << dendl; send_latest_monmap(m->get_connection().get()); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
227,694,505,905,904,160,000,000,000,000,000,000,000
6
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static ssize_t aio_fsync(struct kiocb *iocb) { struct file *file = iocb->ki_filp; ssize_t ret = -EINVAL; if (file->f_op->aio_fsync) ret = file->f_op->aio_fsync(iocb, 0); return ret; }
0
[ "CWE-190" ]
linux-2.6
75e1c70fc31490ef8a373ea2a4bea2524099b478
302,432,422,808,103,800,000,000,000,000,000,000,000
9
aio: check for multiplication overflow in do_io_submit Tavis Ormandy pointed out that do_io_submit does not do proper bounds checking on the passed-in iocb array:        if (unlikely(nr < 0))                return -EINVAL;        if (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(iocbpp)))))                retu...
iakerb_is_iakerb_token(const gss_buffer_t token) { krb5_error_code code; unsigned int bodysize = token->length; unsigned char *ptr = token->value; code = g_verify_token_header(gss_mech_iakerb, &bodysize, &ptr, IAKERB_TOK_PROXY, ...
0
[ "CWE-18" ]
krb5
e04f0283516e80d2f93366e0d479d13c9b5c8c2a
234,962,517,300,939,350,000,000,000,000,000,000,000
13
Fix IAKERB context aliasing bugs [CVE-2015-2696] The IAKERB mechanism currently replaces its context handle with the krb5 mechanism handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations for...
static void vhost_scsi_hotunplug(struct vhost_scsi_tpg *tpg, struct se_lun *lun) { vhost_scsi_do_plug(tpg, lun, false); }
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
257,178,709,759,716,030,000,000,000,000,000,000,000
4
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
static Policy lossy_client(uint64_t req) { return Policy(true, false, false, false, req); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
43,611,211,216,357,900,000,000,000,000,000,000,000
3
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 ...
struct xt_table_info *xt_alloc_table_info(unsigned int size) { struct xt_table_info *info = NULL; size_t sz = sizeof(*info) + size; /* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */ if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages) return NULL; if (sz <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_...
1
[ "CWE-703", "CWE-189" ]
linux
d157bd761585605b7882935ffb86286919f62ea1
119,349,374,194,035,950,000,000,000,000,000,000,000
20
netfilter: x_tables: check for size overflow Ben Hawkes says: integer overflow in xt_alloc_table_info, which on 32-bit systems can lead to small structure allocation and a copy_from_user based heap corruption. Reported-by: Ben Hawkes <hawkes@google.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by:...
mvfprintf( FILE * fp, const char * fmt, va_list ap ) { #ifndef VSNPRINTF_PERCENT_M char nfmt[256]; #else const char * nfmt = fmt; #endif int errval; /* * Save the error value as soon as possible */ #ifdef SYS_WINNT errval = GetLastError(); if (NO_ERROR == errval) #endif /* SYS_WINNT */ errval = err...
0
[ "CWE-835" ]
ntp
bb928ef08eec020ef6008f3a140702ccc0536b8e
288,006,973,796,915,900,000,000,000,000,000,000,000
29
[TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
X509_NAME *X509_get_issuer_name(const X509 *a) { return a->cert_info.issuer; }
0
[ "CWE-476" ]
openssl
8130d654d1de922ea224fa18ee3bc7262edc39c0
111,523,166,147,640,250,000,000,000,000,000,000,000
4
Fix Null pointer deref in X509_issuer_and_serial_hash() The OpenSSL public API function X509_issuer_and_serial_hash() attempts to create a unique hash value based on the issuer and serial number data contained within an X509 certificate. However it fails to correctly handle any errors that may occur while parsing the ...
int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, int interrupt) { struct hid_report_enum *report_enum = hid->report_enum + type; struct hid_report *report; struct hid_driver *hdrv; unsigned int a; int rsize, csize = size; u8 *cdata = data; int ret = 0; report = hid_get_report(re...
0
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
291,261,286,557,490,450,000,000,000,000,000,000,000
52
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
static int map_lookup_and_delete_elem(union bpf_attr *attr) { void __user *ukey = u64_to_user_ptr(attr->key); void __user *uvalue = u64_to_user_ptr(attr->value); int ufd = attr->map_fd; struct bpf_map *map; void *key, *value; u32 value_size; struct fd f; int err; if (CHECK_ATTR(BPF_MAP_LOOKUP_AND_DELETE_ELEM)...
0
[ "CWE-367" ]
bpf
353050be4c19e102178ccc05988101887c25ae53
156,729,091,936,303,420,000,000,000,000,000,000,000
90
bpf: Fix toctou on read-only map's constant scalar tracking Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is checking whether maps are read-only both from BPF program side and user space side, and then, given their content is constant, reading out their data via map->ops->map_direct_value_ad...
GF_EXPORT GF_Err gf_isom_get_track_switch_group_count(GF_ISOFile *movie, u32 trackNumber, u32 *alternateGroupID, u32 *nb_groups) { GF_UserDataMap *map; GF_TrackBox *trak; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak || !trak->Header) return GF_BAD_PARAM; *alternateGroupID = trak->Header->alte...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
118,464,421,399,056,830,000,000,000,000,000,000,000
16
fixed #1706
void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space, MemoryRegion *address_space_io, bool init_vga_ports) { MemoryRegion *vga_io_memory; const MemoryRegionPortio *vga_ports, *vbe_ports; qemu_register_reset(vga_reset, s); s->bank_offset = 0; s->legacy_address_sp...
0
[ "CWE-200" ]
qemu
c1b886c45dc70f247300f549dce9833f3fa2def5
52,519,761,735,079,970,000,000,000,000,000,000,000
28
vbe: rework sanity checks Plug a bunch of holes in the bochs dispi interface parameter checking. Add a function doing verification on all registers. Call that unconditionally on every register write. That way we should catch everything, even changing one register affecting the valid range of another register. Some ...
static void sdap_ad_tokengroups_initgr_mapping_done(struct tevent_req *subreq) { TALLOC_CTX *tmp_ctx = NULL; struct sdap_ad_tokengroups_initgr_mapping_state *state = NULL; struct tevent_req *req = NULL; struct sss_domain_info *domain = NULL; struct ldb_message *msg = NULL; const char *attrs[] = ...
0
[ "CWE-264" ]
sssd
191d7f7ce3de10d9e19eaa0a6ab3319bcd4ca95d
318,665,037,136,412,160,000,000,000,000,000,000,000
149
AD: process non-posix nested groups using tokenGroups When initgr is performed for AD supporting tokenGroups, do not skip non-posix groups. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit 4932db6258ccfb612a3a28eb6a618c2f042b9d58)
static int rbd_osd_setup_stat(struct ceph_osd_request *osd_req, int which) { struct page **pages; /* * The response data for a STAT call consists of: * le64 length; * struct { * le32 tv_sec; * le32 tv_nsec; * } mtime; */ pages = ceph_alloc_page_vector(1, GFP_NOIO); if (IS_...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
170,403,476,404,388,150,000,000,000,000,000,000,000
22
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
int url_is_local_not_ssh(const char *url) { const char *colon = strchr(url, ':'); const char *slash = strchr(url, '/'); return !colon || (slash && slash < colon) || has_dos_drive_prefix(url); }
1
[ "CWE-706" ]
git
f82a97eb9197c1e3768e72648f37ce0ca3233734
93,761,688,030,965,840,000,000,000,000,000,000,000
7
mingw: handle `subst`-ed "DOS drives" Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path names., 2008-03-05), Git was taught to handle absolute Windows paths, i.e. paths that start with a drive letter and a colon. Unbeknownst to us, while drive letters of physical drives are limited to letters of th...
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_POST_DEC, (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG), ZEND_POST_DEC_LONG_NO_OVERFLOW, CV, ANY) { USE_OPLINE zval *var_ptr; var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); ZVAL_LONG(EX_VAR(opline->result.var), Z_LVAL_P(var_ptr)); Z_LVAL_P(var_ptr)--; ZEND_VM_NEXT_OPCO...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
290,240,012,483,378,170,000,000,000,000,000,000,000
10
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.
static int mov_read_SAND(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; int version; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams - 1]; if (atom.size < 5) { av_log(c->fc, AV_LOG_ERROR, "Empty SAND audio box\n"); return AVERROR_I...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
22,441,052,773,651,064,000,000,000,000,000,000,000
25
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
gx_default_1_sub_decode_color( gx_device * dev, gx_color_index color, gx_color_value cv[1] ) { gx_color_value rgb[3]; int code = dev_proc(dev, map_color_rgb)(dev, color, rgb); cv[0] = gx_max_color_value - rgb[0]; return code; }
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
327,196,327,364,854,830,000,000,000,000,000,000,000
11
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
impl_get_Version (DBusMessageIter * iter, void *user_data) { return droute_return_v_string (iter, atk_get_toolkit_version ()); }
0
[]
at-spi2-atk
e4f3eee2e137cd34cd427875365f458c65458164
191,014,881,307,603,730,000,000,000,000,000,000,000
4
Use XDG_RUNTIME_DIR to hold sockets, and do not make a world-writable dir If we use XDG_RUNTIME_DIR, then the directory should be owned by the appropriate user, so it should not need to be world-writable. Hopefully this won't break accessibility for administrative apps on some distro. https://bugzilla.gnome.org/show_...
inbound_action (session *sess, char *chan, char *from, char *ip, char *text, int fromme, int id, const message_tags_data *tags_data) { session *def = sess; server *serv = sess->server; struct User *user; char nickchar[2] = "\000"; char idtext[64]; int privaction = FALSE; if (!fromme) { if (is_channel (...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
16,241,634,450,522,854,000,000,000,000,000,000,000
93
Clean up handling CAP LS
TEST_P(ProxyingConnectIntegrationTest, ProxyConnectWithPortStripping) { config_helper_.addConfigModifier( [&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) { hcm.set_strip_any_host_port(true); auto* route_config = hcm.mutable_route_co...
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
111,754,645,948,140,540,000,000,000,000,000,000,000
55
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static void OneLine16(struct bmp_progressive_state *context) { int i; guchar *pixels; guchar *src; if (!context->Header.Negative) pixels = (context->pixbuf->pixels + context->pixbuf->rowstride * (context->Header.height - context->Lines - 1)); else pixels = (context->pixbuf->pixels + context->pixbuf-...
0
[]
gdk-pixbuf
779429ce34e439c01d257444fe9d6739e72a2024
111,217,402,715,093,960,000,000,000,000,000,000,000
60
bmp: Detect integer overflow of the line width Instead of risking crashes or OOM, return an error if we detect integer overflow. The commit also includes a test image that triggers this overflow when used with pixbuf-read. https://bugzilla.gnome.org/show_bug.cgi?id=768738
static inline int ext4_is_group_locked(struct super_block *sb, ext4_group_t group) { struct ext4_group_info *grinfo = ext4_get_group_info(sb, group); return bit_spin_is_locked(EXT4_GROUP_INFO_LOCKED_BIT, &(grinfo->bb_state));
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
133,916,057,809,430,350,000,000,000,000,000,000,000
8
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
void ZrtpQueue::srtpSecretsOff(EnableSecurity part) { if (part == ForSender) { removeOutQueueCryptoContext(NULL); removeOutQueueCryptoContextCtrl(NULL); } if (part == ForReceiver) { removeInQueueCryptoContext(NULL); removeInQueueCryptoContextCtrl(NULL); } if (zrtpUser...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
210,197,863,550,742,200,000,000,000,000,000,000,000
13
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
static time_t phar_zip_d2u_time(char *cdtime, char *cddate) /* {{{ */ { int dtime = PHAR_GET_16(cdtime), ddate = PHAR_GET_16(cddate); struct tm *tm, tmbuf; time_t now; now = time(NULL); tm = php_localtime_r(&now, &tmbuf); tm->tm_year = ((ddate>>9)&127) + 1980 - 1900; tm->tm_mon = ((ddate>>5)&15) - 1; tm->tm_m...
0
[ "CWE-119" ]
php-src
a6fdc5bb27b20d889de0cd29318b3968aabb57bd
105,877,849,163,844,640,000,000,000,000,000,000,000
19
Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile()
static int handle_vmptrst(struct kvm_vcpu *vcpu) { unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION); u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO); gva_t vmcs_gva; struct x86_exception e; if (!nested_vmx_check_permission(vcpu)) return 1; if (get_vmx_mem_address(vcpu, exit_quali...
0
[ "CWE-284", "CWE-264" ]
linux
3ce424e45411cf5a13105e0386b6ecf6eeb4f66f
233,005,181,620,433,360,000,000,000,000,000,000,000
24
kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC...
static void digit_gen(diy_fp_t Mp, diy_fp_t delta, char* buffer, int* len, int* K) { uint32_t div, p1; uint64_t p2; int d,kappa; diy_fp_t one; one.f = ((uint64_t) 1) << -Mp.e; one.e = Mp.e; p1 = Mp.f >> -one.e; p2 = Mp.f & (one.f - 1); *len = 0; kappa = 3; div = TEN2; while (kappa > 0) { d = p1 / div; if (...
0
[ "CWE-190" ]
mujs
25821e6d74fab5fcc200fe5e818362e03e114428
211,900,475,847,125,760,000,000,000,000,000,000,000
26
Fix 698920: Guard jsdtoa from integer overflow wreaking havoc.
static void annotate_abort(annotate_db_t *d) { /* don't double-abort */ if (!d || !d->in_txn) return; if (d->txn) { #if DEBUG syslog(LOG_ERR, "Aborting annotations db %s\n", d->filename); #endif cyrusdb_abort(d->db, d->txn); } d->txn = NULL; d->in_txn = 0; }
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
243,430,054,620,160,000,000,000,000,000,000,000,000
14
annotate: don't allow everyone to write shared server entries
parse_gpg_control (IOBUF inp, int pkttype, unsigned long pktlen, PACKET * packet, int partial) { byte *p; const byte *sesmark; size_t sesmarklen; int i; (void) pkttype; if (list_mode) es_fprintf (listfp, ":packet 63: length %lu ", pktlen); sesmark = get_session_marker (&sesmarklen); if (pktl...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
208,615,869,575,756,530,000,000,000,000,000,000,000
64
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
set_vrrp_defaults(data_t * data) { data->vrrp_garp_rep = VRRP_GARP_REP; data->vrrp_garp_refresh.tv_sec = VRRP_GARP_REFRESH; data->vrrp_garp_refresh_rep = VRRP_GARP_REFRESH_REP; data->vrrp_garp_delay = VRRP_GARP_DELAY; data->vrrp_garp_lower_prio_delay = PARAMETER_UNSET; data->vrrp_garp_lower_prio_rep = PARAMETER_U...
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
214,312,738,061,181,170,000,000,000,000,000,000,000
22
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
_gcry_ecc_eddsa_genkey (ECC_secret_key *sk, elliptic_curve_t *E, mpi_ec_t ctx, int flags) { gpg_err_code_t rc; int b = 256/8; /* The only size we currently support. */ gcry_mpi_t a, x, y; mpi_point_struct Q; gcry_random_level_t random_level; char *dbuf; size_t dlen; ...
0
[ "CWE-200" ]
libgcrypt
5a22de904a0a366ae79f03ff1e13a1232a89e26b
160,640,062,473,317,370,000,000,000,000,000,000,000
76
ecc: Store EdDSA session key in secure memory. * cipher/ecc-eddsa.c (_gcry_ecc_eddsa_sign): use mpi_snew to allocate session key. -- An attacker who learns the EdDSA session key from side-channel observation during the signing process, can easily revover the long- term secret key. Storing the session key in secure me...
static int processcompl_compat(struct async *as, void __user * __user *arg) { struct urb *urb = as->urb; struct usbdevfs_urb32 __user *userurb = as->userurb; void __user *addr = as->userurb; unsigned int i; if (as->userbuffer && urb->actual_length) { if (copy_urb_data_to_user(as->userbuffer, urb)) return -EF...
0
[ "CWE-200" ]
linux
681fef8380eb818c0b845fca5d2ab1dcbab114ee
71,278,872,679,996,030,000,000,000,000,000,000,000
33
USB: usbfs: fix potential infoleak in devio The stack object “ci” has a total size of 8 bytes. Its last 3 bytes are padding bytes which are not initialized and leaked to userland via “copy_to_user”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct cil_list_item *__cil_ordered_find_match(struct cil_list_item *t, struct cil_list_item *i) { while (i) { if (i->data == t->data) { return i; } i = i->next; } return NULL; }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
196,826,608,057,189,100,000,000,000,000,000,000,000
10
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static int l2cap_set_mode(struct l2cap_chan *chan, u8 mode) { switch (mode) { case BT_MODE_BASIC: if (bdaddr_type_is_le(chan->src_type)) return -EINVAL; mode = L2CAP_MODE_BASIC; clear_bit(CONF_STATE2_DEVICE, &chan->conf_state); break; case BT_MODE_ERTM: if (!disable_ertm || bdaddr_type_is_le(chan->src_t...
0
[ "CWE-787" ]
linux
1bff51ea59a9afb67d2dd78518ab0582a54a472c
223,376,923,594,261,050,000,000,000,000,000,000,000
38
Bluetooth: fix use-after-free error in lock_sock_nested() use-after-free error in lock_sock_nested is reported: [ 179.140137][ T3731] ===================================================== [ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0 [ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k...
R_API ut64 r_bin_get_baddr(RBin *bin) { RBinObject *o = r_bin_cur_object (bin); return binobj_get_baddr (o); }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
63,882,358,904,081,060,000,000,000,000,000,000,000
4
Fix #8748 - Fix oobread on string search
static __poll_t io_uring_poll(struct file *file, poll_table *wait) { struct io_ring_ctx *ctx = file->private_data; __poll_t mask = 0; poll_wait(file, &ctx->cq_wait, wait); /* * synchronizes with barrier from wq_has_sleeper call in * io_commit_cqring */ smp_rmb(); if (READ_ONCE(ctx->rings->sq.tail) - ctx->c...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
154,772,704,240,502,120,000,000,000,000,000,000,000
19
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
void JOIN::get_partial_cost_and_fanout(int end_tab_idx, table_map filter_map, double *read_time_arg, double *record_count_arg) { double record_count= 1; double read_time= 0.0; double sj_inner_fano...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
10,563,160,312,641,109,000,000,000,000,000,000,000
98
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...
void PSOutputDev::endMaskClip(GfxState * state) { writePS("pdfImClipEnd\n"); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
247,692,801,163,400,400,000,000,000,000,000,000,000
3
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
void mp_decode_to_lua_array(lua_State *L, mp_cur *c, size_t len) { assert(len <= UINT_MAX); int index = 1; lua_newtable(L); luaL_checkstack(L, 1, "in function mp_decode_to_lua_array"); while(len--) { lua_pushnumber(L,index++); mp_decode_to_lua_type(L,c); if (c->err) return; ...
0
[ "CWE-119", "CWE-787" ]
redis
5ccb6f7a791bf3490357b00a898885759d98bab0
275,066,862,663,196,400,000,000,000,000,000,000,000
13
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...
timer_getoverrun(timer_t timer_id) { /* since we don't know if there have been signals that weren't delivered, assume none */ return 0; }
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
219,854,911,829,341,050,000,000,000,000,000,000,000
6
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
static const char *tmp_path(void) { const char *tmpdir = NULL; if ((getuid() == geteuid()) && (getgid() == getegid())) { tmpdir = getenv("TMPDIR"); } return tmpdir ? tmpdir : "/tmp"; }
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
33,557,612,081,308,560,000,000,000,000,000,000,000
8
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk, unsigned int count) { struct ext4_system_blocks *system_blks; int ret; /* * Lock the system zone to prevent it being released concurrently * when doing a remount which inverse current "[no]block_validity" * mount option. */ rcu_re...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
179,497,413,535,350,650,000,000,000,000,000,000,000
18
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
static void netlink_walk_stop(struct nl_seq_iter *iter) { rhashtable_walk_stop(&iter->hti); rhashtable_walk_exit(&iter->hti); }
0
[ "CWE-362", "CWE-415" ]
linux
92964c79b357efd980812c4de5c1fd2ec8bb5520
317,231,429,328,021,300,000,000,000,000,000,000,000
5
netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16...
int Pipe::tcp_read(char *buf, unsigned len) { if (sd < 0) return -EINVAL; while (len > 0) { if (msgr->cct->_conf->ms_inject_socket_failures && sd >= 0) { if (rand() % msgr->cct->_conf->ms_inject_socket_failures == 0) { ldout(msgr->cct, 0) << "injecting socket failure" << dendl; ::shutdown(sd, SHUT...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
95,619,818,580,511,910,000,000,000,000,000,000,000
28
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 ...
hb_set_intersect (hb_set_t *set, const hb_set_t *other) { /* Immutible-safe. */ set->intersect (*other); }
0
[ "CWE-787" ]
harfbuzz
d3e09bf4654fe5478b6dbf2b26ebab6271317d81
84,705,393,281,032,880,000,000,000,000,000,000,000
6
[set] Make all operators null-safe again Changed my mind. Also for hb_map_clear(). Part of https://github.com/harfbuzz/harfbuzz/pull/3162
void FilterManager::maybeEndDecode(bool end_stream) { ASSERT(!state_.remote_decode_complete_); state_.remote_decode_complete_ = end_stream; if (end_stream) { stream_info_.downstreamTiming().onLastDownstreamRxByteReceived(dispatcher().timeSource()); ENVOY_STREAM_LOG(debug, "request end stream", *this); }...
1
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
88,764,007,864,431,010,000,000,000,000,000,000,000
8
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size) { int copied = 0; do { int goal = min_t(size_t, size - copied, TTY_BUFFER_PAGE); int space; unsigned long __flags; struct tty_buffer *tb; spin_lock_irqsave(&tty->buf.lock, __flags); spac...
0
[]
linux
c56a00a165712fd73081f40044b1e64407bb1875
103,652,904,789,463,750,000,000,000,000,000,000,000
30
tty: hold lock across tty buffer finding and buffer filling tty_buffer_request_room is well protected, but while after it returns, it releases the port->lock. tty->buf.tail might be modified by either irq handler or other threads. The patch adds more protection by holding the lock across tty buffer finding and buffer...
int SSL_read(SSL* ssl, void* buffer, int sz) { Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer)); return receiveData(*ssl, data); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
207,341,238,000,984,060,000,000,000,000,000,000,000
5
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static av_always_inline void paint_rect(uint8_t *dst, int dx, int dy, int w, int h, int color, int bpp, int stride) { int i, j; dst += dx * bpp + dy * stride; if (bpp == 1) { for (j = 0; j < h; j++) { memset(...
0
[ "CWE-703" ]
FFmpeg
6ba02602aa7fc7d38db582e75b8b093fb3c1608d
59,896,887,289,802,840,000,000,000,000,000,000,000
29
avcodec/vmnc: Check that rectangles are within the picture Prevents out of array accesses with CODEC_FLAG_EMU_EDGE Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
virtual uchar *pack(uchar* to, const uchar *from, uint max_length __attribute__((unused))) { return pack_int64(to, from); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
22,606,974,602,813,420,000,000,000,000,000,000,000
5
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...
EXPORTED int meth_trace(struct transaction_t *txn, void *params) { parse_path_t parse_path = (parse_path_t) params; const char **hdr; unsigned long max_fwd = -1; struct buf *msg = &txn->resp_body.payload; /* Response should not be cached */ txn->flags.cc |= CC_NOCACHE; /* Make sure method ...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
28,037,749,922,201,403,000,000,000,000,000,000,000
76
HTTP: don't overrun buffer when parsing strings with sscanf()
static int is_stack(struct vm_area_struct *vma) { /* * We make no effort to guess what a given thread considers to be * its "stack". It's not even well-defined for programs written * languages like Go. */ return vma->vm_start <= vma->vm_mm->start_stack && vma->vm_end >= vma->vm_mm->start_stack; }
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
297,291,052,471,053,970,000,000,000,000,000,000,000
10
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...