func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static bool r_bin_mdmp_init_directory_entry(struct r_bin_mdmp_obj *obj, struct minidump_directory *entry) {
int i;
struct minidump_handle_operation_list *handle_operation_list;
struct minidump_memory_list *memory_list;
struct minidump_memory64_list *memory64_list;
struct minidump_memory_info_list *memory_info_lis... | 1 | [
"CWE-125"
] | radare2 | eb7deb281df54771fb8ecf5890dc325a7d22d3e2 | 95,101,741,366,890,160,000,000,000,000,000,000,000 | 307 | Fix #10464 - oobread crash in mdmp (#10683) |
set_shell_name (argv0)
char *argv0;
{
/* Here's a hack. If the name of this shell is "sh", then don't do
any startup files; just try to be more like /bin/sh. */
shell_name = argv0 ? base_pathname (argv0) : PROGRAM;
if (argv0 && *argv0 == '-')
{
if (*shell_name == '-')
shell_name++;
lo... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 84,858,955,534,113,450,000,000,000,000,000,000,000 | 29 | commit bash-20190628 snapshot |
void Filter::setDecoderFilterCallbacks(Http::StreamDecoderFilterCallbacks& callbacks) {
callbacks_ = &callbacks;
// As the decoder filter only pushes back via watermarks once data has reached
// it, it can latch the current buffer limit and does not need to update the
// limit if another filter increases it.
... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 78,509,060,233,940,505,000,000,000,000,000,000,000 | 12 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
static int setup_caps(struct lxc_list *caps)
{
struct lxc_list *iterator;
char *drop_entry;
int capid;
lxc_list_for_each(iterator, caps) {
drop_entry = iterator->elem;
capid = parse_cap(drop_entry);
if (capid < 0) {
ERROR("unknown capability %s", drop_entry);
return -1;
}
DEBUG("drop cap... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 291,418,148,432,668,600,000,000,000,000,000,000,000 | 30 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
static void xhci_mfwrap_timer(void *opaque)
{
XHCIState *xhci = opaque;
XHCIEvent wrap = { ER_MFINDEX_WRAP, CC_SUCCESS };
xhci_event(xhci, &wrap, 0);
xhci_mfwrap_update(xhci);
} | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 238,664,209,448,679,850,000,000,000,000,000,000,000 | 8 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
void DL_Dxf::writeLayer(DL_WriterA& dw,
const DL_LayerData& data,
const DL_Attributes& attrib) {
if (data.name.empty()) {
std::cerr << "DL_Dxf::writeLayer: "
<< "Layer name must not be empty\n";
return;
}
int color = attrib.getColor()... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 310,175,661,616,437,600,000,000,000,000,000,000,000 | 51 | check vertexIndex which might be -1 for broken DXF |
Document getSpec() {
return DOC("input" << DOC_ARRAY(DOC_ARRAY(false)) << "expected"
<< DOC("$allElementsTrue" << false << "$anyElementTrue" << false));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 295,911,639,059,693,100,000,000,000,000,000,000,000 | 4 | SERVER-38070 fix infinite loop in agg expression |
void IOBuf::allocExtBuffer(
std::size_t minCapacity,
uint8_t** bufReturn,
SharedInfo** infoReturn,
std::size_t* capacityReturn) {
if (minCapacity > kMaxIOBufSize) {
throw_exception<std::bad_alloc>();
}
size_t mallocSize = goodExtBufferSize(minCapacity);
auto buf = static_cast<uint8_t*>(chec... | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 199,302,009,616,564,700,000,000,000,000,000,000,000 | 22 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c |
static NTSTATUS dcesrv_lsa_AddPrivilegesToAccount(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct lsa_AddPrivilegesToAccount *r)
{
struct lsa_RightSet rights;
struct dcesrv_handle *h;
struct lsa_account_state *astate;
uint32_t i;
DCESRV_PULL_HANDLE(h, r->in.handle, LSA_HANDLE_ACCOUNT);
a... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 160,061,225,681,648,550,000,000,000,000,000,000,000 | 32 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static int sctp_setsockopt_peer_addr_params(struct sock *sk,
char __user *optval, int optlen)
{
struct sctp_paddrparams params;
struct sctp_transport *trans = NULL;
struct sctp_association *asoc = NULL;
struct sctp_sock *sp = sctp_sk(sk);
int error;
int hb_change, pmtud_change, sackdelay_change... | 0 | [
"CWE-476"
] | linux | ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d | 78,556,432,470,323,650,000,000,000,000,000,000,000 | 78 | [SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message
In current implementation, LKSCTP does receive buffer accounting for
data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do
accounting for data in frag_list when data is fragmented. In addition,
LKSCTP doesn't do accounting for data in ... |
compile_assign_lhs(
char_u *var_start,
lhs_T *lhs,
cmdidx_T cmdidx,
int is_decl,
int heredoc,
int has_cmd, // "var" before "var_start"
int oplen,
cctx_T *cctx)
{
if (compile_lhs(var_start, lhs, cmdidx, heredoc, has_cmd, oplen, cctx)
== FAIL)
return FAIL;
... | 0 | [
"CWE-416"
] | vim | 1889f499a4f248cd84e0e0bf6d0d820016774494 | 219,380,205,995,488,340,000,000,000,000,000,000,000 | 27 | patch 9.0.0221: accessing freed memory if compiling nested function fails
Problem: Accessing freed memory if compiling nested function fails.
Solution: Mess up the variable name so that it won't be found. |
static int tcm_loop_drop_nexus(
struct tcm_loop_tpg *tpg)
{
struct se_session *se_sess;
struct tcm_loop_nexus *tl_nexus;
struct tcm_loop_hba *tl_hba = tpg->tl_hba;
tl_nexus = tpg->tl_hba->tl_nexus;
if (!tl_nexus)
return -ENODEV;
se_sess = tl_nexus->se_sess;
if (!se_sess)
return -ENODEV;
if (atomic_read(... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 74,818,045,307,012,870,000,000,000,000,000,000,000 | 33 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
{
struct rq *rq = task_rq(p);
bool queued, running;
lockdep_assert_held(&p->pi_lock);
queued = task_on_rq_queued(p);
running = task_current(rq, p);
if (queued) {
/*
* Because __kthread_bind() calls this on blocked tasks withou... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 104,975,088,040,258,020,000,000,000,000,000,000,000 | 28 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
TEST(HeaderMapImplTest, RemoveRegex) {
// These will match.
LowerCaseString key1 = LowerCaseString("X-prefix-foo");
LowerCaseString key3 = LowerCaseString("X-Prefix-");
LowerCaseString key5 = LowerCaseString("x-prefix-eep");
// These will not.
LowerCaseString key2 = LowerCaseString(" x-prefix-foo");
Lower... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 108,918,544,002,185,180,000,000,000,000,000,000,000 | 43 | 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... |
usefulArg(const char *arg)
{
if((strncasecmp(arg, "name", 4) != 0) &&
(strncasecmp(arg, "filename", 8) != 0) &&
(strncasecmp(arg, "boundary", 8) != 0) &&
(strncasecmp(arg, "protocol", 8) != 0) &&
(strncasecmp(arg, "id", 2) != 0) &&
(strncasecmp(arg, "number", 6) != 0) &&
(strncasecmp(arg, "tota... | 0 | [
"CWE-125"
] | clamav-devel | 586a5180287262070637c8943f2f7efd652e4a2c | 290,485,806,605,726,430,000,000,000,000,000,000,000 | 15 | bb11797 - fix invalid read in fuzzed mail file. |
static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
{
u8 *gb_cur, *version_tlv, version, version_length;
u8 *lto_tlv, lto_length;
u8 *wks_tlv, wks_length;
u8 *miux_tlv, miux_length;
__be16 wks = cpu_to_be16(local->local_wks);
u8 gb_len = 0;
int ret = 0;
version = LLCP_VERSION_11;
version_tlv = nfc_llcp... | 1 | [
"CWE-476"
] | linux | 58bdd544e2933a21a51eecf17c3f5f94038261b5 | 337,226,803,846,405,340,000,000,000,000,000,000,000 | 60 | net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails
KASAN report this:
BUG: KASAN: null-ptr-deref in nfc_llcp_build_gb+0x37f/0x540 [nfc]
Read of size 3 at addr 0000000000000000 by task syz-executor.0/5401
CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45
Hardware name: QEMU Standard PC (i440FX ... |
void RGWListMultipart::pre_exec()
{
rgw_bucket_object_pre_exec(s);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 279,688,921,347,882,600,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
estack_sfile(estack_arg_T which UNUSED)
{
estack_T *entry;
#ifdef FEAT_EVAL
garray_T ga;
size_t len;
int idx;
etype_T last_type = ETYPE_SCRIPT;
char *type_name;
#endif
entry = ((estack_T *)exestack.ga_data) + exestack.ga_len - 1;
#ifdef FEAT_EVAL
if (which == ESTACK_SFILE && entry->es_... | 0 | [
"CWE-122"
] | vim | 2bdad6126778f907c0b98002bfebf0e611a3f5db | 257,374,499,514,155,230,000,000,000,000,000,000,000 | 83 | patch 8.2.4647: "source" can read past end of copied line
Problem: "source" can read past end of copied line.
Solution: Add a terminating NUL. |
void CiffComponent::read(const byte* pData,
uint32_t size,
uint32_t start,
ByteOrder byteOrder)
{
doRead(pData, size, start, byteOrder);
} | 0 | [
"CWE-400"
] | exiv2 | b3d077dcaefb6747fff8204490f33eba5a144edb | 146,733,367,367,403,440,000,000,000,000,000,000,000 | 7 | Fix #460 by adding more checks in CiffDirectory::readDirectory |
dissect_kafka_bytes(proto_tree *tree, int hf_item, tvbuff_t *tvb, packet_info *pinfo, int offset, int flexible,
int *p_offset, int *p_length)
{
if (flexible) {
return dissect_kafka_compact_bytes(tree, hf_item, tvb, pinfo, offset, p_offset, p_length);
} else {
return dissect_... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 328,697,617,550,664,860,000,000,000,000,000,000,000 | 9 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
static const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler(
OPJ_UINT32 p_id)
{
const opj_dec_memory_marker_handler_t *e;
for (e = j2k_memory_marker_handler_tab; e->id != 0; ++e) {
if (e->id == p_id) {
break; /* we find a handler corresponding to the marker ID*/
}
... | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | 4241ae6fbbf1de9658764a80944dc8108f2b4154 | 189,633,264,922,193,950,000,000,000,000,000,000,000 | 11 | Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985) |
_gnutls_dh_set_group(gnutls_session_t session, bigint_t gen,
bigint_t prime)
{
dh_info_st *dh;
int ret;
switch (gnutls_auth_get_type(session)) {
case GNUTLS_CRD_ANON:
{
anon_auth_info_t info;
info = _gnutls_get_auth_info(session, GNUTLS_CRD_ANON);
if (info == NULL)
return gnutls_assert_val(GN... | 0 | [
"CWE-400"
] | gnutls | 1ffb827e45721ef56982d0ffd5c5de52376c428e | 263,363,914,701,542,950,000,000,000,000,000,000,000 | 67 | handshake: set a maximum number of warning messages that can be received per handshake
That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost
of processing. |
void finish_deleting() {
Mutex::Locker l(lock);
assert(status == DELETING_DIR);
status = DELETED_DIR;
cond.Signal();
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 31,378,149,071,538,095,000,000,000,000,000,000,000 | 6 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
Field_blob(uint32 len_arg,bool maybe_null_arg, const LEX_CSTRING *field_name_arg,
const DTCollation &collation)
:Field_longstr((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, 0,
NONE, field_name_arg, collation),
packlength(4)
{
flags|= BLOB_FLAG;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 223,293,446,136,715,460,000,000,000,000,000,000,000 | 8 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
intrusive_ptr<Expression> ExpressionObject::optimize() {
for (auto&& pair : _expressions) {
pair.second = pair.second->optimize();
}
return this;
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 267,524,571,388,146,900,000,000,000,000,000,000,000 | 6 | SERVER-38070 fix infinite loop in agg expression |
void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
{
struct neigh_parms **p;
if (!parms || parms == &tbl->parms)
return;
write_lock_bh(&tbl->lock);
for (p = &tbl->parms.next; *p; p = &(*p)->next) {
if (*p == parms) {
*p = parms->next;
parms->dead = 1;
write_unlock_bh(&tbl->lo... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 91,130,239,636,436,730,000,000,000,000,000,000,000 | 21 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
krb5_get_init_creds_keyblock(krb5_context context,
krb5_creds *creds,
krb5_principal client,
krb5_keyblock *keyblock,
krb5_deltat start_time,
const char *in_tkt_service,
krb5_get_init_creds_opt *options)
{
krb5_init_creds_context ctx;
krb5_error_code ret;
mem... | 0 | [
"CWE-320"
] | heimdal | 2f7f3d9960aa6ea21358bdf3687cee5149aa35cf | 56,456,180,651,842,830,000,000,000,000,000,000,000 | 39 | CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon PKINIT
RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge
when anonymous PKINIT is used. Failure to do so can permit an active
attacker to become a man-in-the-middle.
Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f. First tagged... |
uint32_t CompactProtocolWriter::writeFieldStop() {
return writeByte((int8_t)TType::T_STOP);
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 21,187,124,750,366,070,000,000,000,000,000,000,000 | 3 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
bool Item_sum_avg::fix_length_and_dec()
{
if (Item_sum_sum::fix_length_and_dec())
return TRUE;
maybe_null=null_value=1;
prec_increment= current_thd->variables.div_precincrement;
if (Item_sum_avg::result_type() == DECIMAL_RESULT)
{
int precision= args[0]->decimal_precision() + prec_increment;
decim... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 308,231,550,116,543,820,000,000,000,000,000,000,000 | 25 | 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 int eligible_pid(struct wait_opts *wo, struct task_struct *p)
{
return wo->wo_type == PIDTYPE_MAX ||
task_pid_type(p, wo->wo_type) == wo->wo_pid;
} | 0 | [
"CWE-200",
"CWE-284"
] | linux | 6c85501f2fabcfc4fc6ed976543d252c4eaf4be9 | 296,498,881,287,191,950,000,000,000,000,000,000,000 | 5 | fix infoleak in waitid(2)
kernel_waitid() can return a PID, an error or 0. rusage is filled in the first
case and waitid(2) rusage should've been copied out exactly in that case, *not*
whenever kernel_waitid() has not returned an error. Compat variant shares that
braino; none of kernel_wait4() callers do, so the bel... |
static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, char *offset_base, size_t IFDlength, size_t displacement)
{
size_t i;
int de, section_index = SECTION_MAKERNOTE;
int NumDirEntries, old_motorola_intel;
#ifdef KALLE_0
int offset_diff;
#endif
const maker_note_type ... | 0 | [
"CWE-125"
] | php-src | a1631ac57b853edd81431e57c266ec813e180acd | 188,020,261,381,849,930,000,000,000,000,000,000,000 | 112 | Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s |
static void vhost_net_vq_reset(struct vhost_net *n)
{
int i;
vhost_net_clear_ubuf_info(n);
for (i = 0; i < VHOST_NET_VQ_MAX; i++) {
n->vqs[i].done_idx = 0;
n->vqs[i].upend_idx = 0;
n->vqs[i].ubufs = NULL;
n->vqs[i].vhost_hlen = 0;
n->vqs[i].sock_hlen = 0;
vhost_net_buf_init(&n->vqs[i].rxq);
}
} | 0 | [
"CWE-787"
] | linux | e2b3b35eb9896f26c98b9a2c047d9111638059a2 | 21,988,785,809,152,763,000,000,000,000,000,000,000 | 16 | vhost_net: batch used ring update in rx
This patch tries to batched used ring update during RX. This is pretty
fit for the case when guest is much faster (e.g dpdk based
backend). In this case, used ring is almost empty:
- we may get serious cache line misses/contending on both used ring
and used idx.
- at most 1 p... |
static ALWAYS_INLINE void jslPreload() {
// set up..
jslGetNextCh();
jslGetNextToken();
} | 0 | [
"CWE-787"
] | Espruino | bed844f109b6c222816740555068de2e101e8018 | 334,906,885,429,141,020,000,000,000,000,000,000,000 | 5 | remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426) |
const CString& CUser::GetStatusPrefix() const { return m_sStatusPrefix; } | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 176,526,370,493,230,660,000,000,000,000,000,000,000 | 1 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
void ConnectionManagerImpl::ActiveStream::onBelowWriteBufferLowWatermark() {
ENVOY_STREAM_LOG(debug, "Enabling upstream stream due to downstream stream watermark.", *this);
callLowWatermarkCallbacks();
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 333,915,394,442,259,460,000,000,000,000,000,000,000 | 4 | 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... |
static void __exit dm_multipath_exit(void)
{
destroy_workqueue(kmpath_handlerd);
destroy_workqueue(kmultipathd);
dm_unregister_target(&multipath_target);
kmem_cache_destroy(_mpio_cache);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 338,373,717,507,636,350,000,000,000,000,000,000,000 | 8 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
static int compat_dev_ifconf(struct net *net, struct compat_ifconf __user *uifc32)
{
struct compat_ifconf ifc32;
struct ifconf ifc;
int err;
if (copy_from_user(&ifc32, uifc32, sizeof(struct compat_ifconf)))
return -EFAULT;
ifc.ifc_len = ifc32.ifc_len;
ifc.ifc_req = compat_ptr(ifc32.ifcbuf);
rtnl_lock();
er... | 0 | [
"CWE-362"
] | linux | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | 139,708,980,046,674,180,000,000,000,000,000,000,000 | 24 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereferenc... |
int scnprintf(char *buf, size_t size, const char *fmt, ...)
{
va_list args;
int i;
va_start(args, fmt);
i = vscnprintf(buf, size, fmt, args);
va_end(args);
return i;
} | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 282,768,849,347,989,080,000,000,000,000,000,000,000 | 11 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
static CImg<T> get_load_rgb(const char *const filename, const unsigned int dimw, const unsigned int dimh=1) {
return CImg<T>().load_rgb(filename,dimw,dimh);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 254,063,646,585,609,400,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int fill_note_info(struct elfhdr *elf, int phdrs,
struct elf_note_info *info,
long signr, struct pt_regs *regs)
{
struct task_struct *dump_task = current;
const struct user_regset_view *view = task_user_regset_view(dump_task);
struct elf_thread_core_info *t;
struct elf_prpsinfo *psinfo;
struct cor... | 0 | [
"CWE-476"
] | linux | c8e252586f8d5de906385d8cf6385fee289a825e | 295,883,587,065,256,270,000,000,000,000,000,000,000 | 86 | regset: Prevent null pointer reference on readonly regsets
The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.
Rather than putting in stub functions everywhere, handle ... |
static NTSTATUS cli_session_setup_plain_recv(struct tevent_req *req)
{
return tevent_req_simple_recv_ntstatus(req);
} | 0 | [
"CWE-94"
] | samba | 94295b7aa22d2544af5323bca70d3dcb97fd7c64 | 4,328,435,589,629,747,000,000,000,000,000,000,000 | 4 | CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
selaGetSel(SELA *sela,
l_int32 i)
{
PROCNAME("selaGetSel");
if (!sela)
return (SEL *)ERROR_PTR("sela not defined", procName, NULL);
if (i < 0 || i >= sela->n)
return (SEL *)ERROR_PTR("invalid index", procName, NULL);
return sela->sel[i];
} | 0 | [
"CWE-119",
"CWE-787"
] | leptonica | ee301cb2029db8a6289c5295daa42bba7715e99a | 30,338,974,409,721,846,000,000,000,000,000,000,000 | 12 | 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(). |
TRIO_PUBLIC_STRING size_t trio_format_date_max TRIO_ARGS4((target, max, format, datetime),
char* target, size_t max,
TRIO_CONST char* format,
TRIO... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 46,061,009,194,859,550,000,000,000,000,000,000,000 | 12 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
struct nfs4_exception exception = {
.interruptible = true,
};
int err;
do {
err = _nfs4_proc_getlk(state, cmd, request);
trace_nfs4_get_lock(request, state, cmd, err);
err = nfs4_handle_exception(NFS_SERVER(state->in... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 318,320,416,641,793,140,000,000,000,000,000,000,000 | 15 | 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... |
static int php_during_module_shutdown(void)
{
return module_shutdown;
} | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 144,055,753,655,165,220,000,000,000,000,000,000,000 | 4 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
static int snd_pcm_oss_playback_ready(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
if (atomic_read(&substream->mmap_count))
return runtime->oss.prev_hw_ptr_period !=
get_hw_ptr_period(runtime);
else
return snd_pcm_playback_avail(runtime) >=
runtime->oss... | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 56,139,889,648,727,885,000,000,000,000,000,000,000 | 10 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
int hidp_connection_del(struct hidp_conndel_req *req)
{
u32 valid_flags = BIT(HIDP_VIRTUAL_CABLE_UNPLUG);
struct hidp_session *session;
if (req->flags & ~valid_flags)
return -EINVAL;
session = hidp_session_find(&req->bdaddr);
if (!session)
return -ENOENT;
if (req->flags & BIT(HIDP_VIRTUAL_CABLE_UNPLUG))
... | 0 | [
"CWE-787"
] | linux | 7992c18810e568b95c869b227137a2215702a805 | 118,810,069,354,906,410,000,000,000,000,000,000,000 | 24 | Bluetooth: hidp: buffer overflow in hidp_process_report
CVE-2018-9363
The buffer length is unsigned at all layers, but gets cast to int and
checked in hidp_process_report and can lead to a buffer overflow.
Switch len parameter to unsigned int to resolve issue.
This affects 3.18 and newer kernels.
Signed-off-by: Mar... |
PJ_DEF(pj_status_t) pj_file_getpos( pj_oshandle_t fd,
pj_off_t *pos)
{
long offset;
offset = ftell((FILE*)fd);
if (offset == -1) {
*pos = -1;
return PJ_RETURN_OS_ERROR(errno);
}
*pos = offset;
return PJ_SUCCESS;
} | 0 | [
"CWE-703",
"CWE-835"
] | pjproject | 947bc1ee6d05be10204b918df75a503415fd3213 | 242,536,054,920,170,100,000,000,000,000,000,000,000 | 14 | Merge pull request from GHSA-rwgw-vwxg-q799
* Prevent potential infinite loop when parsing WAV format file
* Check if subchunk is negative.
* Fix and add checks
* Change data type from pj_ssize_t to long.
* Modify check
* Fix leak file descriptor and modify check on wav_playlist
* Move overflow/underflow check t... |
int crxFreeImageData(CrxImage *img)
{
#ifdef LIBRAW_CR3_MEMPOOL
img->memmgr.cleanup();
#else
CrxTile *tile = img->tiles;
int nTiles = img->tileRows * img->tileCols;
if (img->tiles)
{
for (int32_t curTile = 0; curTile < nTiles; curTile++, tile++)
if (tile[curTile].comps)
for (int3... | 0 | [
"CWE-703",
"CWE-770"
] | LibRaw | e41f331e90b383e3208cefb74e006df44bf3a4b8 | 185,551,672,566,647,400,000,000,000,000,000,000,000 | 26 | CR3 decoder: use mempool for memory |
p2cmyk(UINT8 *out, const UINT8 *in, int xsize, const UINT8 *palette) {
p2rgb(out, in, xsize, palette);
rgb2cmyk(out, out, xsize);
} | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 29,648,958,728,390,006,000,000,000,000,000,000,000 | 4 | Use snprintf instead of sprintf |
options_from_list(w, priv)
struct wordlist *w;
int priv;
{
char *argv[MAXARGS];
option_t *opt;
int i, n, ret = 0;
struct wordlist *w0;
privileged_option = priv;
option_source = "secrets file";
option_priority = OPRIO_SECFILE;
while (w != NULL) {
opt = find_option(w->word);
if... | 0 | [
"CWE-415",
"CWE-119"
] | ppp | 7658e8257183f062dc01f87969c140707c7e52cb | 144,231,347,310,540,800,000,000,000,000,000,000,000 | 41 | pppd: Eliminate potential integer overflow in option parsing
When we are reading in a word from an options file, we maintain a count
of the length we have seen so far in 'len', which is an int. When len
exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the
buffer but we continue to increment len. Sin... |
GF_Err saio_Read(GF_Box *s, GF_BitStream *bs)
{
GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox *)s;
if (ptr->flags & 1) {
ptr->aux_info_type = gf_bs_read_u32(bs);
ptr->aux_info_type_parameter = gf_bs_read_u32(bs);
ISOM_DECREASE_SIZE(ptr, 8);
}
ptr->entry_count = gf_bs_read_u32(bs);
... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 58,122,057,460,377,330,000,000,000,000,000,000,000 | 29 | fixed 2 possible heap overflows (inc. #1088) |
void CParaNdisTX::NBLMappingDone(CNBL *NBLHolder)
{
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
if (NBLHolder->MappingSuceeded())
{
DoWithTXLock([NBLHolder, this](){ m_SendList.PushBack(NBLHolder); });
DoPendingTasks(false);
}
else
{
NBLHolder->SetStatus(NDIS_STATUS_FA... | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 54,742,478,409,855,780,000,000,000,000,000,000,000 | 15 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
static int alloc_userspace(unsigned int size, u32 aux_space,
void __user **up_native)
{
*up_native = compat_alloc_user_space(size + aux_space);
if (!*up_native)
return -ENOMEM;
if (clear_user(*up_native, size))
return -EFAULT;
return 0;
} | 0 | [
"CWE-787"
] | linux | a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a | 65,062,201,346,445,760,000,000,000,000,000,000,000 | 10 | media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic
The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit
equivalent. It converts 32-bit data structures into its 64-bit
equivalents and needs to provide the data to the 64-bit ioctl in user
space memory which is commonly allocated using
compat... |
Status CmdAuthenticate::_authenticateX509(const UserName& user, const BSONObj& cmdObj) {
if (!getSSLManager()) {
return Status(ErrorCodes::ProtocolError,
"SSL support is required for the MONGODB-X509 mechanism.");
}
if(user.getDB() != "$external") {
... | 0 | [] | mongo | f85ceb17b37210eef71e8113162c41368bfd5c12 | 178,661,373,941,724,020,000,000,000,000,000,000,000 | 50 | SERVER-9476 Redact some potentially sensitive information when logging authentications. |
screensaver_is_running (DBusConnection *connection)
{
DBusError error;
gboolean exists;
g_return_val_if_fail (connection != NULL, FALSE);
dbus_error_init (&error);
exists = dbus_bus_name_has_owner (connection, GS_LISTENER_SERVICE, &error);
if (dbus_error_is_set (&error... | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 120,009,987,539,869,300,000,000,000,000,000,000,000 | 15 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
qemuProcessHandleBlockJob(qemuMonitorPtr mon G_GNUC_UNUSED,
virDomainObjPtr vm,
const char *diskAlias,
int type,
int status,
const char *error,
void *opaque)
{
... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 198,567,611,530,492,900,000,000,000,000,000,000,000 | 61 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
ZEND_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 103,510,301,312,569,580,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
gs_call_interp(i_ctx_t **pi_ctx_p, ref * pref, int user_errors,
int *pexit_code, ref * perror_object)
{
ref *epref = pref;
ref doref;
ref *perrordict;
ref error_name;
int code, ccode;
ref saref;
i_ctx_t *i_ctx_p = *pi_ctx_p;
int *gc_signal = &imemory_system->gs_lib_ctx->gc... | 1 | [] | ghostpdl | a6807394bd94b708be24758287b606154daaaed9 | 328,318,588,088,226,400,000,000,000,000,000,000,000 | 227 | For hidden operators, pass a name object to error handler.
In normal operation, Postscript error handlers are passed the object which
triggered the error: this is invariably an operator object.
The issue arises when an error is triggered by an operator which is for internal
use only, and that operator is then passed ... |
safe_atoi(const char *str, int *val)
{
return safe_atoi_base(str, val, 10);
} | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 230,793,762,729,487,530,000,000,000,000,000,000,000 | 4 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
u8 inst_id,
enum nl80211_nan_func_term_reason reason,
u64 cookie, gfp_t gfp)
{
struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
struct sk_buff *msg;
struct nlattr *func_attr;
void *hdr;
... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 78,929,526,390,075,780,000,000,000,000,000,000,000 | 58 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
static void mark_reg_unknown(struct bpf_verifier_env *env,
struct bpf_reg_state *regs, u32 regno)
{
if (WARN_ON(regno >= MAX_BPF_REG)) {
verbose(env, "mark_reg_unknown(regs, %u)\n", regno);
/* Something bad happened, let's kill all regs except FP */
for (regno = 0; regno < BPF_REG_FP; regno++)
__mark_... | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 154,315,195,133,426,940,000,000,000,000,000,000,000 | 12 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
SYSCALL_DEFINE3(sendmsg, int, fd, struct msghdr __user *, msg, unsigned int, flags)
{
if (flags & MSG_CMSG_COMPAT)
return -EINVAL;
return __sys_sendmsg(fd, msg, flags);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 242,975,862,817,962,800,000,000,000,000,000,000,000 | 6 | 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... |
regional_destroy(struct regional *r)
{
if(!r) return;
regional_free_all(r);
free(r);
} | 0 | [
"CWE-190"
] | unbound | 226298bbd36f1f0fd9608e98c2ae85988b7bbdb8 | 50,624,631,817,210,300,000,000,000,000,000,000,000 | 6 | - Fix Integer Overflow in Regional Allocator,
reported by X41 D-Sec. |
void RoleGraph::generateUniversalPrivileges(PrivilegeVector* privileges) {
ActionSet allActions;
allActions.addAllActions();
privileges->push_back(Privilege(ResourcePattern::forAnyResource(), allActions));
} | 0 | [
"CWE-20"
] | mongo | cbec187266a9f902b3906ae8ccef2bbda0c5b27b | 173,169,261,732,514,560,000,000,000,000,000,000,000 | 5 | SERVER-36263 Bypassing operation validation in applyOps should require special privilege |
static int ssl_parse_session_ticket_ext( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t len )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
mbedtls_ssl_session session;
mbedtls_ssl_session_init( &session );
if... | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 241,648,976,992,652,080,000,000,000,000,000,000,000 | 71 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
static int listcompare(const char *text, size_t tlen __attribute__((unused)),
const char *list, strarray_t *match_vars, void *rock)
{
struct sieve_interp_ctx *ctx = (struct sieve_interp_ctx *) rock;
char *abook = get_addrbook_mboxname(list, ctx->userid);
int ret = 0;
if (!abook) ... | 0 | [
"CWE-269"
] | cyrus-imapd | 673ebd96e2efbb8895d08648983377262f35b3f7 | 169,876,138,846,606,660,000,000,000,000,000,000,000 | 31 | lmtp_sieve: don't create mailbox with admin for sieve autocreate |
static void _store_resource_sdb(struct PE_(r_bin_pe_obj_t) *bin) {
RListIter *iter;
r_pe_resource *rs;
int index = 0;
ut64 vaddr = 0;
char *key;
Sdb *sdb = sdb_new0 ();
if (!sdb) {
return;
}
r_list_foreach (bin->resources, iter, rs) {
key = sdb_fmt ("resource.%d.timestr", index);
sdb_set (sdb, key, rs->t... | 0 | [
"CWE-125"
] | radare2 | 4e1cf0d3e6f6fe2552a269def0af1cd2403e266c | 202,570,531,229,324,780,000,000,000,000,000,000,000 | 28 | Fix crash in pe |
ConnectionLimitIntegrationTest()
: BaseIntegrationTest(GetParam(), ConfigHelper::tcpProxyConfig()) {} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 118,132,395,968,795,950,000,000,000,000,000,000,000 | 2 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static int _regulator_is_enabled(struct regulator_dev *rdev)
{
/* A GPIO control always takes precedence */
if (rdev->ena_pin)
return rdev->ena_gpio_state;
/* If we don't know then assume that the regulator is always on */
if (!rdev->desc->ops->is_enabled)
return 1;
return rdev->desc->ops->is_enabled(rdev);
... | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 68,085,646,567,903,630,000,000,000,000,000,000,000 | 12 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> |
void perf_sched_cb_dec(struct pmu *pmu)
{
struct perf_cpu_context *cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
this_cpu_dec(perf_sched_cb_usages);
if (!--cpuctx->sched_cb_usage)
list_del(&cpuctx->sched_cb_entry);
} | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 126,991,165,181,412,180,000,000,000,000,000,000,000 | 9 | 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... |
ObjectID JSObject::getObjectID(JSObject *self, Runtime *runtime) {
if (LLVM_LIKELY(self->flags_.objectID))
return self->flags_.objectID;
// Object ID does not yet exist, get next unique global ID..
self->flags_.objectID = runtime->generateNextObjectID();
// Make sure it is not zero.
if (LLVM_UNLIKELY(!se... | 0 | [
"CWE-843",
"CWE-125"
] | hermes | fe52854cdf6725c2eaa9e125995da76e6ceb27da | 153,441,131,005,877,640,000,000,000,000,000,000,000 | 11 | [CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain.
Summary:
The change in the hermes repository fixes the security vulnerability
CVE-2020-1911. This vulnerability only affects applications which
allow evaluation of uncontrolled, untrusted JavaScript code not
shipped wit... |
int FLTLayerApplyCondSQLFilterToLayer(FilterEncodingNode *psNode, mapObj *map, int iLayerIndex)
{
return FLTLayerApplyPlainFilterToLayer(psNode, map, iLayerIndex);
} | 0 | [
"CWE-200",
"CWE-119"
] | mapserver | e52a436c0e1c5e9f7ef13428dba83194a800f4df | 258,056,596,946,102,240,000,000,000,000,000,000,000 | 4 | security fix (patch by EvenR) |
static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
{
int ret = vb2_queue_or_prepare_buf(q, b, "qbuf");
return ret ? ret : vb2_core_qbuf(q, b->index, b);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab | 305,908,153,097,431,640,000,000,000,000,000,000,000 | 6 | [media] videobuf2-v4l2: Verify planes array in buffer dequeueing
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer
which will be dequeued is not known until the buffer has been removed from
the queue. The number of planes is specific to a buffer, not to the queue.
This does lead to the situat... |
static int ssl_parse_server_psk_hint( mbedtls_ssl_context *ssl,
unsigned char **p,
unsigned char *end )
{
int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
size_t len;
((void) ssl);
/*
* PSK parameters:
*
* opaque ... | 1 | [
"CWE-125"
] | mbedtls | 740b218386083dc708ce98ccc94a63a95cd5629e | 25,355,558,776,446,520,000,000,000,000,000,000,000 | 33 | Add bounds check before length read |
PHP_FUNCTION(gd_info)
{
if (zend_parse_parameters_none() == FAILURE) {
RETURN_FALSE;
}
array_init(return_value);
add_assoc_string(return_value, "GD Version", PHP_GD_VERSION_STRING, 1);
#ifdef ENABLE_GD_TTF
add_assoc_bool(return_value, "FreeType Support", 1);
#if HAVE_LIBFREETYPE
add_assoc_string(return_value... | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 35,404,906,836,948,060,000,000,000,000,000,000,000 | 51 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
static void __blk_mq_requeue_request(struct request *rq)
{
struct request_queue *q = rq->q;
trace_block_rq_requeue(q, rq);
if (test_and_clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags)) {
if (q->dma_drain_size && blk_rq_bytes(rq))
rq->nr_phys_segments--;
}
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 227,693,096,112,015,150,000,000,000,000,000,000,000 | 11 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
char*
mono_verify_corlib ()
{
/* This is a public API function so cannot be removed */
return NULL; | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 133,525,333,334,542,600,000,000,000,000,000,000,000 | 5 | 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 |
int mbedtls_asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag )
{
if( *p - start < 1 )
return( MBEDTLS_ERR_ASN1_BUF_TOO_SMALL );
*--(*p) = tag;
return( 1 );
} | 0 | [] | mbedtls | 97b5209bc01ab8b3b519fdb46cefc04739433124 | 122,358,857,728,408,970,000,000,000,000,000,000,000 | 9 | Fix potential double free in cert writing code
In case an entry with the given OID already exists in the list passed to
mbedtls_asn1_store_named_data() and there is not enough memory to allocate
room for the new value, the existing entry will be freed but the preceding
entry in the list will sill hold a pointer to it.... |
static void curl_aio_cancel(BlockDriverAIOCB *blockacb)
{
// Do we have to implement canceling? Seems to work without...
} | 0 | [
"CWE-20"
] | qemu | 6d4b9e55fc625514a38d27cff4b9933f617fa7dc | 89,480,230,383,959,080,000,000,000,000,000,000,000 | 4 | curl: check data size before memcpy to local buffer. (CVE-2014-0144)
curl_read_cb is callback function for libcurl when data arrives. The
data size passed in here is not guaranteed to be within the range of
request we submitted, so we may overflow the guest IO buffer. Check the
real size we have before memcpy to buffe... |
static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p,
size_t msg_len)
{
struct sock *sk = asoc->base.sk;
long current_timeo = *timeo_p;
DEFINE_WAIT(wait);
int err = 0;
pr_debug("%s: asoc:%p, timeo:%ld, msg_len:%zu\n", __func__, asoc,
*timeo_p, msg_len);
/* Increment the associatio... | 0 | [
"CWE-416"
] | linux | a0ff660058b88d12625a783ce9e5c1371c87951f | 27,107,913,181,517,270,000,000,000,000,000,000,000 | 65 | sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf
After commit cea0cc80a677 ("sctp: use the right sk after waking up from
wait_buf sleep"), it may change to lock another sk if the asoc has been
peeled off in sctp_wait_for_sndbuf.
However, the asoc's new sk could be already closed elsewhere, a... |
slapi_pblock_set_op_stack_elem(Slapi_PBlock *pb, void *stack_elem)
{
#ifdef PBLOCK_ANALYTICS
pblock_analytics_record(pb, SLAPI_OP_STACK_ELEM);
#endif
_pblock_assert_pb_intop(pb);
pb->pb_intop->op_stack_elem = stack_elem;
} | 0 | [
"CWE-415"
] | 389-ds-base | a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b | 281,442,931,077,013,860,000,000,000,000,000,000,000 | 8 | 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... |
ecryptfs_add_new_key_tfm(struct ecryptfs_key_tfm **key_tfm, char *cipher_name,
size_t key_size)
{
struct ecryptfs_key_tfm *tmp_tfm;
int rc = 0;
BUG_ON(!mutex_is_locked(&key_tfm_list_mutex));
tmp_tfm = kmem_cache_alloc(ecryptfs_key_tfm_cache, GFP_KERNEL);
if (key_tfm != NULL)
(*key_tfm) = tmp_tfm;
if (!tmp... | 0 | [
"CWE-189"
] | linux-2.6 | 8faece5f906725c10e7a1f6caf84452abadbdc7b | 200,558,284,613,230,650,000,000,000,000,000,000,000 | 38 | eCryptfs: Allocate a variable number of pages for file headers
When allocating the memory used to store the eCryptfs header contents, a
single, zeroed page was being allocated with get_zeroed_page().
However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or
ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche... |
static void phys_page_compact_all(AddressSpaceDispatch *d, int nodes_nb)
{
if (d->phys_map.skip) {
phys_page_compact(&d->phys_map, d->map.nodes);
}
} | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 145,930,394,602,485,390,000,000,000,000,000,000,000 | 6 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
find_process (pid, alive_only, jobp)
pid_t pid;
int alive_only;
int *jobp; /* index into jobs list or NO_JOB */
{
PROCESS *p;
p = find_pipeline (pid, alive_only, jobp);
while (p && p->pid != pid)
p = p->next;
return p;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 319,213,470,619,402,980,000,000,000,000,000,000,000 | 12 | bash-4.4-rc2 release |
curlResult(void *ptr, size_t size, size_t nmemb, void *userdata)
{
char *p = (char *)ptr;
instanceData *pData = (instanceData*) userdata;
char *buf;
size_t newlen;
newlen = pData->replyLen + size*nmemb;
if((buf = realloc(pData->reply, newlen + 1)) == NULL) {
DBGPRINTF("omelasticsearch: realloc failed in curlRe... | 0 | [
"CWE-399"
] | rsyslog | 80f88242982c9c6ad6ce8628fc5b94ea74051cf4 | 316,625,293,853,627,700,000,000,000,000,000,000,000 | 17 | bugfix: double-free in omelasticsearch
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461
Thanks to Marius Ionescu for providing a detailled bug report |
Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) :
Pipeline(identifier, next),
pos(0),
eod(false)
{
this->inbuf[0] = '0';
this->inbuf[1] = '0';
this->inbuf[2] = '\0';
} | 0 | [
"CWE-787"
] | qpdf | dc92574c10f3e2516ec6445b88c5d584f40df4e5 | 137,112,791,600,174,440,000,000,000,000,000,000,000 | 9 | Fix some pipelines to be safe if downstream write fails (fuzz issue 28262) |
void Krecipes::filePrint()
{
m_view->printRequested();
} | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 51,686,708,843,432,240,000,000,000,000,000,000,000 | 4 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
virtual ~SpawnerFactory() { } | 0 | [] | passenger | 8c6693e0818772c345c979840d28312c2edd4ba4 | 255,834,777,724,094,600,000,000,000,000,000,000,000 | 1 | Security check socket filenames reported by spawned application processes. |
static int calcstepsizes(uint_fast16_t refstepsize, int numrlvls,
uint_fast16_t *stepsizes)
{
int bandno;
int numbands;
uint_fast16_t expn;
uint_fast16_t mant;
expn = JPC_QCX_GETEXPN(refstepsize);
mant = JPC_QCX_GETMANT(refstepsize);
numbands = 3 * numrlvls - 2;
for (bandno = 0; bandno < numbands; ++bandno) {... | 1 | [
"CWE-617"
] | jasper | 84d00fb29a22e360c2ff91bdc2cd81c288826bfc | 97,162,810,315,411,630,000,000,000,000,000,000,000 | 16 | jpc_dec: check for JPC_QCX_EXPN() parameter overflow
Avoid the assertion failure in the JPC_QCX_EXPN() function. While the
"expn" variable cannot be bigger than 0x1f, adding something to it may
exceed that limit.
This condition could be exploited with a malicious JP2 file, allowing
a denial of service attack on proc... |
includeFile(const FileInfo *file, CharsString *includedFile,
TranslationTableHeader **table, DisplayTableHeader **displayTable) {
int k;
char includeThis[MAXSTRING];
char **tableFiles;
int rv;
for (k = 0; k < includedFile->length; k++)
includeThis[k] = (char)includedFile->chars[k];
if (k >= MAXSTRING) {
com... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 224,901,761,514,736,580,000,000,000,000,000,000,000 | 31 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
ModuleExport void UnregisterMTVImage(void)
{
(void) UnregisterMagickInfo("MTV");
} | 0 | [
"CWE-401"
] | ImageMagick6 | 210474b2fac6a661bfa7ed563213920e93e76395 | 309,832,979,618,756,470,000,000,000,000,000,000,000 | 4 | Fix ultra rare but potential memory-leak |
coolkey_get_certificate(sc_card_t *card, sc_cardctl_coolkey_object_t *obj, struct sc_pkcs15_der *cert)
{
sc_cardctl_coolkey_object_t *cert_obj;
unsigned long object_id;
int r;
cert_obj = obj;
if (coolkey_get_object_type(obj->id) != COOLKEY_ID_CERT) {
r = coolkey_find_matching_cert(card, obj, &cert_obj);
if (r... | 0 | [] | OpenSC | 7114fb71b54ddfe06ce5dfdab013f4c38f129d14 | 254,482,638,140,542,250,000,000,000,000,000,000,000 | 31 | coolkey: Initialize potentially uninitialized memory
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28855 |
static int mwifiex_pcie_create_rxbd_ring(struct mwifiex_adapter *adapter)
{
struct pcie_service_card *card = adapter->card;
const struct mwifiex_pcie_card_reg *reg = card->pcie.reg;
/*
* driver maintaines the read pointer and firmware maintaines the write
* pointer. The write pointer starts at 0 (zero) while th... | 0 | [
"CWE-400",
"CWE-200",
"CWE-401"
] | linux | d10dcb615c8e29d403a24d35f8310a7a53e3050c | 87,645,029,115,900,130,000,000,000,000,000,000,000 | 41 | mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be
released if mwifiex_map_pci_memory() fails. The release for skb and
card->evtbd_ring_vbase is added.
Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines... |
static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp)
{
struct sadb_msg *hdr = NULL;
if (skb->len < sizeof(*hdr)) {
*errp = -EMSGSIZE;
} else {
hdr = (struct sadb_msg *) skb->data;
if (hdr->sadb_msg_version != PF_KEY_V2 ||
hdr->sadb_msg_reserved != 0 ||
(hdr->sadb_msg_type <= ... | 0 | [] | linux | 096f41d3a8fcbb8dde7f71379b1ca85fe213eded | 40,492,870,886,435,580,000,000,000,000,000,000,000 | 26 | af_key: Fix sadb_x_ipsecrequest parsing
The parsing of sadb_x_ipsecrequest is broken in a number of ways.
First of all we're not verifying sadb_x_ipsecrequest_len. This
is needed when the structure carries addresses at the end. Worse
we don't even look at the length when we parse those optional
addresses.
The migra... |
void __init ipc_init_proc_interface(const char *path, const char *header,
int ids, int (*show)(struct seq_file *, void *))
{
struct proc_dir_entry *pde;
struct ipc_proc_iface *iface;
iface = kmalloc(sizeof(*iface), GFP_KERNEL);
if (!iface)
return;
iface->path = path;
iface->header = header;
iface->ids = ids... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 232,193,214,887,791,100,000,000,000,000,000,000,000 | 23 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
static MOBI_RET mobi_parse_idxt(MOBIBuffer *buf, MOBIIdxt *idxt, const size_t entries_count) {
const uint32_t idxt_offset = (uint32_t) buf->offset;
idxt->offsets_count = 0;
char idxt_magic[5];
mobi_buffer_getstring(idxt_magic, buf, 4);
if (strncmp(idxt_magic, IDXT_MAGIC, 4) != 0) {
debug_pri... | 0 | [
"CWE-125",
"CWE-787"
] | libmobi | eafc415bc6067e72577f70d6dd5acbf057ce6e6f | 203,374,086,627,316,200,000,000,000,000,000,000,000 | 19 | Fix wrong boundary checks in inflections parser resulting in stack buffer over-read with corrupt input |
static int ZEND_FASTCALL ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval z_copy;
zval *z = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
if (IS_CV != IS_CONST &&
Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL &&
zend_std_cast_object_tos... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 272,822,932,319,567,430,000,000,000,000,000,000,000 | 18 | - 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 |
glue(glue(cirrus_bitblt_rop_bkwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
uint8_t *dst,const uint8_t *src,
int dstpitch,int srcpitch,
int bltwidth,int bltheight)
{
int x,y;
uint8_t p1, p2;
dstpitch += bltwidth;
srcpitch += bltwidth;
for (y = 0; y < bltheight; y++) {
... | 1 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 206,391,556,163,726,100,000,000,000,000,000,000,000 | 26 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
MONGO_EXPORT int mongo_run_command( mongo *conn, const char *db, const bson *command,
bson *out ) {
int ret = MONGO_OK;
bson response = {NULL, 0};
bson fields;
int sl = strlen( db );
char *ns = bson_malloc( sl + 5 + 1 ); /* ".$cmd" + nul */
int res, success = ... | 1 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 57,292,396,090,765,330,000,000,000,000,000,000,000 | 36 | don't mix up int and size_t (first pass to fix that) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.