func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
do_sub(exarg_T *eap)
{
linenr_T lnum;
long i = 0;
regmmatch_T regmatch;
static subflags_T subflags = {FALSE, FALSE, FALSE, TRUE, FALSE,
FALSE, FALSE, 0};
#ifdef FEAT_EVAL
subflags_T subflags_save;
#endif
int save_do_all; /* remember user specified 'g' flag */
int save_do_ask;... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 267,055,552,453,176,350,000,000,000,000,000,000,000 | 1,086 | 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. |
static int set_reg_wr(struct mlx5_ib_qp *qp,
const struct ib_reg_wr *wr,
void **seg, int *size)
{
struct mlx5_ib_mr *mr = to_mmr(wr->mr);
struct mlx5_ib_pd *pd = to_mpd(qp->ibqp.pd);
int mr_list_size = mr->ndescs * mr->desc_size;
bool umr_inline = mr_list_size <= MLX5_IB_SQ_UMR_INLINE_THRESHOLD;
i... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 319,721,981,634,440,220,000,000,000,000,000,000,000 | 37 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
static ssize_t slab_attr_store(struct kobject *kobj,
struct attribute *attr,
const char *buf, size_t len)
{
struct slab_attribute *attribute;
struct kmem_cache *s;
int err;
attribute = to_slab_attr(attr);
s = to_slab(kobj);
if (!attribute->store)
return -EIO;
err = attribute->store(s, buf, len);
... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 299,163,765,540,047,100,000,000,000,000,000,000,000 | 18 | 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 svm_adjust_tsc_offset_guest(struct kvm_vcpu *vcpu, s64 adjustment)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->control.tsc_offset += adjustment;
if (is_guest_mode(vcpu))
svm->nested.hsave->control.tsc_offset += adjustment;
else
trace_kvm_write_tsc_offset(vcpu->vcpu_id,
svm->vmcb->con... | 0 | [
"CWE-200",
"CWE-399"
] | linux | cbdb967af3d54993f5814f1cee0ed311a055377d | 77,634,993,106,134,365,000,000,000,000,000,000,000 | 14 | KVM: svm: unconditionally intercept #DB
This is needed to avoid the possibility that the guest triggers
an infinite stream of #DB exceptions (CVE-2015-8104).
VMX is not affected: because it does not save DR6 in the VMCS,
it already intercepts #DB unconditionally.
Reported-by: Jan Beulich <jbeulich@suse.com>
Cc: stab... |
static void f_hidg_req_complete(struct usb_ep *ep, struct usb_request *req)
{
struct f_hidg *hidg = (struct f_hidg *)ep->driver_data;
unsigned long flags;
if (req->status != 0) {
ERROR(hidg->func.config->cdev,
"End Point Request ERROR: %d\n", req->status);
}
spin_lock_irqsave(&hidg->write_spinlock, flags);
... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | 072684e8c58d17e853f8e8b9f6d9ce2e58d2b036 | 238,629,313,653,169,270,000,000,000,000,000,000,000 | 15 | USB: gadget: f_hid: fix deadlock in f_hidg_write()
In f_hidg_write() the write_spinlock is acquired before calling
usb_ep_queue() which causes a deadlock when dummy_hcd is being used.
This is because dummy_queue() callbacks into f_hidg_req_complete() which
tries to acquire the same spinlock. This is (part of) the back... |
sync_result_msg(Slapi_PBlock *pb, Sync_Cookie *cookie)
{
int rc = 0;
char *cookiestr = sync_cookie2str(cookie);
LDAPControl **ctrl = (LDAPControl **)slapi_ch_calloc(2, sizeof(LDAPControl *));
if (cookie->openldap_compat) {
sync_create_sync_done_control(&ctrl[0], 1, cookiestr);
} else {
... | 0 | [
"CWE-476"
] | 389-ds-base | d7eef2fcfbab2ef8aa6ee0bf60f0a9b16ede66e0 | 104,391,628,590,619,560,000,000,000,000,000,000,000 | 18 | Issue 4711 - SIGSEV with sync_repl (#4738)
Bug description:
sync_repl sends back entries identified with a unique
identifier that is 'nsuniqueid'. If 'nsuniqueid' is
missing, then it may crash
Fix description:
Check a nsuniqueid is available else returns OP_ERR
relates: https://github.com/389ds/389-ds-ba... |
static JSValue js_sys_crc32(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
const u8 *data;
size_t data_size;
if (!argc) return GF_JS_EXCEPTION(ctx);
if (JS_IsString(argv[0])) {
u32 crc=0;
const char *str = JS_ToCString(ctx, argv[0]);
if (str) {
crc = gf_crc_32(str, (u32) strlen(str... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 75,073,570,725,170,130,000,000,000,000,000,000,000 | 21 | fixed #2138 |
static void handle_rx(struct vhost_net *net)
{
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_RX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned uninitialized_var(in), log;
struct vhost_log *vq_log;
struct msghdr msg = {
.msg_name = NULL,
.msg_namelen = 0,
.msg_control = NULL, /* FIXME: get and h... | 0 | [
"CWE-399"
] | linux | dd7633ecd553a5e304d349aa6f8eb8a0417098c5 | 197,079,102,826,674,250,000,000,000,000,000,000,000 | 108 | vhost-net: fix use-after-free in vhost_net_flush
vhost_net_ubuf_put_and_wait has a confusing name:
it will actually also free it's argument.
Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01
"vhost-net: flush outstanding DMAs on memory change"
vhost_net_flush tries to use the argument after passing it
to ... |
ostream &ProtocolV2::_conn_prefix(std::ostream *_dout) {
return *_dout << "--2- " << messenger->get_myaddrs() << " >> "
<< *connection->peer_addrs << " conn(" << connection << " "
<< this
<< " " << ceph_con_mode_name(auth_meta->con_mode)
<< " :" << connection->port
... | 0 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 206,261,204,628,846,940,000,000,000,000,000,000,000 | 12 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
static ErrorCode clusterSendToAllServers(
v8::Isolate* isolate, std::string const& dbname,
std::string const& path, // Note: Has to be properly encoded!
arangodb::rest::RequestType const& method, std::string const& body) {
TRI_GET_GLOBALS();
network::ConnectionPool* pool =
v8g->_server.getFeature... | 0 | [
"CWE-918"
] | arangodb | d7b35a6884c6b2802d34d79fb2a79fb2c9ec2175 | 254,514,314,803,737,820,000,000,000,000,000,000,000 | 45 | [APM-78] Disable installation from remote URL (#15292) (#15343)
* [APM-78] Disable installation from remote URL (#15292)
* Update CHANGELOG
* Fix clang-format
Co-authored-by: Vadim <vadim@arangodb.com> |
static void destroy_rss_raw_qp_tir(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp)
{
mlx5_core_destroy_tir(dev->mdev, qp->rss_qp.tirn);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 70,539,153,371,171,980,000,000,000,000,000,000,000 | 4 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
void Gfx::opCurveTo1(Object args[], int numArgs) {
double x1, y1, x2, y2, x3, y3;
if (!state->isCurPt()) {
error(getPos(), "No current point in curveto1");
return;
}
x1 = state->getCurX();
y1 = state->getCurY();
x2 = args[0].getNum();
y2 = args[1].getNum();
x3 = args[2].getNum();
y3 = args[3]... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 328,854,975,159,581,450,000,000,000,000,000,000,000 | 15 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
int security_path_truncate(struct path *path, loff_t length,
unsigned int time_attrs)
{
if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
return 0;
return security_ops->path_truncate(path, length, time_attrs);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 117,987,346,732,409,420,000,000,000,000,000,000,000 | 7 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
connection_new_private(Connection *conn)
{
if (NULL == conn->c_private) {
Conn_private *new_private = (Conn_private *)slapi_ch_calloc(1, sizeof(Conn_private));
if (NULL == new_private) {
/* memory allocation failed */
return -1;
}
conn->c_private = new_private... | 0 | [
"CWE-415"
] | 389-ds-base | a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b | 100,890,379,887,537,750,000,000,000,000,000,000,000 | 40 | Issue 5218 - double-free of the virtual attribute context in persistent search (#5219)
description:
A search is processed by a worker using a private pblock.
If the search is persistent, the worker spawn a thread
and kind of duplicate its private pblock so that the spawn
thread continue to process the p... |
static void process_bin_flush(conn *c) {
time_t exptime = 0;
protocol_binary_request_flush* req = binary_get_request(c);
rel_time_t new_oldest = 0;
if (!settings.flush_enabled) {
// flush_all is not allowed but we log it on stats
write_bin_error(c, PROTOCOL_BINARY_RESPONSE_AUTH_ERROR, NULL,... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 87,389,151,382,285,260,000,000,000,000,000,000,000 | 34 | CVE reported by cisco talos |
rb_str_tr_s(str, src, repl)
VALUE str, src, repl;
{
str = rb_str_dup(str);
tr_trans(str, src, repl, 1);
return str;
} | 0 | [
"CWE-20"
] | ruby | e926ef5233cc9f1035d3d51068abe9df8b5429da | 235,002,666,511,228,800,000,000,000,000,000,000,000 | 7 | * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static int apparmor_path_chown(struct path *path, uid_t uid, gid_t gid)
{
struct path_cond cond = { path->dentry->d_inode->i_uid,
path->dentry->d_inode->i_mode
};
if (!mediated_filesystem(path->dentry->d_inode))
return 0;
return common_perm(OP_CHOWN, path, AA_MAY_CHOWN, &cond);
} | 0 | [
"CWE-20"
] | linux | a5b2c5b2ad5853591a6cac6134cd0f599a720865 | 25,644,951,572,556,707,000,000,000,000,000,000,000 | 11 | AppArmor: fix oops in apparmor_setprocattr
When invalid parameters are passed to apparmor_setprocattr a NULL deref
oops occurs when it tries to record an audit message. This is because
it is passing NULL for the profile parameter for aa_audit. But aa_audit
now requires that the profile passed is not NULL.
Fix this by... |
GF_Box *sbgp_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_SampleGroupBox, GF_ISOM_BOX_TYPE_SBGP);
return (GF_Box *)tmp; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 306,684,841,671,780,440,000,000,000,000,000,000,000 | 5 | fixed #1587 |
ssl_buf_freelist_free(SSL3_BUF_FREELIST *list)
{
SSL3_BUF_FREELIST_ENTRY *ent, *next;
for (ent = list->head; ent; ent = next)
{
next = ent->next;
OPENSSL_free(ent);
}
OPENSSL_free(list);
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 250,615,018,739,835,000,000,000,000,000,000,000,000 | 10 | Add Next Protocol Negotiation. |
CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data,
const char *pinnedpubkey,
const unsigned char *pubkey, size_t pubkeylen)
{
FILE *fp;
unsigned char *buf = NULL, *pem_ptr = NULL;
CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH;
/* if a path wasn'... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 146,333,982,108,050,440,000,000,000,000,000,000,000 | 155 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
AP4_AtomSampleTable::GetChunkOffset(AP4_Ordinal chunk_index,
AP4_Position& offset)
{
if (m_StcoAtom) {
AP4_UI32 offset_32;
AP4_Result result = m_StcoAtom->GetChunkOffset(chunk_index+1, offset_32);
if (AP4_SUCCEEDED(result)) {
offset = offset... | 0 | [
"CWE-476",
"CWE-703"
] | Bento4 | 4d3f0bebd5f8518fd775f671c12bea58c68e814e | 128,986,994,558,948,900,000,000,000,000,000,000,000 | 19 | fixed possible crashes on malformed inputs. |
bit_read_BLL (Bit_Chain *dat)
{
unsigned int i, len;
BITCODE_BLL result = 0ULL;
len = bit_read_BB (dat) << 1 | bit_read_B (dat);
switch (len)
{
case 1:
return bit_read_RC (dat);
case 2:
return bit_read_RS (dat);
case 4:
return bit_read_RL (dat);
default:
for (i = 0; i... | 0 | [
"CWE-703",
"CWE-125"
] | libredwg | 95cc9300430d35feb05b06a9badf678419463dbe | 39,727,181,427,367,515,000,000,000,000,000,000,000 | 22 | encode: protect from stack under-flow
From GH #178 fuzzing |
yang_check_rpc_action(struct lys_module *module, struct lys_node_rpc_action *rpc, struct lys_node **child,
int options, struct unres_schema *unres)
{
struct lys_node *node;
if (rpc->nodetype == LYS_ACTION) {
for (node = rpc->parent; node; node = lys_parent(node)) {
if ... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 4,502,342,809,321,802,000,000,000,000,000,000,000 | 33 | yang parser BUGFIX double free
Fixes #742 |
static int crypto_rsa_private(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus,
const BYTE* private_exponent, BYTE* output)
{
return crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length,
output);
} | 0 | [
"CWE-787"
] | FreeRDP | 8305349a943c68b1bc8c158f431dc607655aadea | 60,474,933,227,001,550,000,000,000,000,000,000,000 | 6 | Fixed GHSL-2020-102 heap overflow
(cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581) |
static int hid_add_field(struct hid_parser *parser, unsigned report_type, unsigned flags)
{
struct hid_report *report;
struct hid_field *field;
unsigned usages;
unsigned offset;
unsigned i;
report = hid_register_report(parser->device, report_type, parser->global.report_id);
if (!report) {
hid_err(parser->devi... | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 44,908,798,749,815,560,000,000,000,000,000,000,000 | 70 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
}
static void DumpMetaItem(GF_ISOFile *file, Bool root_meta, u32 tk_num, char *name)
{
char szInd[2];
u32 i, count, primary_id;
u32 meta_type = gf_isom_get_meta_type(file, root_meta, tk_num);
if (name[0]=='\t') {
szInd[0] = '\t';
szInd[1] = 0;
} else {
szInd[0] = 0;
}
count = gf_isom_get_meta_item_count(... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 289ffce3e0d224d314f5f92a744d5fe35999f20b | 274,414,806,448,810,460,000,000,000,000,000,000,000 | 102 | fixed #1767 (fuzz) |
static void sas_ata_post_internal(struct ata_queued_cmd *qc)
{
if (qc->flags & ATA_QCFLAG_FAILED)
qc->err_mask |= AC_ERR_OTHER;
if (qc->err_mask) {
/*
* Find the sas_task and kill it. By this point, libata
* has decided to kill the qc and has frozen the port.
* In this state sas_ata_task_done() will no... | 0 | [
"CWE-284"
] | linux | 0558f33c06bb910e2879e355192227a8e8f0219d | 275,387,821,554,754,630,000,000,000,000,000,000,000 | 23 | scsi: libsas: direct call probe and destruct
In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery
competing with ata error handling") introduced disco mutex to prevent
rediscovery competing with ata error handling and put the whole
revalidation in the mutex. But the rphy add/remove needs to wait for the
... |
*/
PHP_FUNCTION(date_add)
{
zval *object, *interval;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &object, date_ce_date, &interval, date_ce_interval) == FAILURE) {
RETURN_FALSE;
}
php_date_add(object, interval, return_value TSRMLS_CC);
RETURN_ZVAL(object, 1, 0); | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 818,608,598,531,709,400,000,000,000,000,000,000 | 12 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
static void reset_file_context(struct rar5* rar) {
memset(&rar->file, 0, sizeof(rar->file));
blake2sp_init(&rar->file.b2state, 32);
if(rar->main.solid) {
rar->cstate.solid_offset += rar->cstate.write_ptr;
} else {
rar->cstate.solid_offset = 0;
}
rar->cstate.write_ptr = 0;
rar->cstate.last_write_ptr = 0;
r... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 313,373,205,079,747,800,000,000,000,000,000,000,000 | 19 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
static void hog_device_free(void *data)
{
struct hog_device *dev = data;
queue_remove(devices, dev);
if (queue_isempty(devices)) {
queue_destroy(devices, NULL);
devices = NULL;
}
btd_device_unref(dev->device);
bt_hog_unref(dev->hog);
free(dev);
} | 0 | [] | bluez | 8cdbd3b09f29da29374e2f83369df24228da0ad1 | 215,793,981,741,312,550,000,000,000,000,000,000,000 | 14 | HOGP must only accept data from bonded devices.
HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding.
Reference:
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm |
__xmlLoaderErr(void *ctx, const char *msg, const char *filename)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlStructuredErrorFunc schannel = NULL;
xmlGenericErrorFunc channel = NULL;
void *data = NULL;
xmlErrorLevel level = XML_ERR_ERROR;
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 42,956,629,210,547,980,000,000,000,000,000,000,000 | 29 | 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. |
SMB2_QFS_info(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid, struct kstatfs *fsdata)
{
struct smb_rqst rqst;
struct smb2_query_info_rsp *rsp = NULL;
struct kvec iov;
struct kvec rsp_iov;
int rc = 0;
int resp_buftype;
struct cifs_ses *ses = tcon->ses;
struct smb2_fs_... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 319,305,099,147,045,440,000,000,000,000,000,000,000 | 46 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
char *Sys_ConsoleInput(void)
{
return CON_Input( );
} | 0 | [
"CWE-59"
] | ioq3 | b5acc31a4da72cc3a4a6d88facb15b6214d745c6 | 6,947,906,368,576,049,000,000,000,000,000,000,000 | 4 | CVE-2012-3345 |
void setup_sysctl_set(struct ctl_table_set *p,
struct ctl_table_set *parent,
int (*is_seen)(struct ctl_table_set *))
{
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | bfdc0b497faa82a0ba2f9dddcf109231dd519fcc | 105,952,441,500,183,700,000,000,000,000,000,000,000 | 5 | sysctl: restrict write access to dmesg_restrict
When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel
ring buffer. But a root user without CAP_SYS_ADMIN is able to reset
dmesg_restrict to 0.
This is an issue when e.g. LXC (Linux Containers) are used and complete
user space is running without CA... |
static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
struct kvm_vcpu_events *events)
{
if (events->flags & ~(KVM_VCPUEVENT_VALID_NMI_PENDING
| KVM_VCPUEVENT_VALID_SIPI_VECTOR
| KVM_VCPUEVENT_VALID_SHADOW
| KVM_VCPUEVENT_VALID_SMM
| KVM_VCPUEVENT_VALID_PAYL... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 55,375,082,193,350,070,000,000,000,000,000,000,000 | 84 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
static int ct_change_folder(struct media_player *mp, const char *path,
uint64_t uid, void *user_data)
{
struct avrcp_player *player = user_data;
struct avrcp *session;
uint8_t direction;
session = player->sessions->data;
set_ct_player(session, player);
player->change_path = g_strdup(path);
player->change_u... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 257,933,289,060,512,080,000,000,000,000,000,000,000 | 18 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
static void userfaultfd_show_fdinfo(struct seq_file *m, struct file *f)
{
struct userfaultfd_ctx *ctx = f->private_data;
wait_queue_entry_t *wq;
unsigned long pending = 0, total = 0;
spin_lock(&ctx->fault_pending_wqh.lock);
list_for_each_entry(wq, &ctx->fault_pending_wqh.head, entry) {
pending++;
total++;
}
... | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 200,544,047,008,045,800,000,000,000,000,000,000,000 | 25 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
struct sk_buff *napi_get_frags(struct napi_struct *napi)
{
struct sk_buff *skb = napi->skb;
if (!skb) {
skb = napi_alloc_skb(napi, GRO_MAX_HEAD);
if (skb) {
napi->skb = skb;
skb_mark_napi_id(skb, napi);
}
}
return skb; | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 71,052,081,398,051,550,000,000,000,000,000,000,000 | 13 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
_archive_write_disk_free(struct archive *_a)
{
struct archive_write_disk *a;
int ret;
if (_a == NULL)
return (ARCHIVE_OK);
archive_check_magic(_a, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_ANY | ARCHIVE_STATE_FATAL, "archive_write_disk_free");
a = (struct archive_write_disk *)_a;
ret = _archive_write_disk_cl... | 0 | [
"CWE-703",
"CWE-22"
] | libarchive | 59357157706d47c365b2227739e17daba3607526 | 300,976,319,862,728,160,000,000,000,000,000,000,000 | 40 | Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool. |
static struct timing_generator *dcn10_timing_generator_create(
struct dc_context *ctx,
uint32_t instance)
{
struct optc *tgn10 =
kzalloc(sizeof(struct optc), GFP_KERNEL);
if (!tgn10)
return NULL;
tgn10->base.inst = instance;
tgn10->base.ctx = ctx;
tgn10->tg_regs = &tg_regs[instance];
tgn10->tg_shift = ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 237,824,671,589,761,770,000,000,000,000,000,000,000 | 21 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
parse_SET_VLAN_VID(char *arg, struct ofpbuf *ofpacts,
enum ofputil_protocol *usable_protocols OVS_UNUSED)
{
return parse_set_vlan_vid(arg, ofpacts, false);
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 41,374,583,533,216,570,000,000,000,000,000,000,000 | 5 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static int do_move_page_to_node_array(struct mm_struct *mm,
struct page_to_node *pm,
int migrate_all)
{
int err;
struct page_to_node *pp;
LIST_HEAD(pagelist);
down_read(&mm->mmap_sem);
/*
* Build a list of pages to migrate
*/
for (pp = pm; pp->node != MAX_NUMNODES; pp++) {
struct vm_ar... | 0 | [
"CWE-476"
] | linux | 42cb14b110a5698ccf26ce59c4441722605a3743 | 340,146,660,555,017,730,000,000,000,000,000,000,000 | 82 | mm: migrate dirty page without clear_page_dirty_for_io etc
clear_page_dirty_for_io() has accumulated writeback and memcg subtleties
since v2.6.16 first introduced page migration; and the set_page_dirty()
which completed its migration of PageDirty, later had to be moderated to
__set_page_dirty_nobuffers(); then PageSwa... |
Definition &operator~() {
ignoreSemanticValue = true;
return *this;
}
void accept(Ope::Visitor &v) { holder_->accept(v); } | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 237,393,770,879,322,200,000,000,000,000,000,000,000 | 6 | Fix #122 |
PJ_DEF(pj_status_t) pjsip_transport_remove_state_listener (
pjsip_transport *tp,
pjsip_tp_state_listener_key *key,
const void *user_data)
{
transport_data *tp_data;
tp_state_listener *entry;
PJ_ASSERT_RETURN(tp && key, PJ_EINVAL);
pj_lock_acquire(tp->lock);
tp_data = (tran... | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 268,754,454,734,941,750,000,000,000,000,000,000,000 | 39 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
void uuid_short_init()
{
uuid_value= ((((ulonglong) global_system_variables.server_id) << 56) +
(((ulonglong) server_start_time) << 24));
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 309,039,988,201,465,020,000,000,000,000,000,000,000 | 5 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
String *Item_func_set_user_var::str_result(String *str)
{
DBUG_ASSERT(fixed == 1);
check(TRUE);
update(); // Store expression
return m_var_entry->val_str(&null_value, str, decimals);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 285,509,534,811,028,760,000,000,000,000,000,000,000 | 7 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static void vnc_display_print_local_addr(VncDisplay *vd)
{
SocketAddress *addr;
Error *err = NULL;
if (!vd->listener || !vd->listener->nsioc) {
return;
}
addr = qio_channel_socket_get_local_address(vd->listener->sioc[0], &err);
if (!addr) {
return;
}
if (addr->type != ... | 0 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 128,166,122,737,518,600,000,000,000,000,000,000,000 | 23 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... |
void CertDecoder::GetKey()
{
if (source_.GetError().What()) return;
GetSequence();
keyOID_ = GetAlgoId();
if (keyOID_ == RSAk) {
byte b = source_.next();
if (b != BIT_STRING) {
source_.SetError(BIT_STR_E);
return;
}
b = source_.next(); /... | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 252,476,757,895,064,820,000,000,000,000,000,000,000 | 29 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
char *Item_func_password::
create_password_hash_buffer(THD *thd, const char *password, size_t pass_len)
{
String *password_str= new (thd->mem_root)String(password, thd->variables.
character_set_client);
check_password_policy(password_str);
char *buff= NULL;
... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 274,252,116,690,706,800,000,000,000,000,000,000,000 | 29 | 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... |
static int sas_discover_new(struct domain_device *dev, int phy_id)
{
struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id];
struct domain_device *child;
int res;
SAS_DPRINTK("ex %016llx phy%d new device attached\n",
SAS_ADDR(dev->sas_addr), phy_id);
res = sas_ex_phy_discover(dev, phy_id);
if (res)
return r... | 0 | [
"CWE-399",
"CWE-772"
] | linux | 4a491b1ab11ca0556d2fda1ff1301e862a2d44c4 | 303,075,161,736,927,120,000,000,000,000,000,000,000 | 29 | scsi: libsas: fix memory leak in sas_smp_get_phy_events()
We've got a memory leak with the following producer:
while true;
do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null;
done
The buffer req is allocated and not freed after we return. Fix it.
Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
S... |
void TopologyDescription::checkWireCompatibilityVersions() {
const WireVersionInfo supportedWireVersion = {BATCH_COMMANDS, LATEST_WIRE_VERSION};
std::ostringstream errorOss;
_compatible = true;
for (const auto& serverDescription : _servers) {
if (serverDescription->getType() == ServerType::kUnk... | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 51,331,412,040,371,810,000,000,000,000,000,000,000 | 30 | SERVER-50170 fix max staleness read preference parameter for server selection |
static char *_xmlwriter_get_valid_file_path(char *source, char *resolved_path, int resolved_path_len TSRMLS_DC) {
xmlURI *uri;
xmlChar *escsource;
char *file_dest;
int isFileUri = 0;
uri = xmlCreateURI();
escsource = xmlURIEscapeStr((xmlChar *)source, (xmlChar *) ":");
xmlParseURIReference(uri, (char *)escsour... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 319,612,270,162,220,100,000,000,000,000,000,000,000 | 68 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
format_BUNDLE(const struct ofpact_bundle *a,
const struct ofpact_format_params *fp)
{
bundle_format(a, fp->port_map, fp->s);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 188,585,665,345,716,100,000,000,000,000,000,000,000 | 5 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
static void __reg_assign_32_into_64(struct bpf_reg_state *reg)
{
reg->umin_value = reg->u32_min_value;
reg->umax_value = reg->u32_max_value;
/* Attempt to pull 32-bit signed bounds into 64-bit bounds
* but must be positive otherwise set to worse case bounds
* and refine later from tnum.
*/
if (reg->s32_min_va... | 1 | [
"CWE-668"
] | net | e572ff80f05c33cd0cb4860f864f5c9c044280b6 | 235,358,464,305,257,740,000,000,000,000,000,000,000 | 17 | bpf: Make 32->64 bounds propagation slightly more robust
Make the bounds propagation in __reg_assign_32_into_64() slightly more
robust and readable by aligning it similarly as we did back in the
__reg_combine_64_into_32() counterpart. Meaning, only propagate or
pessimize them as a smin/smax pair.
Signed-off-by: Danie... |
CImgDisplay& render(const CImg<T>& img) {
if (!img)
throw CImgArgumentException(_cimgdisplay_instance
"render(): Empty specified image.",
cimgdisplay_instance);
if (is_empty()) return *this;
if (img._depth!=1) return ... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 333,446,580,085,490,640,000,000,000,000,000,000,000 | 87 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
test_command()
{
int what;
int save_token = c_token++;
if (!term) /* unknown terminal */
int_error(c_token, "use 'set term' to set terminal type first");
what = lookup_table(&test_tbl[0], c_token);
switch (what) {
default:
if (!END_OF_COMMAND)
int_error(c_token, "unrecognized test option"... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 85,754,035,012,068,830,000,000,000,000,000,000,000 | 24 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
table_netaddr_match(const char *s1, const char *s2)
{
struct netaddr n1;
struct netaddr n2;
if (strcasecmp(s1, s2) == 0)
return 1;
if (!text_to_netaddr(&n1, s1))
return 0;
if (!text_to_netaddr(&n2, s2))
return 0;
if (n1.ss.ss_family != n2.ss.ss_family)
return 0;
if (n1.ss.ss_len != n2.ss.ss_len)
retur... | 0 | [
"CWE-772",
"CWE-401"
] | src | 79a034b4aed29e965f45a13409268290c9910043 | 82,981,170,044,455,830,000,000,000,000,000,000,000 | 17 | Use regfree after we're done with preg.
From gilles@ |
static void update_cpu_load(struct rq *this_rq)
{
unsigned long this_load = this_rq->load.weight;
int i, scale;
this_rq->nr_load_updates++;
/* Update our load: */
for (i = 0, scale = 1; i < CPU_LOAD_IDX_MAX; i++, scale += scale) {
unsigned long old_load, new_load;
/* scale is effectively 1 << i now, and >> ... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 276,031,176,431,120,630,000,000,000,000,000,000,000 | 25 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
flatpak_dir_read_latest_commit (FlatpakDir *self,
const char *remote,
const char *ref,
char **out_checksum,
GCancellable *cancellable,
GError ... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 81,181,094,295,387,260,000,000,000,000,000,000,000 | 32 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
NamespaceString CommandHelpers::parseNsCollectionRequired(StringData dbname,
const BSONObj& cmdObj) {
// Accepts both BSON String and Symbol for collection name per SERVER-16260
// TODO(kangas) remove Symbol support in MongoDB 3.0 after Ruby driver audit... | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 206,892,942,036,829,550,000,000,000,000,000,000,000 | 20 | SERVER-38275 ban find explain with UUID |
find_option_end(char_u **arg, int *scope)
{
char_u *p = *arg;
++p;
if (*p == 'g' && p[1] == ':')
{
*scope = OPT_GLOBAL;
p += 2;
}
else if (*p == 'l' && p[1] == ':')
{
*scope = OPT_LOCAL;
p += 2;
}
else
*scope = 0;
if (!ASCII_ISALPHA(*p))
return NULL;
*arg = p;
if... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 78,864,093,183,112,350,000,000,000,000,000,000,000 | 29 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
int JOIN::init_join_caches()
{
JOIN_TAB *tab;
for (tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITHOUT_CONST_TABLES);
tab;
tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS))
{
TABLE *table= tab->table;
if (table->file->keyread_enabled())
{
if (!(table->file->index_flags(table->fil... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 38,782,741,550,883,337,000,000,000,000,000,000,000 | 28 | 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 int restore_sigcontext(struct pt_regs *regs,
struct sigcontext __user *sc, long *_d0)
{
unsigned int err = 0;
if (is_using_fpu(current))
fpu_kill_state(current);
#define COPY(x) err |= __get_user(regs->x, &sc->x)
COPY(d1); COPY(d2); COPY(d3);
COPY(a0); COPY(a1); COPY(a2); COPY(a3);
COPY(e0); CO... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 320,779,803,353,686,900,000,000,000,000,000,000,000 | 50 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static void nf_tables_flowtable_notify(struct nft_ctx *ctx,
struct nft_flowtable *flowtable,
struct list_head *hook_list,
int event)
{
struct nftables_pernet *nft_net = nft_pernet(ctx->net);
struct sk_buff *skb;
u16 flags = 0;
int err;
if (!ctx->report &&
!nfnetlink_has_liste... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 182,003,070,175,519,500,000,000,000,000,000,000,000 | 34 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
static napi_value TestUtf8(napi_env env, napi_callback_info info) {
size_t argc = 1;
napi_value args[1];
NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL));
NAPI_ASSERT(env, argc >= 1, "Wrong number of arguments");
napi_valuetype valuetype;
NAPI_CALL(env, napi_typeof(env, args[0], &value... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 278,056,618,867,439,100,000,000,000,000,000,000,000 | 25 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
GRANT_COLUMN(String &c, ulong y) :rights (y)
{
column= (char*) memdup_root(&memex,c.ptr(), key_length=c.length());
} | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 146,578,472,474,681,580,000,000,000,000,000,000,000 | 4 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
ktime_t __hrtimer_get_remaining(const struct hrtimer *timer, bool adjust)
{
unsigned long flags;
ktime_t rem;
lock_hrtimer_base(timer, &flags);
if (IS_ENABLED(CONFIG_TIME_LOW_RES) && adjust)
rem = hrtimer_expires_remaining_adjusted(timer);
else
rem = hrtimer_expires_remaining(timer);
unlock_hrtimer_base(time... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 290,944,229,710,743,980,000,000,000,000,000,000,000 | 14 | 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... |
static void mainwindows_rresize_line(int xdiff, MAIN_WINDOW_REC *win)
{
int windows, i, extra_width, next_column, shrunk;
int *widths;
GSList *line, *tmp;
line = mainwindows_get_line(win);
windows = g_slist_length(line);
widths = g_new0(int, windows);
extra_width = screen_width - windows + 1;
for (tmp = line,... | 0 | [
"CWE-476"
] | irssi | 5b5bfef03596d95079c728f65f523570dd7b03aa | 90,410,012,671,392,210,000,000,000,000,000,000,000 | 43 | check the error condition of mainwindow_create |
void Random::secureRandom(void* data, size_t size) {
using Single = SingletonThreadLocal<BufferedRandomDevice, RandomTag>;
Single::get().get(data, size);
} | 0 | [
"CWE-119",
"CWE-787"
] | folly | 8e927ee48b114c8a2f90d0cbd5ac753795a6761f | 242,679,590,069,504,150,000,000,000,000,000,000,000 | 4 | Flush secureRandom buffer on fork
Summary: On fork, flush the secureRandom buffer, so that we don't share entropy between the parent and child.
Reviewed By: ricklavoie
Differential Revision: D9196474
fbshipit-source-id: 12ff8488d814466186df61328a5f1d4000beb27f |
grub_ext2_dir (grub_device_t device, const char *path,
int (*hook) (const char *filename,
const struct grub_dirhook_info *info,
void *closure),
void *closure)
{
struct grub_ext2_data *data = 0;
struct grub_fshelp_node *fdiro = 0;
struct grub_ext2_dir_closure c;
grub_dl_ref (my_mod... | 0 | [
"CWE-703",
"CWE-787"
] | radare2 | 796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191 | 70,448,040,400,062,900,000,000,000,000,000,000,000 | 35 | Fix ext2 buffer overflow in r2_sbu_grub_memmove |
TEST(HttpStatusChecker, SingleRetriable599) {
const std::string yaml = R"EOF(
timeout: 1s
interval: 1s
unhealthy_threshold: 2
healthy_threshold: 2
http_health_check:
service_name_matcher:
prefix: locations
path: /healthcheck
retriable_statuses:
- start: 599
end: 600
)EOF"... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 308,080,924,299,744,070,000,000,000,000,000,000,000 | 24 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static struct NntpEmailData *nntp_edata_new(void)
{
return mutt_mem_calloc(1, sizeof(struct NntpEmailData));
} | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 291,528,020,750,097,700,000,000,000,000,000,000,000 | 4 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
static void print_string_set(FILE *f, const char *field, Set *s) {
bool space = false;
Iterator i;
char *p;
if (set_isempty(s))
return;
fputs(field, f);
SET_FOREACH(p, s, i) {
if (space)
fputc(' ', f);
... | 0 | [
"CWE-120"
] | systemd | f5a8c43f39937d97c9ed75e3fe8621945b42b0db | 290,633,042,368,391,100,000,000,000,000,000,000,000 | 18 | networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRout... |
_outFuncExpr(StringInfo str, const FuncExpr *node)
{
WRITE_NODE_TYPE("FUNCEXPR");
WRITE_OID_FIELD(funcid);
WRITE_OID_FIELD(funcresulttype);
WRITE_BOOL_FIELD(funcretset);
WRITE_BOOL_FIELD(funcvariadic);
WRITE_ENUM_FIELD(funcformat, CoercionForm);
WRITE_OID_FIELD(funccollid);
WRITE_OID_FIELD(inputcollid);
WRITE... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 57,540,045,380,601,500,000,000,000,000,000,000,000 | 14 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
filter_init( void )
{
static Filter filter_objectClass_pres = { LDAP_FILTER_PRESENT };
static struct berval filterstr_objectClass_pres = BER_BVC("(objectClass=*)");
filter_objectClass_pres.f_desc = slap_schema.si_ad_objectClass;
slap_filter_objectClass_pres = &filter_objectClass_pres;
slap_filterstr_objectClass_... | 0 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 157,030,554,674,422,680,000,000,000,000,000,000,000 | 12 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
ptaCopy(PTA *pta)
{
l_int32 i;
l_float32 x, y;
PTA *npta;
PROCNAME("ptaCopy");
if (!pta)
return (PTA *)ERROR_PTR("pta not defined", procName, NULL);
if ((npta = ptaCreate(pta->nalloc)) == NULL)
return (PTA *)ERROR_PTR("npta not made", procName, NULL);
for (i = 0; i < pta->... | 0 | [
"CWE-119",
"CWE-787"
] | leptonica | ee301cb2029db8a6289c5295daa42bba7715e99a | 142,429,800,586,128,500,000,000,000,000,000,000,000 | 21 | Security fixes: expect final changes for release 1.75.3.
* Fixed a debian security issue with fscanf() reading a string with
possible buffer overflow.
* There were also a few similar situations with sscanf(). |
NTSTATUS smbXcli_conn_samba_suicide_recv(struct tevent_req *req)
{
return tevent_req_simple_recv_ntstatus(req);
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 317,057,893,635,580,930,000,000,000,000,000,000,000 | 4 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
find_folder_items_response_cb (ESoapResponse *response,
GSimpleAsyncResult *simple)
{
EwsAsyncData *async_data;
ESoapParameter *param;
ESoapParameter *subparam;
GError *error = NULL;
async_data = g_simple_async_result_get_op_res_gpointer (simple);
param = e_soap_response_get_first... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 131,855,162,012,638,780,000,000,000,000,000,000,000 | 39 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
TfLiteRegistration* Register_WHERE() {
static TfLiteRegistration r = {/*init*/ nullptr, /*free*/ nullptr,
where::Prepare, where::Eval};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 158,218,014,722,415,100,000,000,000,000,000,000,000 | 5 | [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... |
_dbus_read (int fd,
DBusString *buffer,
int count)
{
int bytes_read;
int start;
char *data;
_dbus_assert (count >= 0);
start = _dbus_string_get_length (buffer);
if (!_dbus_string_lengthen (buffer, count))
{
errno = ENOMEM;
return -... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 329,533,479,218,302,900,000,000,000,000,000,000,000 | 48 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
int x509parse_public_keyfile( rsa_context *rsa, const char *path )
{
int ret;
size_t n;
unsigned char *buf;
if ( (ret = load_file( path, &buf, &n ) ) != 0 )
return( ret );
ret = x509parse_public_key( rsa, buf, n );
memset( buf, 0, n + 1 );
free( buf );
return( ret );
} | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 332,168,872,629,012,460,000,000,000,000,000,000,000 | 16 | RSA blinding on CRT operations to counter timing attacks |
static int cap_path_unlink(struct path *dir, struct dentry *dentry)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 266,373,081,679,267,400,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
undo_read(bufinfo_T *bi, char_u *buffer, size_t size)
{
int retval = OK;
#ifdef FEAT_CRYPT
if (bi->bi_buffer != NULL)
{
int size_todo = (int)size;
char_u *p = buffer;
while (size_todo > 0)
{
size_t n;
if (bi->bi_used >= bi->bi_avail)
{
n = fread(bi->bi_buffer, 1, (size_t)CRYPT_BUF_SI... | 0 | [
"CWE-787"
] | vim | 338f1fc0ee3ca929387448fe464579d6113fa76a | 265,618,342,456,797,300,000,000,000,000,000,000,000 | 46 | patch 8.2.5023: substitute overwrites allocated buffer
Problem: Substitute overwrites allocated buffer.
Solution: Disallow undo when in a substitute command. |
void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
{
int lastBorder;
/* Seek left */
int leftLimit = -1, rightLimit;
int i, restoreAlphaBlending = 0;
if (border < 0 || color < 0) {
/* Refuse to fill to a non-solid border */
return;
}
if (!im->trueColor) {
if ((color > (im->colo... | 0 | [
"CWE-119"
] | php-src | 863d37ea66d5c960db08d6f4a2cbd2518f0f80d1 | 329,948,195,872,902,570,000,000,000,000,000,000,000 | 87 | Fix #72696: imagefilltoborder stackoverflow on truecolor images
We must not allow negative color values be passed to
gdImageFillToBorder(), because that can lead to infinite recursion
since the recursion termination condition will not necessarily be met. |
void msix_save(PCIDevice *dev, QEMUFile *f)
{
unsigned n = dev->msix_entries_nr;
if (!msix_present(dev)) {
return;
}
qemu_put_buffer(f, dev->msix_table, n * PCI_MSIX_ENTRY_SIZE);
qemu_put_buffer(f, dev->msix_pba, (n + 7) / 8);
} | 0 | [] | qemu | 43b11a91dd861a946b231b89b7542856ade23d1b | 189,915,455,238,025,750,000,000,000,000,000,000,000 | 11 | msix: implement pba write (but read-only)
qpci_msix_pending() writes on pba region, causing qemu to SEGV:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fba8c0 (LWP 25882)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00005555556556c5 in memor... |
TfLiteStatus L2Eval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data);
OpData* data = reinterpret_cast<OpData*>(node->user_data);
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output));
const TfLiteTensor* in... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 96,180,062,000,256,680,000,000,000,000,000,000,000 | 22 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
ldbm_config_import_cachesize_get(void *arg)
{
struct ldbminfo *li = (struct ldbminfo *)arg;
return (void *)((uintptr_t)li->li_import_cachesize);
} | 0 | [
"CWE-399",
"CWE-203"
] | 389-ds-base | cc0f69283abc082488824702dae485b8eae938bc | 175,730,569,280,878,100,000,000,000,000,000,000,000 | 6 | Issue 4480 - Unexpected info returned to ldap request (#4491)
Bug description:
If the bind entry does not exist, the bind result info
reports that 'No such entry'. It should not give any
information if the target entry exists or not
Fix description:
Does not return any additional information d... |
PHP_FUNCTION(imagecreatetruecolor)
{
zend_long x_size, y_size;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &x_size, &y_size) == FAILURE) {
return;
}
if (x_size <= 0 || y_size <= 0 || x_size >= INT_MAX || y_size >= INT_MAX) {
php_error_docref(NULL, E_WARNING, "Invalid image dimensions");
... | 0 | [
"CWE-787"
] | php-src | 28022c9b1fd937436ab67bb3d61f652c108baf96 | 287,034,284,780,010,500,000,000,000,000,000,000,000 | 22 | Fix bug#72697 - select_colors write out-of-bounds
(cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4)
Conflicts:
ext/gd/gd.c |
GF_Err dinf_Size(GF_Box *s)
{
GF_Err e;
GF_DataInformationBox *ptr = (GF_DataInformationBox *)s;
if (ptr->dref) {
e = gf_isom_box_size((GF_Box *) ptr->dref);
if (e) return e;
ptr->size += ptr->dref->size;
}
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 93,940,830,508,847,200,000,000,000,000,000,000,000 | 11 | prevent dref memleak on invalid input (#1183) |
int kill_pid_info_as_cred(int sig, struct siginfo *info, struct pid *pid,
const struct cred *cred, u32 secid)
{
int ret = -EINVAL;
struct task_struct *p;
unsigned long flags;
if (!valid_signal(sig))
return ret;
rcu_read_lock();
p = pid_task(pid, PIDTYPE_PID);
if (!p) {
ret = -ESRCH;
goto out_unlock;
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 223,247,731,798,148,600,000,000,000,000,000,000,000 | 35 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
struct razer_report razer_chroma_standard_matrix_set_custom_frame(unsigned char row_index, unsigned char start_col, unsigned char stop_col, unsigned char *rgb_data)
{
const size_t start_arg_offset = 4;
struct razer_report report = {0};
size_t row_length = (size_t) (((stop_col + 1) - start_col) * 3);
if... | 0 | [
"CWE-787"
] | openrazer | 7e8a04feb378a679f1bcdcae079a5100cc45663b | 189,003,042,639,364,230,000,000,000,000,000,000,000 | 23 | Fix oob memcpy in matrix_custom_frame methods
Adjust row_length if it exeeds the arguments array |
asmlinkage long parisc_fadvise64_64(int fd,
unsigned int high_off, unsigned int low_off,
unsigned int high_len, unsigned int low_len, int advice)
{
return sys_fadvise64_64(fd, (loff_t)high_off << 32 | low_off,
(loff_t)high_len << 32 | low_len, advice);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 61,214,414,310,845,670,000,000,000,000,000,000,000 | 7 | 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 ... |
STATIC AV *
S_add_multi_match(pTHX_ AV* multi_char_matches, SV* multi_string, const STRLEN cp_count)
{
/* This adds the string scalar <multi_string> to the array
* <multi_char_matches>. <multi_string> is known to have exactly
* <cp_count> code points in it. This is used when constructing a
* bracke... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 133,489,257,607,560,380,000,000,000,000,000,000,000 | 45 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
win_alloc_lines(win_T *wp)
{
wp->w_lines_valid = 0;
wp->w_lines = ALLOC_CLEAR_MULT(wline_T, Rows );
if (wp->w_lines == NULL)
return FAIL;
return OK;
} | 1 | [
"CWE-703",
"CWE-125"
] | vim | 05b27615481e72e3b338bb12990fb3e0c2ecc2a9 | 278,017,148,260,989,500,000,000,000,000,000,000,000 | 8 | patch 8.2.4154: ml_get error when exchanging windows in Visual mode
Problem: ml_get error when exchanging windows in Visual mode.
Solution: Correct end of Visual area when entering another buffer. |
con_header_read(agooCon c, size_t *mlenp) {
char *hend = strstr(c->buf, "\r\n\r\n");
agooMethod method;
struct _agooSeg path;
char *query = NULL;
char *qend;
char *b;
size_t clen = 0;
long mlen;
agooHook hook = NULL;
agooPage p;
struct _agooErr err = AGOO_ERR_INIT;
... | 1 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 230,426,910,782,272,240,000,000,000,000,000,000,000 | 190 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
GF_Err pcmC_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_PCMConfigBox *ptr = (GF_PCMConfigBox *) s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u8(bs, ptr->format_flags);
gf_bs_write_u8(bs, ptr->PCM_sample_size);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 43,332,442,971,029,920,000,000,000,000,000,000,000 | 11 | fixed #2255 |
suggest_load_files(void)
{
langp_T *lp;
int lpi;
slang_T *slang;
char_u *dotp;
FILE *fd;
char_u buf[MAXWLEN];
int i;
time_t timestamp;
int wcount;
int wordnr;
garray_T ga;
int c;
// Do this for all languages that support sound folding.
for (lpi = 0; lpi < cu... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 320,569,272,914,272,830,000,000,000,000,000,000,000 | 134 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
nfs4_update_changeattr_locked(struct inode *inode,
struct nfs4_change_info *cinfo,
unsigned long timestamp, unsigned long cache_validity)
{
struct nfs_inode *nfsi = NFS_I(inode);
nfsi->cache_validity |= NFS_INO_INVALID_CTIME
| NFS_INO_INVALID_MTIME
| cache_validity;
if (cinfo->atomic && cinfo->before == in... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 110,649,412,367,213,880,000,000,000,000,000,000,000 | 36 | 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... |
e_ews_connection_delete_folder_finish (EEwsConnection *cnc,
GAsyncResult *result,
GError **error)
{
GSimpleAsyncResult *simple;
g_return_val_if_fail (cnc != NULL, FALSE);
g_return_val_if_fail (
g_simple_async_result_is_valid (
result,... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 294,226,984,230,062,180,000,000,000,000,000,000,000 | 19 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
int MemIo::open()
{
p_->idx_ = 0;
p_->eof_ = false;
return 0;
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 126,304,329,213,356,620,000,000,000,000,000,000,000 | 6 | Fix https://github.com/Exiv2/exiv2/issues/55 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.