func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
remove_device (ClutterDeviceManagerXI2 *manager_xi2,
gint device_id)
{
ClutterInputDevice *device;
device = g_hash_table_lookup (manager_xi2->devices_by_id,
GINT_TO_POINTER (device_id));
if (device != NULL)
{
manager_xi2->master_device... | 0 | [
"CWE-264"
] | clutter | e310c68d7b38d521e341f4e8a36f54303079d74e | 329,400,556,887,998,300,000,000,000,000,000,000,000 | 27 | x11: trap errors when calling XIQueryDevice
Devices can disappear at any time, causing XIQueryDevice
to throw an error. At the same time, plug a memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=701974 |
ldns_rr_type2buffer_str(ldns_buffer *output, const ldns_rr_type type)
{
const ldns_rr_descriptor *descriptor;
descriptor = ldns_rr_descript(type);
if (descriptor && descriptor->_name) {
ldns_buffer_printf(output, "%s", descriptor->_name);
} else {
/* exceptions for pseudotypes */
switch (type) {
case LDN... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 251,999,769,464,038,000,000,000,000,000,000,000,000 | 32 | CAA and URI |
add_tag_field(
dict_T *dict,
char *field_name,
char_u *start, // start of the value
char_u *end) // after the value; can be NULL
{
char_u *buf;
int len = 0;
int retval;
// check that the field name doesn't exist yet
if (dict_has_key(dict, field_name))
{
if (p_verbose ... | 0 | [
"CWE-416"
] | vim | adce965162dd89bf29ee0e5baf53652e7515762c | 128,235,897,737,844,020,000,000,000,000,000,000,000 | 42 | patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer
Problem: Using freed memory when 'tagfunc' deletes the buffer.
Solution: Make a copy of the tag name. |
static inline bool nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
{
return false;
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 188,537,844,713,353,260,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... |
STATIC void
S_rck_elide_nothing(pTHX_ regnode *node)
{
dVAR;
PERL_ARGS_ASSERT_RCK_ELIDE_NOTHING;
if (OP(node) != CURLYX) {
const int max = (reg_off_by_arg[OP(node)]
? I32_MAX
/* I32 may be smaller than U16 on CRAYs! */
: (I3... | 0 | [
"CWE-190"
] | perl5 | 0a320d753fe7fca03df259a4dfd8e641e51edaa8 | 306,226,457,186,531,460,000,000,000,000,000,000,000 | 33 | study_chunk: extract rck_elide_nothing
(CVE-2020-10878)
(cherry picked from commit 93dee06613d4e1428fb10905ce1c3c96f53113dc) |
void CLASS derror()
{
if (!data_error)
{
fprintf(stderr, "%s: ", ifname);
if (feof(ifp))
fprintf(stderr, _("Unexpected end of file\n"));
else
fprintf(stderr, _("Corrupt data near 0x%llx\n"), (INT64)ftello(ifp));
}
data_error++;
} | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 101,226,159,498,453,920,000,000,000,000,000,000,000 | 12 | Secunia SA75000 advisory: several buffer overruns |
static int ip6mr_find_vif(struct mr6_table *mrt, struct net_device *dev)
{
int ct;
for (ct = mrt->maxvif - 1; ct >= 0; ct--) {
if (mrt->vif6_table[ct].dev == dev)
break;
}
return ct;
} | 0 | [
"CWE-20"
] | linux | 99253eb750fda6a644d5188fb26c43bad8d5a745 | 197,325,884,424,616,500,000,000,000,000,000,000,000 | 10 | ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt
Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed
the issue for ipv4 ipmr:
ip_mroute_setsockopt() & ip_mroute_getsockopt() should not
access/set raw_sk(sk)->ipmr_table before making sure the socket
is a raw socket, and prot... |
static u32 tx_sa_update_pn(struct macsec_tx_sa *tx_sa, struct macsec_secy *secy)
{
u32 pn;
spin_lock_bh(&tx_sa->lock);
pn = tx_sa->next_pn;
tx_sa->next_pn++;
if (tx_sa->next_pn == 0) {
pr_debug("PN wrapped, transitioning to !oper\n");
tx_sa->active = false;
if (secy->protect_frames)
secy->operational = ... | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 96,528,257,618,126,450,000,000,000,000,000,000,000 | 18 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
const char *get_cpp_buf()
{
return m_cpp_buf;
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 23,088,590,743,424,130,000,000,000,000,000,000,000 | 4 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
FUNC_DECODER(dissector_postgresql)
{
DECLARE_DISP_PTR(ptr);
struct ec_session *s = NULL;
void *ident = NULL;
char tmp[MAX_ASCII_ADDR_LEN];
struct postgresql_status *conn_status;
/* don't complain about unused var */
(void) DECODE_DATA;
(void) DECODE_DATALEN;
(void) DECODED_LEN;
if (F... | 0 | [
"CWE-119",
"CWE-703"
] | ettercap | e3abe7d7585ecc420a7cab73313216613aadad5a | 63,866,847,725,357,750,000,000,000,000,000,000,000 | 110 | Fixed heap overflow caused by length |
std::string MD5::unparse()
{
final();
return QUtil::hex_encode(
std::string(reinterpret_cast<char*>(digest_val), 16));
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 59,642,458,852,187,700,000,000,000,000,000,000,000 | 6 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
void ComputeAsync(OpKernelContext* context, DoneCallback done) override {
// The shape of 'grads' is [num_boxes, crop_height, crop_width, depth].
const Tensor& grads = context->input(0);
// The shape of 'boxes' is [num_boxes, 4].
const Tensor& boxes = context->input(2);
// The shape of 'box_index'... | 0 | [
"CWE-190"
] | tensorflow | 7c1692bd417eb4f9b33ead749a41166d6080af85 | 121,610,277,482,034,860,000,000,000,000,000,000,000 | 80 | PR #51732: Fix crash of tf.image.crop_and_resize when input is large number
Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/51732
This PR is part of the effort in #46890 where
tf.image.crop_and_resize will crash if shape consists of large number.
Signed-off-by: Yong Tang <yong.tang.github@outlo... |
static int parsePermissiveModify (
Operation *op,
SlapReply *rs,
LDAPControl *ctrl )
{
if ( op->o_permissive_modify != SLAP_CONTROL_NONE ) {
rs->sr_text = "permissiveModify control specified multiple times";
return LDAP_PROTOCOL_ERROR;
}
if ( !BER_BVISNULL( &ctrl->ldctl_value )) {
rs->sr_text = "permissive... | 0 | [
"CWE-125"
] | openldap | 21981053a1195ae1555e23df4d9ac68d34ede9dd | 242,226,633,545,982,340,000,000,000,000,000,000,000 | 21 | ITS#9408 fix vrfilter double-free |
QPDFObjectHandle::shallowCopy()
{
assertInitialized();
if (isStream())
{
QTC::TC("qpdf", "QPDFObjectHandle ERR shallow copy stream");
throw std::runtime_error(
"attempt to make a shallow copy of a stream");
}
QPDFObjectHandle new_obj;
if (isArray())
{
QTC::TC("qpdf", "QPDFObjectHan... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 46,869,912,361,831,710,000,000,000,000,000,000,000 | 32 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
return -EOPNOTSUPP;
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 334,179,619,541,560,900,000,000,000,000,000,000,000 | 4 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
get_packer(ImagingEncoderObject* encoder, const char* mode,
const char* rawmode)
{
int bits;
ImagingShuffler pack;
pack = ImagingFindPacker(mode, rawmode, &bits);
if (!pack) {
Py_DECREF(encoder);
PyErr_SetString(PyExc_SystemError, "unknown raw mode");
return -1;
}
encoder->state.... | 0 | [
"CWE-119"
] | Pillow | a130c45990578a1bb0a6a000ed1b110e27324910 | 77,654,138,605,324,640,000,000,000,000,000,000,000 | 18 | add several TIFF decoders and encoders |
cancel_file_info_for_file (NautilusDirectory *directory,
NautilusFile *file)
{
if (directory->details->get_info_file == file)
{
file_info_cancel (directory);
}
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 320,722,779,193,775,420,000,000,000,000,000,000,000 | 8 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static void sev_flush_encrypted_page(struct kvm_vcpu *vcpu, void *va)
{
int asid = to_kvm_svm(vcpu->kvm)->sev_info.asid;
/*
* Note! The address must be a kernel address, as regular page walk
* checks are performed by VM_PAGE_FLUSH, i.e. operating on a user
* address is non-deterministic and unsafe. This func... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 240,310,767,504,889,240,000,000,000,000,000,000,000 | 35 | 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... |
Item_func_or_sum(THD *thd, List<Item> &list):
Item_result_field(thd), Item_args(thd, list) { } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 93,801,493,894,189,930,000,000,000,000,000,000,000 | 2 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
_equalAlterDefaultPrivilegesStmt(const AlterDefaultPrivilegesStmt *a, const AlterDefaultPrivilegesStmt *b)
{
COMPARE_NODE_FIELD(options);
COMPARE_NODE_FIELD(action);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 16,386,836,504,063,181,000,000,000,000,000,000,000 | 7 | 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... |
decode_NXAST_RAW_REG_LOAD(const struct nx_action_reg_load *narl,
enum ofp_version ofp_version OVS_UNUSED,
const struct vl_mff_map *vl_mff_map,
uint64_t *tlv_bitmap, struct ofpbuf *out)
{
struct mf_subfield dst;
enum ofperr error;
... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 47,186,521,085,646,360,000,000,000,000,000,000,000 | 37 | 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> |
process_cmd_dump(CMD_Request *msg, char *line)
{
msg->command = htons(REQ_DUMP);
msg->data.dump.pad = htonl(0);
} | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 233,827,003,129,926,750,000,000,000,000,000,000,000 | 5 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
void CWebServer::Cmd_GetThemes(WebEmSession & session, const request& req, Json::Value &root)
{
root["status"] = "OK";
root["title"] = "GetThemes";
m_mainworker.GetAvailableWebThemes();
int ii = 0;
for (const auto & itt : m_mainworker.m_webthemes)
{
root["result"][ii]["theme"] = itt;
ii++;... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 320,646,482,756,395,850,000,000,000,000,000,000,000 | 12 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
int brcmf_cfg80211_del_iface(struct wiphy *wiphy, struct wireless_dev *wdev)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = wdev->netdev;
if (ndev && ndev == cfg_to_ndev(cfg))
return -ENOTSUPP;
/* vif event pending in firmware */
if (brcmf_cfg80211_vif_event_armed(cfg))
re... | 0 | [
"CWE-787"
] | linux | 1b5e2423164b3670e8bc9174e4762d297990deff | 330,947,225,072,843,770,000,000,000,000,000,000,000 | 41 | brcmfmac: assure SSID length from firmware is limited
The SSID length as received from firmware should not exceed
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by:... |
void Magick::Image::chromaBluePrimary(double *x_,double *y_,double *z_) const
{
*x_=constImage()->chromaticity.blue_primary.x;
*y_=constImage()->chromaticity.blue_primary.y;
*z_=constImage()->chromaticity.blue_primary.z;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 330,111,113,629,330,680,000,000,000,000,000,000,000 | 6 | Added missing return to avoid use after free. |
inline uint argument_count() const { return arg_count; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 264,389,630,798,888,700,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd,
unsigned long arg)
{
struct hci_dev *hdev = hci_pi(sk)->hdev;
if (!hdev)
return -EBADFD;
if (test_bit(HCI_USER_CHANNEL, &hdev->dev_flags))
return -EBUSY;
if (hdev->dev_type != HCI_BREDR)
return -EOPNOTSUPP;
switch (cmd) {
case HCISET... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 128,647,352,197,710,790,000,000,000,000,000,000,000 | 48 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static void __fastcall RegisterSwitch(
TSwitchesUsage & SwitchesUsage, const UnicodeString & Name, const UnicodeString & Desc)
{
SwitchesUsage.push_back(std::make_pair(LowerCase(Name), Desc));
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 16,930,624,325,529,208,000,000,000,000,000,000,000 | 5 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
int bcf_update_filter(const bcf_hdr_t *hdr, bcf1_t *line, int *flt_ids, int n)
{
if ( !(line->unpacked & BCF_UN_FLT) ) bcf_unpack(line, BCF_UN_FLT);
line->d.shared_dirty |= BCF1_DIRTY_FLT;
line->d.n_flt = n;
if ( !n ) return 0;
hts_expand(int, line->d.n_flt, line->d.m_flt, line->d.flt);
int i;
... | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 112,255,303,761,078,430,000,000,000,000,000,000,000 | 12 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
static void cmd_anal_ucall_ref (RCore *core, ut64 addr) {
RAnalFunction * fcn = r_anal_get_fcn_at (core->anal, addr, R_ANAL_FCN_TYPE_NULL);
if (fcn) {
r_cons_printf (" ; %s", fcn->name);
} else {
r_cons_printf (" ; 0x%" PFMT64x, addr);
}
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | a1bc65c3db593530775823d6d7506a457ed95267 | 80,648,323,920,870,530,000,000,000,000,000,000,000 | 8 | Fix #12375 - Crash in bd+ao (#12382) |
void cgsleep_ms(int ms)
{
cgtimer_t ts_start;
cgsleep_prepare_r(&ts_start);
cgsleep_ms_r(&ts_start, ms);
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 7,573,451,237,416,446,000,000,000,000,000,000,000 | 7 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
{
struct inet_sock *inet = inet_sk(sk);
struct raw6_sock *rp = raw6_sk(sk);
if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) {
atomic_inc(&sk->sk_drops);
kfree_skb(skb);
return NET_RX_DROP;
}
if (!rp->checksum)
skb->ip_summed = CHECKSUM_UNNECESSARY;
... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 8,837,030,460,885,242,000,000,000,000,000,000,000 | 39 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
DEFINE_IDTENTRY_RAW(xenpv_exc_machine_check)
{
/*
* There's no IST on Xen PV, but we still need to dispatch
* to the correct handler.
*/
if (user_mode(regs))
noist_exc_machine_check(regs);
else
exc_machine_check(regs);
} | 0 | [
"CWE-703"
] | linux | 96e8fc5818686d4a1591bb6907e7fdb64ef29884 | 288,535,007,630,211,400,000,000,000,000,000,000,000 | 11 | x86/xen: Use clear_bss() for Xen PV guests
Instead of clearing the bss area in assembly code, use the clear_bss()
function.
This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-of... |
void ExpressionZip::_doAddDependencies(DepsTracker* deps) const {
std::for_each(
_inputs.begin(), _inputs.end(), [&deps](intrusive_ptr<Expression> inputExpression) -> void {
inputExpression->addDependencies(deps);
});
std::for_each(_defaults.begin(),
_defaults.end()... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 137,098,548,903,236,710,000,000,000,000,000,000,000 | 11 | SERVER-38070 fix infinite loop in agg expression |
static inline bool guest_cpuid_has_pcid(struct kvm_vcpu *vcpu)
{
struct kvm_cpuid_entry2 *best;
best = kvm_find_cpuid_entry(vcpu, 1, 0);
return best && (best->ecx & bit(X86_FEATURE_PCID));
} | 0 | [] | linux | 6d1068b3a98519247d8ba4ec85cd40ac136dbdf9 | 180,143,989,682,920,600,000,000,000,000,000,000,000 | 7 | KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461)
On hosts without the XSAVE support unprivileged local user can trigger
oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest
cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN
ioctl.
invalid opcode: 0000 [#2]... |
list_ne_type_resources (WinLibrary *fi, int *count)
{
size_t c, rescnt;
WinResource *wr;
Win16NETypeInfo *typeinfo;
/* count number of `type' resources */
typeinfo = (Win16NETypeInfo *) fi->first_resource;
RETURN_IF_BAD_POINTER(NULL, *typeinfo);
for (rescnt = 0 ; typeinfo->type_id != 0 ; re... | 0 | [] | icoutils | a8c8543731ed255e6f8bb81c662155f98710ac20 | 165,474,359,540,602,460,000,000,000,000,000,000,000 | 42 | wrestool: read_library() moves memory around, check it doesn't overwrite header data |
xmlSchemaParseFacet(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
xmlNodePtr node)
{
xmlSchemaFacetPtr facet;
xmlNodePtr child = NULL;
const xmlChar *value;
if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
return (NULL);
facet = xmlSchemaNewFacet();
if ... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 280,837,189,311,451,180,000,000,000,000,000,000,000 | 78 | 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. |
void ConnectionHandlerImpl::ActiveTcpListener::onAccept(Network::ConnectionSocketPtr&& socket) {
if (listenerConnectionLimitReached()) {
ENVOY_LOG(trace, "closing connection: listener connection limit reached for {}",
config_->name());
socket->close();
stats_.downstream_cx_overflow_.inc();
... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 172,737,591,295,830,930,000,000,000,000,000,000,000 | 11 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
void ConnectionManagerImpl::ActiveStreamDecoderFilter::encode100ContinueHeaders(
HeaderMapPtr&& headers) {
// If Envoy is not configured to proxy 100-Continue responses, swallow the 100 Continue
// here. This avoids the potential situation where Envoy strips Expect: 100-Continue and sends a
// 100-Continue, t... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 331,822,442,462,602,080,000,000,000,000,000,000,000 | 10 | 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... |
int oidc_auth_checker(request_rec *r) {
oidc_cfg *c = ap_get_module_config(r->server->module_config,
&auth_openidc_module);
/* check for anonymous access and PASS mode */
if (r->user != NULL && strlen(r->user) == 0) {
r->user = NULL;
if (oidc_dir_cfg_unauth_action(r) == OIDC_UNAUTH_PASS)
return OK;
if ... | 0 | [
"CWE-601"
] | mod_auth_openidc | 03e6bfb446f4e3f27c003d30d6a433e5dd8e2b3d | 46,695,577,810,191,510,000,000,000,000,000,000,000 | 49 | apply OIDCRedirectURLsAllowed setting to target_link_uri
closes #672; thanks @Meheni
release 2.4.9.4
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
main(int argc, char *argv[])
{
struct font_reader fr;
int c;
FILE *ifp = 0;
const char *ifp_filename = "<stdin>";
Clp_Parser *clp =
Clp_NewParser(argc, (const char * const *)argv, sizeof(options) / sizeof(options[0]), options);
program_name = Clp_ProgramName(clp);
/* interpret command line arguments... | 0 | [
"CWE-119",
"CWE-787"
] | t1utils | 6b9d1aafcb61a3663c883663eb19ccdbfcde8d33 | 136,302,060,401,594,090,000,000,000,000,000,000,000 | 105 | Security fixes.
- Don't overflow the small cs_start buffer (reported by Niels
Thykier via the debian tracker (Jakub Wilk), found with a
fuzzer ("American fuzzy lop")).
- Cast arguments to <ctype.h> functions to unsigned char. |
void dcn20_calculate_dlg_params(
struct dc *dc, struct dc_state *context,
display_e2e_pipe_params_st *pipes,
int pipe_cnt,
int vlevel)
{
int i, j, pipe_idx, pipe_idx_unsplit;
bool visited[MAX_PIPES] = { 0 };
/* Writeback MCIF_WB arbitration parameters */
dc->res_pool->funcs->set_mcif_arb_params(dc, context... | 0 | [
"CWE-400",
"CWE-703",
"CWE-401"
] | linux | 055e547478a11a6360c7ce05e2afc3e366968a12 | 165,340,187,984,005,240,000,000,000,000,000,000,000 | 103 | drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
bool WriteEbmlElement(IMkvWriter* writer, uint64 type, uint64 value) {
return WriteEbmlElement(writer, type, value, 0);
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 216,010,660,230,155,360,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
isdn_net_reset(struct net_device *dev)
{
#ifdef CONFIG_ISDN_X25
struct concap_device_ops * dops =
((isdn_net_local *) netdev_priv(dev))->dops;
struct concap_proto * cprot =
((isdn_net_local *) netdev_priv(dev))->netdev->cprot;
#endif
#ifdef CONFIG_ISDN_X25
if( cprot && cprot -> pops && dops )
cprot -> pops -> ... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 145,861,151,725,312,830,000,000,000,000,000,000,000 | 13 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
{
struct sco_conn *conn = sco_pi(sk)->conn;
struct sk_buff *skb;
int err;
/* Check outgoing MTU */
if (len > conn->mtu)
return -EINVAL;
BT_DBG("sk %p len %d", sk, len);
skb = bt_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAIT, &er... | 1 | [
"CWE-416"
] | linux | 99c23da0eed4fd20cae8243f2b51e10e66aa0951 | 218,458,627,623,771,800,000,000,000,000,000,000,000 | 25 | Bluetooth: sco: Fix lock_sock() blockage by memcpy_from_msg()
The sco_send_frame() also takes lock_sock() during memcpy_from_msg()
call that may be endlessly blocked by a task with userfaultd
technique, and this will result in a hung task watchdog trigger.
Just like the similar fix for hci_sock_sendmsg() in commit
92... |
stack_slot_get_name (ILStackDesc *value)
{
return type_names [value->stype & TYPE_MASK];
} | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 116,944,575,046,572,350,000,000,000,000,000,000,000 | 4 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
HandShakeType Finished::get_type() const
{
return finished;
} | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 46,063,861,474,874,210,000,000,000,000,000,000,000 | 4 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
Method* InstanceKlass::find_method_impl(const Symbol* name,
const Symbol* signature,
OverpassLookupMode overpass_mode,
StaticLookupMode static_mode,
PrivateLook... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 299,717,853,302,326,480,000,000,000,000,000,000,000 | 12 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
static void FVMenuRemoveKern(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
FVRemoveKerns(&fv->b);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 122,808,318,150,330,510,000,000,000,000,000,000,000 | 5 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static int ext4_da_get_block_prep(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
int ret = 0;
BUG_ON(create == 0);
BUG_ON(bh_result->b_size != inode->i_sb->s_blocksize);
/*
* first, we need to know whether the block is allocated already
* preallocated blocks are unmap... | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 187,117,884,299,863,130,000,000,000,000,000,000,000 | 35 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
hexkeygrip_from_pk (PKT_public_key *pk, char **r_grip)
{
gpg_error_t err;
unsigned char grip[20];
*r_grip = NULL;
err = keygrip_from_pk (pk, grip);
if (!err)
{
char * buf = xtrymalloc (20*2+1);
if (!buf)
err = gpg_error_from_syserror ();
else
{
bin2hex (grip, 2... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 269,460,645,625,537,400,000,000,000,000,000,000,000 | 20 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static void scsi_write_same_complete(void *opaque, int ret)
{
WriteSameCBData *data = opaque;
SCSIDiskReq *r = data->r;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
assert(r->req.aiocb != NULL);
r->req.aiocb = NULL;
aio_context_acquire(blk_get_aio_context(s->qdev.conf.blk));
... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 176,671,719,321,715,860,000,000,000,000,000,000,000 | 41 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
static php_curl *alloc_curl_handle()
{
php_curl *ch = ecalloc(1, sizeof(php_curl));
ch->to_free = ecalloc(1, sizeof(struct _php_curl_free));
ch->handlers = ecalloc(1, sizeof(php_curl_handlers));
ch->handlers->write = ecalloc(1, sizeof(php_curl_write));
ch->handlers... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 72dbb7f416160f490c4e9987040989a10ad431c7 | 254,889,219,216,030,350,000,000,000,000,000,000,000 | 25 | Fix bug #72674 - check both curl_escape and curl_unescape |
QPDFWriter::pushMD5Pipeline()
{
if (! this->m->id2.empty())
{
// Can't happen in the code
throw std::logic_error(
"Deterministic ID computation enabled after ID"
" generation has already occurred.");
}
assert(this->m->deterministic_id);
assert(this->m->md5_pip... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 1,229,223,770,379,702,000,000,000,000,000,000,000 | 19 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
njs_function_frame_save(njs_vm_t *vm, njs_frame_t *frame, u_char *pc)
{
size_t value_count, n;
njs_value_t *start, *end, *p, **new, *value, **local;
njs_function_t *function;
njs_native_frame_t *active, *native;
*frame = *vm->active_frame;
frame->previous_active_frame... | 1 | [
"CWE-416"
] | njs | ad48705bf1f04b4221a5f5b07715ac48b3160d53 | 59,057,408,530,075,800,000,000,000,000,000,000,000 | 51 | Fixed frame allocation from an awaited frame.
njs_function_frame_save() is used to save the awaited frame when "await"
instruction is encountered. The saving was done as a memcpy() of
existing runtime frame.
njs_function_frame_alloc() is used to alloc a new function frame, this
function tries to use a spare prealloca... |
GC_API GC_ATTR_MALLOC void * GC_CALL GC_memalign(size_t align, size_t lb)
{
size_t new_lb;
size_t offset;
ptr_t result;
if (align <= GRANULE_BYTES) return GC_malloc(lb);
if (align >= HBLKSIZE/2 || lb >= HBLKSIZE/2) {
if (align > HBLKSIZE) {
return (*GC_get_oom_fn())(LONG_MAX-1024)... | 1 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 155,843,077,315,574,080,000,000,000,000,000,000,000 | 33 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
void __cil_ordered_list_init(struct cil_ordered_list **ordered)
{
*ordered = cil_malloc(sizeof(**ordered));
(*ordered)->merged = CIL_FALSE;
(*ordered)->list = NULL;
(*ordered)->node = NULL;
} | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 196,582,730,410,618,060,000,000,000,000,000,000,000 | 8 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
*/
static void re_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
re_yy_flush_buffer(b ,yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
/* If b is the current buffer, then re_yy_init_buffer... | 0 | [
"CWE-476",
"CWE-703",
"CWE-125"
] | yara | 3119b232c9c453c98d8fa8b6ae4e37ba18117cd4 | 313,163,566,636,220,620,000,000,000,000,000,000,000 | 24 | re_lexer: Make reading escape sequences more robust (#586)
* Add test for issue #503
* re_lexer: Make reading escape sequences more robust
This commit fixes parsing incomplete escape sequences at the end of a
regular expression and parsing things like \xxy (invalid hex digits)
which before were silently turned... |
gadgetfs_unbind (struct usb_gadget *gadget)
{
struct dev_data *dev = get_gadget_data (gadget);
DBG (dev, "%s\n", __func__);
spin_lock_irq (&dev->lock);
dev->state = STATE_DEV_UNBOUND;
while (dev->udc_usage > 0) {
spin_unlock_irq(&dev->lock);
usleep_range(1000, 2000);
spin_lock_irq(&dev->lock);
}
spin_un... | 0 | [
"CWE-763"
] | linux | 501e38a5531efbd77d5c73c0ba838a889bfc1d74 | 65,890,299,241,007,220,000,000,000,000,000,000,000 | 25 | usb: gadget: clear related members when goto fail
dev->config and dev->hs_config and dev->dev need to be cleaned if
dev_config fails to avoid UAF.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com
Signed... |
bool PostgreSqlMigrationWriter::writeMo(const IrcServerMO &ircserver)
{
bindValue(0, ircserver.serverid);
bindValue(1, ircserver.userid.toInt());
bindValue(2, ircserver.networkid.toInt());
bindValue(3, ircserver.hostname);
bindValue(4, ircserver.port);
bindValue(5, ircserver.password);
bindV... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 113,499,251,963,952,520,000,000,000,000,000,000,000 | 18 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
do_string_sub(
char_u *str,
char_u *pat,
char_u *sub,
typval_T *expr,
char_u *flags)
{
int sublen;
regmatch_T regmatch;
int i;
int do_all;
char_u *tail;
char_u *end;
garray_T ga;
char_u *ret;
char_u *save_cpo;
char_u *zero_width = NULL;
// Make 'cpopti... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 108,964,507,485,124,900,000,000,000,000,000,000,000 | 101 | 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. |
qf_cleanup_state(qfstate_T *pstate)
{
if (pstate->fd != NULL)
fclose(pstate->fd);
vim_free(pstate->growbuf);
if (pstate->vc.vc_type != CONV_NONE)
convert_setup(&pstate->vc, NULL, NULL);
} | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 240,515,019,773,469,880,000,000,000,000,000,000,000 | 9 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static int restore_curseg_summaries(struct f2fs_sb_info *sbi)
{
int type = CURSEG_HOT_DATA;
int err;
if (is_set_ckpt_flags(sbi, CP_COMPACT_SUM_FLAG)) {
int npages = npages_for_summary_flush(sbi, true);
if (npages >= 2)
ra_meta_pages(sbi, start_sum_block(sbi), npages,
META_CP, true);
/* restore for... | 0 | [
"CWE-200",
"CWE-476"
] | linux | d4fdf8ba0e5808ba9ad6b44337783bd9935e0982 | 60,461,098,537,645,510,000,000,000,000,000,000,000 | 30 | f2fs: fix a panic caused by NULL flush_cmd_control
Mount fs with option noflush_merge, boot failed for illegal address
fcc in function f2fs_issue_flush:
if (!test_opt(sbi, FLUSH_MERGE)) {
ret = submit_flush_wait(sbi);
atomic_inc(&fcc->issued_flush); -> Here, fcc illegal
... |
static void ssl_check_for_safari(SSL *s, const unsigned char *data, const unsigned char *d, int n) {
unsigned short type, size;
static const unsigned char kSafariExtensionsBlock[] = {
0x00, 0x0a, /* elliptic_curves extension */
0x00, 0x08, /* 8 bytes */
0x00, 0x06, /* 6 bytes of curve ids */
0x00, 0x17, /... | 0 | [] | openssl | 96db9023b881d7cd9f379b0c154650d6c108e9a3 | 180,229,809,432,562,300,000,000,000,000,000,000,000 | 68 | Add heartbeat extension bounds check.
A missing bounds check in the handling of the TLS heartbeat extension
can be used to reveal up to 64k of memory to a connected client or
server.
Thanks for Neel Mehta of Google Security for discovering this bug and to
Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm... |
tm_alloc(char *resources, tm_event_t *event)
{
if (!init_done)
return TM_BADINIT;
return TM_ENOTIMPLEMENTED;
} | 0 | [
"CWE-264"
] | torque | f2f4c950f3d461a249111c8826da3beaafccace9 | 47,762,556,574,691,940,000,000,000,000,000,000,000 | 7 | TRQ-2885 - limit tm_adopt() to only adopt a session id that
is owned by the calling user. |
static int cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
{
int pal_start, pal_count, i, ret, fps;
if(buf_end - buf < 16) {
av_log(s->avctx, AV_LOG_WARNING, "truncated header\n");
return AVERROR_INVALIDDATA;
}
s->width = AV_RL16(&buf[4]);
s->height =... | 0 | [
"CWE-703"
] | FFmpeg | 5430839144c6da0160e8e0cfb0c8db01de432e94 | 59,573,207,057,703,170,000,000,000,000,000,000,000 | 37 | eacmv: clear references on frame dimensions change
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
struct Sass_Options* ADDCALL sass_file_context_get_options(struct Sass_File_Context* ctx) { return ctx; } | 0 | [
"CWE-125"
] | libsass | 8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae | 162,467,227,051,140,430,000,000,000,000,000,000,000 | 1 | Optimize line_begin/end search in `handle_error`
There is no need to advance by UTF-8 code points when searching for an
ASCII character, because UTF-8 is a prefix-free encoding. |
protocol_handshake_newstyle (void)
{
GET_CONN;
struct nbd_new_handshake handshake;
uint16_t gflags;
gflags = (NBD_FLAG_FIXED_NEWSTYLE | NBD_FLAG_NO_ZEROES) & mask_handshake;
debug ("newstyle negotiation: flags: global 0x%x", gflags);
handshake.nbdmagic = htobe64 (NBD_MAGIC);
handshake.version = htobe64... | 0 | [
"CWE-924"
] | nbdkit | 09a13dafb7bb3a38ab52eb5501cba786365ba7fd | 219,078,101,803,643,100,000,000,000,000,000,000,000 | 37 | server: CVE-2021-3716 reset structured replies on starttls
https://nostarttls.secvuln.info/ pointed out a series of CVEs in
common implementation flaw in various SMTP and IMAP clients and
servers, all with a common thread of improperly caching plaintext
state across the STARTTLS encryption boundary; and recommended th... |
handle_to_name(int handle)
{
if (handle_is_ok(handle, HANDLE_DIR)||
handle_is_ok(handle, HANDLE_FILE))
return handles[handle].name;
return NULL;
} | 0 | [
"CWE-732",
"CWE-703",
"CWE-269"
] | src | a6981567e8e215acc1ef690c8dbb30f2d9b00a19 | 122,584,176,614,381,620,000,000,000,000,000,000,000 | 7 | disallow creation (of empty files) in read-only mode; reported by
Michal Zalewski, feedback & ok deraadt@ |
bool CConnectionTransportUDP::SendPacketGather( int nChunks, const iovec *pChunks, int cbSendTotal )
{
// Safety
if ( !m_pSocket )
{
AssertMsg( false, "Attemt to send packet, but socket has been closed!" );
return false;
}
// Update stats
m_connection.m_statsEndToEnd.TrackSentPacket( cbSendTotal );
// Hand... | 0 | [
"CWE-703"
] | GameNetworkingSockets | d944a10808891d202bb1d5e1998de6e0423af678 | 186,495,737,799,999,740,000,000,000,000,000,000,000 | 15 | Tweak pointer math to avoid possible integer overflow |
TEST(GatherNdOpTest, Uint8Int64) {
GatherNdOpModel m({TensorType_UINT8, {3, 2, 3}}, {TensorType_INT64, {2, 2}});
m.SetInput<uint8_t>({1, 1, 1, 2, 2, 2, //
3, 3, 3, 4, 4, 4, //
5, 5, 5, 6, 6, 6});
m.SetPositions<int64_t>({0, 1, 1, 0});
ASSERT_EQ(m.Invoke(), kTfLite... | 0 | [
"CWE-125"
] | tensorflow | 595a65a3e224a0362d7e68c2213acfc2b499a196 | 267,767,323,458,325,900,000,000,000,000,000,000,000 | 10 | Return a TFLite error if gather_nd will result in reading invalid memory
PiperOrigin-RevId: 463054033 |
application_unhandled_file (ActivateParameters *parameters, NautilusFile *file)
{
GFile *location;
char *full_uri_for_display;
char *uri_for_display;
char *error_message;
gboolean show_install_mime;
GtkWidget *dialog;
char *mime_type;
char *text;
ActivateParametersInstall *parameters_install;
location = naut... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 271,208,465,447,091,230,000,000,000,000,000,000,000 | 87 | 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 TABLE_LIST::fetch_number_of_rows()
{
int error= 0;
if (jtbm_subselect)
{
if (jtbm_subselect->is_jtbm_merged)
{
table->file->stats.records= (ha_rows)jtbm_subselect->jtbm_record_count;
set_if_bigger(table->file->stats.records, 2);
table->used_stat_records= table->file->stats.records;
... | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 59,168,348,903,200,640,000,000,000,000,000,000,000 | 24 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
void stdp_box_del(GF_Box *s)
{
GF_DegradationPriorityBox *ptr = (GF_DegradationPriorityBox *)s;
if (ptr == NULL ) return;
if (ptr->priorities) gf_free(ptr->priorities);
gf_free(ptr);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 147,858,139,872,796,200,000,000,000,000,000,000,000 | 7 | fixed #1587 |
static bool encrypt_des(const unsigned char *in, unsigned char *out,
const unsigned char *key_56)
{
char key[8];
size_t out_len;
CCCryptorStatus err;
/* Expand the 56-bit key to 64-bits */
extend_key_56_to_64(key_56, key);
/* Set the key parity to odd */
Curl_des_set_odd_parity((... | 0 | [
"CWE-190"
] | curl | 7f2a1df6f5fc598750b2c6f34465c8d924db28cc | 327,732,324,308,087,770,000,000,000,000,000,000,000 | 20 | ntlm: avoid integer overflow for malloc size
Reported-by: Alex Nichols
Assisted-by: Kamil Dudka and Max Dymond
CVE-2017-8816
Bug: https://curl.haxx.se/docs/adv_2017-11e7.html |
eval_expr(uschar **sptr, BOOL decimal, uschar **error, BOOL endket)
{
uschar *s = *sptr;
int_eximarith_t x = eval_op_or(&s, decimal, error);
if (*error == NULL)
{
if (endket)
{
if (*s != ')')
*error = US"expecting closing parenthesis";
else
while (isspace(*(++s)));
}
else if (*s != 0) ... | 0 | [
"CWE-189"
] | exim | 7685ce68148a083d7759e78d01aa5198fc099c44 | 268,496,868,043,226,530,000,000,000,000,000,000,000 | 18 | Only expand integers for integer math once |
static int parse_info(char *p)
{
struct SYMBOL *s;
char info_type = *p;
char *error_txt = NULL;
s = abc_new(ABC_T_INFO, p);
p += 2;
switch (info_type) {
case 'd':
case 's':
if (parse.abc_state == ABC_S_GLOBAL)
break;
if (!deco_start) {
error_txt = "Erroneous 'd:'/'s:'";
break;
}
error_txt = ... | 0 | [
"CWE-125",
"CWE-787"
] | abcm2ps | 3169ace6d63f6f517a64e8df0298f44a490c4a15 | 297,539,484,437,979,900,000,000,000,000,000,000,000 | 67 | fix: crash when accidental without a note at start of line after K:
Issue #84. |
test_bson_append_overflow (void)
{
const char *key = "a";
uint32_t len;
bson_t b;
len = BSON_MAX_SIZE;
len -= 4; /* len */
len -= 1; /* type */
len -= 1; /* value */
len -= 1; /* end byte */
bson_init (&b);
BSON_ASSERT (!bson_append_bool (&b, key, len, true));
bson_destroy (&b);
} | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 168,664,869,585,628,740,000,000,000,000,000,000,000 | 16 | CDRIVER-2269 Check for zero string length in codewscope |
int16_t yang_dnode_get_int16(const struct lyd_node *dnode,
const char *xpath_fmt, ...)
{
const struct lyd_value *dvalue;
dvalue = YANG_DNODE_XPATH_GET_VALUE(dnode, xpath_fmt);
assert(dvalue->realtype->basetype == LY_TYPE_INT16);
return dvalue->int16;
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 319,005,915,468,069,650,000,000,000,000,000,000,000 | 8 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
static uint8_t *scsi_get_buf(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
return (uint8_t *)r->iov.iov_base;
} | 0 | [
"CWE-119",
"CWE-787"
] | qemu | 103b40f51e4012b3b0ad20f615562a1806d7f49a | 78,279,909,774,974,210,000,000,000,000,000,000,000 | 6 | scsi-disk: commonize iovec creation between reads and writes
Also, consistently use qiov.size instead of iov.iov_len.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
static inline int fast_to_acquire(struct gfs2_rgrpd *rgd)
{
struct gfs2_glock *gl = rgd->rd_gl;
if (gl->gl_state != LM_ST_UNLOCKED && list_empty(&gl->gl_holders) &&
!test_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags) &&
!test_bit(GLF_DEMOTE, &gl->gl_flags))
return 1;
if (rgd->rd_flags & GFS2_RDF_PREFERRED)... | 0 | [
"CWE-416"
] | linux | 36e4ad0316c017d5b271378ed9a1c9a4b77fab5f | 121,820,515,913,041,450,000,000,000,000,000,000,000 | 12 | GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
Before this patch, function read_rindex_entry would set a rgrp
glock's gl_object pointer to itself before inserting the rgrp into
the rgrp rbtree. The problem is: if another process was also reading
the rgrp in, and had already inserted its newly create... |
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
return zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 38,479,238,308,320,383,000,000,000,000,000,000,000 | 4 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
int CLASS ljpeg_start (struct jhead *jh, int info_only)
{
int c, tag;
ushort len;
int cnt = 0;
uchar data[0x10000];
const uchar *dp;
memset (jh, 0, sizeof *jh);
jh->restart = INT_MAX;
fread (data, 2, 1, ifp);
if (data[1] != 0xd8) return 0;
do {
if(feof(ifp)) return 0;
if(cnt++ > 1024) retur... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 129,434,689,327,967,300,000,000,000,000,000,000,000 | 55 | fixed two more problems found by fuzzer |
static inline bool ptlock_init(struct page *page)
{
/*
* prep_new_page() initialize page->private (and therefore page->ptl)
* with 0. Make sure nobody took it in use in between.
*
* It can happen if arch try to use slab for page table allocation:
* slab code uses page->slab_cache, which share storage with pa... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 129,344,948,034,598,820,000,000,000,000,000,000,000 | 15 | 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 ... |
std::vector<int8_t> GetOutput() { return ExtractVector<int8_t>(output_); } | 0 | [
"CWE-369"
] | tensorflow | 5f7975d09eac0f10ed8a17dbb6f5964977725adc | 255,342,596,280,535,360,000,000,000,000,000,000,000 | 1 | Prevent another div by 0 in optimized pooling implementations TFLite
PiperOrigin-RevId: 370800091
Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b |
bool Lex_input_stream::init(THD *thd,
char* buff,
size_t length)
{
DBUG_EXECUTE_IF("bug42064_simulate_oom",
DBUG_SET("+d,simulate_out_of_memory"););
m_cpp_buf= (char*) thd->alloc(length + 1);
DBUG_EXECUTE_IF("bug42064_simulate_oom",
... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 116,181,643,005,345,900,000,000,000,000,000,000,000 | 20 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
std::vector<OwnedSlice::SliceRepresentation> OwnedImpl::describeSlicesForTest() const {
std::vector<OwnedSlice::SliceRepresentation> slices;
for (const auto& slice : slices_) {
slices.push_back(slice->describeSliceForTest());
}
return slices;
} | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 75,885,997,883,702,860,000,000,000,000,000,000,000 | 7 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
static inline void VectorCopy43(const DDSVector4 source,
DDSVector3 *destination)
{
destination->x = source.x;
destination->y = source.y;
destination->z = source.z;
} | 0 | [
"CWE-20",
"CWE-617"
] | ImageMagick | 0c5b1e430a83ef793a7334bbbee408cf3c628699 | 240,847,324,302,448,470,000,000,000,000,000,000,000 | 7 | Added check to prevent image being 0x0 (reported in #489). |
char *strdup(const char *str)
{
size_t len;
char *newstr;
if(!str)
return (char *)NULL;
len = strlen(str);
if(len >= ((size_t)-1) / sizeof(char))
return (char *)NULL;
newstr = malloc((len+1)*sizeof(char));
if(!newstr)
return (char *)NULL;
memcpy(newstr,str,(len+1)*sizeof(char));
retu... | 0 | [
"CWE-200"
] | curl | b3875606925536f82fc61f3114ac42f29eaf6945 | 69,699,206,385,785,980,000,000,000,000,000,000,000 | 22 | curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds
When duplicating a handle, the data to post was duplicated using
strdup() when it could be binary and contain zeroes and it was not even
zero terminated! This caused read out of bounds crashes/segfaults.
Since the lib/strdup.c file no longer is easily sha... |
drv_cursorSet(TERMINAL_CONTROL_BLOCK * TCB, int vis)
{
SCREEN *sp;
int code = ERR;
AssertTCB();
SetSP();
T((T_CALLED("tinfo:drv_cursorSet(%p,%d)"), (void *) SP_PARM, vis));
if (SP_PARM != 0 && IsTermInfo(SP_PARM)) {
switch (vis) {
case 2:
code = NCURSES_PUTP2_FLUSH("cursor_visible", cu... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 324,015,161,695,010,300,000,000,000,000,000,000,000 | 27 | 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... |
static inline uint32_t ReadWebPLSBWord(
const unsigned char *magick_restrict data)
{
register const unsigned char
*p;
register uint32_t
value;
p=data;
value=(uint32_t) (*p++);
value|=((uint32_t) (*p++)) << 8;
value|=((uint32_t) (*p++)) << 16;
value|=((uint32_t) (*p++)) << 24;
return(value);
... | 0 | [
"CWE-400"
] | ImageMagick | cb63560ba25e4a6c51ab282538c24877fff7d471 | 105,315,057,845,900,380,000,000,000,000,000,000,000 | 16 | https://github.com/ImageMagick/ImageMagick/issues/641 |
list_update_cgroup_event(struct perf_event *event,
struct perf_event_context *ctx, bool add)
{
struct perf_cpu_context *cpuctx;
if (!is_cgroup_event(event))
return;
if (add && ctx->nr_cgroups++)
return;
else if (!add && --ctx->nr_cgroups)
return;
/*
* Because cgroup events are always per-cpu events,
... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 67,720,114,107,798,530,000,000,000,000,000,000,000 | 27 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
void WebContents::DevToolsAddFileSystem(
const std::string& type,
const base::FilePath& file_system_path) {
base::FilePath path = file_system_path;
if (path.empty()) {
std::vector<base::FilePath> paths;
file_dialog::DialogSettings settings;
settings.parent_window = owner_window();
settings.f... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 226,716,547,889,860,100,000,000,000,000,000,000,000 | 32 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static void ttm_pool_update_free_locked(struct ttm_page_pool *pool,
unsigned freed_pages)
{
pool->npages -= freed_pages;
pool->nfrees += freed_pages;
} | 0 | [
"CWE-125"
] | linux | 453393369dc9806d2455151e329c599684762428 | 10,744,696,764,785,250,000,000,000,000,000,000,000 | 6 | drm/ttm: fix incrementing the page pointer for huge pages
When we increment the counter we need to increment the pointer as well.
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: e16858a7e6e7 drm/ttm: fix start page for huge page check in ttm_put_pages()
Reviewed-by: Michel Dänzer <michel.daenzer@amd.... |
static int64_t update_size(AVIOContext *pb, int64_t pos)
{
int64_t curpos = avio_tell(pb);
avio_seek(pb, pos, SEEK_SET);
avio_wb32(pb, curpos - pos); /* rewrite size */
avio_seek(pb, curpos, SEEK_SET);
return curpos - pos;
} | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 271,157,412,494,839,900,000,000,000,000,000,000,000 | 9 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static std::vector<int> parse_numrange(char const* range, int max,
bool throw_error = false)
{
std::vector<int> result;
char const* p = range;
try
{
std::vector<int> work;
static int const comma = -1;
static int const dash = -2;
enu... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 82,746,222,363,828,340,000,000,000,000,000,000,000 | 146 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
void __jbd2_journal_temp_unlink_buffer(struct journal_head *jh)
{
struct journal_head **list = NULL;
transaction_t *transaction;
struct buffer_head *bh = jh2bh(jh);
J_ASSERT_JH(jh, jbd_is_locked_bh_state(bh));
transaction = jh->b_transaction;
if (transaction)
assert_spin_locked(&transaction->t_journal->j_list_... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 15291164b22a357cb211b618adfef4fa82fc0de3 | 185,537,544,689,393,980,000,000,000,000,000,000,000 | 45 | jbd2: clear BH_Delay & BH_Unwritten in journal_unmap_buffer
journal_unmap_buffer()'s zap_buffer: code clears a lot of buffer head
state ala discard_buffer(), but does not touch _Delay or _Unwritten as
discard_buffer() does.
This can be problematic in some areas of the ext4 code which assume
that if they have found a ... |
TfLiteRegistration* Register_MINIMUM() {
return Register_MINIMUM_GENERIC_OPT();
} | 0 | [
"CWE-125"
] | tensorflow | 953f28dca13c92839ba389c055587cfe6c723578 | 43,029,760,850,462,760,000,000,000,000,000,000,000 | 3 | Prevent a null pointer exception in TFLite
PiperOrigin-RevId: 370800206
Change-Id: Idd437ebce4ff224120d8eefc1c14c062173b71d6 |
void self_vector_v(const unsigned int pos, const mp_func op, const unsigned int arg1) {
const unsigned int siz = _cimg_mp_size(pos);
if (siz>24) CImg<ulongT>::vector((ulongT)mp_self_map_vector_v,pos,siz,(ulongT)op,arg1).move_to(code);
else {
code.insert(siz);
for (unsi... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 333,111,024,024,768,970,000,000,000,000,000,000,000 | 9 | Fix other issues in 'CImg<T>::load_bmp()'. |
juniper_mfr_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, register const u_char *p)
{
struct juniper_l2info_t l2info;
memset(&l2info, 0, sizeof(l2info));
l2info.pictype = DLT_JUNIPER_MFR;
if (juniper_parse_header(ndo, p, h, &l2info) == 0)
retu... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 68,603,290,817,036,440,000,000,000,000,000,000,000 | 58 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.