func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync) { bool ret; if (dsync) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); spin_lock(&sbi->inode_lock[DIRTY_META]); ret = list_empty(&F2FS_I(inode)->gdirty_list); spin_unlock(&sbi->inode_lock[DIRTY_META]); return ret; } if (!is_inode_f...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
148,324,178,533,570,700,000,000,000,000,000,000,000
33
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static CHARSET_INFO *get_checksum_charset(const char *csname) { CHARSET_INFO *cs= get_charset_by_csname(csname, MY_CS_BINSORT, MYF(0)); if (!cs) { // Charset has no binary collation: use my_charset_bin. cs= &my_charset_bin; } return cs; }
0
[]
mysql-server
475dcde2c7856dd0050b967099a86c087d94f32f
115,691,998,130,322,510,000,000,000,000,000,000,000
10
Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD Description: my_crypt_genhash depends on the length of plaintext password. Longer the password, more is the time required to produce the transformation. An unusually large password may consume considerable amount of time...
write_http_response_header_impl(dir_connection_t *conn, ssize_t length, const char *type, const char *encoding, const char *extra_headers, long cache_lifetime) { char date[RFC1123_TIME_LEN+1]; char tmp[1024]; char *cp; time_t now =...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
268,322,424,116,870,800,000,000,000,000,000,000,000
64
Fix assertion failure in tor_timegm. Fixes bug 6811.
CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString, int stmt_location, int stmt_len) { const char *schemaName = stmt->schemaname; Oid namespaceId; OverrideSearchPath *overridePath; List *parsetree_list; ListCell *parsetree_item; Oid owner_uid; Oid saved_uid; int save_sec_conte...
1
[ "CWE-94" ]
postgres
5721da7e41e7a280587bda29cd1674c7da3317f8
221,606,949,682,735,530,000,000,000,000,000,000,000
163
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...
template<typename T> inline void sgels(char & TRANS, int &M, int &N, int &NRHS, T* lapA, int &LDA, T* lapB, int &LDB, T* WORK, int &LWORK, int &INFO){ dgels_(&TRANS, &M, &N, &NRHS, lapA, &LDA, lapB, &LDB, WORK, &LWORK, &INFO);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
259,740,127,623,434,450,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
int vm_insert_page(struct vm_area_struct *vma, unsigned long addr, struct page *page) { if (addr < vma->vm_start || addr >= vma->vm_end) return -EFAULT; if (!page_count(page)) return -EINVAL; if (!(vma->vm_flags & VM_MIXEDMAP)) { BUG_ON(down_read_trylock(&vma->vm_mm->mmap_sem)); BUG_ON(vma->vm_flags & VM_...
0
[ "CWE-20" ]
linux
6b7339f4c31ad69c8e9c0b2859276e22cf72176d
186,290,508,041,456,580,000,000,000,000,000,000,000
14
mm: avoid setting up anonymous pages into file mapping Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated...
void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, u64 delta_ns, const enum hrtimer_mode mode) { struct hrtimer_clock_base *base, *new_base; unsigned long flags; int leftmost; base = lock_hrtimer_base(timer, &flags); /* Remove an active timer from the queue: */ remove_hrtimer(timer, base, tr...
1
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
21,480,091,889,831,135,000,000,000,000,000,000,000
41
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
SpoolssEndDocPrinter_q(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) { e_ctx_hnd policy_hnd; char *pol_name; /* Parse packet */ offset = dissect_nt_policy_hnd( tvb, offset, pinfo, tree, di, drep, hf_hnd, &policy_hnd, NULL, FALSE, FALSE); dcerpc_f...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
92,622,623,972,613,360,000,000,000,000,000,000,000
23
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...
static int kvm_arch_suspend_notifier(struct kvm *kvm) { struct kvm_vcpu *vcpu; unsigned long i; int ret = 0; mutex_lock(&kvm->lock); kvm_for_each_vcpu(i, vcpu, kvm) { if (!vcpu->arch.pv_time.active) continue; ret = kvm_set_guest_paused(vcpu); if (ret) { kvm_err("Failed to pause guest VCPU%d: %d\n", ...
0
[ "CWE-476" ]
linux
fee060cd52d69c114b62d1a2948ea9648b5131f9
11,100,480,120,536,414,000,000,000,000,000,000,000
22
KVM: x86: avoid calling x86 emulator without a decoded instruction Whenever x86_decode_emulated_instruction() detects a breakpoint, it returns the value that kvm_vcpu_check_breakpoint() writes into its pass-by-reference second argument. Unfortunately this is completely bogus because the expected outcome of x86_decode...
static int proc_close( struct inode *inode, struct file *file ) { struct proc_data *data = file->private_data; if (data->on_close != NULL) data->on_close(inode, file); kfree(data->rbuffer); kfree(data->wbuffer); kfree(data); return 0; }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
79,569,369,573,731,780,000,000,000,000,000,000,000
11
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
guess_fstype_and_mount(const char *spec, const char *node, const char **types, int flags, char *mount_opts, int *special, int *status) { struct mountargs args = { spec, node, NULL, flags & ~MS_NOSYS, mount_opts }; int ambivalent = 0; if (*types && strcasecmp (*types, "auto") == 0) *types = NULL...
0
[ "CWE-200" ]
util-linux
0377ef91270d06592a0d4dd009c29e7b1ff9c9b8
150,966,730,339,756,790,000,000,000,000,000,000,000
51
mount: (deprecated) drop --guess-fstype The option is undocumented and unnecessary. Signed-off-by: Karel Zak <kzak@redhat.com>
void CLASS crop_masked_pixels() { int row, col; unsigned #ifndef LIBRAW_LIBRARY_BUILD r, raw_pitch = raw_width*2, c, m, mblack[8], zero, val; #else c, m, zero, val; #define mblack imgdata.color.black_stat #endif #ifndef LIBRAW_LIBRARY_BUILD if (load_raw == &CLASS phase_one_load_raw || load_raw...
0
[ "CWE-189" ]
LibRaw
4606c28f494a750892c5c1ac7903e62dd1c6fdb5
10,100,887,791,418,224,000,000,000,000,000,000,000
78
0.16.1: fix for dcraw ljpeg_start() vulnerability
void ha_myisam::position(const uchar *record) { my_off_t row_position= mi_position(file); my_store_ptr(ref, ref_length, row_position); }
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
220,374,003,769,801,200,000,000,000,000,000,000,000
5
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
int fit_image_check_sig(const void *fit, int noffset, const void *data, size_t size, int required_keynode, char **err_msgp) { struct image_sign_info info; struct image_region region; uint8_t *fit_value; int fit_value_len; *err_msgp = NULL; if (fit_image_setup_verify(&info, fit, noffset, required_keynode, ...
0
[]
u-boot
79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4
112,655,791,607,576,720,000,000,000,000,000,000,000
29
fit: Don't allow verification of images with @ nodes When searching for a node called 'fred', any unit address appended to the name is ignored by libfdt, meaning that 'fred' can match 'fred@1'. This means that we cannot be sure that the node originally intended is the one that is used. Disallow use of nodes with unit...
inline void StreamListener::OnStreamAfterShutdown(ShutdownWrap* w, int status) { CHECK_NOT_NULL(previous_listener_); previous_listener_->OnStreamAfterShutdown(w, status); }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
220,737,458,433,684,530,000,000,000,000,000,000,000
4
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
MATCHER_P(Percent, rhs, "") { envoy::type::v3::FractionalPercent expected; expected.set_numerator(rhs); expected.set_denominator(envoy::type::v3::FractionalPercent::HUNDRED); return TestUtility::protoEqual(expected, arg, /*ignore_repeated_field_ordering=*/false); }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
288,839,996,899,763,600,000,000,000,000,000,000,000
6
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
static inline struct inode *isofs_iget_reloc(struct super_block *sb, unsigned long block, unsigned long offset) { return __isofs_iget(sb, block, offset, 1); }
0
[ "CWE-20", "CWE-399" ]
linux
410dd3cf4c9b36f27ed4542ee18b1af5e68645a4
205,142,097,714,050,940,000,000,000,000,000,000,000
6
isofs: Fix unbounded recursion when processing relocated directories We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow...
static inline void context_clear_pasid_enable(struct context_entry *context) { context->lo &= ~(1ULL << 11); }
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
200,465,219,732,447,730,000,000,000,000,000,000,000
4
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...
static int unpack_audio (WavpackContext *wpc, FILE *outfile, int qmode, unsigned char *md5_digest, int64_t *sample_count) { unsigned char *output_buffer = NULL, *output_pointer = NULL, *new_channel_order = NULL; int bps = WavpackGetBytesPerSample (wpc), num_channels = WavpackGetNumChannels (wpc); int64_t un...
0
[ "CWE-476", "CWE-703" ]
WavPack
25b4a2725d8568212e7cf89ca05ca29d128af7ac
160,765,848,295,356,800,000,000,000,000,000,000,000
132
issue #121: NULL pointer dereference in wvunpack.c * check for NULL pointer before dereferencing in wvunpack.c * sanitize custom extensions to be alphanumeric only
static void urlDestroyHashMapEntry(void *arg ATTR_UNUSED, char *key, char *value) { UNUSED(arg); free(key); free(value); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
shellinabox
4f0ecc31ac6f985e0dd3f5a52cbfc0e9251f6361
119,385,329,322,836,380,000,000,000,000,000,000,000
6
Rolling code for version 2.21
Get a specific body section's MIME headers */ PHP_FUNCTION(imap_fetchmime) { zval *streamind; long msgno, flags = 0; pils *imap_le_struct; char *body, *sec; int sec_len; unsigned long len; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc TSRMLS_CC, "rls|l", &streamind, &msgno, &sec, &sec_len, &fla...
0
[ "CWE-476" ]
php-src
7edc639b9ff1c3576773d79d016abbeed1f93846
160,815,463,926,853,340,000,000,000,000,000,000,000
39
Fix #77020: null pointer dereference in imap_mail If an empty $message is passed to imap_mail(), we must not set message to NULL, since _php_imap_mail() is not supposed to handle NULL pointers (opposed to pointers to NUL).
bool test_r_str_trim(void) { // 1 const char* one = r_str_trim_head_ro (" hello "); mu_assert_streq (one, "hello ", "one"); // 2 char* two = strdup (" hello "); r_str_trim_head (two); mu_assert_streq (two, "hello ", "two"); r_str_trim (two); // 2 mu_assert_streq (two, "hello", "three"); free (two); ...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
123,950,559,435,218,250,000,000,000,000,000,000,000
14
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static int pvc_connect(struct socket *sock, struct sockaddr *sockaddr, int sockaddr_len, int flags) { return pvc_bind(sock, sockaddr, sockaddr_len); }
0
[ "CWE-200" ]
linux
3c0c5cfdcd4d69ffc4b9c0907cec99039f30a50a
256,147,891,551,078,320,000,000,000,000,000,000,000
5
atm: fix info leak via getsockname() The ATM code fails to initialize the two padding bytes of struct sockaddr_atmpvc inserted for alignment. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@dave...
int fuse_fill_super_common(struct super_block *sb, struct fuse_fs_context *ctx) { struct fuse_dev *fud = NULL; struct fuse_mount *fm = get_fuse_mount_super(sb); struct fuse_conn *fc = fm->fc; struct inode *root; struct dentry *root_dentry; int err; err = -EINVAL; if (sb->s_flags & SB_MANDLOCK) goto err; fu...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
247,902,311,578,807,300,000,000,000,000,000,000,000
99
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
dissect_kafka_metadata_replica(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { proto_tree_add_item(tree, hf_kafka_replica, tvb, offset, 4, ENC_BIG_ENDIAN); return offset + 4; }
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
30,015,833,284,570,343,000,000,000,000,000,000,000
6
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
TEST_P(Http2IntegrationTest, RouterDownstreamDisconnectBeforeResponseComplete) { testRouterDownstreamDisconnectBeforeResponseComplete(); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
225,169,248,766,026,900,000,000,000,000,000,000,000
3
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
string_copy(const uschar *s) { int len = Ustrlen(s) + 1; uschar *ss = store_get(len); memcpy(ss, s, len); return ss; }
0
[ "CWE-264" ]
exim
43ba2742c700d625dcdcdaf7bbadc2f72776854a
116,310,888,926,336,690,000,000,000,000,000,000,000
7
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...
DispatcherThread(ModuleSQL* CreatorModule) : Parent(CreatorModule) { }
0
[ "CWE-476" ]
inspircd
8745660fcdac7c1b80c94cfc0ff60928cd4dd4b7
157,000,408,750,528,480,000,000,000,000,000,000,000
1
Initialise and deallocate the MySQL library correctly.
bool st_select_lex_unit::check_parameters(SELECT_LEX *main_select) { for(SELECT_LEX *sl= first_select(); sl; sl= sl->next_select()) { if (sl->check_parameters(main_select)) return TRUE; } return fake_select_lex && fake_select_lex->check_parameters(main_select); }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
228,620,701,664,629,460,000,000,000,000,000,000,000
9
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
GF_Err dfla_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_FLACConfigBox *ptr = (GF_FLACConfigBox *) s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_data(bs, ptr->data, ptr->dataSize); return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
327,165,497,187,889,700,000,000,000,000,000,000,000
9
fixed #1587
routerset_refresh_countries(routerset_t *target) { int cc; bitarray_free(target->countries); if (!geoip_is_loaded()) { target->countries = NULL; target->n_countries = 0; return; } target->n_countries = geoip_get_n_countries(); target->countries = bitarray_init_zero(target->n_countries); SMART...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
226,799,095,289,248,080,000,000,000,000,000,000,000
23
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
void bcf_empty(bcf1_t *v) { bcf_clear1(v); free(v->d.id); free(v->d.als); free(v->d.allele); free(v->d.flt); free(v->d.info); free(v->d.fmt); if (v->d.var ) free(v->d.var); free(v->shared.s); free(v->indiv.s); memset(&v->d,0,sizeof(v->d)); memset(&v->shared,0,sizeof(v->shared)); mems...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
160,039,073,155,485,700,000,000,000,000,000,000,000
12
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
static int fsl_lpspi_runtime_resume(struct device *dev) { struct spi_controller *controller = dev_get_drvdata(dev); struct fsl_lpspi_data *fsl_lpspi; int ret; fsl_lpspi = spi_controller_get_devdata(controller); ret = clk_prepare_enable(fsl_lpspi->clk_per); if (ret) return ret; ret = clk_prepare_enable(fsl_l...
0
[ "CWE-400", "CWE-401" ]
linux
057b8945f78f76d0b04eeb5c27cd9225e5e7ad86
10,596,632,010,006,302,000,000,000,000,000,000,000
20
spi: lpspi: fix memory leak in fsl_lpspi_probe In fsl_lpspi_probe an SPI controller is allocated either via spi_alloc_slave or spi_alloc_master. In all but one error cases this controller is put by going to error handling code. This commit fixes the case when pm_runtime_get_sync fails and it should go to the error han...
static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; mul_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSR...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
58,969,466,036,192,240,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void decode_xml(XMLObj *obj) { RGWXMLDecoder::decode_xml("Status", status, obj); }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
17,222,321,226,260,400,000,000,000,000,000,000,000
3
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static int gather_hugetbl_stats(pte_t *pte, unsigned long hmask, unsigned long addr, unsigned long end, struct mm_walk *walk) { return 0; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
330,458,440,559,760,760,000,000,000,000,000,000,000
5
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
double pae(jas_matrix_t *x, jas_matrix_t *y) { double s; double d; int i; int j; s = 0.0; for (i = 0; i < jas_matrix_numrows(x); i++) { for (j = 0; j < jas_matrix_numcols(x); j++) { d = abs(jas_matrix_get(y, i, j) - jas_matrix_get(x, i, j)); if (d > s) { s = d; } } } return s; }
0
[ "CWE-119" ]
jasper
65536647d380571d1a9a6c91fa03775fb5bbd256
91,132,515,943,778,400,000,000,000,000,000,000,000
19
A new experimental memory allocator has been introduced. The allocator is experimental in the sense that its API is not considered stable and the allocator may change or disappear entirely in future versions of the code. This new allocator tracks how much memory is being used by jas_malloc and friends. A maximum upp...
static void __perf_event_disable(struct perf_event *event, struct perf_cpu_context *cpuctx, struct perf_event_context *ctx, void *info) { if (event->state < PERF_EVENT_STATE_INACTIVE) return; update_context_time(ctx); update_cgrp_time_from_event(event); update_group_times(event); if (event == eve...
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
317,711,941,083,011,100,000,000,000,000,000,000,000
17
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) { #ifdef HAVE_TLS if (mysql->net.pvio && mysql->net.pvio->ctls) { return ma_pvio_tls_cipher(mysql->net.pvio->ctls); } #endif return(NULL); }
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
100,896,105,329,828,150,000,000,000,000,000,000,000
10
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
static inline int ep_events_available(struct eventpoll *ep) { return !list_empty_careful(&ep->rdllist) || READ_ONCE(ep->ovflist) != EP_UNACTIVE_PTR; }
0
[ "CWE-416" ]
linux
a9ed4a6560b8562b7e2e2bed9527e88001f7b682
137,834,863,620,715,720,000,000,000,000,000,000,000
5
epoll: Keep a reference on files added to the check list When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe wh...
static double mp_matrix_invert(_cimg_math_parser& mp) { double *const ptrd = &_mp_arg(1) + 1; const double *const ptr1 = &_mp_arg(2) + 1; const unsigned int k = (unsigned int)mp.opcode[3]; const bool use_LU = (bool)_mp_arg(4); CImg<doubleT>(ptrd,k,k,1,1,true) = CImg<doubleT...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
257,598,795,018,412,000,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void groups_sort(struct group_info *group_info) { int base, max, stride; int gidsetsize = group_info->ngroups; for (stride = 1; stride < gidsetsize; stride = 3 * stride + 1) ; /* nothing */ stride /= 3; while (stride) { max = gidsetsize - stride; for (base = 0; base < max; base++) { int left = ba...
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
119,429,697,845,714,660,000,000,000,000,000,000,000
27
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
static int validate_slab_node(struct kmem_cache *s, struct kmem_cache_node *n, unsigned long *map) { unsigned long count = 0; struct page *page; unsigned long flags; spin_lock_irqsave(&n->list_lock, flags); list_for_each_entry(page, &n->partial, lru) { validate_slab_slab(s, page, map); count++; } if (cou...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
7,683,235,479,588,303,000,000,000,000,000,000,000
33
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static double mp_image_norm(_cimg_math_parser& mp) { unsigned int ind = (unsigned int)mp.opcode[2]; if (ind!=~0U) { if (!mp.imglist.width()) return cimg::type<double>::nan(); ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); } const CImg<T> &img...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
226,494,623,880,727,720,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start, ram_addr_t length, unsigned client) { return false; }
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
202,590,552,848,748,900,000,000,000,000,000,000,000
6
Fix crash when mapping a big memory and calling uc_close
static int ascii_to_wc(AVIOContext *pb, const uint8_t *b) { int val; while (*b) { GET_UTF8(val, *b++, return -1;) avio_wb16(pb, val); } avio_wb16(pb, 0x00); return 0; }
0
[ "CWE-369" ]
FFmpeg
2c0e98a0b478284bdff6d7a4062522605a8beae5
133,278,452,568,972,340,000,000,000,000,000,000,000
10
avformat/movenc: Write version 2 of audio atom if channels is not known The version 1 needs the channel count and would divide by 0 Fixes: division by 0 Fixes: fpe_movenc.c_1108_1.ogg Fixes: fpe_movenc.c_1108_2.ogg Fixes: fpe_movenc.c_1108_3.wav Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> Signed-off-by: Michael N...
xmlFatalErr(xmlParserCtxtPtr ctxt, xmlParserErrors error, const char *info) { const char *errmsg; char errstr[129] = ""; if ((ctxt != NULL) && (ctxt->disableSAX != 0) && (ctxt->instate == XML_PARSER_EOF)) return; switch (error) { case XML_ERR_INVALID_HEX_CHARREF: errmsg = "...
1
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
111,961,835,312,167,130,000,000,000,000,000,000,000
205
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.
bgp_prune () { return; }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
41,963,434,879,353,774,000,000,000,000,000,000,000
4
bash-4.4-rc2 release
TEST_P(Http2IntegrationTest, RouterUpstreamResponseBeforeRequestComplete) { testRouterUpstreamResponseBeforeRequestComplete(); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
1,194,153,803,988,763,600,000,000,000,000,000,000
3
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u) { struct ip_vs_scheduler *sched, *old_sched; int ret = 0; /* * Lookup the scheduler, by 'u->sched_name' */ sched = ip_vs_scheduler_get(u->sched_name); if (sched == NULL) { pr_info("Scheduler module ip_vs_%s not found\n", u->sch...
0
[ "CWE-119", "CWE-787" ]
linux
04bcef2a83f40c6db24222b27a52892cba39dffb
200,088,469,457,440,600,000,000,000,000,000,000,000
77
ipvs: Add boundary check on ioctl arguments The ipvs code has a nifty system for doing the size of ioctl command copies; it defines an array with values into which it indexes the cmd to find the right length. Unfortunately, the ipvs code forgot to check if the cmd was in the range that the array provides, allowing fo...
void fuse_read_args_fill(struct fuse_io_args *ia, struct file *file, loff_t pos, size_t count, int opcode) { struct fuse_file *ff = file->private_data; struct fuse_args *args = &ia->ap.args; ia->read.in.fh = ff->fh; ia->read.in.offset = pos; ia->read.in.size = count; ia->read.in.flags = file->f_flags; args-...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
7,612,123,456,620,234,000,000,000,000,000,000,000
19
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
gdata_service_get_authorizer (GDataService *self) { g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL); return self->priv->authorizer; }
0
[ "CWE-20" ]
libgdata
6799f2c525a584dc998821a6ce897e463dad7840
230,050,651,296,022,740,000,000,000,000,000,000,000
6
core: Validate SSL certificates for all connections This prevents MitM attacks which use spoofed SSL certificates. Note that this bumps our libsoup requirement to 2.37.91. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535
read_limits(long *minval, long *maxval) { int reverse = FALSE; char_u *first_char; long tmp; if (*regparse == '-') { // Starts with '-', so reverse the range later regparse++; reverse = TRUE; } first_char = regparse; *minval = getdigits(&regparse); if (*regparse == ',') // T...
0
[ "CWE-416" ]
vim
4c13e5e6763c6eb36a343a2b8235ea227202e952
49,004,314,822,500,650,000,000,000,000,000,000,000
44
patch 8.2.3949: using freed memory with /\%V Problem: Using freed memory with /\%V. Solution: Get the line again after getvvcol().
static u8 m4v_get_sar_idx(u32 w, u32 h) { u32 i; for (i = 0; i < 6; i++) { if ((m4v_sar[i].w == w) && (m4v_sar[i].h == h)) return i; } return 0xF; }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
119,150,331,010,278,980,000,000,000,000,000,000,000
8
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static int setup_transport(void) { int rv; rv = transport()->init(message_recv); if (rv < 0) { log_error("failed to init booth_transport %s", transport()->name); goto out; } rv = booth_transport[TCP].init(NULL); if (rv < 0) { log_error("failed to init booth_transport[TCP]"); goto out; } out: return r...
0
[ "CWE-287", "CWE-284" ]
booth
35bf0b7b048d715f671eb68974fb6b4af6528c67
256,812,193,455,605,100,000,000,000,000,000,000,000
19
Revert "Refactor: main: substitute is_auth_req macro" This reverts commit da79b8ba28ad4837a0fee13e5f8fb6f89fe0e24c. authfile != authkey Signed-off-by: Jan Friesse <jfriesse@redhat.com>
static int pl022_post_load(void *opaque, int version_id) { PL022State *s = opaque; if (s->tx_fifo_head < 0 || s->tx_fifo_head >= ARRAY_SIZE(s->tx_fifo) || s->rx_fifo_head < 0 || s->rx_fifo_head >= ARRAY_SIZE(s->rx_fifo)) { return -1; } return 0; }
0
[ "CWE-119" ]
qemu
d8d0a0bc7e194300e53a346d25fe5724fd588387
116,269,500,909,214,030,000,000,000,000,000,000,000
12
pl022: fix buffer overun on invalid state load CVE-2013-4530 pl022.c did not bounds check tx_fifo_head and rx_fifo_head after loading them from file and before they are used to dereference array. Reported-by: Michael S. Tsirkin <mst@redhat.com Reported-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Micha...
static struct free_nid *__lookup_free_nid_list(struct f2fs_nm_info *nm_i, nid_t n) { return radix_tree_lookup(&nm_i->free_nid_root, n); }
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
58,580,643,504,605,540,000,000,000,000,000,000,000
5
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
f_round(typval_T *argvars, typval_T *rettv) { float_T f = 0.0; rettv->v_type = VAR_FLOAT; if (get_float_arg(argvars, &f) == OK) rettv->vval.v_float = vim_round(f); else rettv->vval.v_float = 0.0; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
39,459,434,354,202,420,000,000,000,000,000,000,000
10
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
mech_rpa_auth_continue(struct auth_request *auth_request, const unsigned char *data, size_t data_size) { struct rpa_auth_request *request = (struct rpa_auth_request *)auth_request; switch (request->phase) { case 0: mech_rpa_auth_phase1(auth_request, data, data_size); break; case 1: mech_rpa_auth_p...
0
[ "CWE-125" ]
core
69ad3c902ea4bbf9f21ab1857d8923f975dc6145
162,390,922,764,459,030,000,000,000,000,000,000,000
21
auth: mech-rpa - Fail on zero len buffer
static void v9fs_remove(void *opaque) { int32_t fid; int err = 0; size_t offset = 7; V9fsFidState *fidp; V9fsPDU *pdu = opaque; err = pdu_unmarshal(pdu, offset, "d", &fid); if (err < 0) { goto out_nofid; } trace_v9fs_remove(pdu->tag, pdu->id, fid); fidp = get_fid(pdu, f...
0
[ "CWE-399", "CWE-772" ]
qemu
e95c9a493a5a8d6f969e86c9f19f80ffe6587e19
189,623,662,036,884,970,000,000,000,000,000,000,000
43
9pfs: fix potential host memory leak in v9fs_read In 9pfs read dispatch function, it doesn't free two QEMUIOVector object thus causing potential memory leak. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Greg Kurz <groug@kaod.org>
void testUriUserInfoHostPort23_Bug3510198_2() { // User info with ":", with port, with escaped chars in user name and password UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; int res; // 0 4 0 3 0 13 01 0 4 01 res = uriParseUriA(&stateA, "http" ":/...
0
[ "CWE-787" ]
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
175,955,633,856,500,000,000,000,000,000,000,000,000
18
UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex Reported by Google Autofuzz team
getword(f, word, newlinep, filename) FILE *f; char *word; int *newlinep; char *filename; { int c, len, escape; int quoted, comment; int value, digit, got, n; #define isoctal(c) ((c) >= '0' && (c) < '8') *newlinep = 0; len = 0; escape = 0; comment = 0; quoted = 0; /...
0
[ "CWE-415", "CWE-119" ]
ppp
7658e8257183f062dc01f87969c140707c7e52cb
335,180,675,507,600,630,000,000,000,000,000,000,000
240
pppd: Eliminate potential integer overflow in option parsing When we are reading in a word from an options file, we maintain a count of the length we have seen so far in 'len', which is an int. When len exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the buffer but we continue to increment len. Sin...
static int ext4_fill_super(struct super_block *sb, void *data, int silent) { char *orig_data = kstrdup(data, GFP_KERNEL); struct buffer_head *bh; struct ext4_super_block *es = NULL; struct ext4_sb_info *sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); ext4_fsblk_t block; ext4_fsblk_t sb_block = get_sb_block(&data); ext4...
0
[ "CWE-125" ]
linux
3a4b77cd47bb837b8557595ec7425f281f2ca1fe
334,301,463,682,867,600,000,000,000,000,000,000,000
962
ext4: validate s_first_meta_bg at mount time Ralf Spenneberg reported that he hit a kernel crash when mounting a modified ext4 image. And it turns out that kernel crashed when calculating fs overhead (ext4_calculate_overhead()), this is because the image has very large s_first_meta_bg (debug code shows it's 842150400)...
fr_window_free_open_files (FrWindow *window) { GList *scan; for (scan = window->priv->open_files; scan; scan = scan->next) { OpenFile *file = scan->data; if (file->monitor != NULL) g_file_monitor_cancel (file->monitor); open_file_free (file); } g_list_free (window->priv->open_files); window->priv->open_...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
281,827,555,654,586,330,000,000,000,000,000,000,000
14
libarchive: sanitize filenames before extracting
static int hdrchkTagType(rpm_tag_t tag, rpm_tagtype_t type) { rpmTagType t = rpmTagGetTagType(tag); if (t == type) return 0; /* Permit unknown tags for forward compatibility */ if (t == RPM_NULL_TYPE) return 0; /* Some string tags harmlessly disagree on the exact type */ if (rpmTagGetClass(t...
0
[ "CWE-125" ]
rpm
8f4b3c3cab8922a2022b9e47c71f1ecf906077ef
267,498,769,410,118,440,000,000,000,000,000,000,000
18
hdrblobInit() needs bounds checks too Users can pass untrusted data to hdrblobInit() and it must be robust against this.
wav_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock) { WAVLIKE_PRIVATE *wpriv ; WAV_FMT *wav_fmt ; FACT_CHUNK fact_chunk ; uint32_t marker, chunk_size = 0, RIFFsize = 0, done = 0 ; int parsestage = 0, error, format = 0 ; if (psf->is_pipe == 0 && psf->filelength > SF_PLATFORM_S64 (0xffffffff)...
1
[ "CWE-476" ]
libsndfile
6f3266277bed16525f0ac2f0f03ff4626f1923e5
27,174,487,493,943,340,000,000,000,000,000,000,000
455
Fix max channel count bug The code was allowing files to be written with a channel count of exactly `SF_MAX_CHANNELS` but was failing to read some file formats with the same channel count.
static int evr_active(struct task_struct *target, const struct user_regset *regset) { flush_spe_to_thread(target); return target->thread.used_spe ? regset->n : 0; }
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
299,027,086,309,895,200,000,000,000,000,000,000,000
6
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
inline uint32_t web_client_api_request_v1_data_google_format(char *name) { uint32_t hash = simple_hash(name); int i; for(i = 0; api_v1_data_google_formats[i].name ; i++) { if (unlikely(hash == api_v1_data_google_formats[i].hash && !strcmp(name, api_v1_data_google_formats[i].name))) { re...
0
[ "CWE-113", "CWE-200", "CWE-94", "CWE-74" ]
netdata
92327c9ec211bd1616315abcb255861b130b97ca
90,953,982,471,564,650,000,000,000,000,000,000,000
12
fixed vulnerabilities identified by red4sec.com (#4521)
static void set_cc_op(DisasContext *s, CCOp op) { int dead; if (s->cc_op == op) { return; } /* Discard CC computation that will no longer be used. */ dead = cc_op_live[s->cc_op] & ~cc_op_live[op]; if (dead & USES_CC_DST) { tcg_gen_discard_tl(cpu_cc_dst); } if (dead & U...
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
339,049,855,109,726,700,000,000,000,000,000,000,000
36
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
bool CudnnSupport::DoElementwiseOperate( Stream* stream, dnn::ElementwiseOperation operation, port::ArraySlice<dnn::BatchDescriptor> input_dimensions, port::ArraySlice<const DeviceMemory<float>*> input_data, const dnn::BatchDescriptor& output_dimensions, DeviceMemory<float>* output_data) { LOG(FAT...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
202,638,983,279,355,300,000,000,000,000,000,000,000
9
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
handle_did_throw() { char *p = NULL; msglist_T *messages = NULL; ESTACK_CHECK_DECLARATION /* * If the uncaught exception is a user exception, report it as an * error. If it is an error exception, display the saved error * message now. For an interrupt exception, do nothing; the * ...
0
[ "CWE-125" ]
vim
d3a117814d6acbf0dca3eff1a7626843b9b3734a
38,769,223,327,838,313,000,000,000,000,000,000,000
63
patch 8.2.4009: reading one byte beyond the end of the line Problem: Reading one byte beyond the end of the line. Solution: Check for NUL byte first.
static struct tevent_req *cli_connect_nb_send( TALLOC_CTX *mem_ctx, struct tevent_context *ev, const char *host, const struct sockaddr_storage *dest_ss, uint16_t port, int name_type, const char *myname, int signing_state, int flags) { struct tevent_req *req, *subreq; struct cli_connect_nb_state *state; req = te...
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
333,746,628,506,863,300,000,000,000,000,000,000,000
43
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl) { u32 a; char buf[32]; if (in && inaddr_name) return -1; else if (!in && !inaddr_name) return -1; if (in) { a = ntohl(in->s_addr); evutil_snprintf(buf, sizeof(buf...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
100,736,541,343,363,700,000,000,000,000,000,000,000
21
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
xsltLREBuildEffectiveNsNodes(xsltCompilerCtxtPtr cctxt, xsltStyleItemLRElementInfoPtr item, xmlNodePtr elem, int isLRE) { xmlNsPtr ns, tmpns; xsltEffectiveNsPtr effNs, lastEffNs = NULL; int i, j, holdByElem; xsltPointerListPtr extElemNs = cctxt->inode->extElemNs; xsltPointerL...
0
[]
libxslt
7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
106,101,155,990,917,960,000,000,000,000,000,000,000
163
Crash compiling stylesheet with DTD * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation process could get seriously wrong
static long do_splice_to(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) { ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); int ret; if (unlikely(!(in->f_mode & FMODE_READ))) return -EBADF; ret = rw_ve...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
190,263,454,428,113,700,000,000,000,000,000,000,000
25
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
hb_ot_layout_language_get_feature_count (hb_ot_layout_t *layout, hb_ot_layout_table_type_t table_type, unsigned int script_index, unsigned int language_index) { const LangSys &l = get_gsubgpos_table (layout, table_type).get_script (script_index).get_lang_sys (...
0
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
13,857,489,114,483,295,000,000,000,000,000,000,000
9
[HB] Remove all references to the old code!
R_API char *r_str_nextword(char *s, char ch) { char *p = strchr (s, ch); if (!p) { return NULL; } *p++ = 0; return p; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
237,944,026,883,000,050,000,000,000,000,000,000,000
8
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
R_API st64 r_buf_read_at(RBuffer *b, ut64 addr, ut8 *buf, ut64 len) { r_return_val_if_fail (b && buf, -1); st64 o_addr = r_buf_seek (b, 0, R_BUF_CUR); st64 r = r_buf_seek (b, addr, R_BUF_SET); if (r < 0) { return r; } r = r_buf_read (b, buf, len); r_buf_seek (b, o_addr, R_BUF_SET); return r; }
1
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
222,127,049,619,397,960,000,000,000,000,000,000,000
12
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
static void lsr_read_any_attribute(GF_LASeRCodec *lsr, GF_Node *node, Bool skippable) { u32 val = 1; if (skippable) GF_LSR_READ_INT(lsr, val, 1, "has_attrs"); if (val) { do { GF_LSR_READ_INT(lsr, val, lsr->info->cfg.extensionIDBits, "reserved"); val = lsr_read_vluimsbf5(lsr, "len");//len in BITS GF_LSR_RE...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
50,275,722,787,834,050,000,000,000,000,000,000,000
14
fixed #2213
int manager_ref_gid(Manager *m, gid_t gid, bool clean_ipc) { return manager_ref_uid_internal(m, &m->gid_refs, (uid_t) gid, clean_ipc); }
0
[ "CWE-20" ]
systemd
531ac2b2349da02acc9c382849758e07eb92b020
128,729,731,651,368,830,000,000,000,000,000,000,000
3
If the notification message length is 0, ignore the message (#4237) Fixes #4234. Signed-off-by: Jorge Niedbalski <jnr@metaklass.org>
ecc_mul_m (const struct ecc_modulo *m, mp_limb_t a24, unsigned bit_low, unsigned bit_high, mp_limb_t *qx, const uint8_t *n, const mp_limb_t *px, mp_limb_t *scratch) { unsigned i; mp_limb_t cy, swap; #define x2 (scratch) #define z2 (scratch + m->size) #define x3 (scratch + 2*m->size) #define z3 (scr...
1
[ "CWE-787" ]
nettle
a63893791280d441c713293491da97c79c0950fe
22,599,530,654,605,990,000,000,000,000,000,000,000
125
New functions ecc_mod_mul_canonical and ecc_mod_sqr_canonical. * ecc-mod-arith.c (ecc_mod_mul_canonical, ecc_mod_sqr_canonical): New functions. * ecc-internal.h: Declare and document new functions. * curve448-eh-to-x.c (curve448_eh_to_x): Use ecc_mod_sqr_canonical. * curve25519-eh-to-x.c (curve25519_eh_to_x): Use ecc_...
input_split(struct input_ctx *ictx) { const char *errstr; char *ptr, *out; struct input_param *ip; u_int i; for (i = 0; i < ictx->param_list_len; i++) { if (ictx->param_list[i].type == INPUT_STRING) free(ictx->param_list[i].str); } ictx->param_list_len = 0; if (ictx->param_len == 0) return (0); ...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
35,867,577,092,853,410,000,000,000,000,000,000,000
49
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
pci_apic_prt_entry(int bus, int slot, int pin, int pirq_pin, int ioapic_irq, void *arg) { dsdt_line(" Package ()"); dsdt_line(" {"); dsdt_line(" 0x%X,", slot << 16 | 0xffff); dsdt_line(" 0x%02X,", pin - 1); dsdt_line(" Zero,"); dsdt_line(" 0x%X", ioapic_irq); dsdt_line(" },"); }
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
73,830,874,590,762,675,000,000,000,000,000,000,000
11
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
on_release_display (int signal) { int fd; fd = open ("/dev/tty0", O_RDWR | O_NOCTTY); ioctl(fd, VT_RELDISP, 1); close(fd); }
0
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
73,772,493,518,106,270,000,000,000,000,000,000,000
8
session-worker: Don't switch back VTs until session is fully exited There's a race condition on shutdown where the session worker is switching VTs back to the initial VT at the same time as the session exit is being processed. This means that manager may try to start a login screen (because of the VT switch) when aut...
int def_font(DviContext *dvi, int opcode) { DviFontRef *ref; Int32 arg; arg = dugetn(dvi, opcode - DVI_FNT_DEF1 + 1); if(dvi->depth) ref = font_find_flat(dvi, arg); else ref = dvi->findref(dvi, arg); /* skip the rest */ dskip(dvi, 12); dskip(dvi, duget1(dvi) + duget1(dvi)); if(ref == NULL) { dvierr(dvi...
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
79,221,163,644,285,350,000,000,000,000,000,000,000
23
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
CImg<T>& select(const char *const title, const unsigned int feature_type=2, unsigned int *const XYZ=0, const bool exit_on_anykey=false, const bool is_deep_selection_default=false) { return get_select(title,feature_type,XYZ,exit_on_anykey,is_deep_sele...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
115,931,850,057,467,230,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int php_object_element_export(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; smart_str *buf; level = va_arg(args, int); buf = va_arg(args, smart_str *); buffer_append_spaces(buf, level + 2); if (hash_key->nKeyLength != 0) { const char *class_name; /* ig...
0
[]
php-src
e8429400d40e3c3aa4b22ba701991d698a2f3b2f
283,449,947,600,433,170,000,000,000,000,000,000,000
33
Fix bug #70172 - Use After Free Vulnerability in unserialize()
GIT_INLINE(bool) only_spaces_and_dots(const char *path) { const char *c = path; for (;; c++) { if (*c == '\0' || *c == ':') return true; if (*c != ' ' && *c != '.') return false; } return true; }
0
[ "CWE-20", "CWE-706" ]
libgit2
e1832eb20a7089f6383cfce474f213157f5300cb
152,221,961,657,317,620,000,000,000,000,000,000,000
13
path: also guard `.gitmodules` against NTFS Alternate Data Streams We just safe-guarded `.git` against NTFS Alternate Data Stream-related attack vectors, and now it is time to do the same for `.gitmodules`. Note: In the added regression test, we refrain from verifying all kinds of variations between short names and N...
get_compopt_value(optname, buf) const char *optname; char *buf; { char ocl[MAXOCLASSES+1]; static const char none[] = "(none)", randomrole[] = "random", to_be_done[] = "(to be done)", defopt[] = "default", defbrief[] = "def"; int i; buf[0] = '\0'; if (!strcmp(optname,"align_message")) Sprin...
0
[ "CWE-269" ]
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
221,046,664,047,605,450,000,000,000,000,000,000,000
316
escapes() revamp Partial rewrite of escapes(), mostly changing its if-then-else logic so that end-of-string can be checked once instead for each case. The previous version had a bug if the input string ended with backslash and one decimal digit (due to being lumped together with the handling for trailing \X or \O...
TEST_F(DocumentSourceMatchTest, CommentShouldNotAddAnyDependencies) { auto match = DocumentSourceMatch::create(fromjson("{$comment: 'misleading?'}"), getExpCtx()); DepsTracker dependencies; ASSERT_EQUALS(DepsTracker::State::SEE_NEXT, match->getDependencies(&dependencies)); ASSERT_EQUALS(0U, dependencies...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
149,136,548,403,498,640,000,000,000,000,000,000,000
8
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
generate_auth(CMD_Request *msg) { int data_len; data_len = PKL_CommandLength(msg); assert(auth_hash_id >= 0); return UTI_GenerateNTPAuth(auth_hash_id, (unsigned char *)password, password_length, (unsigned char *)msg, data_len, ((unsigned char *)msg) + data_len, sizeof (msg->auth)); }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
286,853,040,267,546,000,000,000,000,000,000,000,000
11
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
void auth_policy_send_request(struct policy_lookup_ctx *context) { const char *error; struct http_url *url; if (http_url_parse(context->url, NULL, HTTP_URL_ALLOW_USERINFO_PART, context->pool, &url, &error) != 0) { auth_request_log_error(context->request, "policy", "Could not parse url %s: %s", context->ur...
0
[ "CWE-20" ]
core
1f2c35da2b96905bec6e45f88af0f33ee63789e6
177,728,234,989,514,700,000,000,000,000,000,000,000
36
auth: Fix auth-policy crash when username is NULL If SASL request is invalid, or incomplete, and username is left NULL, handle it gracefully by adding just NUL byte in auth policy digest for username.
UriBool URI_FUNC(_TESTING_ONLY_ParseIpSix)(const URI_CHAR * text) { UriMemoryManager * const memory = &defaultMemoryManager; URI_TYPE(Uri) uri; URI_TYPE(ParserState) parser; const URI_CHAR * const afterIpSix = text + URI_STRLEN(text); const URI_CHAR * res; URI_FUNC(ResetUri)(&uri); parser.uri = &uri; URI_FUNC(...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
36,437,125,036,898,083,000,000,000,000,000,000,000
15
Fix uriParse*Ex* out-of-bounds read
bool Frame::AddAdditionalData(const uint8_t* additional, uint64_t length, uint64_t add_id) { uint8_t* const data = new (std::nothrow) uint8_t[static_cast<size_t>(length)]; // NOLINT if (!data) return false; delete[] additional_; additional_ = data; additional_length_ ...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
129,453,693,071,910,520,000,000,000,000,000,000,000
15
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
void jfs_dirty_inode(struct inode *inode, int flags) { static int noisy = 5; if (isReadOnly(inode)) { if (!special_file(inode->i_mode) && noisy) { /* kernel allows writes to devices on read-only * partitions and may try to mark inode dirty */ jfs_err("jfs_dirty_inode called on read-only volume"); ...
0
[ "CWE-476" ]
linux
a53046291020ec41e09181396c1e829287b48d47
132,050,040,297,755,600,000,000,000,000,000,000,000
18
jfs: prevent NULL deref in diFree Add validation check for JFS_IP(ipimap)->i_imap to prevent a NULL deref in diFree since diFree uses it without do any validations. When function jfs_mount calls diMount to initialize fileset inode allocation map, it can fail and JFS_IP(ipimap)->i_imap won't be initialized. Then it cal...
static TPM_RESULT SWTPM_NVRAM_GetFilenameForName(char *filename, /* output: rooted filename */ size_t bufsize, uint32_t tpm_number, const char *name, /* input: a...
0
[]
swtpm
cae5991423826f21b11f7a5bc7f7b2b538bde2a2
259,450,910,722,351,200,000,000,000,000,000,000,000
35
swtpm: Do not follow symlinks when opening lockfile (CVE-2020-28407) This patch addresses CVE-2020-28407. Prevent us from following symliks when we open the lockfile for writing. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static inline void set_page_address(struct page *page, void *address) { page->virtual = address; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
4,765,422,556,619,461,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
void kvm_put_guest_fpu(struct kvm_vcpu *vcpu) { kvm_put_guest_xcr0(vcpu); if (!vcpu->guest_fpu_loaded) return; vcpu->guest_fpu_loaded = 0; fpu_save_init(&vcpu->arch.guest_fpu); __kernel_fpu_end(); ++vcpu->stat.fpu_reload; kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu); trace_kvm_fpu(0); }
0
[]
linux
6d1068b3a98519247d8ba4ec85cd40ac136dbdf9
8,491,622,829,669,540,000,000,000,000,000,000,000
14
KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) On hosts without the XSAVE support unprivileged local user can trigger oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN ioctl. invalid opcode: 0000 [#2]...
find_varbind_in_list( netsnmp_variable_list *vblist, const oid *name, size_t len) { for (; vblist != NULL; vblist = vblist->next_variable) if (!snmp_oid_compare(vblist->name, vblist->name_length, name, len)) return vblist; return NULL; }
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
199,374,345,211,868,800,000,000,000,000,000,000,000
9
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
int cdev_add(struct cdev *p, dev_t dev, unsigned count) { int error; p->dev = dev; p->count = count; error = kobj_map(cdev_map, dev, count, NULL, exact_match, exact_lock, p); if (error) return error; kobject_get(p->kobj.parent); return 0; }
0
[ "CWE-362" ]
linux
68faa679b8be1a74e6663c21c3a9d25d32f1c079
151,165,360,894,936,830,000,000,000,000,000,000,000
16
chardev: Avoid potential use-after-free in 'chrdev_open()' 'chrdev_open()' calls 'cdev_get()' to obtain a reference to the 'struct cdev *' stashed in the 'i_cdev' field of the target inode structure. If the pointer is NULL, then it is initialised lazily by looking up the kobject in the 'cdev_map' and so the whole proc...