func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
command_process_var_cell(var_cell_t *cell, or_connection_t *conn) { #ifdef KEEP_TIMING_STATS /* how many of each cell have we seen so far this second? needs better * name. */ static int num_versions=0, num_cert=0; time_t now = time(NULL); if (now > current_second) { /* the second has rolled over */ /* ...
0
[ "CWE-264" ]
tor
a74e7fd40f1a77eb4000d8216bb5b80cdd8a6193
280,212,876,433,183,900,000,000,000,000,000,000,000
41
Reject create cells on outgoing OR connections from bridges
static bool nl80211_parse_mcast_rate(struct cfg80211_registered_device *rdev, int mcast_rate[IEEE80211_NUM_BANDS], int rateval) { struct wiphy *wiphy = &rdev->wiphy; bool found = false; int band, i; for (band = 0; band < IEEE80211_NUM_BANDS; band++) { struct ieee80211_supported_band *sband; sband = wi...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
229,384,460,924,046,560,000,000,000,000,000,000,000
26
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
static void print_buffer_to_file(enum loglevel level, const char *buffer, size_t length) { time_t skr; struct tm tm_tmp; struct tm *start; DBUG_ENTER("print_buffer_to_file"); DBUG_PRINT("enter",("buffer: %s", buffer)); mysql_mutex_lock(&LOCK_error_log); skr= my_time(0); ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
335,855,610,689,877,960,000,000,000,000,000,000,000
31
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...
void Rfft2dReorder(int fft_height, int fft_width, double** fft_input_output) { int fft_height_half; ruy::profiler::ScopeLabel label("Rfft2dReorder"); double real, img; fft_height_half = fft_height >> 1; // Use 4x4 input as an example, reorder the frequency matrix from // [[(F(0, 0), F(0, -2/4)) F(...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
332,411,236,607,034,770,000,000,000,000,000,000,000
52
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file, const char* path) { int ret = SSL_FAILURE; const int HALF_PATH = 128; if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA); if (ret == SSL_SUCCESS && path) { // call read_file for ea...
1
[]
mysql-server
5c6169fb309981b564a17bee31b367a18866d674
56,053,394,156,907,920,000,000,000,000,000,000,000
64
Bug #24740291: YASSL UPDATE TO 2.4.2
static bool equal(Item *i1, Item *i2, Field *f2) { DBUG_ASSERT((i2 == NULL) ^ (f2 == NULL)); if (i2 != NULL) return i1->eq(i2, 1); else if (i1->type() == Item::FIELD_ITEM) return f2->eq(((Item_field *) i1)->field); else return FALSE; }
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
157,156,796,562,320,880,000,000,000,000,000,000,000
11
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static void test_date_ts() { int rc; myheader("test_date_ts"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_date"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_date(c1 TIMESTAMP, \ c2 TIMESTAMP, \ ...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
190,351,923,998,632,260,000,000,000,000,000,000,000
18
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
int rtl8xxxu_gen2_channel_to_group(int channel) { int group; if (channel < 3) group = 0; else if (channel < 6) group = 1; else if (channel < 9) group = 2; else if (channel < 12) group = 3; else group = 4; return group; }
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
42,048,056,847,497,910,000,000,000,000,000,000,000
17
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static inline void cm_deref_id(struct cm_id_private *cm_id_priv) { if (atomic_dec_and_test(&cm_id_priv->refcount)) complete(&cm_id_priv->comp); }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
91,872,878,060,362,150,000,000,000,000,000,000,000
5
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 NTSTATUS pdb_samba_dsdb_create_alias(struct pdb_methods *m, const char *name, uint32_t *rid) { TALLOC_CTX *frame = talloc_stackframe(); struct pdb_samba_dsdb_state *state = talloc_get_type_abort( m->private_data, struct pdb_samba_dsdb_state); struct dom_sid *sid; struct ldb_dn *dn; NTSTATUS stat...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
312,159,984,454,327,950,000,000,000,000,000,000,000
22
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static struct inet6_dev *ipv6_find_idev(struct net_device *dev) { struct inet6_dev *idev; ASSERT_RTNL(); idev = __in6_dev_get(dev); if (!idev) { idev = ipv6_add_dev(dev); if (!idev) return NULL; } if (dev->flags&IFF_UP) ipv6_mc_up(idev); return idev; }
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
317,179,749,713,520,800,000,000,000,000,000,000,000
17
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
void Item::print(String *str, enum_query_type query_type) { str->append(full_name()); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
287,300,652,820,352,140,000,000,000,000,000,000,000
4
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.
QPDFWriter::disableIncompatibleEncryption(int major, int minor, int extension_level) { if (! this->m->encrypted) { return; } bool disable = false; if (compareVersions(major, minor, 1, 3) < 0) { disable = true; } else { int V = QUtil::stri...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
177,236,502,545,987,350,000,000,000,000,000,000,000
56
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static void switched_from_fair(struct rq *rq, struct task_struct *p) { detach_task_cfs_rq(p); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
216,487,686,253,808,670,000,000,000,000,000,000,000
4
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
Status AuthorizationManager::checkAuthForPrivilege(const Privilege& privilege) { if (_externalState->shouldIgnoreAuthChecks()) return Status::OK(); return _probeForPrivilege(privilege); }
0
[ "CWE-264" ]
mongo
23344f8b7506df694f66999693ee3c00dfd6afae
102,143,029,050,241,260,000,000,000,000,000,000,000
6
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
ByteVector &ByteVector::append(const ByteVector &v) { if(v.d->size == 0) return *this; // Simply return if appending nothing. detach(); uint originalSize = d->size; resize(d->size + v.d->size); ::memcpy(DATA(d) + originalSize, DATA(v.d), v.size()); return *this; }
0
[ "CWE-189" ]
taglib
dcdf4fd954e3213c355746fa15b7480461972308
48,071,259,497,705,550,000,000,000,000,000,000,000
13
Avoid uint overflow in case the length + index is over UINT_MAX
static void __init htab_init_page_sizes(void) { int rc; /* Default to 4K pages only */ memcpy(mmu_psize_defs, mmu_psize_defaults_old, sizeof(mmu_psize_defaults_old)); /* * Try to find the available page sizes in the device-tree */ rc = of_scan_flat_dt(htab_dt_scan_page_sizes, NULL); if (rc != 0) /*...
0
[ "CWE-200" ]
linux-2.6
721151d004dcf01a71b12bb6b893f9160284cf6e
118,329,290,436,560,950,000,000,000,000,000,000,000
77
[POWERPC] Allow drivers to map individual 4k pages to userspace Some drivers have resources that they want to be able to map into userspace that are 4k in size. On a kernel configured with 64k pages we currently end up mapping the 4k we want plus another 60k of physical address space, which could contain anything. T...
rb_add_time_stamp(struct ring_buffer_event *event, u64 delta) { event->type_len = RINGBUF_TYPE_TIME_EXTEND; /* Not the first event on the page? */ if (rb_event_index(event)) { event->time_delta = delta & TS_MASK; event->array[0] = delta >> TS_SHIFT; } else { /* nope, just zero it */ event->time_delta = 0; ...
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
152,455,223,203,621,380,000,000,000,000,000,000,000
16
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
extract_VOMS_info( globus_gsi_cred_handle_t cred_handle, int verify_type, char **voname, char **firstfqan, char **quoted_DN_and_FQAN) { #if !defined(HAVE_EXT_VOMS) return 1; #else int ret; struct vomsdata *voms_data = NULL; struct voms *voms_cert = NULL; char *subject_name = NULL; char **fqan = NULL; int voms...
1
[ "CWE-20" ]
htcondor
2f3c393feb819cf6c6d06fb0a2e9c4e171f3c26d
238,626,953,283,650,970,000,000,000,000,000,000,000
167
(#6455) Fix issue validating VOMS proxies
int main() { initialize_environment(); test_format_wrong_size(); test_format_fail_and_double_free(); test_blit_info_format_check(); test_blit_info_format_check_null_format(); test_format_is_plain_nullptr_deref_trigger(); test_format_util_format_is_rgb_nullptr_deref_trigger_illegal_resource(); t...
1
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
41,637,944,043,380,694,000,000,000,000,000,000,000
29
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
void xtra_box_del(GF_Box *s) { GF_XtraBox *ptr = (GF_XtraBox *)s; while (gf_list_count(ptr->tags)) { GF_XtraTag *tag = gf_list_pop_back(ptr->tags); if (tag->name) gf_free(tag->name); if (tag->prop_value) gf_free(tag->prop_value); gf_free(tag); } gf_list_del(ptr->tags); gf_free(s); }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
9,758,047,721,625,235,000,000,000,000,000,000,000
12
fixed #2255
smtp_enter_state(struct smtp_session *s, int newstate) { log_trace(TRACE_SMTP, "smtp: %p: %s -> %s", s, smtp_strstate(s->state), smtp_strstate(newstate)); s->state = newstate; }
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
18,980,179,413,661,750,000,000,000,000,000,000,000
8
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
static int sctp_getsockopt_pr_streamstatus(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_stream_out_ext *streamoute; struct sctp_association *asoc; struct sctp_prstatus params; int retval = -EINVAL; int policy; if (len < sizeof(params)) goto out; len = sizeo...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
82,139,070,316,255,440,000,000,000,000,000,000,000
63
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
Local<Function> Http2Settings::callback() const { return callback_.Get(env()->isolate()); }
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
304,370,379,263,569,900,000,000,000,000,000,000,000
3
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...
void ActiveStreamEncoderFilter::onEncoderFilterBelowWriteBufferLowWatermark() { ENVOY_STREAM_LOG(debug, "Enabling upstream stream due to filter callbacks.", parent_); parent_.callLowWatermarkCallbacks(); }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
187,860,877,331,198,580,000,000,000,000,000,000,000
4
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static u32 alloc_apf_token(struct kvm_vcpu *vcpu) { /* make sure the token value is not 0 */ u32 id = vcpu->arch.apf.id; if (id << 12 == 0) vcpu->arch.apf.id = 1; return (vcpu->arch.apf.id++ << 12) | vcpu->vcpu_id; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
101,218,486,652,517,600,000,000,000,000,000,000,000
10
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
static gboolean nbd_negotiate_continue(QIOChannel *ioc, GIOCondition condition, void *opaque) { qemu_coroutine_enter(opaque); return TRUE; }
1
[ "CWE-20" ]
qemu
2b0bbc4f8809c972bad134bc1a2570dbb01dea0b
42,452,972,415,633,465,000,000,000,000,000,000,000
7
nbd/server: get rid of nbd_negotiate_read and friends Functions nbd_negotiate_{read,write,drop_sync} were introduced in 1a6245a5b, when nbd_rwv (was nbd_wr_sync) was working through qemu_co_sendv_recvv (the path is nbd_wr_sync -> qemu_co_{recv/send} -> qemu_co_send_recv -> qemu_co_sendv_recvv), which just yields, with...
gdImageFill (gdImagePtr im, int x, int y, int color) { int lastBorder; int old; int leftLimit, rightLimit; int i; if (x >= im->sx) { x = im->sx - 1; } if (y >= im->sy) { y = im->sy - 1; } old = gdImageGetPixel (im, x, y); if (color == gdTiled) { /* Tile fill -- got to watch ...
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
297,126,922,269,779,200,000,000,000,000,000,000,000
139
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
TEST_F(GroupVerifierTest, TestRequiresAnyWithAllowMissingButOk) { TestUtility::loadFromYaml(RequiresAnyConfig, proto_config_); proto_config_.mutable_rules(0) ->mutable_requires() ->mutable_requires_any() ->add_requirements() ->mutable_allow_missing(); createAsyncMockAuthsAndVerifier(std::...
1
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
20,453,909,730,633,440,000,000,000,000,000,000,000
17
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
static const char *parse_number( cJSON *item, const char *num ) { int64_t i = 0; double f = 0; int isint = 1; int sign = 1, scale = 0, subscale = 0, signsubscale = 1; /* Could use sscanf for this? */ if ( *num == '-' ) { /* Has sign. */ sign = -1; ++num; } if ( *num == '0' ) /* Is zero. */ ++num; if...
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
184,609,699,897,690,780,000,000,000,000,000,000,000
64
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
pfm_restore_pmcs(unsigned long *pmcs, unsigned long mask) { int i; for (i=0; mask; i++, mask>>=1) { if ((mask & 0x1) == 0) continue; ia64_set_pmc(i, pmcs[i]); } ia64_srlz_d(); }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
15,298,669,198,258,794,000,000,000,000,000,000,000
10
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
FilterUtility::finalTimeout(const RouteEntry& route, Http::HeaderMap& request_headers, bool insert_envoy_expected_request_timeout_ms, bool grpc_request, bool per_try_timeout_hedging_enabled, bool respect_expected_rq_timeout) { // See ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
308,090,738,051,330,140,000,000,000,000,000,000,000
95
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...
auth_request_want_skip_userdb(struct auth_request *request, struct auth_userdb *userdb) { switch (userdb->skip) { case AUTH_USERDB_SKIP_NEVER: return FALSE; case AUTH_USERDB_SKIP_FOUND: return request->userdb_success; case AUTH_USERDB_SKIP_NOTFOUND: return !request->userdb_success; } i_unreached();...
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
35,739,291,779,931,047,000,000,000,000,000,000,000
13
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
gdm_session_worker_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { GdmSessionWorker *worker; DBusError error; worker = GDM_SE...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
521,152,577,670,859,450,000,000,000,000,000,000
35
Store the face and dmrc files in a cache. Refer to bug #565151.
PHP_FUNCTION(pcntl_signal) { zval *handle, **dest_handle = NULL; char *func_name; long signo; zend_bool restart_syscalls = 1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz|b", &signo, &handle, &restart_syscalls) == FAILURE) { return; } if (signo < 1 || signo > 32) { php_error_docref(NULL TSRMLS_...
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
218,739,523,744,484,330,000,000,000,000,000,000,000
62
Fixed bug #69418 - more s->p fixes for filenames
tgetpass_display_error(enum tgetpass_errval errval) { debug_decl(tgetpass_display_error, SUDO_DEBUG_CONV); switch (errval) { case TGP_ERRVAL_NOERROR: break; case TGP_ERRVAL_TIMEOUT: sudo_warnx(U_("timed out reading password")); break; case TGP_ERRVAL_NOPASSWORD: sudo_warnx(U_("no password was p...
0
[ "CWE-787" ]
sudo
fa8ffeb17523494f0e8bb49a25e53635f4509078
40,642,466,275,136,700,000,000,000,000,000,000,000
19
Fix a buffer overflow when pwfeedback is enabled and input is a not a tty. In getln() if the user enters ^U (erase line) and the write(2) fails, the remaining buffer size is reset but the current pointer is not. While here, fix an incorrect break for erase when write(2) fails. Also disable pwfeedback when input is not ...
void derive_collocated_motion_vectors(base_context* ctx, de265_image* img, const slice_segment_header* shdr, int xP,int yP, int colPic, ...
0
[ "CWE-787" ]
libde265
697aa4f7c774abd6374596e6707a6f4f54265355
335,541,782,360,155,300,000,000,000,000,000,000,000
174
fix MC with HDR chroma, but SDR luma (#301)
void Magick::Image::sketch(const double radius_,const double sigma_, const double angle_) { MagickCore::Image *newImage; GetPPException; newImage=SketchImage(constImage(),radius_,sigma_,angle_,exceptionInfo); replaceImage(newImage); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
114,435,042,910,942,060,000,000,000,000,000,000,000
11
Added missing return to avoid use after free.
static inline PixelTrait GetPixelTraits(const Image *restrict image, const PixelChannel channel) { return(image->channel_map[channel].traits); }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
69,617,418,911,872,270,000,000,000,000,000,000,000
5
void __cpu_clear_user_page(void *kaddr, unsigned long vaddr) { clear_page(kaddr); }
0
[]
linux
1d18c47c735e8adfe531fc41fae31e98f86b68fe
228,664,401,318,027,920,000,000,000,000,000,000,000
4
arm64: MMU fault handling and page table management This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch) and page table management. The user translation table is pointed to by TTBR0 and the kernel one (swapper_pg_dir) by TTBR1. There is no translation inform...
void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds, const char *str, int len MY_ATTRIBUTE((unused))) { reg1 REPLACE *rep_pos; reg2 REPLACE_STRING *rep_str; const char *start, *from; DBUG_ENTER("replace_strings_append"); start= from= str; rep...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
79,181,480,049,268,010,000,000,000,000,000,000,000
50
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
bool run(OperationContext* opCtx, const string& dbname, const BSONObj& cmdObj, BSONObjBuilder& result) { auth::CreateOrUpdateUserArgs args; Status status = auth::parseCreateOrUpdateUserCommands(cmdObj, "createUser", dbname, &args); uassertStatusOK(statu...
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
326,012,549,580,291,070,000,000,000,000,000,000,000
93
SERVER-38984 Validate unique User ID on UserCache hit
int socket_accept(int fd, uint16_t port) { #ifdef WIN32 int addr_len; #else socklen_t addr_len; #endif int result; struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(port); addr_len = sizeof(addr); result = acce...
1
[ "CWE-284", "CWE-703" ]
libusbmuxd
4397b3376dc4e4cb1c991d0aed61ce6482614196
164,887,039,991,861,780,000,000,000,000,000,000,000
20
common: [security fix] Make sure sockets only listen locally
~FileCloser() { if (m_file != NULL) fclose(m_file); }
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
102,788,888,524,940,570,000,000,000,000,000,000,000
5
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
static void __implement(u8 *report, unsigned offset, int n, u32 value) { unsigned int idx = offset / 8; unsigned int size = offset + n; unsigned int bit_shift = offset % 8; int bits_to_set = 8 - bit_shift; u8 bit_mask = 0xff << bit_shift; while (n - bits_to_set >= 0) { report[idx] &= ~bit_mask; report[idx] |...
0
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
188,970,889,163,983,400,000,000,000,000,000,000,000
27
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
void ha_partition::destroy_record_priority_queue() { DBUG_ENTER("ha_partition::destroy_record_priority_queue"); if (m_ordered_rec_buffer) { delete_queue(&m_queue); my_free(m_ordered_rec_buffer); m_ordered_rec_buffer= NULL; } DBUG_VOID_RETURN; }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
211,087,419,594,268,500,000,000,000,000,000,000,000
11
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
nautilus_file_is_launchable (NautilusFile *file) { gboolean type_can_be_executable; type_can_be_executable = FALSE; if (file->details->mime_type != NULL) { type_can_be_executable = g_content_type_can_be_executable (eel_ref_str_peek (file->details->mime_type)); } return type_can_be_executable && nautilus...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
179,178,846,055,674,030,000,000,000,000,000,000,000
16
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
int get_user_pages_fast(unsigned long start, int nr_pages, int write, struct page **pages) { int nr, ret; start &= PAGE_MASK; nr = __get_user_pages_fast(start, nr_pages, write, pages); ret = nr; if (nr < nr_pages) { /* Try to get the remaining pages with get_user_pages */ start += nr << PAGE_SHIFT; page...
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
253,504,863,383,491,000,000,000,000,000,000,000,000
27
mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_p...
pte_t *__page_check_address(struct page *page, struct mm_struct *mm, unsigned long address, spinlock_t **ptlp, int sync) { pmd_t *pmd; pte_t *pte; spinlock_t *ptl; if (unlikely(PageHuge(page))) { /* when pud is not present, pte will be NULL */ pte = huge_pte_offset(mm, address); if (!pte) return NULL...
0
[ "CWE-400", "CWE-703", "CWE-264" ]
linux
57e68e9cd65b4b8eb4045a1e0d0746458502554c
15,368,262,466,116,577,000,000,000,000,000,000,000
41
mm: try_to_unmap_cluster() should lock_page() before mlocking A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin fuzzing with trinity. The call site try_to_unmap_cluster() does not lock the pages other than its check_page parameter (which is already locked). The BUG_ON in mlock_vma_page() is not ...
asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, compat_long_t addr, compat_long_t data) { struct task_struct *child; long ret; if (request == PTRACE_TRACEME) { ret = ptrace_traceme(); goto out; } child = ptrace_get_task_struct(pid); if (IS_ERR(child)) { ret = PTR_ERR(chil...
1
[ "CWE-20", "CWE-362" ]
linux
9899d11f654474d2d54ea52ceaa2a1f4db3abd68
62,785,132,211,384,510,000,000,000,000,000,000,000
38
ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL putreg() assumes that the tracee is not running and pt_regs_access() can safely play with its stack. However a killed tracee can return from ptrace_stop() to the low-level asm code and do RESTORE_REST, this means that debugger can actually read/mod...
virtual GBool tilingPatternFill(GfxState *state, Object *str, int paintType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) { return gTrue; }
1
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
329,771,619,705,462,880,000,000,000,000,000,000,000
5
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static ssize_t store_user_store(struct kmem_cache *s, const char *buf, size_t length) { if (any_slab_objects(s)) return -EBUSY; s->flags &= ~SLAB_STORE_USER; if (buf[0] == '1') s->flags |= SLAB_STORE_USER; calculate_sizes(s, -1); return length; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
296,099,879,166,191,500,000,000,000,000,000,000,000
12
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 void test_object_foreach() { const char *key; json_t *object1, *object2, *value; object1 = json_pack("{sisisi}", "foo", 1, "bar", 2, "baz", 3); object2 = json_object(); json_object_foreach(object1, key, value) json_object_set(object2, key, value); if(!json_equal(object1, object...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
113,409,396,944,434,920,000,000,000,000,000,000,000
17
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
const char *CClient::LoadMap(const char *pName, const char *pFilename, unsigned WantedCrc) { static char aErrorMsg[128]; SetState(IClient::STATE_LOADING); if(!m_pMap->Load(pFilename)) { str_format(aErrorMsg, sizeof(aErrorMsg), "map '%s' not found", pFilename); return aErrorMsg; } // get the crc of the map ...
0
[ "CWE-119", "CWE-787" ]
teeworlds
ff254722a2683867fcb3e67569ffd36226c4bc62
70,355,112,682,217,640,000,000,000,000,000,000,000
34
added some checks to snap handling
do_device_not_available(struct pt_regs *regs, long error_code) { enum ctx_state prev_state; prev_state = exception_enter(); BUG_ON(use_eager_fpu()); #ifdef CONFIG_MATH_EMULATION if (read_cr0() & X86_CR0_EM) { struct math_emu_info info = { }; conditional_sti(regs); info.regs = regs; math_emulate(&info); ...
0
[ "CWE-17" ]
linux-2.6
6f442be2fb22be02cafa606f1769fa1e6f894441
80,118,396,867,619,710,000,000,000,000,000,000,000
25
x86_64, traps: Stop using IST for #SS On a 32-bit kernel, this has no effect, since there are no IST stacks. On a 64-bit kernel, #SS can only happen in user code, on a failed iret to user space, a canonical violation on access via RSP or RBP, or a genuine stack segment violation in 32-bit kernel code. The first two ...
/* Author: CJH */ PHP_IMAP_EXPORT void mm_notify(MAILSTREAM *stream, char *str, long errflg) { STRINGLIST *cur = NIL; if (strncmp(str, "[ALERT] ", 8) == 0) { if (IMAPG(imap_alertstack) == NIL) { IMAPG(imap_alertstack) = mail_newstringlist(); IMAPG(imap_alertstack)->LSIZE = strlen((char*)(IMAPG(imap_alertstac...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
300,451,550,211,187,330,000,000,000,000,000,000,000
21
Disable rsh/ssh functionality in imap by default (bug #77153)
ndpi_port_range *ndpi_build_default_ports(ndpi_port_range *ports, u_int16_t portA, u_int16_t portB, u_int16_t portC, u_int16_t portD, u_int16_t portE) { int i = 0; ports[i].port_low = portA, ports[i].port_high = portA; i++; ports[i].port_low = portB, ports[i].port_high...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
178,397,800,927,481,200,000,000,000,000,000,000,000
16
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static void v4l2loopback_remove_sysfs(struct video_device *vdev) { #define V4L2_SYSFS_DESTROY(x) device_remove_file(&vdev->dev, &dev_attr_##x) if (vdev) { V4L2_SYSFS_DESTROY(format); V4L2_SYSFS_DESTROY(buffers); V4L2_SYSFS_DESTROY(max_openers); /* ... */ } }
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
36,038,962,561,562,446,000,000,000,000,000,000,000
11
add explicit format specifier to printf() invocations CWE-134
static int fts3PendingTermsAddOne( Fts3Table *p, int iCol, int iPos, Fts3Hash *pHash, /* Pending terms hash table to add entry to */ const char *zToken, int nToken ){ PendingList *pList; int rc = SQLITE_OK; pList = (PendingList *)fts3HashFind(pHash, zToken, nToken); if( pList ){ ...
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
169,208,832,092,718,420,000,000,000,000,000,000,000
30
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
name_to_mod_mask(int c) { int i; c = TOUPPER_ASC(c); for (i = 0; mod_mask_table[i].mod_mask != 0; i++) if (c == mod_mask_table[i].name) return mod_mask_table[i].mod_flag; return 0; }
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
182,201,636,978,971,900,000,000,000,000,000,000,000
10
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
static void *ndp_msg_payload_opts_offset(struct ndp_msg *msg, int offset) { unsigned char *ptr = ndp_msg_payload_opts(msg); return ptr + offset; }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
112,250,082,113,946,300,000,000,000,000,000,000,000
6
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp) { struct sctp_association *asoc = sctp_id2assoc(sk, id); struct sctp_sock *sp = sctp_sk(sk); struct socket *sock; int err = 0; /* Do not peel off from one netns to another one. */ if (!net_eq(current->nsproxy->net_ns, sock_net(sk))) r...
0
[ "CWE-416", "CWE-787" ]
linux
df80cd9b28b9ebaa284a41df611dbf3a2d05ca74
152,085,995,943,632,750,000,000,000,000,000,000,000
47
sctp: do not peel off an assoc from one netns to another one Now when peeling off an association to the sock in another netns, all transports in this assoc are not to be rehashed and keep use the old key in hashtable. As a transport uses sk->net as the hash key to insert into hashtable, it would miss removing these t...
static int v2_scan_dquots(struct quota_handle *h, int (*process_dquot) (struct dquot *, void *), void *data) { return qtree_scan_dquots(h, process_dquot, data); }
0
[ "CWE-787" ]
e2fsprogs
8dbe7b475ec5e91ed767239f0e85880f416fc384
5,993,374,746,639,951,000,000,000,000,000,000,000
6
libsupport: add checks to prevent buffer overrun bugs in quota code A maliciously corrupted file systems can trigger buffer overruns in the quota code used by e2fsck. To fix this, add sanity checks to the quota header fields as well as to block number references in the quota tree. Addresses: CVE-2019-5094 Addresses:...
static struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev, struct list_head **iter) { struct netdev_adjacent *lower; lower = list_entry_rcu((*iter)->next, struct netdev_adjacent, list); if (&lower->list == &dev->adj_list.lower) return NULL; *iter = &lower->list; return lower->dev;
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
321,389,210,260,015,550,000,000,000,000,000,000,000
13
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
void update_used_tables() { update_table_bitmaps(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
337,183,472,008,039,240,000,000,000,000,000,000,000
4
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 u32 pegasus_get_msglevel(struct net_device *dev) { pegasus_t *pegasus = netdev_priv(dev); return pegasus->msg_enable; }
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
154,575,060,705,351,220,000,000,000,000,000,000,000
5
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
void kvm_arch_hardware_disable(void *garbage) { }
0
[ "CWE-399", "CWE-284" ]
linux
e8180dcaa8470ceca21109f143876fdcd9fe050a
148,460,403,137,170,230,000,000,000,000,000,000,000
3
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 cm_process_routed_req(struct cm_req_msg *req_msg, struct ib_wc *wc) { if (!cm_req_get_primary_subnet_local(req_msg)) { if (req_msg->primary_local_lid == IB_LID_PERMISSIVE) { req_msg->primary_local_lid = cpu_to_be16(wc->slid); cm_req_set_primary_sl(req_msg, wc->sl); } if (req_msg->primary_remot...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
26,349,888,727,602,883,000,000,000,000,000,000,000
22
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...
OPJ_BOOL opj_j2k_encoder_set_extra_options( opj_j2k_t *p_j2k, const char* const* p_options, opj_event_mgr_t * p_manager) { const char* const* p_option_iter; if (p_options == NULL) { return OPJ_TRUE; } for (p_option_iter = p_options; *p_option_iter != NULL; ++p_option_iter) { ...
0
[ "CWE-20" ]
openjpeg
73fdf28342e4594019af26eb6a347a34eceb6296
177,993,046,767,982,900,000,000,000,000,000,000,000
31
opj_j2k_write_sod(): avoid potential heap buffer overflow (fixes #1299) (probably master only)
static Value performIdentityConversion(const boost::intrusive_ptr<ExpressionContext>& expCtx, Value inputValue) { return inputValue; }
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
29,853,516,749,130,747,000,000,000,000,000,000,000
4
SERVER-43699 $mod should not overflow for large negative values
ves_icall_type_GetTypeCodeInternal (MonoReflectionType *type) { int t = type->type->type; MONO_ARCH_SAVE_REGS; if (type->type->byref) return TYPECODE_OBJECT; handle_enum: switch (t) { case MONO_TYPE_VOID: return TYPECODE_OBJECT; case MONO_TYPE_BOOLEAN: return TYPECODE_BOOLEAN; case MONO_TYPE_U1: retur...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
13,740,695,423,103,666,000,000,000,000,000,000,000
80
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
static int dev_ifconf(struct net *net, char __user *arg) { struct ifconf ifc; struct net_device *dev; char __user *pos; int len; int total; int i; /* * Fetch the caller's info block. */ if (copy_from_user(&ifc, arg, sizeof(struct ifconf))) return -EFAULT; pos = ifc.ifc_buf; len = ifc.ifc_len; /* ...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
16,174,244,636,853,872,000,000,000,000,000,000,000
50
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
trash_files (CommonJob *job, GList *files, int *files_skipped) { GList *l; GFile *file; GList *to_delete; GError *error; int total_files, files_trashed; char *primary, *secondary, *details; int response; if (job_aborted (job)) { return; } total_files = g_list_length (files); files_trashed = 0; report_t...
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
63,479,597,883,978,870,000,000,000,000,000,000,000
85
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
static void Ins_SZPS( INS_ARG ) { switch ( args[0] ) { case 0: CUR.zp0 = CUR.twilight; break; case 1: CUR.zp0 = CUR.pts; break; default: CUR.error = TT_Err_Invalid_Reference; return; } CUR.zp1 = CUR.zp0; CUR.zp2 = CUR.zp0; CUR.GS.gep0 = (I...
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
276,329,155,687,293,600,000,000,000,000,000,000,000
24
Bug 698024: bounds check zone pointer in Ins_MIRP()
_nc_retrace_sp(SCREEN *code) { T((T_RETURN("%p"), (void *) code)); return code; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
314,474,401,583,303,300,000,000,000,000,000,000,000
5
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
void t2p_read_tiff_init(T2P* t2p, TIFF* input){ tdir_t directorycount=0; tdir_t i=0; uint16 pagen=0; uint16 paged=0; uint16 xuint16=0; uint16 tiff_transferfunctioncount=0; uint16* tiff_transferfunction[3]; directorycount=TIFFNumberOfDirectories(input); if(directorycount > TIFF_DIR_MAX) { TIFFError( TIFF...
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
300,156,905,202,225,400,000,000,000,000,000,000,000
218
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
static int pbase_tree_cache_ix(const unsigned char *sha1) { return sha1[0] % ARRAY_SIZE(pbase_tree_cache); }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
9,015,462,459,889,656,000,000,000,000,000,000,000
4
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static void vmsvga_io_write(void *opaque, hwaddr addr, uint64_t data, unsigned size) { struct vmsvga_state_s *s = opaque; switch (addr) { case SVGA_IO_MUL * SVGA_INDEX_PORT: vmsvga_index_write(s, addr, data); break; case SVGA_IO_MUL * SVGA_VALUE_PORT: ...
0
[]
qemu
fa892e9abb728e76afcf27323ab29c57fb0fe7aa
155,920,447,578,428,340,000,000,000,000,000,000,000
17
ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206) Prevent potential integer overflow by limiting 'width' and 'height' to 512x512. Also change 'datasize' type to size_t. Refer to security advisory https://starlabs.sg/advisories/22-4206/ for more information. Fixes: CVE-2021-4206 Signed-off-by: Mauro Matt...
static int nfs4_xdr_dec_get_lease_time(struct rpc_rqst *rqstp, struct xdr_stream *xdr, void *data) { struct nfs4_get_lease_time_res *res = data; struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (!status) status = decode_sequence(xdr, &res->lr_seq_res, rqstp)...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
47,812,285,952,988,780,000,000,000,000,000,000,000
17
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
int i915_gem_context_reset_stats_ioctl(struct drm_device *dev, void *data, struct drm_file *file) { struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_reset_stats *args = data; struct i915_gem_context *ctx; int ret; if (args->flags || args->pad) return -EINVAL; ret = -ENOENT; rcu_re...
0
[ "CWE-416" ]
linux
7dc40713618c884bf07c030d1ab1f47a9dc1f310
271,938,098,962,160,200,000,000,000,000,000,000,000
37
drm/i915: Introduce a mutex for file_priv->context_idr Define a mutex for the exclusive use of interacting with the per-file context-idr, that was previously guarded by struct_mutex. This allows us to reduce the coverage of struct_mutex, with a view to removing the last bits coordinating GEM context later. (In the sho...
static int dnxhd_get_hr_frame_size(int cid, int w, int h) { int result, i = ff_dnxhd_get_cid_table(cid); if (i < 0) return i; result = ((h + 15) / 16) * ((w + 15) / 16) * ff_dnxhd_cid_table[i].packet_scale.num / ff_dnxhd_cid_table[i].packet_scale.den; result = (result + 2048) / 4096 * 4096; ...
0
[ "CWE-476" ]
FFmpeg
31c1c0b46a7021802c3d1d18039fca30dba5a14e
188,840,504,947,950,120,000,000,000,000,000,000,000
12
avcodec/dnxhd_parser: Do not return invalid value from dnxhd_find_frame_end() on error Fixes: Null pointer dereference Fixes: CVE-2017-9608 Found-by: Yihan Lian Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 611b35627488a8d0763e75c25ee0875c5b7987dd) Signed-off-by: Michael Niede...
int cancel_extop( Operation *op, SlapReply *rs ) { Operation *o; int rc; int opid; BerElementBuffer berbuf; BerElement *ber = (BerElement *)&berbuf; assert( ber_bvcmp( &slap_EXOP_CANCEL, &op->ore_reqoid ) == 0 ); if ( op->ore_reqdata == NULL ) { rs->sr_text = "no message ID supplied"; return LDAP_PROTOCOL_...
0
[ "CWE-835" ]
openldap
9d0e8485f3113505743baabf1167e01e4558ccf5
228,327,621,321,662,200,000,000,000,000,000,000,000
131
ITS#9428 fix cancel exop
R_API int r_sys_setenv(const char *key, const char *value) { if (!key) { return 0; } #if __UNIX__ if (!value) { unsetenv (key); return 0; } return setenv (key, value, 1); #elif __WINDOWS__ LPTSTR key_ = r_sys_conv_utf8_to_win (key); LPTSTR value_ = r_sys_conv_utf8_to_win (value); int ret = SetEnvironmentV...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
76,790,137,851,069,450,000,000,000,000,000,000,000
25
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...
block_prep( oparg_T *oap, struct block_def *bdp, linenr_T lnum, int is_del) { int incr = 0; char_u *pend; char_u *pstart; char_u *line; char_u *prev_pstart; char_u *prev_pend; chartabsize_T cts; #ifdef FEAT_LINEBREAK int lbr_saved = curwin->w_p_lbr; // Avoid a ...
0
[ "CWE-122" ]
vim
c249913edc35c0e666d783bfc21595cf9f7d9e0d
105,232,387,141,822,030,000,000,000,000,000,000,000
151
patch 9.0.0483: illegal memory access when replacing in virtualedit mode Problem: Illegal memory access when replacing in virtualedit mode. Solution: Check for replacing NUL after Tab.
static int sctp_get_port_local(struct sock *sk, union sctp_addr *addr) { struct sctp_sock *sp = sctp_sk(sk); bool reuse = (sk->sk_reuse || sp->reuse); struct sctp_bind_hashbucket *head; /* hash list */ struct net *net = sock_net(sk); kuid_t uid = sock_i_uid(sk); struct sctp_bind_bucket *pp; unsigned short snum; ...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
114,645,420,471,530,330,000,000,000,000,000,000,000
164
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
static int rndis_keepalive_response(struct rndis_params *params, rndis_keepalive_msg_type *buf) { rndis_keepalive_cmplt_type *resp; rndis_resp_t *r; /* host "should" check only in RNDIS_DATA_INITIALIZED state */ r = rndis_add_response(params, sizeof(rndis_keepalive_cmplt_type)); if (!r) return -ENOMEM;...
0
[ "CWE-200", "CWE-668" ]
linux
38ea1eac7d88072bbffb630e2b3db83ca649b826
35,910,538,151,117,734,000,000,000,000,000,000,000
21
usb: gadget: rndis: check size of RNDIS_MSG_SET command Check the size of the RNDIS_MSG_SET command given to us before attempting to respond to an invalid message size. Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com> Signed-off-by: ...
apply_all_case_fold(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg) { return onigenc_apply_all_case_fold_with_map( sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 1, flag, f, arg); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
291,047,644,253,182,540,000,000,000,000,000,000,000
7
onig-5.9.2
static void free_VS_VERSIONINFO(PE_VS_VERSIONINFO* vs_VersionInfo) { if (vs_VersionInfo) { free (vs_VersionInfo->szKey); free (vs_VersionInfo->Value); free_VarFileInfo (vs_VersionInfo->varFileInfo); free_StringFileInfo (vs_VersionInfo->stringFileInfo); free (vs_VersionInfo); } }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
306,847,907,643,081,780,000,000,000,000,000,000,000
9
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
int adapter_set_name(struct btd_adapter *adapter, const char *name) { if (g_strcmp0(adapter->system_name, name) == 0) return 0; DBG("name: %s", name); g_free(adapter->system_name); adapter->system_name = g_strdup(name); g_dbus_emit_property_changed(dbus_conn, adapter->path, ADAPTER_INTERFACE, "Name"); ...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
75,103,952,145,254,580,000,000,000,000,000,000,000
24
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
sc_pkcs15emu_coolkey_init_ex(sc_pkcs15_card_t *p15card, struct sc_aid *aid) { sc_card_t *card = p15card->card; sc_context_t *ctx = card->ctx; int rv; LOG_FUNC_CALLED(ctx); rv = coolkey_detect_card(p15card); if (rv) LOG_FUNC_RETURN(ctx, SC_ERROR_WRONG_CARD); rv = sc_pkcs15emu_coolkey_init(p15card); ...
0
[]
OpenSC
7114fb71b54ddfe06ce5dfdab013f4c38f129d14
189,302,483,008,615,100,000,000,000,000,000,000,000
16
coolkey: Initialize potentially uninitialized memory Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28855
m4_eval (struct obstack *obs, int argc, token_data **argv) { int32_t value = 0; int radix = 10; int min = 1; const char *s; if (bad_argc (argv[0], argc, 2, 4)) return; if (*ARG (2) && !numeric_arg (argv[0], ARG (2), &radix)) return; if (radix < 1 || radix > (int) strlen (digits)) { M4...
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
24,048,158,566,945,250,000,000,000,000,000,000,000
64
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
static int resolve_seg_reg(struct insn *insn, struct pt_regs *regs, int regoff) { int idx; /* * In the unlikely event of having to resolve the segment register * index for rIP, do it first. Segment override prefixes should not * be used. Hence, it is not necessary to inspect the instruction, * which may be i...
0
[ "CWE-416", "CWE-362" ]
linux
de9f869616dd95e95c00bdd6b0fcd3421e8a4323
134,914,738,092,853,700,000,000,000,000,000,000,000
42
x86/insn-eval: Fix use-after-free access to LDT entry get_desc() computes a pointer into the LDT while holding a lock that protects the LDT from being freed, but then drops the lock and returns the (now potentially dangling) pointer to its caller. Fix it by giving the caller a copy of the LDT entry instead. Fixes: 6...
static int kvm_task_switch_32(struct kvm_vcpu *vcpu, u16 tss_selector, u16 old_tss_sel, u32 old_tss_base, struct desc_struct *nseg_desc) { struct tss_segment_32 tss_segment_32; int ret = 0; if (kvm_read_guest(vcpu->kvm, old_tss_base, &tss_segment_32, sizeof tss_segment_32)) goto out; sav...
0
[ "CWE-476" ]
linux-2.6
59839dfff5eabca01cc4e20b45797a60a80af8cb
337,206,925,063,695,900,000,000,000,000,000,000,000
38
KVM: x86: check for cr3 validity in ioctl_set_sregs Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity checking for the new cr3 value: "Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to the kernel. This will trigger a NULL pointer access in gfn_to_rmap() when userspace next tries...
MagickPrivate MagickBooleanType AnnotateComponentGenesis(void) { if (annotate_semaphore == (SemaphoreInfo *) NULL) annotate_semaphore=AcquireSemaphoreInfo(); return(MagickTrue); }
0
[ "CWE-125" ]
ImageMagick
7c2c5ba5b8e3a0b2b82f56c71dfab74ed4006df7
17,606,395,248,970,644,000,000,000,000,000,000,000
6
https://github.com/ImageMagick/ImageMagick/issues/1588
fribidi_get_par_embedding_levels_ex ( /* input */ const FriBidiCharType *bidi_types, const FriBidiBracketType *bracket_types, const FriBidiStrIndex len, /* input and output */ FriBidiParType *pbase_dir, /* output */ FriBidiLevel *embedding_levels ) { FriBidiLevel base_level_per_iso_level[FRIBIDI_BIDI_...
0
[ "CWE-120" ]
fribidi
d989590e124ad995de3598800c8835d819fadf80
176,782,804,545,907,730,000,000,000,000,000,000,000
896
Reduce dynamic allocations by using arrays for all small arrays.
static ssize_t khugepaged_max_ptes_none_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) { int err; unsigned long max_ptes_none; err = strict_strtoul(buf, 10, &max_ptes_none); if (err || max_ptes_none > HPAGE_PMD_NR-1) return -EINVAL; khugepaged_max_...
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
91,356,376,908,532,240,000,000,000,000,000,000,000
15
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
posix_acl_valid(struct user_namespace *user_ns, const struct posix_acl *acl) { const struct posix_acl_entry *pa, *pe; int state = ACL_USER_OBJ; int needs_mask = 0; FOREACH_ACL_ENTRY(pa, acl, pe) { if (pa->e_perm & ~(ACL_READ|ACL_WRITE|ACL_EXECUTE)) return -EINVAL; switch (pa->e_tag) { case ACL_USER_OBJ: ...
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
127,361,005,054,530,100,000,000,000,000,000,000,000
62
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
static int __init cmdline_parse_movablecore(char *p) { return cmdline_parse_core(p, &required_movablecore); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
13,802,671,023,375,706,000,000,000,000,000,000,000
4
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
static int cx24116_initfe(struct dvb_frontend *fe) { struct cx24116_state *state = fe->demodulator_priv; struct cx24116_cmd cmd; int ret; dprintk("%s()\n", __func__); /* Power on */ cx24116_writereg(state, 0xe0, 0); cx24116_writereg(state, 0xe1, 0); cx24116_writereg(state, 0xea, 0); /* Firmware CMD 36: Powe...
0
[ "CWE-476", "CWE-119", "CWE-125" ]
linux
1fa2337a315a2448c5434f41e00d56b01a22283c
55,712,622,943,742,940,000,000,000,000,000,000,000
28
[media] cx24116: fix a buffer overflow when checking userspace params The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: stab...
static int emit_atomic(u8 **pprog, u8 atomic_op, u32 dst_reg, u32 src_reg, s16 off, u8 bpf_size) { u8 *prog = *pprog; int cnt = 0; EMIT1(0xF0); /* lock prefix */ maybe_emit_mod(&prog, dst_reg, src_reg, bpf_size == BPF_DW); /* emit opcode */ switch (atomic_op) { case BPF_ADD: case BPF_SUB: case BPF_...
0
[ "CWE-77" ]
linux
e4d4d456436bfb2fe412ee2cd489f7658449b098
194,119,476,344,941,360,000,000,000,000,000,000,000
42
bpf, x86: Validate computation of branch displacements for x86-64 The branch displacement logic in the BPF JIT compilers for x86 assumes that, for any generated branch instruction, the distance cannot increase between optimization passes. But this assumption can be violated due to how the distances are computed. Spec...