func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
nfsd4_decode_fallocate(struct nfsd4_compoundargs *argp, struct nfsd4_fallocate *fallocate) { DECODE_HEAD; status = nfsd4_decode_stateid(argp, &fallocate->falloc_stateid); if (status) return status; READ_BUF(16); p = xdr_decode_hyper(p, &fallocate->falloc_offset); xdr_decode_hyper(p, &fallocate->fallo...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
32,589,443,661,685,643,000,000,000,000,000,000,000
15
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
int ssl_write_finished( ssl_context *ssl ) { int ret, hash_len; SSL_DEBUG_MSG( 2, ( "=> write finished" ) ); ssl->handshake->calc_finished( ssl, ssl->out_msg + 4, ssl->endpoint ); // TODO TLS/1.2 Hash length is determined by cipher suite (Page 63) hash_len = ( ssl->minor_ver == SSL_MINOR_VERSION_...
0
[ "CWE-310" ]
polarssl
4582999be608c9794d4518ae336b265084db9f93
235,973,880,847,520,300,000,000,000,000,000,000,000
50
Fixed timing difference resulting from badly formatted padding.
BGD_DECLARE(void) gdImageSetTile (gdImagePtr im, gdImagePtr tile) { int i; im->tile = tile; if ((!im->trueColor) && (!im->tile->trueColor)) { for (i = 0; (i < gdImageColorsTotal (tile)); i++) { int index; index = gdImageColorResolveAlpha (im, gdImageRed (tile, i), ...
0
[ "CWE-119", "CWE-787" ]
libgd
77f619d48259383628c3ec4654b1ad578e9eb40e
222,228,410,569,188,070,000,000,000,000,000,000,000
16
fix #215 gdImageFillToBorder stack-overflow when invalid color is used
void nego_set_send_preconnection_pdu(rdpNego* nego, BOOL SendPreconnectionPdu) { nego->SendPreconnectionPdu = SendPreconnectionPdu; }
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
23,811,782,645,374,270,000,000,000,000,000,000,000
4
Fixed oob read in irp_write and similar
Item_datetime_literal_for_invalid_dates(THD *thd, MYSQL_TIME *ltime, uint dec_arg) :Item_datetime_literal(thd, ltime, dec_arg) { }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
154,867,010,133,076,530,000,000,000,000,000,000,000
3
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static int nfs4_xdr_dec_link(struct rpc_rqst *rqstp, struct xdr_stream *xdr, struct nfs4_link_res *res) { struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (status) goto out; status = decode_sequence(xdr, &res->seq_res, rqstp); if (status) goto out; status = decode_put...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
254,345,545,454,265,580,000,000,000,000,000,000,000
39
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
Parameter_Obj Parser::parse_parameter() { if (peek< alternatives< exactly<','>, exactly< '{' >, exactly<';'> > >()) { css_error("Invalid CSS", " after ", ": expected variable (e.g. $foo), was "); } while (lex< alternatives < spaces, block_comment > >()); lex < variable >(); std::string nam...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
91,597,629,823,066,390,000,000,000,000,000,000,000
21
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
xfs_attr_shortform_lookup(xfs_da_args_t *args) { xfs_attr_shortform_t *sf; xfs_attr_sf_entry_t *sfe; int i; xfs_ifork_t *ifp; trace_xfs_attr_sf_lookup(args); ifp = args->dp->i_afp; ASSERT(ifp->if_flags & XFS_IFINLINE); sf = (xfs_attr_shortform_t *)ifp->if_u1.if_data; sfe = &sf->list[0]; for (i = 0; i < sf->...
0
[ "CWE-476" ]
linux
bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a
98,436,071,162,362,920,000,000,000,000,000,000,000
25
xfs: don't call xfs_da_shrink_inode with NULL bp xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an oops if we try. This also seems to fix a flaw where th...
int vfs_follow_link(struct nameidata *nd, const char *link) { return __vfs_follow_link(nd, link); }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
210,689,355,916,412,550,000,000,000,000,000,000,000
4
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
void kvm_inject_nmi(struct kvm_vcpu *vcpu) { vcpu->arch.nmi_pending = 1; }
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
162,312,071,510,017,650,000,000,000,000,000,000,000
4
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
nfs4_find_state_owner(struct nfs_server *server, struct rpc_cred *cred) { struct nfs_client *clp = server->nfs_client; struct rb_node **p = &clp->cl_state_owners.rb_node, *parent = NULL; struct nfs4_state_owner *sp, *res = NULL; while (*p != NULL) { parent = *p; sp = rb_entry(parent, struct nfs4_state...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
187,321,426,466,380,200,000,000,000,000,000,000,000
31
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
bool smbXcli_session_is_guest(struct smbXcli_session *session) { if (session == NULL) { return false; } if (session->conn == NULL) { return false; } if (session->conn->protocol >= PROTOCOL_SMB2_02) { if (session->smb2->session_flags & SMB2_SESSION_FLAG_IS_GUEST) { return true; } return false; } i...
1
[ "CWE-94" ]
samba
46b5e4aca6adb12a27efaad3bfe66c2d8a82ec95
90,397,104,465,816,030,000,000,000,000,000,000,000
23
CVE-2016-2019: libcli/smb: don't allow guest sessions if we require signing Note real anonymous sessions (with "" as username) don't hit this as we don't even call smb2cli_session_set_session_key() in that case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
static void processNode(xmlTextReaderPtr reader) { const xmlChar *name, *value; int type, empty; type = xmlTextReaderNodeType(reader); empty = xmlTextReaderIsEmptyElement(reader); if (debug) { name = xmlTextReaderConstName(reader); if (name == NULL) name = BAD_CAST "--"; value = xmlTextRe...
0
[ "CWE-416" ]
libxml2
1358d157d0bd83be1dfe356a69213df9fac0b539
108,754,994,733,898,620,000,000,000,000,000,000,000
90
Fix use-after-free with `xmllint --html --push` Call htmlCtxtUseOptions to make sure that names aren't stored in dictionaries. Note that this issue only affects xmllint using the HTML push parser. Fixes #230.
static double mp_da_size(_cimg_math_parser& mp) { mp_check_list(mp,"da_size"); const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); CImg<T> &img = mp.imglist[ind]; const int siz = img?(int)img[img._height - 1]:0; if (img && (img._width!=1 ||...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
96,871,515,953,912,180,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offset, int section_index) { int i, sn, num_entries, sub_section_index = 0; unsigned char *dir_entry; size_t ifd_size, dir_size, entry_offset, next_offset, entry_length, entry_value=0, fgot; int entry_tag , entry_type; tag_table_type tag_ta...
0
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
115,087,322,991,861,060,000,000,000,000,000,000,000
234
Fixed bug #79282
static VOID MiniportDisableMSIInterrupt( IN PVOID MiniportInterruptContext, IN ULONG MessageId ) { PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportInterruptContext; /* TODO - How we prevent DPC procedure from re-enabling interrupt? */ CParaNdisAbstractPath *path = GetPathByMessageId(...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
18,878,462,601,257,510,000,000,000,000,000,000,000
11
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
print_tc_bandwidth_table(netdissect_options *ndo, const u_char *ptr) { ND_PRINT((ndo, "\n\t TC Bandwidth Table")); ND_PRINT((ndo, "\n\t TC%% : 0 1 2 3 4 5 6 7")); ND_PRINT((ndo, "\n\t Value : %-3d %-3d %-3d %-3d %-3d %-3d %-3d %-3d", ptr[0], p...
0
[ "CWE-399", "CWE-835" ]
tcpdump
34cec721d39c76be1e0a600829a7b17bdfb832b6
218,788,686,753,694,000,000,000,000,000,000,000,000
8
CVE-2017-12997/LLDP: Don't use an 8-bit loop counter. If you have a for (i = 0; i < N; i++) loop, you'd better make sure that i is big enough to hold N - not N-1, N. The TLV length here is 9 bits long, not 8 bits long, so an 8-bit loop counter will overflow and you can loop infinitely. This fixes an infinite loop...
int APE::Properties::channels() const { return d->channels; }
0
[]
taglib
77d61c6eca4d08b9b025738acf6b926cc750db23
98,150,552,274,874,280,000,000,000,000,000,000,000
4
Make sure to not try dividing by zero
static int hub_handle_remote_wakeup(struct usb_hub *hub, unsigned int port, u16 portstatus, u16 portchange) { return 0; }
0
[ "CWE-703" ]
linux
e50293ef9775c5f1cf3fcc093037dd6a8c5684ea
330,988,325,469,661,550,000,000,000,000,000,000,000
5
USB: fix invalid memory access in hub_activate() Commit 8520f38099cc ("USB: change hub initialization sleeps to delayed_work") changed the hub_activate() routine to make part of it run in a workqueue. However, the commit failed to take a reference to the usb_hub structure or to lock the hub interface while doing so. ...
static int update_volume_key_segment_digest(struct crypt_device *cd, struct luks2_hdr *hdr, int digest, int commit) { int r; /* Remove any assignments in memory */ r = LUKS2_digest_segment_assign(cd, hdr, CRYPT_DEFAULT_SEGMENT, CRYPT_ANY_DIGEST, 0, 0); if (r) return r; /* Assign it to the specific digest */ r...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
262,985,735,720,161,770,000,000,000,000,000,000,000
12
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static int exclude_super_stripes(struct btrfs_block_group *cache) { struct btrfs_fs_info *fs_info = cache->fs_info; const bool zoned = btrfs_is_zoned(fs_info); u64 bytenr; u64 *logical; int stripe_len; int i, nr, ret; if (cache->start < BTRFS_SUPER_INFO_OFFSET) { stripe_len = BTRFS_SUPER_INFO_OFFSET - cache->...
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
263,783,045,388,183,300,000,000,000,000,000,000,000
50
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
static int fromiccpcs(int cs) { switch (cs) { case ICC_CS_RGB: return JAS_CLRSPC_GENRGB; break; case ICC_CS_YCBCR: return JAS_CLRSPC_GENYCBCR; break; case ICC_CS_GRAY: return JAS_CLRSPC_GENGRAY; break; } return JAS_CLRSPC_UNKNOWN; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
5,214,988,294,219,704,300,000,000,000,000,000,000
15
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
double get_post_group_estimate(JOIN* join, double join_op_rows) { table_map tables_in_group_list= table_map(0); /* Find out which tables are used in GROUP BY list */ for (ORDER *order= join->group_list_for_estimates; order; order= order->next) { Item *item= order->item[0]; table_map item_used_tables= i...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
33,425,618,849,537,537,000,000,000,000,000,000,000
51
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...
static int GetCutColors(Image *image,ExceptionInfo *exception) { Quantum intensity, scale_intensity; register Quantum *q; ssize_t x, y; intensity=0; scale_intensity=ScaleCharToQuantum(16); for (y=0; y < (ssize_t) image->rows; y++) { q=GetAuthenticPixels(image,0,y,image->columns,...
0
[ "CWE-787" ]
ImageMagick
cc4ac341f29fa368da6ef01c207deaf8c61f6a2e
5,531,117,225,296,182,000,000,000,000,000,000,000
35
https://github.com/ImageMagick/ImageMagick/issues/1162
TfLiteRegistration* Register_BIDIRECTIONAL_SEQUENCE_LSTM() { static TfLiteRegistration r = { bidirectional_sequence_lstm::Init, bidirectional_sequence_lstm::Free, bidirectional_sequence_lstm::Prepare, bidirectional_sequence_lstm::Eval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
67,398,049,337,991,290,000,000,000,000,000,000,000
6
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
best_effort_strncat_in_locale(struct archive_string *as, const void *_p, size_t length, struct archive_string_conv *sc) { size_t remaining; const uint8_t *itp; int return_value = 0; /* success */ /* * If both from-locale and to-locale is the same, this makes a copy. * And then this checks all copied MBS ca...
0
[ "CWE-125" ]
libarchive
22b1db9d46654afc6f0c28f90af8cdc84a199f41
194,627,184,245,990,800,000,000,000,000,000,000,000
44
Bugfix and optimize archive_wstring_append_from_mbs() The cal to mbrtowc() or mbtowc() should read up to mbs_length bytes and not wcs_length. This avoids out-of-bounds reads. mbrtowc() and mbtowc() return (size_t)-1 wit errno EILSEQ when they encounter an invalid multibyte character and (size_t)-2 when they they enco...
do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap, uint32_t namesz, uint32_t descsz, size_t noff, size_t doff, int *flags, size_t size, int clazz) { #ifdef ELFCORE int os_style = -1; /* * Sigh. The 2.0.36 kernel in Debian 2.1, at * least, doesn't correctly implement name *...
1
[ "CWE-125" ]
file
2858eaf99f6cc5aae129bcbf1e24ad160240185f
150,404,405,228,822,080,000,000,000,000,000,000,000
198
Avoid OOB read (found by ASAN reported by F. Alonso)
void cgtimer_time(cgtimer_t *ts_start) { struct timeval tv; cgtime(&tv); ts_start->tv_sec = tv->tv_sec; ts_start->tv_nsec = tv->tv_usec * 1000; }
0
[ "CWE-20", "CWE-703" ]
sgminer
910c36089940e81fb85c65b8e63dcd2fac71470c
110,157,326,834,076,720,000,000,000,000,000,000,000
8
stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime. Might have introduced a memory leak, don't have time to check. :( Should the other hex2bin()'s be checked? Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this.
bool ElectronBrowserClient::IsSuitableHost( content::RenderProcessHost* process_host, const GURL& site_url) { #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) auto* browser_context = process_host->GetBrowserContext(); extensions::ExtensionRegistry* registry = extensions::ExtensionRegistry::Get(browser_contex...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
80,860,617,025,397,940,000,000,000,000,000,000,000
20
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static int32 GListFIsSelected(GGadget *g, int32 pos) { GListField *gl = (GListField *) g; if ( pos>=gl->ltot ) return( false ); if ( pos<0 ) return( false ); if ( gl->ltot>0 ) return( gl->ti[pos]->selected ); return( false ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
184,139,248,827,703,830,000,000,000,000,000,000,000
12
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static struct dentry *shmem_fh_to_dentry(struct super_block *sb, struct fid *fid, int fh_len, int fh_type) { struct inode *inode; struct dentry *dentry = NULL; u64 inum; if (fh_len < 3) return NULL; inum = fid->raw[2]; inum = (inum << 32) | fid->raw[1]; inode = ilookup5(sb, (unsigned long)(inum + fid->raw...
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
213,778,034,359,514,170,000,000,000,000,000,000,000
22
tmpfs: fix use-after-free of mempolicy object The tmpfs remount logic preserves filesystem mempolicy if the mpol=M option is not specified in the remount request. A new policy can be specified if mpol=M is given. Before this patch remounting an mpol bound tmpfs without specifying mpol= mount option in the remount re...
static void remove_node_from_stable_tree(struct stable_node *stable_node) { struct rmap_item *rmap_item; struct hlist_node *hlist; hlist_for_each_entry(rmap_item, hlist, &stable_node->hlist, hlist) { if (rmap_item->hlist.next) ksm_pages_sharing--; else ksm_pages_shared--; put_anon_vma(rmap_item->anon_vm...
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
51,885,444,167,870,830,000,000,000,000,000,000,000
18
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static void print_section(SectionID id, int level) { const SectionID *pid; const struct section *section = &sections[id]; printf("%c%c%c", section->flags & SECTION_FLAG_IS_WRAPPER ? 'W' : '.', section->flags & SECTION_FLAG_IS_ARRAY ? 'A' : '.', section-...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
173,736,710,452,866,700,000,000,000,000,000,000,000
16
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static double mp_sinh(_cimg_math_parser& mp) { return std::sinh(_mp_arg(2));
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
28,074,879,313,591,187,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
AfterTriggerEndXact(bool isCommit) { /* * Forget everything we know about AFTER triggers. * * Since all the info is in TopTransactionContext or children thereof, we * don't really need to do anything to reclaim memory. However, the * pending-events list could be large, and so it's useful to discard it as ...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
179,866,705,328,445,450,000,000,000,000,000,000,000
16
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
bool Field_timestamp::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { ulong sec_part; my_time_t ts= get_timestamp(&sec_part); return timestamp_to_TIME(get_thd(), ltime, ts, sec_part, fuzzydate); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
96,608,673,184,536,870,000,000,000,000,000,000,000
6
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, int parity) { int bufsize = JPC_CEILDIVPOW2(numrows, 1); jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; jpc_fix_t *buf = splitbuf; register jpc_fix_t *srcptr; register jpc_fix_t *dstptr; register int n; register int m; int hstartcol; /* Get a buffer. *...
1
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
33,925,845,307,094,970,000,000,000,000,000,000,000
59
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static void __nft_release_hook(struct net *net, struct nft_table *table) { struct nft_flowtable *flowtable; struct nft_chain *chain; list_for_each_entry(chain, &table->chains, list) __nf_tables_unregister_hook(net, table, chain, true); list_for_each_entry(flowtable, &table->flowtables, list) __nft_unregister_f...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
290,539,249,409,174,200,000,000,000,000,000,000,000
11
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
void readErr(const AsyncSocketException& ex) noexcept override { ReadCallbackBase::readErr(ex); std::cerr << "ReadErrorCallback::readError" << std::endl; setState(STATE_SUCCEEDED); }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
218,789,859,369,197,640,000,000,000,000,000,000,000
5
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static struct device *bnep_get_device(struct bnep_session *session) { struct hci_conn *conn; conn = l2cap_pi(session->sock->sk)->chan->conn->hcon; if (!conn) return NULL; return &conn->dev; }
0
[ "CWE-20", "CWE-284" ]
linux
71bb99a02b32b4cc4265118e85f6035ca72923f0
213,812,736,920,867,080,000,000,000,000,000,000,000
10
Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket same story as cmtp Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
int main(int argc, const char *argv[]) { const UnitTest tests[] = { unit_test(test_getpwnam_r_wrapper), unit_test(test_getpwuid_r_wrapper), unit_test(test_getgrnam_r_wrapper), unit_test(test_getgrgid_r_wrapper), }; return run_tests(tests); }
0
[ "CWE-19" ]
freeipa
50c8f0c80175c7812bb523ab2387b19a94245b59
160,665,028,699,777,420,000,000,000,000,000,000,000
11
extdom: handle ERANGE return code for getXXYYY_r() calls The getXXYYY_r() calls require a buffer to store the variable data of the passwd and group structs. If the provided buffer is too small ERANGE is returned and the caller can try with a larger buffer again. Cmocka/cwrap based unit-tests for get*_r_wrapper() are ...
get_optional_content_rbgroups (OCGs *ocg) { Array *rb; GList *groups = nullptr; rb = ocg->getRBGroupsArray (); if (rb) { int i, j; for (i = 0; i < rb->getLength (); ++i) { Array *rb_array; GList *group = nullptr; Object obj = rb->get (i); if (!obj.isArray ()) { continue;...
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
252,354,991,963,604,800,000,000,000,000,000,000,000
38
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
TEST_P(Security, BuiltinAuthenticationAndCryptoPlugin_besteffort_rtps_data300kb) { PubSubReader<Data1mbType> reader(TEST_TOPIC_NAME); PubSubWriter<Data1mbType> writer(TEST_TOPIC_NAME); PropertyPolicy pub_property_policy, sub_property_policy; sub_property_policy.properties().emplace_back(Property("dds....
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
287,981,610,937,816,960,000,000,000,000,000,000,000
68
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
void CIRCSock::SendNextCap() { if (!m_uCapPaused) { if (m_ssPendingCaps.empty()) { // We already got all needed ACK/NAK replies. PutIRC("CAP END"); } else { CString sCap = *m_ssPendingCaps.begin(); m_ssPendingCaps.erase(m_ssPendingCaps.begin()); ...
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
262,662,382,143,733,680,000,000,000,000,000,000,000
12
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
static void nfs4_proc_commit_setup(struct nfs_write_data *data, struct rpc_message *msg) { struct nfs_server *server = NFS_SERVER(data->inode); data->args.bitmask = server->attr_bitmask; data->res.server = server; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMMIT]; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
189,185,663,633,404,360,000,000,000,000,000,000,000
8
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
void iniparser_dump_ini(const dictionary * d, FILE * f) { int i ; int nsec ; const char * secname ; if (d==NULL || f==NULL) return ; nsec = iniparser_getnsec(d); if (nsec<1) { /* No section in file: dump all keys as they are */ for (i=0 ; i<d->size ; i++) { ...
0
[]
iniparser
4f870752abbb756911d7b11405d49e9769d082bd
71,156,360,087,945,650,000,000,000,000,000,000,000
25
Fix #68 when reading file with only \0 char
unsigned long long qpdf_get_error_file_position(qpdf_data qpdf, qpdf_error e) { if (e == 0) { return 0; } return e->exc->getFilePosition(); }
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
6,507,791,352,929,622,000,000,000,000,000,000,000
8
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 ...
void CLASS merror(void *ptr, const char *where) { if (ptr) return; fprintf(stderr, _("%s: Out of memory in %s\n"), ifname, where); longjmp(failure, 1); }
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
100,625,638,049,802,250,000,000,000,000,000,000,000
7
Secunia SA75000 advisory: several buffer overruns
longlong Item_func_bit_xor::val_int() { DBUG_ASSERT(fixed == 1); ulonglong arg1= (ulonglong) args[0]->val_int(); ulonglong arg2= (ulonglong) args[1]->val_int(); if ((null_value= (args[0]->null_value || args[1]->null_value))) return 0; return (longlong) (arg1 ^ arg2); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
68,459,669,529,026,330,000,000,000,000,000,000,000
9
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static int ssl_parse_servername_ext( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; size_t servername_list_size, hostname_len; const unsigned char *p; MBEDTLS_S...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
140,832,680,275,742,550,000,000,000,000,000,000,000
66
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
GF_Err SmDm_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SMPTE2086MasteringDisplayMetadataBox *p = (GF_SMPTE2086MasteringDisplayMetadataBox*)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u16(bs, p->primaryRChromaticity_x); gf_bs_write_u16(bs, p->primaryRChromaticity_y); gf_bs_write...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
334,941,971,191,748,070,000,000,000,000,000,000,000
20
fixed #1785 (fuzz)
i915_mmu_notifier_free(struct i915_mmu_notifier *mn, struct mm_struct *mm) { if (mn == NULL) return; mmu_notifier_unregister(&mn->mn, mm); kfree(mn); }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
163,886,217,021,108,700,000,000,000,000,000,000,000
9
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
static void sock_destroy_inode(struct inode *inode) { struct socket_alloc *ei; struct socket_wq *wq; ei = container_of(inode, struct socket_alloc, vfs_inode); wq = rcu_dereference_protected(ei->socket.wq, 1); kfree_rcu(wq, rcu); kmem_cache_free(sock_inode_cachep, ei); }
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
89,972,504,238,089,250,000,000,000,000,000,000,000
10
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
static void V1_minix_read_inode(struct inode * inode) { struct buffer_head * bh; struct minix_inode * raw_inode; struct minix_inode_info *minix_inode = minix_i(inode); int i; raw_inode = minix_V1_raw_inode(inode->i_sb, inode->i_ino, &bh); if (!raw_inode) { make_bad_inode(inode); return; } inode->i_mode = r...
0
[ "CWE-189" ]
linux-2.6
f5fb09fa3392ad43fbcfc2f4580752f383ab5996
107,975,926,153,864,720,000,000,000,000,000,000,000
27
[PATCH] Fix for minix crash Mounting a (corrupt) minix filesystem with zero s_zmap_blocks gives a spectacular crash on my 2.6.17.8 system, no doubt because minix/inode.c does an unconditional minix_set_bit(0,sbi->s_zmap[0]->b_data); [akpm@osdl.org: make labels conistent while we're there] Signed-off-by: Andrew Mort...
double Item_string::val_real() { DBUG_ASSERT(fixed == 1); return double_from_string_with_check(str_value.charset(), str_value.ptr(), str_value.ptr() + str_value.length()); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
293,698,718,529,396,800,000,000,000,000,000,000,000
8
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type) { if (type >= ARRAY_SIZE(kvm_device_ops_table)) return -ENOSPC; if (kvm_device_ops_table[type] != NULL) return -EEXIST; kvm_device_ops_table[type] = ops; return 0; }
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
155,315,176,151,981,140,000,000,000,000,000,000,000
11
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
win_rotate(int upwards, int count) { win_T *wp1; win_T *wp2; frame_T *frp; int n; if (ONE_WINDOW) /* nothing to do */ { beep_flush(); return; } #ifdef FEAT_GUI need_mouse_correct = TRUE; #endif /* Check if all frames in this row/col have one window. */ FOR_ALL_FRAMES(frp, ...
0
[ "CWE-416" ]
vim
ec66c41d84e574baf8009dbc0bd088d2bc5b2421
219,029,188,562,801,840,000,000,000,000,000,000,000
77
patch 8.1.2136: using freed memory with autocmd from fuzzer Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra, Dominique Pelle) Solution: Avoid using "wp" after autocommands. (closes #5041)
dns_zone_getautomatic(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); return (zone->automatic); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
295,749,879,122,945,030,000,000,000,000,000,000,000
4
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
GF_Err reftype_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 i; GF_TrackReferenceTypeBox *ptr = (GF_TrackReferenceTypeBox *)s; ptr->type = ptr->reference_type; if (!ptr->trackIDCount) return GF_OK; e = gf_isom_box_write_header(s, bs); ptr->type = GF_ISOM_BOX_TYPE_REFT; if (e) return e; for (i = 0; i < pt...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
130,437,423,234,644,790,000,000,000,000,000,000,000
16
fixed 2 possible heap overflows (inc. #1088)
struct razer_report razer_chroma_extended_matrix_effect_wave(unsigned char variable_storage, unsigned char led_id, unsigned char direction) { struct razer_report report = razer_chroma_extended_matrix_effect_base(0x06, variable_storage, led_id, 0x04); // Some devices use values 0x00, 0x01 // Others use valu...
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
316,457,811,545,141,800,000,000,000,000,000,000,000
14
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
static int init_iommu_hw(void) { struct dmar_drhd_unit *drhd; struct intel_iommu *iommu = NULL; for_each_active_iommu(iommu, drhd) if (iommu->qi) dmar_reenable_qi(iommu); for_each_iommu(iommu, drhd) { if (drhd->ignored) { /* * we always have to disable PMRs or DMA may fail on * this device *...
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
102,946,970,501,469,400,000,000,000,000,000,000,000
33
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
xmlXPathFunctionLookup(xmlXPathContextPtr ctxt, const xmlChar *name) { if (ctxt == NULL) return (NULL); if (ctxt->funcLookupFunc != NULL) { xmlXPathFunction ret; xmlXPathFuncLookupFunc f; f = ctxt->funcLookupFunc; ret = f(ctxt->funcLookupData, name, NULL); if (ret != NULL) return(ret); } re...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
115,210,334,566,575,870,000,000,000,000,000,000,000
15
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
make_guard_confirmed(guard_selection_t *gs, entry_guard_t *guard) { if (BUG(guard->confirmed_on_date && guard->confirmed_idx >= 0)) return; // LCOV_EXCL_LINE if (BUG(smartlist_contains(gs->confirmed_entry_guards, guard))) return; // LCOV_EXCL_LINE const int GUARD_LIFETIME = get_guard_lifetime(); guard...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
319,259,193,092,477,380,000,000,000,000,000,000,000
24
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static union _zend_function *row_method_get( zval **object_pp, char *method_name, int method_len, const zend_literal *key TSRMLS_DC) { zend_function *fbc; char *lc_method_name; lc_method_name = emalloc(method_len + 1); zend_str_tolower_copy(lc_method_name, method_name, method_len); if (zend_hash_find(&pdo_row...
0
[ "CWE-476" ]
php-src
6045de69c7dedcba3eadf7c4bba424b19c81d00d
152,337,735,364,332,320,000,000,000,000,000,000,000
18
Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle Proper soltion would be to call serialize/unserialize and deal with the result, but this requires more work that should be done by wddx maintainer (not me).
CImg<T>& operator<<=(const CImg<t>& img) { const ulongT siz = size(), isiz = img.size(); if (siz && isiz) { if (is_overlapped(img)) return *this^=+img; T *ptrd = _data, *const ptre = _data + siz; if (siz>isiz) for (ulongT n = siz/isiz; n; --n) for (const t *ptrs = img._...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
106,326,198,375,623,480,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
check_SET_IPV4_SRC(const struct ofpact_ipv4 *a OVS_UNUSED, struct ofpact_check_params *cp) { return check_set_ipv4(cp); }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
35,799,106,390,563,010,000,000,000,000,000,000,000
5
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
static void sapi_update_response_code(int ncode TSRMLS_DC) { /* if the status code did not change, we do not want to change the status line, and no need to change the code */ if (SG(sapi_headers).http_response_code == ncode) { return; } if (SG(sapi_headers).http_status_line) { efree(SG(sapi_headers).http_s...
0
[ "CWE-190", "CWE-79" ]
php-src
996faf964bba1aec06b153b370a7f20d3dd2bb8b
109,486,132,289,159,800,000,000,000,000,000,000,000
14
Update header handling to RFC 7230
Parser Parser::from_c_str(const char* beg, const char* end, Context& ctx, Backtraces traces, ParserState pstate, const char* source, bool allow_parent) { pstate.offset.column = 0; pstate.offset.line = 0; Parser p(ctx, pstate, traces, allow_parent); p.source = source ? source : beg; p.position ...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
13,097,710,082,907,710,000,000,000,000,000,000,000
13
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
void online_fair_sched_group(struct task_group *tg) { }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
18,994,254,097,871,259,000,000,000,000,000,000,000
1
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
ccid_transceive (ccid_driver_t handle, const unsigned char *apdu_buf, size_t apdu_buflen, unsigned char *resp, size_t maxresplen, size_t *nresp) { int rc; /* The size of the buffer used to be 10+259. For the via_escape hack we need one extra byte, thus 11+259. */ unsigned ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
22,475,533,869,312,930,000,000,000,000,000,000,000
329
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 ...
BOOLEAN AnalyzeL2Hdr( PNET_PACKET_INFO packetInfo) { PETH_HEADER dataBuffer = (PETH_HEADER) packetInfo->headersBuffer; if (packetInfo->dataLength < ETH_HEADER_SIZE) return FALSE; packetInfo->ethDestAddr = dataBuffer->DstAddr; if (ETH_IS_BROADCAST(dataBuffer)) { packetInfo->isB...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
233,445,436,964,285,370,000,000,000,000,000,000,000
46
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p, int (*put_cb)(const SSL_CIPHER *, unsigned char *)) { int i,j=0; SSL_CIPHER *c; unsigned char *q; #ifndef OPENSSL_NO_KRB5 int nokrb5 = !kssl_tgt_is_available(s->kssl_ctx); #endif /* OPENSSL_NO_KRB5 */ if (sk == NULL) return(0)...
0
[]
openssl
8671b898609777c95aedf33743419a523874e6e8
107,936,648,181,887,430,000,000,000,000,000,000,000
32
Memory saving patch.
static int snd_mbox1_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { static const char *const texts[2] = { "Internal", "S/PDIF" }; return snd_ctl_enum_info(uinfo, 1, ARRAY_SIZE(texts), texts); }
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
263,687,700,905,586,240,000,000,000,000,000,000,000
10
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
static inline int hrtimer_hres_active(void) { return 0; }
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
226,978,847,694,839,130,000,000,000,000,000,000,000
1
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
NOEXPORT int ssl_tlsext_ticket_key_cb(SSL *ssl, unsigned char *key_name, unsigned char *iv, EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc) { CLI *c; const EVP_CIPHER *cipher; int iv_len; (void)key_name; /* squash the unused parameter warning */ s_log(LOG_DEBUG, "Session ticket processing cal...
1
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
304,476,826,089,038,400,000,000,000,000,000,000,000
46
stunnel-5.57
static pj_status_t decode_unknown_attr(pj_pool_t *pool, const pj_uint8_t *buf, const pj_stun_msg_hdr *msghdr, void **p_attr) { pj_stun_unknown_attr *attr; const pj_uint16_t *punk_attr; unsigned i; PJ_UNUSED_ARG(msghdr); attr = PJ_POOL_ZALLOC_T(pool, pj_stun_unkn...
0
[ "CWE-191" ]
pjproject
15663e3f37091069b8c98a7fce680dc04bc8e865
227,266,905,781,935,040,000,000,000,000,000,000,000
28
Merge pull request from GHSA-2qpg-f6wf-w984
void __init ima_init_policy(void) { int i, entries; /* if !ima_use_tcb set entries = 0 so we load NO default rules */ if (ima_use_tcb) entries = ARRAY_SIZE(default_rules); else entries = 0; for (i = 0; i < entries; i++) list_add_tail(&default_rules[i].list, &measure_default_rules); ima_measure = &measure_...
0
[ "CWE-284", "CWE-264" ]
linux
867c20265459d30a01b021a9c1e81fb4c5832aa9
140,502,421,105,745,000,000,000,000,000,000,000,000
14
ima: fix add LSM rule bug If security_filter_rule_init() doesn't return a rule, then not everything is as fine as the return code implies. This bug only occurs when the LSM (eg. SELinux) is disabled at runtime. Adding an empty LSM rule causes ima_match_rules() to always succeed, ignoring any remaining rules. defau...
rb_dlhandle_sym(VALUE self, VALUE sym) { void (*func)(); struct dl_handle *dlhandle; void *handle; const char *name; const char *err; int i; #if defined(HAVE_DLERROR) # define CHECK_DLERROR if( err = dlerror() ){ func = 0; } #else # define CHECK_DLERROR #endif rb_secure(2); name = Saf...
0
[ "CWE-20", "CWE-399" ]
ruby
4600cf725a86ce31266153647ae5aa1197b1215b
264,873,285,355,953,260,000,000,000,000,000,000,000
73
* ext/dl/dl.c (rb_dlhandle_initialize): prohibits DL::dlopen with a tainted name of library. Patch by sheepman <sheepman AT sheepman.sakura.ne.jp>. * ext/dl/dl.c (rb_dlhandle_sym): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void test_nghttp2_submit_settings_update_local_window_size(void) { nghttp2_session *session; nghttp2_session_callbacks callbacks; nghttp2_outbound_item *item; nghttp2_settings_entry iv[4]; nghttp2_stream *stream; nghttp2_frame ack_frame; nghttp2_mem *mem; nghttp2_option *option; mem = nghttp2_mem_def...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
310,077,934,834,840,570,000,000,000,000,000,000,000
87
Add nghttp2_option_set_max_outbound_ack
static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, bool txpending, enum ieee80211_band band) { struct ieee80211_local *local = sdata->local; struct ieee80211_tx_data tx; ieee80211_tx_result res_prepare; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); bool result = tr...
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
33,205,390,620,877,160,000,000,000,000,000,000,000
41
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
static void virgl_cmd_transfer_to_host_2d(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_transfer_to_host_2d t2d; struct virtio_gpu_box box; VIRTIO_GPU_FILL_CMD(t2d); trace_virtio_gpu_cmd_res_xfer_toh_2d(t2d.resource_id); box.x = t2...
0
[]
qemu
2fe760554eb3769d70f608a158474f728ba45ba6
206,101,011,248,988,570,000,000,000,000,000,000,000
24
virtio-gpu: check max_outputs only The scanout id should not be above the configured num_scanouts. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
_g_mime_type_get_from_content (char *buffer, gsize buffer_size) { static const struct magic { const unsigned int off; const unsigned int len; const char * const id; const char * const mime_type; } magic_ids [] = { /* magic ids taken from magic/Magdir/archive from the file-4.21 tarball */ { 0,...
0
[ "CWE-22" ]
file-roller
57268e51e59b61c9e3125eb0f65551c7084297e2
111,920,374,034,853,790,000,000,000,000,000,000,000
40
Path traversal vulnerability Do not extract files with relative paths. [bug #794337]
R_API RBinJavaVerificationObj *r_bin_java_read_from_buffer_verification_info_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { if (sz < 8) { return NULL; } ut64 offset = 0; RBinJavaVerificationObj *se = R_NEW0 (RBinJavaVerificationObj); if (!se) { return NULL; } se->file_offset = buf_offset; se->tag = buffer[off...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
179,674,876,881,854,370,000,000,000,000,000,000,000
26
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static inline void io_put_task(struct task_struct *task, int nr) { if (likely(task == current)) task->io_uring->cached_refs += nr; else __io_put_task(task, nr); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
115,451,987,187,770,360,000,000,000,000,000,000,000
7
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...
void Item::register_in(THD *thd) { next= thd->free_list; thd->free_list= this; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
192,601,903,782,405,340,000,000,000,000,000,000,000
5
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
f_listener_remove(typval_T *argvars, typval_T *rettv) { listener_T *lnr; listener_T *next; listener_T *prev; int id; buf_T *buf; if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL) return; id = tv_get_number(argvars); FOR_ALL_BUFFERS(buf) { prev = NULL; for (lnr = ...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
221,299,770,837,037,180,000,000,000,000,000,000,000
34
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
get_one_option(int optid, const struct my_option *opt, char *argument) { switch(optid) { case '#': #ifndef DBUG_OFF DBUG_PUSH(argument ? argument : "d:t:S:i:O,/tmp/mysqltest.trace"); debug_check_flag= 1; debug_info_flag= 1; #endif break; case 'r': record = 1; break; case 'x': { cha...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
95,288,900,842,416,650,000,000,000,000,000,000,000
99
mysqltest: don't eat new lines in --exec pass them through as is
static int cvt_gate_to_trap(int vector, const gate_desc *val, struct trap_info *info) { unsigned long addr; if (val->bits.type != GATE_TRAP && val->bits.type != GATE_INTERRUPT) return 0; info->vector = vector; addr = gate_offset(val); if (!get_trap_addr((void **)&addr, val->bits.ist)) return 0; info...
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
153,477,112,605,901,440,000,000,000,000,000,000,000
23
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, size_t count, const cdf_directory_t *root_storage) { size_t i; cdf_timestamp_t tp; struct timespec ts; char buf[64]; const char *str = NULL; const char *s; int len; if (!NOT...
0
[ "CWE-20", "CWE-119" ]
file
6d209c1c489457397a5763bca4b28e43aac90391
26,318,759,969,685,456,000,000,000,000,000,000,000
114
Apply patches from file-CVE-2012-1571.patch From Francisco Alonso Espejo: file < 5.18/git version can be made to crash when checking some corrupt CDF files (Using an invalid cdf_read_short_sector size) The problem I found here, is that in most situations (if h_short_sec_size_p2 > 8) because the blocksiz...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { TfLiteTensor* output_values; TF_LITE_ENSURE_OK( context, GetOutputSafe(context, node, kOutputValues, &output_values)); TfLiteTensor* output_indexes; TF_LITE_ENSURE_OK( context, GetOutputSafe(context, node, kOutputIndexes, &output_indexes)...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
83,141,027,118,201,650,000,000,000,000,000,000,000
51
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
Status MakeCallable(const CallableOptions& callable_options, CallableHandle* out_handle) override { return wrapped_->MakeCallable(callable_options, out_handle); }
0
[ "CWE-20", "CWE-703" ]
tensorflow
adf095206f25471e864a8e63a0f1caef53a0e3a6
293,968,543,888,245,000,000,000,000,000,000,000,000
4
Validate `NodeDef`s from `FunctionDefLibrary` of a `GraphDef`. We already validated `NodeDef`s from a `GraphDef` but missed validating those from the `FunctionDefLibrary`. Thus, some maliciously crafted models could evade detection and cause denial of service due to a `CHECK`-fail. PiperOrigin-RevId: 332536309 Change...
show_sb_text(void) { msgchunk_T *mp; // Only show something if there is more than one line, otherwise it looks // weird, typing a command without output results in one line. mp = msg_sb_start(last_msgchunk); if (mp == NULL || mp->sb_prev == NULL) vim_beep(BO_MESS); else { do_more_prompt('...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
15,246,297,366,763,910,000,000,000,000,000,000,000
15
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
bool dbug_user_var_equals_int(THD *thd, const char *name, int value) { user_var_entry *var; LEX_CSTRING varname= { name, strlen(name)}; if ((var= get_variable(&thd->user_vars, &varname, FALSE))) { bool null_value; longlong var_value= var->val_int(&null_value); if (!null_value && var_value == value) ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
260,349,548,041,902,600,000,000,000,000,000,000,000
13
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...
s_aos_reset(stream *s) { /* PLRM definition of reset operator is strange. */ /* Rewind the file and discard the buffer. */ s->position = 0; s->srptr = s->srlimit = s->cbuf - 1; s->end_status = 0; }
0
[]
ghostpdl
04b37bbce174eed24edec7ad5b920eb93db4d47d
326,768,117,631,968,080,000,000,000,000,000,000,000
8
Bug 697799: have .rsdparams check its parameters The Ghostscript internal operator .rsdparams wasn't checking the number or type of the operands it was being passed. Do so.
static int blk_mq_queue_reinit_notify(struct notifier_block *nb, unsigned long action, void *hcpu) { struct request_queue *q; /* * Before new mappings are established, hotadded cpu might already * start handling requests. This doesn't break anything as we map * offline CPUs to first hardware queue. W...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
180,388,443,604,770,570,000,000,000,000,000,000,000
45
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
uint8_t *nghttp2_cpymem(uint8_t *dest, const void *src, size_t len) { if (len == 0) { return dest; } memcpy(dest, src, len); return dest + len; }
0
[ "CWE-707" ]
nghttp2
336a98feb0d56b9ac54e12736b18785c27f75090
164,887,912,356,133,130,000,000,000,000,000,000,000
9
Implement max settings option
void __fastcall TExternalConsole::Print(UnicodeString Str, bool FromBeginning, bool Error) { // need to do at least one iteration, even when Str is empty (new line) do { TConsoleCommStruct * CommStruct = GetCommStruct(); try { size_t MaxLen = LENOF(CommStruct->PrintEvent.Message) - 1; ...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
117,040,326,651,894,920,000,000,000,000,000,000,000
34
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
TfLiteStatus EluEval(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, 0); TfLiteTensor* output = GetOutput(context, node, 0); switch (input->type) { case kTfLiteFloat32: { optimized_ops::Elu(GetTensorShape(input), GetTensorData<float>(input), ...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
283,393,408,905,418,460,000,000,000,000,000,000,000
21
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
void io_wq_worker_sleeping(struct task_struct *tsk) { struct io_worker *worker = kthread_data(tsk); struct io_wqe *wqe = worker->wqe; if (!(worker->flags & IO_WORKER_F_UP)) return; if (!(worker->flags & IO_WORKER_F_RUNNING)) return; worker->flags &= ~IO_WORKER_F_RUNNING; spin_lock_irq(&wqe->lock); io_wqe_...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
228,374,740,555,262,430,000,000,000,000,000,000,000
16
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
static int check_map_access(struct bpf_verifier_env *env, u32 regno, int off, int size, bool zero_size_allowed) { struct bpf_verifier_state *vstate = env->cur_state; struct bpf_func_state *state = vstate->frame[vstate->curframe]; struct bpf_reg_state *reg = &state->regs[regno]; int err; /* We may have adju...
0
[ "CWE-703", "CWE-189" ]
linux
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
105,481,759,388,004,970,000,000,000,000,000,000,000
53
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged ...