func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline int selinux_option(char *option, int len) { return (match_prefix(CONTEXT_STR, sizeof(CONTEXT_STR)-1, option, len) || match_prefix(FSCONTEXT_STR, sizeof(FSCONTEXT_STR)-1, option, len) || match_prefix(DEFCONTEXT_STR, sizeof(DEFCONTEXT_STR)-1, option, len) || match_prefix(ROOTCONTEXT_STR, sizeof(ROOTC...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
117,733,673,060,260,300,000,000,000,000,000,000,000
8
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...
static void vmx_post_block(struct kvm_vcpu *vcpu) { if (kvm_x86_ops.set_hv_timer) kvm_lapic_switch_to_hv_timer(vcpu); pi_post_block(vcpu); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
322,392,635,545,549,860,000,000,000,000,000,000,000
7
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
int analyze_security(sd_bus *bus, char **units, AnalyzeSecurityFlags flags) { _cleanup_(table_unrefp) Table *overview_table = NULL; int ret = 0, r; assert(bus); if (strv_length(units) != 1) { overview_table = table_new("unit", "exposure", "predicate", "happy"); ...
0
[ "CWE-269" ]
systemd
9d880b70ba5c6ca83c82952f4c90e86e56c7b70c
135,665,311,805,436,040,000,000,000,000,000,000,000
117
analyze: check for RestrictSUIDSGID= in "systemd-analyze security" And let's give it a heigh weight, since it pretty much can be used for bad things only.
bool JlCompress::compressDir(QString fileCompressed, QString dir, bool recursive, QDir::Filters filters) { // Creo lo zip QuaZip zip(fileCompressed); QDir().mkpath(QFileInfo(fileCompressed).absolutePath()); if(!zip.open(QuaZip::mdCreate)) { QFile::remove(fileCompress...
0
[ "CWE-22" ]
quazip
5d2fc16a1976e5bf78d2927b012f67a2ae047a98
151,477,385,591,422,310,000,000,000,000,000,000,000
26
Fixed the Zip Slip vulnerability in JlCompress When extracting a file with a dangerous path like "../evil.exe" from a ZIP archive with JlCompress::extractDir(), the target file would be created outside of the target directory, potentially even overwriting an existing file there.
struct dentry *ext4_get_parent(struct dentry *child) { __u32 ino; static const struct qstr dotdot = QSTR_INIT("..", 2); struct ext4_dir_entry_2 * de; struct buffer_head *bh; bh = ext4_find_entry(d_inode(child), &dotdot, &de, NULL); if (IS_ERR(bh)) return ERR_CAST(bh); if (!bh) return ERR_PTR(-ENOENT); ino ...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
8,977,969,391,638,321,000,000,000,000,000,000,000
23
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...
static CURLcode multi_done(struct connectdata **connp, CURLcode status, /* an error if this is called after an error was detected */ bool premature) { CURLcode result; struct connectdata *conn; struct Curl_easy *da...
0
[ "CWE-416" ]
curl
75dc096e01ef1e21b6c57690d99371dedb2c0b80
254,430,906,661,974,500,000,000,000,000,000,000,000
128
curl_multi_cleanup: clear connection pointer for easy handles CVE-2016-5421 Bug: https://curl.haxx.se/docs/adv_20160803C.html Reported-by: Marcelo Echeverria and Fernando Muñoz
static int piv_generate_key(sc_card_t *card, sc_cardctl_piv_genkey_info_t *keydata) { int r; u8 rbuf[4096]; u8 *p; const u8 *tag; u8 tagbuf[16]; u8 outdata[3]; /* we could also add tag 81 for exponent */ size_t taglen, i; size_t out_len; size_t in_len; unsigned int cla_out, tag_out; SC_FUNC_CALLED(card->c...
0
[]
OpenSC
456ac566938a1da774db06126a2fa6c0cba514b3
268,470,318,717,163,200,000,000,000,000,000,000,000
110
PIV Improved parsing of data from the card Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced with sc_asn1_read_tag. The input is also tested that the expected tag is the first byte. Additional tests are also add. sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs do not ...
void Http2Stream::SubmitRstStream(const uint32_t code) { CHECK(!this->is_destroyed()); code_ = code; auto is_stream_cancel = [](const uint32_t code) { return code == NGHTTP2_CANCEL; }; // If RST_STREAM frame is received with error code NGHTTP2_CANCEL, // add it to the pending list and don't force purg...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
187,238,405,661,545,800,000,000,000,000,000,000,000
33
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
fatal_error(const char *message, ...) { va_list val; va_start(val, message); fprintf(stderr, "%s: ", program_name); vfprintf(stderr, message, val); putc('\n', stderr); va_end(val); exit(1); }
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
136,192,880,090,679,590,000,000,000,000,000,000,000
10
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
static void init_sdb_formats(struct MACH0_(obj_t) *bin) { /* * These definitions are used by r2 -nn * must be kept in sync with libr/bin/d/macho */ sdb_set (bin->kv, "mach0_build_platform.cparse", "enum mach0_build_platform" "{MACOS=1, IOS=2, TVOS=3, WATCHOS=4, BRIDGEOS=5, IOSMAC=6, IOSSIMULATOR=7, TVOSSIMULA...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
4,272,052,987,990,198,500,000,000,000,000,000,000
134
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compoundres *resp) { /* * All that remains is to write the tag and operation count... */ struct xdr_buf *buf = resp->xdr.buf; WARN_ON_ONCE(buf->len != buf->head[0].iov_len + buf->page_len + buf->tail[0].iov_len); rqstp->rq_next_pa...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
105,614,242,260,989,880,000,000,000,000,000,000,000
21
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...
xmlSchemaVPushText(xmlSchemaValidCtxtPtr vctxt, int nodeType, const xmlChar *value, int len, int mode, int *consumed) { /* * Unfortunately we have to duplicate the text sometimes. * OPTIMIZE: Maybe we could skip it, if: * 1. content type is simple * 2. whitespace is "collapse" * 3....
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
195,487,733,454,548,770,000,000,000,000,000,000,000
126
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static ssize_t ctor_show(struct kmem_cache *s, char *buf) { if (!s->ctor) return 0; return sprintf(buf, "%pS\n", s->ctor); }
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
53,375,970,584,956,740,000,000,000,000,000,000,000
6
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
uint32_t CompactProtocolWriter::writeI16(int16_t i16) { uint32_t sz = apache::thrift::util::writeVarint( out_, apache::thrift::util::i32ToZigzag(i16)); return sz; }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
145,220,082,763,917,000,000,000,000,000,000,000,000
5
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static void cma_listen_on_all(struct rdma_id_private *id_priv) { struct cma_device *cma_dev; mutex_lock(&lock); list_add_tail(&id_priv->list, &listen_any_list); list_for_each_entry(cma_dev, &dev_list, list) cma_listen_on_dev(id_priv, cma_dev); mutex_unlock(&lock); }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
30,486,915,184,921,815,000,000,000,000,000,000,000
10
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
static int rm_rf_children_inner( int fd, const char *fname, int is_dir, RemoveFlags flags, const struct stat *root_dev) { struct stat st; int r, q = 0; assert(fd >= 0); assert(fname); if (is_dir < ...
1
[ "CWE-674" ]
systemd
5b1cf7a9be37e20133c0208005274ce4a5b5c6a1
231,577,131,642,326,450,000,000,000,000,000,000,000
71
shared/rm-rf: loop over nested directories instead of instead of recursing To remove directory structures, we need to remove the innermost items first, and then recursively remove higher-level directories. We would recursively descend into directories and invoke rm_rf_children and rm_rm_children_inner. This is problem...
__u32 skb_get_hash_perturb(const struct sk_buff *skb, const siphash_key_t *perturb) { struct flow_keys keys; return ___skb_get_hash(skb, &keys, perturb); }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
167,439,878,004,175,720,000,000,000,000,000,000,000
7
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
p = gf_filter_pid_get_property(ds->ipid, GF_PROP_PID_HLS_EXT_VARIANT); if (p) { ds->rep->nb_hls_variant_tags = p->value.string_list.nb_items; ds->rep->hls_variant_tags = (const char **) p->value.string_list.vals; } } static Bool dasher_same_roles(GF_DashStream *ds1, GF_DashStream *ds2) { const GF_PropStringLis...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
228,328,117,099,188,900,000,000,000,000,000,000,000
16
fixed #2138
rfbBool TextChatOpen(rfbClient* client) { rfbTextChatMsg chat; if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; chat.type = rfbTextChat; chat.pad1 = 0; chat.pad2 = 0; chat.length = rfbClientSwap32IfLE(rfbTextChatOpen); return (WriteToRFBServer(client, (char *)&chat, sz_rfbText...
0
[ "CWE-20" ]
libvncserver
85a778c0e45e87e35ee7199f1f25020648e8b812
148,461,812,857,033,240,000,000,000,000,000,000,000
11
Check for MallocFrameBuffer() return value If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to NULL. Subsequent writes into that buffer could lead to memory corruption, or even arbitrary code execution.
static int ssl_check_record_type( uint8_t record_type ) { if( record_type != MBEDTLS_SSL_MSG_HANDSHAKE && record_type != MBEDTLS_SSL_MSG_ALERT && record_type != MBEDTLS_SSL_MSG_CHANGE_CIPHER_SPEC && record_type != MBEDTLS_SSL_MSG_APPLICATION_DATA ) { return( MBEDTLS_ERR_SSL_INVAL...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
86,519,459,277,245,770,000,000,000,000,000,000,000
12
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>
static u_int8_t ndpi_detection_get_l4_internal(struct ndpi_detection_module_struct *ndpi_str, const u_int8_t *l3, u_int16_t l3_len, const u_int8_t **l4_return, u_int16_t *l4_len_return, u_int8_t *l4_protocol_return, u_int32_t ...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
71,512,231,497,540,100,000,000,000,000,000,000,000
85
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
PHP_FUNCTION(imagepsslantfont) { zval *fnt; double slt; int *f_ind; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rd", &fnt, &slt) == FAILURE) { return; } ZEND_FETCH_RESOURCE(f_ind, int *, &fnt, -1, "Type 1 font", le_ps_font); if (T1_SlantFont(*f_ind, slt) != 0) { RETURN_FALSE; } RETURN_TRUE; }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
137,812,587,967,858,080,000,000,000,000,000,000,000
18
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
bool DISOpticalFlowImpl::ocl_PatchInverseSearch(UMat &src_Ux, UMat &src_Uy, UMat &I0, UMat &I1, UMat &I0x, UMat &I0y, int num_iter, int pyr_level) { size_t globalSize[] = {(size_t)ws, (size_t)hs}; size_t localSize[] = {16, 16}; int idx; int num_inner_iter...
0
[ "CWE-125", "CWE-369" ]
opencv
d1615ba11a93062b1429fce9f0f638d1572d3418
170,024,567,581,481,840,000,000,000,000,000,000,000
117
video:fixed DISOpticalFlow segfault from small img
parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env) { #define POSIX_BRACKET_CHECK_LIMIT_LENGTH 20 #define POSIX_BRACKET_NAME_MIN_LEN 4 static PosixBracketEntryType PBS[] = { { (UChar* )"alnum", ONIGENC_CTYPE_ALNUM, 5 }, { (UChar* )"alpha", ONIGENC_CTYPE_ALPHA, 5 }, { (...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
109,903,954,435,298,600,000,000,000,000,000,000,000
73
onig-5.9.2
deinterleave_double (STATE * state) { int read_len ; int ch, k ; do { read_len = sf_readf_double (state->infile, state->din.d, BUFFER_LEN) ; for (ch = 0 ; ch < state->channels ; ch ++) { for (k = 0 ; k < read_len ; k++) state->dout.d [k] = state->din.d [k * state->channels + ch] ; sf_write_double (state...
0
[ "CWE-476" ]
libsndfile
aaea680337267bfb6d2544da878890ee7f1c5077
119,573,380,054,986,100,000,000,000,000,000,000,000
16
Check MAX_CHANNELS in sndfile-deinterleave Allocated buffer has space for only 16 channels. Verify that input file meets this limit. Fixes #397
is_left(int a) { if (a == ANCR_END_BUF || a == ANCR_SEMI_END_BUF || a == ANCR_END_LINE || a == ANCR_PREC_READ || a == ANCR_PREC_READ_NOT) return 0; return 1; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
106,083,647,542,018,380,000,000,000,000,000,000,000
8
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static int ext4_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) { handle_t *handle; struct inode *inode; int err, retries = 0; if (!new_valid_dev(rdev)) return -EINVAL; retry: handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + EXT4_INDEX_EXTRA_TRANS_BLOCKS +...
0
[ "CWE-20" ]
linux-2.6
e6b8bc09ba2075cd91fbffefcd2778b1a00bd76f
2,551,661,372,569,291,000,000,000,000,000,000,000
34
ext4: Add sanity check to make_indexed_dir Make sure the rec_len field in the '..' entry is sane, lest we overrun the directory block and cause a kernel oops on a purposefully corrupted filesystem. Thanks to Sami Liedes for reporting this bug. http://bugzilla.kernel.org/show_bug.cgi?id=12430 Signed-off-by: "Theodor...
date_s_valid_weeknum_p(int argc, VALUE *argv, VALUE klass) { VALUE vy, vw, vd, vf, vsg; VALUE argv2[5]; rb_scan_args(argc, argv, "41", &vy, &vw, &vd, &vf, &vsg); argv2[0] = vy; argv2[1] = vw; argv2[2] = vd; argv2[3] = vf; if (argc < 5) argv2[4] = INT2FIX(DEFAULT_SG); else argv2[4...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
322,784,635,833,726,640,000,000,000,000,000,000,000
20
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
TEST(GatherNdOpTest, Float32Int32) { GatherNdOpModel m({TensorType_FLOAT32, {3, 2, 3}}, {TensorType_INT32, {2, 2}}); m.SetInput<float>({1.1, -1.2, 1.3, -2.1, 2.2, 2.3, // 3.1, 3.2, -3.3, -4.1, -4.2, 4.3, // 5.1, -5.2, 5.3, 6.1, -6.2, 6.3}); m.SetPos...
0
[ "CWE-125" ]
tensorflow
595a65a3e224a0362d7e68c2213acfc2b499a196
139,083,497,787,516,740,000,000,000,000,000,000,000
12
Return a TFLite error if gather_nd will result in reading invalid memory PiperOrigin-RevId: 463054033
int sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data) { int ret; ret = sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port, index); ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, data); return ret; }
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
43,217,076,671,706,430,000,000,000,000,000,000,000
9
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
Item_func_isnull::remove_eq_conds(THD *thd, Item::cond_result *cond_value, bool top_level_arg) { Item *real_item= args[0]->real_item(); if (real_item->type() == Item::FIELD_ITEM) { Field *field= ((Item_field*) real_item)->field; if (((field->type() == MYSQL_TYPE_DATE) ||...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
143,692,558,395,346,300,000,000,000,000,000,000,000
113
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
CServer* CIRCNetwork::GetNextServer(bool bAdvance) { if (m_vServers.empty()) { return nullptr; } if (m_uServerIdx >= m_vServers.size()) { m_uServerIdx = 0; } if (bAdvance) { return m_vServers[m_uServerIdx++]; } else { return m_vServers[m_uServerIdx]; } }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
146,921,520,467,046,600,000,000,000,000,000,000,000
15
Don't crash if user specified invalid encoding. This is CVE-2019-9917
dissect_printer_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) { guint32 attributes; static const int * hf_attributes[] = { &hf_printer_attributes_published, &hf_printer_attributes_raw_only, &hf_printer_attributes_enable_bidi, &hf_printer_attri...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
60,266,577,299,795,980,000,000,000,000,000,000,000
29
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
ves_icall_System_Reflection_Module_GetMDStreamVersion (MonoImage *image) { return (image->md_version_major << 16) | (image->md_version_minor); }
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
96,274,707,700,535,630,000,000,000,000,000,000,000
4
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma, *prev; struct vm_unmapped_area_info info; const unsigned long mmap_end = arch_get_mmap_end(addr); if (len > mmap_end - mmap...
0
[ "CWE-476" ]
linux
0a1d52994d440e21def1c2174932410b4f2a98a1
23,650,774,003,513,900,000,000,000,000,000,000,000
30
mm: enforce min addr even if capable() in expand_downwards() security_mmap_addr() does a capability check with current_cred(), but we can reach this code from contexts like a VFS write handler where current_cred() must not be used. This can be abused on systems without SMAP to make NULL pointer dereferences exploitab...
static CHAT_DCC_REC *dcc_chat_find_nick(IRC_SERVER_REC *server, const char *nick) { GSList *tmp; g_return_val_if_fail(nick != NULL, NULL); for (tmp = dcc_conns; tmp != NULL; tmp = tmp->next) { CHAT_DCC_REC *dcc = tmp->data; if (IS_DCC_CHAT(dcc) && dcc->server == server && g_ascii_strcasecmp(dcc->ni...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
43,760,047,965,322,780,000,000,000,000,000,000,000
17
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
xptrDocTest(const char *filename, const char *resul ATTRIBUTE_UNUSED, const char *err ATTRIBUTE_UNUSED, int options) { char pattern[500]; char result[500]; glob_t globbuf; size_t i; int ret = 0, res; xpathDocument = xmlReadFile(filename, NULL, ...
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
286,669,470,346,242,270,000,000,000,000,000,000,000
34
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
g_file_replace_async (GFile *file, const char *etag, gboolean make_backup, GFileCreateFlags flags, int io_priority, GCancellable *cancellable, ...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
102,252,151,552,364,410,000,000,000,000,000,000,000
23
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
int ext4_ind_map_blocks(handle_t *handle, struct inode *inode, struct ext4_map_blocks *map, int flags) { struct ext4_allocation_request ar; int err = -EIO; ext4_lblk_t offsets[4]; Indirect chain[4]; Indirect *partial; int indirect_blks; int blocks_to_boundary = 0; int depth; int count = 0; ext4_fsblk_t ...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
307,029,634,860,607,860,000,000,000,000,000,000,000
142
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...
fn_smtp_receive_timeout(const uschar * name, const uschar * str) { if (*str == '$') smtp_receive_timeout_s = string_copy(str); else { /* "smtp_receive_timeout", opt_time, &smtp_receive_timeout */ smtp_receive_timeout = readconf_readtime(str, 0, FALSE); if (smtp_receive_timeout < 0) log_write(0,...
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
160,024,276,979,321,110,000,000,000,000,000,000,000
13
Fix CVE-2016-1531 Add keep_environment, add_environment. Change the working directory to "/" during the early startup phase. (cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0) (cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832) (cherry picked from commit 14b82c8b736c8ed24eda...
void MYSQL_BIN_LOG::purge() { #ifdef HAVE_REPLICATION if (expire_logs_days) { DEBUG_SYNC(current_thd, "at_purge_logs_before_date"); time_t purge_time= my_time(0) - expire_logs_days*24*60*60; if (purge_time >= 0) { purge_logs_before_date(purge_time); } } #endif }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
117,443,457,841,282,870,000,000,000,000,000,000,000
14
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
bool AllRegularInputsEqual(const NodeDef& node) { if (!HasRegularInputs(node)) return true; for (int i = 1; i < node.input_size(); ++i) { if (IsControlInput(node.input(i))) { break; } if (node.input(0) != node.input(i)) { return false; } } return true; }
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
149,801,702,119,770,380,000,000,000,000,000,000,000
12
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
static inline unsigned char *PopShortPixel(const EndianType endian, const unsigned short pixel,unsigned char *pixels) { register unsigned int quantum; quantum=pixel; if (endian == LSBEndian) { *pixels++=(unsigned char) (quantum); *pixels++=(unsigned char) (quantum >> 8); return(pixels...
0
[ "CWE-190" ]
ImageMagick
f60d59cc3a7e3402d403361e0985ffa56f746a82
452,319,867,579,224,100,000,000,000,000,000,000
17
https://github.com/ImageMagick/ImageMagick/issues/1727
TEST(RegexMatchExpression, MatchesElementWrongType) { BSONObj notMatchInt = BSON("x" << 1); BSONObj notMatchBool = BSON("x" << true); RegexMatchExpression regex("", "1", ""); ASSERT(!regex.matchesSingleElement(notMatchInt.firstElement())); ASSERT(!regex.matchesSingleElement(notMatchBool.firstElement...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
296,477,677,199,849,500,000,000,000,000,000,000,000
7
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static int get_update_sysctl_factor(void) { unsigned int cpus = min_t(int, num_online_cpus(), 8); unsigned int factor; switch (sysctl_sched_tunable_scaling) { case SCHED_TUNABLESCALING_NONE: factor = 1; break; case SCHED_TUNABLESCALING_LINEAR: factor = cpus; break; case SCHED_TUNABLESCALING_LOG: default...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
201,870,621,988,015,520,000,000,000,000,000,000,000
20
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
xfrm_dev_state_flush_secctx_check(struct net *net, struct net_device *dev, bool task_valid) { return 0; }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
44,509,024,114,130,180,000,000,000,000,000,000,000
4
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
PHP_FUNCTION(parse_url) { char *str; size_t str_len; php_url *resource; zend_long key = -1; zval tmp; zend_bool has_port; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STRING(str, str_len) Z_PARAM_OPTIONAL Z_PARAM_LONG(key) ZEND_PARSE_PARAMETERS_END(); resource = php_url_parse_ex2(str, str_len, &has_port);...
0
[ "CWE-20" ]
php-src
4a89e726bd4d0571991dc22a9a1ad4509e8fe347
218,589,631,996,899,640,000,000,000,000,000,000,000
93
Alternative fix for bug 77423 That bug report originally was about `parse_url()` misbehaving, but the security aspect was actually only regarding `FILTER_VALIDATE_URL`. Since the changes to `parse_url_ex()` apparently affect userland code which is relying on the sloppy URL parsing[1], this alternative restores the old...
DefineSequence(ParseState *pstate, CreateSeqStmt *seq) { FormData_pg_sequence seqform; FormData_pg_sequence_data seqdataform; bool need_seq_rewrite; List *owned_by; CreateStmt *stmt = makeNode(CreateStmt); Oid seqoid; ObjectAddress address; Relation rel; HeapTuple tuple; TupleDesc tupDesc; Datum value...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
30,598,201,161,033,335,000,000,000,000,000,000,000
146
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */ { /* is_identical_function() returns 1 in case of identity and 0 in case * of a difference; * whereas this comparison function is expected to return 0 on identity, * and non zero otherwise. */ ZVAL_DEREF(z1); ZVAL_DEREF(z2); return fast_i...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
121,421,286,414,413,930,000,000,000,000,000,000,000
11
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.
inline const int32_t* DimsDataUpTo5D() const { return dims_; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
8ee24e7949a203d234489f9da2c5bf45a7d5157d
135,744,918,669,197,470,000,000,000,000,000,000,000
1
[tflite] Ensure `MatchingDim` does not allow buffer overflow. We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ...
int jas_getdbglevel() { return jas_dbglevel; }
0
[ "CWE-415", "CWE-190", "CWE-369" ]
jasper
634ce8e8a5accc0fa05dd2c20d42b4749d4b2735
158,541,095,925,231,050,000,000,000,000,000,000,000
4
Made some changes to the I/O stream library for memory streams. There were a number of potential problems due to the possibility of integer overflow. Changed some integral types to the larger types size_t or ssize_t. For example, the function mem_resize now takes the buffer size parameter as a size_t. Added a new funct...
miniflow_equal(const struct miniflow *a, const struct miniflow *b) { const uint64_t *ap = miniflow_get_values(a); const uint64_t *bp = miniflow_get_values(b); /* This is mostly called after a matching hash, so it is highly likely that * the maps are equal as well. */ if (OVS_LIKELY(flowmap_equal(a...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
225,710,834,705,634,930,000,000,000,000,000,000,000
22
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
TEST_P(Http2CodecImplTest, ResponseDataFloodCounterReset) { static const int kMaxOutboundFrames = 100; max_outbound_frames_ = kMaxOutboundFrames; initialize(); TestRequestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, fals...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
52,074,843,277,896,670,000,000,000,000,000,000,000
40
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return get_item_copy<Item_field>(thd, mem_root, this); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
164,772,311,097,938,350,000,000,000,000,000,000,000
2
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 InlineX int pad4(int value) { int remainder = value & 3; if (!remainder) return value; return value + 4 - remainder; }
0
[ "CWE-190", "CWE-787" ]
libvncserver
a6788d1da719ae006605b78d22f5a9f170b423af
209,270,106,577,216,970,000,000,000,000,000,000,000
6
libvncserver: scale: cast to 64 bit before shifting Since pixel_value is 64 bit the data type of the shift operand should be 64 bit too to prevent integer overflows.
static void core_dump_config(apr_pool_t *p, server_rec *s) { core_server_config *sconf = ap_get_core_module_config(s->module_config); apr_file_t *out = NULL; const char *tmp; const char **defines; int i; if (!ap_exists_config_define("DUMP_RUN_CFG")) return; apr_file_open_stdout(&out...
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
275,771,489,389,638,150,000,000,000,000,000,000,000
40
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
test_bson_new_from_buffer (void) { bson_t *b; uint8_t *buf = bson_malloc0 (5); size_t len = 5; uint32_t len_le = BSON_UINT32_TO_LE (5); memcpy (buf, &len_le, sizeof (len_le)); b = bson_new_from_buffer (&buf, &len, bson_realloc_ctx, NULL); BSON_ASSERT (b->flags & BSON_FLAG_NO_FREE); BSON_ASSER...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
335,616,199,878,767,700,000,000,000,000,000,000,000
36
CDRIVER-2269 Check for zero string length in codewscope
xfs_cross_rename( struct xfs_trans *tp, struct xfs_inode *dp1, struct xfs_name *name1, struct xfs_inode *ip1, struct xfs_inode *dp2, struct xfs_name *name2, struct xfs_inode *ip2, int spaceres) { int error = 0; int ip1_flags = 0; int ip2_flags = 0; int dp2_flags = 0; /* Swap inode number for diren...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
300,411,961,059,425,200,000,000,000,000,000,000,000
102
xfs: fix up non-directory creation in SGID directories XFS always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem, see commit 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") for...
compute_consensus_package_lines(smartlist_t *votes) { const int n_votes = smartlist_len(votes); /* This will be a map from "packagename version" strings to arrays * of const char *, with the i'th member of the array corresponding to the * package line from the i'th vote. */ strmap_t *package_status = st...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
338,417,908,866,609,430,000,000,000,000,000,000,000
68
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
cr_tknzr_try_to_skip_spaces (CRTknzr * a_this) { enum CRStatus status = CR_ERROR; guint32 cur_char = 0; g_return_val_if_fail (a_this && PRIVATE (a_this) && PRIVATE (a_this)->input, CR_BAD_PARAM_ERROR); status = cr_input_peek_char (PRIVATE (a_this)->input, ...
0
[ "CWE-119" ]
libcroco
9ad72875e9f08e4c519ef63d44cdbd94aa9504f7
241,668,885,230,760,900,000,000,000,000,000,000,000
25
tknzr: support only max long rgb values This fixes a possible out of bound when reading rgbs which are longer than the support MAXLONG
unsigned long __weak memory_block_size_bytes(void) { return MIN_MEMORY_BLOCK_SIZE; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
70,073,876,703,351,840,000,000,000,000,000,000,000
4
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
GF_Err gf_isom_remove_cenc_saiz(GF_ISOFile *the_file, u32 trackNumber) { u32 i; GF_SampleTableBox *stbl; GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return GF_BAD_PARAM; stbl = trak->Media->information->sampleTable; if (!stbl) return GF_BAD_PARAM; for (i = 0; i < gf_lis...
0
[ "CWE-476" ]
gpac
3b84ffcbacf144ce35650df958432f472b6483f8
140,869,735,552,577,820,000,000,000,000,000,000,000
35
fixed #1735
runtest(int i) { int ret = 0, res; int old_errors, old_tests, old_leaks; old_errors = nb_errors; old_tests = nb_tests; old_leaks = nb_leaks; if ((tests_quiet == 0) && (testDescriptions[i].desc != NULL)) printf("## %s\n", testDescriptions[i].desc); res = launchTests(&testDescriptions[i]); ...
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
154,187,740,782,441,250,000,000,000,000,000,000,000
23
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan, struct net_device *dev, struct vxlan_sock *sock6, struct sk_buff *skb, int oif, u8 tos, __be32 label, const struct in6_addr *daddr, struct in6_addr *saddr, __be16 dport, __be16 sport, struct dst_ca...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
73,756,745,654,178,910,000,000,000,000,000,000,000
54
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
bool tr_variantFromFile(tr_variant* setme, tr_variant_fmt fmt, char const* filename, tr_error** error) { bool ret = false; uint8_t* buf; size_t buflen; buf = tr_loadFile(filename, &buflen, error); if (buf != NULL) { if (tr_variantFromBuf(setme, fmt, buf, buflen, filename, NULL) == 0) ...
0
[ "CWE-416", "CWE-284" ]
transmission
2123adf8e5e1c2b48791f9d22fc8c747e974180e
320,825,331,221,532,960,000,000,000,000,000,000,000
24
CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk In libtransmission/variant.c, function tr_variantWalk, when the variant stack is reallocated, a pointer to the previously allocated memory region is kept. This address is later accessed (heap use-after-free) while walking back down the stack, causing the applic...
void JOIN::join_free() { SELECT_LEX_UNIT *tmp_unit; SELECT_LEX *sl; /* Optimization: if not EXPLAIN and we are done with the JOIN, free all tables. */ bool full= !(select_lex->uncacheable) && !(thd->lex->describe); bool can_unlock= full; DBUG_ENTER("JOIN::join_free"); cleanup(full); for (tm...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
23,938,322,497,157,530,000,000,000,000,000,000,000
59
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
void kvm_arch_destroy_vm(struct kvm *kvm) { int i; kvm_free_stage2_pgd(kvm); for (i = 0; i < KVM_MAX_VCPUS; ++i) { if (kvm->vcpus[i]) { kvm_arch_vcpu_free(kvm->vcpus[i]); kvm->vcpus[i] = NULL; } } }
0
[ "CWE-399", "CWE-284" ]
linux
e8180dcaa8470ceca21109f143876fdcd9fe050a
24,132,594,277,237,394,000,000,000,000,000,000,000
13
ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl Some ARM KVM VCPU ioctls require the vCPU to be properly initialized with the KVM_ARM_VCPU_INIT ioctl before being used with further requests. KVM_RUN checks whether this initialization has been done, but other ioctls do not. Namely KVM_GET_REG_LIST will ...
static void schannel_session_free(void *ptr) { /* this is expected to be called under sessionid lock */ struct Curl_schannel_cred *cred = ptr; cred->refcount--; if(cred->refcount == 0) { s_pSecFn->FreeCredentialsHandle(&cred->cred_handle); Curl_safefree(cred); } }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
131,782,487,237,986,640,000,000,000,000,000,000,000
11
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static umode_t rbd_bus_is_visible(struct kobject *kobj, struct attribute *attr, int index) { if (!single_major && (attr == &bus_attr_add_single_major.attr || attr == &bus_attr_remove_single_major.attr)) return 0; return attr->mode; }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
189,825,231,566,801,120,000,000,000,000,000,000,000
10
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...
nsim_map_lookup_elem(struct bpf_offloaded_map *offmap, void *key, void *value) { struct nsim_bpf_bound_map *nmap = offmap->dev_priv; int idx; mutex_lock(&nmap->mutex); idx = nsim_map_key_find(offmap, key); if (idx >= 0) memcpy(value, nmap->entry[idx].value, offmap->map.value_size); mutex_unlock(&nmap->mutex)...
0
[]
net
481221775d53d6215a6e5e9ce1cce6d2b4ab9a46
183,044,667,225,836,900,000,000,000,000,000,000,000
15
netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc Zero-initialize memory for new map's value in function nsim_bpf_map_alloc since it may cause a potential kernel information leak issue, as follows: 1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for a new map. 2....
createenv(const struct rule *rule, const struct passwd *mypw, const struct passwd *targpw) { struct env *env; u_int i; env = malloc(sizeof(*env)); if (!env) err(1, NULL); RB_INIT(&env->root); env->count = 0; addnode(env, "DOAS_USER", mypw->pw_name); if (rule->options & KEEPENV) { extern char **enviro...
0
[ "CWE-200", "CWE-909" ]
OpenDoas
01c658f8c45cb92a343be5f32aa6da70b2032168
92,367,726,906,881,200,000,000,000,000,000,000,000
59
redo the environment inheritance to not inherit. it was intended to make life easier, but it can be surprising or even unsafe. instead, reset just about everything to the target user's values. ok deraadt martijn Thanks to Sander Bos in particular for pointing out some nasty edge cases.
//! Access to a pixel value, using Neumann boundary conditions for the X-coordinate \const. const T& atX(const int x, const int y=0, const int z=0, const int c=0) const { if (is_empty()) throw CImgInstanceException(_cimg_instance "atX(): Empty instance.", ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
199,442,002,296,657,000,000,000,000,000,000,000,000
7
Fix other issues in 'CImg<T>::load_bmp()'.
ExecCreateTableAs(CreateTableAsStmt *stmt, const char *queryString, ParamListInfo params, QueryEnvironment *queryEnv, char *completionTag) { Query *query = castNode(Query, stmt->query); IntoClause *into = stmt->into; bool is_matview = (into->viewQuery != NULL); DestReceiver *dest; Oid save_userid...
1
[ "CWE-94" ]
postgres
5919bb5a5989cda232ac3d1f8b9d90f337be2077
304,831,065,422,689,100,000,000,000,000,000,000,000
158
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
void InstanceKlass::verify_on(outputStream* st) { #ifndef PRODUCT // Avoid redundant verifies, this really should be in product. if (_verify_count == Universe::verify_count()) return; _verify_count = Universe::verify_count(); #endif // Verify Klass Klass::verify_on(st); // Verify that klass is present in ...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
119,547,343,050,194,960,000,000,000,000,000,000,000
113
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static void ext4_discard_allocated_blocks(struct ext4_allocation_context *ac) { struct ext4_prealloc_space *pa = ac->ac_pa; struct ext4_buddy e4b; int err; if (pa == NULL) { if (ac->ac_f_ex.fe_len == 0) return; err = ext4_mb_load_buddy(ac->ac_sb, ac->ac_f_ex.fe_group, &e4b); if (err) { /* * This sh...
0
[ "CWE-416" ]
linux
8844618d8aa7a9973e7b527d038a2a589665002c
53,589,889,579,682,080,000,000,000,000,000,000,000
29
ext4: only look at the bg_flags field if it is valid The bg_flags field in the block group descripts is only valid if the uninit_bg or metadata_csum feature is enabled. We were not consistently looking at this field; fix this. Also block group #0 must never have uninitialized allocation bitmaps, or need to be zeroed...
static void http_av_log(void *ptr, int level, const char *fmt, va_list vargs) { static int print_prefix = 1; AVClass *avc = ptr ? *(AVClass**)ptr : NULL; if (level > av_log_get_level()) return; if (print_prefix && avc) http_log("[%s @ %p]", avc->item_name(ptr), ptr); print_prefix = s...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
48,644,926,719,915,370,000,000,000,000,000,000,000
11
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 av_cold int hevc_init_context(AVCodecContext *avctx) { HEVCContext *s = avctx->priv_data; int i; s->avctx = avctx; s->tmp_frame = av_frame_alloc(); if (!s->tmp_frame) goto fail; s->output_frame = av_frame_alloc(); if (!s->output_frame) goto fail; for (i = 0; i ...
0
[ "CWE-703" ]
FFmpeg
b25e84b7399bd91605596b67d761d3464dbe8a6e
329,670,851,381,433,600,000,000,000,000,000,000,000
38
hevc: check that the VCL NAL types are the same for all slice segments of a frame Fixes possible invalid memory access for mismatching skipped/non-skipped slice segments. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Sample-Id: 00001533-google
qb_ipc_us_fc_set(struct qb_ipc_one_way *one_way, int32_t fc_enable) { struct ipc_us_control *ctl = (struct ipc_us_control *)one_way->u.us.shared_data; qb_util_log(LOG_TRACE, "setting fc to %d", fc_enable); qb_atomic_int_set(&ctl->flow_control, fc_enable); }
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
129,735,941,294,250,670,000,000,000,000,000,000,000
8
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
box_add(PG_FUNCTION_ARGS) { BOX *box = PG_GETARG_BOX_P(0); Point *p = PG_GETARG_POINT_P(1); PG_RETURN_BOX_P(box_construct((box->high.x + p->x), (box->low.x + p->x), (box->high.y + p->y), (box->low.y + p->y))); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
306,314,276,664,298,100,000,000,000,000,000,000,000
10
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
**/ CImgList<Tfloat> get_SVD(const bool sorting=true, const unsigned int max_iteration=40, const float lambda=0) const { CImgList<Tfloat> res(3); SVD(res[0],res[1],res[2],sorting,max_iteration,lambda); return res;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
135,032,202,910,700,730,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
GF_Box *mvhd_box_new() { ISOM_DECL_BOX_ALLOC(GF_MovieHeaderBox, GF_ISOM_BOX_TYPE_MVHD); tmp->preferredRate = (1<<16); tmp->preferredVolume = (1<<8); tmp->matrixA = (1<<16); tmp->matrixD = (1<<16); tmp->matrixW = (1<<30); tmp->nextTrackID = 1; return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
43,731,183,747,608,780,000,000,000,000,000,000,000
15
fixed #1587
httpSpecialDoSide(HTTPRequestPtr requestor) { HTTPConnectionPtr client = requestor->connection; if (readFinished(client)) return 1; if(client->reqbegin > 0 && client->reqlen > client->reqbegin) { memmove(client->reqbuf, client->reqbuf + client->reqbegin, client->reqlen ...
0
[ "CWE-617" ]
polipo
0e2b44af619e46e365971ea52b97457bc0778cd3
23,733,126,566,743,518,000,000,000,000,000,000,000
19
Try to read POST requests to local configuration interface correctly.
static void dlg_beautify_response(pjsip_dialog *dlg, pj_bool_t add_headers, int st_code, pjsip_tx_data *tdata) { pjsip_cseq_hdr *cseq; int st_class; const pjsip_hdr *c_hdr; pjsip_hdr *hdr; cseq = PJSIP_MSG_CSEQ_HDR(tdata->msg); pj_assert(cseq != NULL); st_class = st_code ...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
265,876,036,796,609,740,000,000,000,000,000,000,000
71
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
static int copyTruncate(const char *currLog, const char *saveLog, const struct stat *sb, int flags, int skip_copy) { int rc = 1; int fdcurr = -1, fdsave = -1; message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog); if (!debug) { /* read access is sufficient for 'co...
0
[ "CWE-732" ]
logrotate
f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25
4,490,468,675,180,581,000,000,000,000,000,000,000
80
Lock state file to prevent parallel execution Running multiple instances of logrotate on the same set of log-files might have undesirable effects. Add command line option --skip-state-lock to skip locking the state file, for example if locking is unsupported or prohibited. Fixes: https://github.com/logrotate/logrota...
void jas_image_delcmpt(jas_image_t *image, int cmptno) { if (cmptno >= image->numcmpts_) { return; } jas_image_cmpt_destroy(image->cmpts_[cmptno]); if (cmptno < image->numcmpts_) { memmove(&image->cmpts_[cmptno], &image->cmpts_[cmptno + 1], (image->numcmpts_ - 1 - cmptno) * sizeof(jas_image_cmpt_t *)); } ...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
163,669,015,419,206,400,000,000,000,000,000,000,000
14
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...
srtp_unprotect_aead (srtp_ctx_t *ctx, srtp_stream_ctx_t *stream, int delta, xtd_seq_num_t est, void *srtp_hdr, unsigned int *pkt_octet_len) { srtp_hdr_t *hdr = (srtp_hdr_t*)srtp_hdr; uint32_t *enc_start; /* pointer to start of encrypted portion */ unsigned int enc_octet_len = 0; /* nu...
1
[ "CWE-119" ]
libsrtp
704a31774db0dd941094fd2b47c21638b8dc3de2
86,401,475,912,077,490,000,000,000,000,000,000,000
151
Prevent potential DoS attack due to lack of bounds checking on RTP header CSRC count and extension header length. Credit goes to Randell Jesup and the Firefox team for reporting this issue.
bool Image::isPrintICC(uint16_t type, Exiv2::PrintStructureOption option) { return type == 0x8773 && option == kpsIccProfile; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
154,407,545,278,630,980,000,000,000,000,000,000,000
4
Fix https://github.com/Exiv2/exiv2/issues/55
void Item_sp_variable::make_send_field(THD *thd, Send_field *field) { Item *it= this_item(); it->make_send_field(thd, field); if (name.str) field->col_name= name; else field->col_name= m_name; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
155,830,383,035,686,520,000,000,000,000,000,000,000
10
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.
void InitializeHttpParser(Local<Object> target, Local<Value> unused, Local<Context> context, void* priv) { Environment* env = Environment::GetCurrent(context); BindingData* const binding_data = env->AddBindingData<BindingData>(conte...
1
[ "CWE-400" ]
node
753f3b247ae2d24fee0b3f48b9ec3a5c308f0650
217,925,854,812,613,770,000,000,000,000,000,000,000
56
http: add requestTimeout This commits introduces a new http.Server option called requestTimeout with a default value in milliseconds of 0. If requestTimeout is set to a positive value, the server will start a new timer set to expire in requestTimeout milliseconds when a new connection is established. The timer is als...
void CLASS adobe_coeff (const char *t_make, const char *t_model) { static const struct { const char *prefix; short t_black, t_maximum, trans[12]; } table[] = { { "AgfaPhoto DC-833m", 0, 0, /* DJC */ { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, { "Apple QuickTake", 0, 0, /* DJC */ { 21...
0
[ "CWE-189" ]
LibRaw
4606c28f494a750892c5c1ac7903e62dd1c6fdb5
80,697,737,236,991,470,000,000,000,000,000,000,000
894
0.16.1: fix for dcraw ljpeg_start() vulnerability
diff_buf_idx(buf_T *buf) { int idx; for (idx = 0; idx < DB_COUNT; ++idx) if (curtab->tp_diffbuf[idx] == buf) break; return idx; }
0
[ "CWE-787" ]
vim
c101abff4c6756db4f5e740fde289decb9452efa
53,786,634,995,928,650,000,000,000,000,000,000,000
9
patch 8.2.5164: invalid memory access after diff buffer manipulations Problem: Invalid memory access after diff buffer manipulations. Solution: Use zero offset when change removes all lines in a diff block.
gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h) { TIFF* tif = img->tif; tileSeparateRoutine put = img->put.separate; uint32 col, row, y, rowstoread; tmsize_t pos; uint32 tw, th; unsigned char* buf; unsigned char* p0; unsigned char* p1; unsigned char* p2; unsigned char* pa; tmsize_t til...
0
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
95,565,101,808,189,270,000,000,000,000,000,000,000
141
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
T* createInputPartT(int partNumber) { }
0
[ "CWE-94", "CWE-787" ]
openexr
8b5370c688a7362673c3a5256d93695617a4cd9a
255,702,009,747,841,340,000,000,000,000,000,000,000
4
Fix #491, issue with part number range check reconstructing chunk offset table The chunk offset was incorrectly testing for a part number that was the same size (i.e. an invalid index) Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
extractG4DataFromFile(const char *filein, l_uint8 **pdata, size_t *pnbytes, l_int32 *pw, l_int32 *ph, l_int32 *pminisblack) { l_uint8 *inarray, *data; l_uint16 minisblack, comptype; /* a...
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
47,352,139,468,266,850,000,000,000,000,000,000,000
89
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
void validate() { if (!validated_) { #ifndef CROW_DISABLE_STATIC_DIR // stat on windows doesn't care whether '/' or '\' is being used. on Linux however, using '\' doesn't work. therefore every instance of '\' gets replaced with '/' then a check is done to make s...
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
186,719,467,876,535,940,000,000,000,000,000,000,000
47
Prevent HTTP pipelining which Crow doesn't support.
void CL_ConnectionlessPacket( netadr_t from, msg_t *msg ) { char *s; char *c; int challenge = 0; MSG_BeginReadingOOB( msg ); MSG_ReadLong( msg ); // skip the -1 s = MSG_ReadStringLine( msg ); Cmd_TokenizeString( s ); c = Cmd_Argv(0); Com_DPrintf ("CL packet %s: %s\n", NET_AdrToStringwPort(from), c); // ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
38,269,724,675,290,696,000,000,000,000,000,000,000
203
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
const char *MACH0_(get_intrp)(struct MACH0_(obj_t) *bin) { return bin? bin->intrp: NULL; }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
295,967,545,623,949,100,000,000,000,000,000,000,000
3
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
qtdemux_parse_cenc_aux_info (GstQTDemux * qtdemux, QtDemuxStream * stream, GstByteReader * br, guint8 * info_sizes, guint32 sample_count) { QtDemuxCencSampleSetInfo *ss_info = NULL; guint8 size; gint i; g_return_val_if_fail (qtdemux != NULL, FALSE); g_return_val_if_fail (stream != NULL, FALSE); g_retur...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
197,528,989,106,461,770,000,000,000,000,000,000,000
81
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
void shm_clean(XShmSegmentInfo *shm, XImage *xim) { int db = 0; if (db) fprintf(stderr, "shm_clean: called: %p\n", (void *)xim); X_LOCK; #if HAVE_XSHM if (shm != NULL && shm->shmid != -1 && dpy) { if (db) fprintf(stderr, "shm_clean: XShmDetach_wr\n"); XShmDetach_wr(dpy, shm); } #endif if (xim != NULL) { i...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
177,714,579,899,366,660,000,000,000,000,000,000,000
30
scan: limit access to shared memory segments to current user
ParseWinNum(act, var) struct action *act; int *var; { char **args = act->args; int i = 0; if (*args == 0 || args[1]) { Msg(0, "%s: %s: one argument required.", rc_name, comms[act->nr].name); return -1; } i = WindowByNoN(*args); if (i < 0) { Msg(0, "%s: %s: invalid argument. G...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
261,349,016,432,301,860,000,000,000,000,000,000,000
24
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...