func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void kbd_event(struct input_handle *handle, unsigned int event_type,
unsigned int event_code, int value)
{
/* We are called with interrupts disabled, just take the lock */
spin_lock(&kbd_event_lock);
if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))
kbd_rawcode(value);
if (... | 0 | [
"CWE-416"
] | linux | 6ca03f90527e499dd5e32d6522909e2ad390896b | 304,212,226,450,464,840,000,000,000,000,000,000,000 | 17 | vt: keyboard, simplify vt_kdgkbsent
Use 'strlen' of the string, add one for NUL terminator and simply do
'copy_to_user' instead of the explicit 'for' loop. This makes the
KDGKBSENT case more compact.
The only thing we need to take care about is NULL 'func_table[i]'. Use
an empty string in that case.
The original che... |
bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start,
ram_addr_t length,
unsigned client)
{
DirtyMemoryBlocks *blocks;
unsigned long end, page;
bool dirty = false;
if (length == 0) {
return fal... | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 236,233,446,500,832,930,000,000,000,000,000,000,000 | 37 | 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... |
alt_merge_node_opt_info(OptNode* to, OptNode* add, OptEnv* env)
{
alt_merge_opt_anc_info(&to->anc, &add->anc);
alt_merge_opt_exact(&to->sb, &add->sb, env);
alt_merge_opt_exact(&to->sm, &add->sm, env);
alt_merge_opt_exact(&to->spr, &add->spr, env);
alt_merge_opt_map(env->enc, &to->map, &add->map);
alt_mer... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 302,980,277,080,265,230,000,000,000,000,000,000,000 | 10 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
bool build_authorizer(const EntityName &ename, uint64_t global_id) {
__u8 struct_v = 1;
::encode(struct_v, bl);
::encode(ename, bl);
::encode(global_id, bl);
return 0;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 307,659,038,747,209,660,000,000,000,000,000,000,000 | 7 | 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 ... |
ecma_get_internal_string (lit_magic_string_id_t id) /**< identifier of magic string */
{
JERRY_ASSERT (id >= LIT_NON_INTERNAL_MAGIC_STRING__COUNT && id < LIT_MAGIC_STRING__COUNT);
return (ecma_string_t *) ECMA_CREATE_DIRECT_STRING (ECMA_DIRECT_STRING_SPECIAL, (uintptr_t) id);
} /* ecma_get_internal_string */ | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 189,149,286,718,300,800,000,000,000,000,000,000,000 | 5 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static sctp_xmit_t sctp_packet_bundle_auth(struct sctp_packet *pkt,
struct sctp_chunk *chunk)
{
struct sctp_association *asoc = pkt->transport->asoc;
struct sctp_chunk *auth;
sctp_xmit_t retval = SCTP_XMIT_OK;
/* if we don't have an association, we can't do authentication */
if (!asoc)
return retval;
... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 323,413,718,196,285,280,000,000,000,000,000,000,000 | 34 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
const char *cJSON_GetErrorPtr( void )
{
return ep;
} | 1 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 317,718,346,004,122,580,000,000,000,000,000,000,000 | 4 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
void enc_untrusted_syslog(int priority, const char *message, int len) {
EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_syslog,
TokLinuxSyslogPriority(priority), message,
len);
} | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 57,809,538,614,013,010,000,000,000,000,000,000,000 | 5 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
Item_cache_wrapper::Item_cache_wrapper(Item *item_arg)
:orig_item(item_arg), expr_cache(NULL), expr_value(NULL)
{
DBUG_ASSERT(orig_item->fixed);
max_length= orig_item->max_length;
maybe_null= orig_item->maybe_null;
decimals= orig_item->decimals;
collation.set(orig_item->collation);
with_sum_func= orig_ite... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 60,376,919,497,996,170,000,000,000,000,000,000,000 | 20 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
GF_Err gf_filter_set_active_opengl_context(GF_Filter *filter)
{
#ifndef GPAC_DISABLE_3D
if (filter->finalized || filter->removed) return GF_OK;
return gf_fs_set_gl(filter->session);
#else
return GF_NOT_SUPPORTED;
#endif
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 302,954,100,812,201,600,000,000,000,000,000,000,000 | 9 | fixed crashes for very long path - cf #1908 |
static int napi_poll(struct napi_struct *n, struct list_head *repoll)
{
void *have;
int work, weight;
list_del_init(&n->poll_list);
have = netpoll_poll_lock(n);
weight = n->weight;
/* This NAPI_STATE_SCHED test is for avoiding a race
* with netpoll's poll_napi(). Only the entity which
* obtains the lock... | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 163,643,352,361,107,320,000,000,000,000,000,000,000 | 61 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
static int check_standalone(void)
{
socklen_t socksize = (socklen_t) sizeof ctrlconn;
if (getsockname(0, (struct sockaddr *) &ctrlconn, &socksize) != 0) {
clientfd = -1;
return 1;
}
if (dup2(0, 1) == -1) {
_EXIT(EXIT_FAILURE);
}
clientfd = 0;
return 0;
} | 0 | [
"CWE-434"
] | pure-ftpd | 37ad222868e52271905b94afea4fc780d83294b4 | 24,919,091,323,372,363,000,000,000,000,000,000,000 | 14 | Initialize the max upload file size when quotas are enabled
Due to an unwanted check, files causing the quota to be exceeded
were deleted after the upload, but not during the upload.
The bug was introduced in 2009 in version 1.0.23
Spotted by @DroidTest, thanks! |
static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_TMP(int type, ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval *container = _get_zval_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC);
zend_free_op free_op2;
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 2,673,300,190,315,059,000,000,000,000,000,000,000 | 47 | - 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 |
static inline unsigned long page_to_section(const struct page *page)
{
return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 121,683,653,266,543,810,000,000,000,000,000,000,000 | 4 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static int do_recv_NotifyData(rpc_message_t *message, void *p_value)
{
int error;
uint64_t id;
if ((error = rpc_message_recv_uint64(message, &id)) < 0)
return error;
if (sizeof(void *) == 4 && ((uint32_t)(id >> 32)) != 0) {
npw_printf("ERROR: 64-bit viewers in 32-bit wrappers are not supported\n");
abort()... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 27,691,223,323,651,962,000,000,000,000,000,000,000 | 16 | Support all the new variables added |
static int nf_tables_fill_flowtable_info(struct sk_buff *skb, struct net *net,
u32 portid, u32 seq, int event,
u32 flags, int family,
struct nft_flowtable *flowtable,
struct list_head *hook_list)
{
struct nlattr *nest, *nest_devs;
struct nft_hook *hook;
struct nlmsghdr *nlh;
event = nfnl_ms... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 272,529,059,657,280,730,000,000,000,000,000,000,000 | 49 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
Token DocumentChecker::next_misspelling()
{
bool correct;
Token tok;
do {
if (!tokenizer_->advance()) {
tok.offset = proc_str_.size();
tok.len = 0;
return tok;
}
correct = speller_->check(MutableString(tokenizer_->word.data(),
tokenizer_->word.size() - 1));
tok.len ... | 0 | [
"CWE-125"
] | aspell | de29341638833ba7717bd6b5e6850998454b044b | 84,723,582,285,572,980,000,000,000,000,000,000,000 | 19 | Don't allow null-terminated UCS-2/4 strings using the original API.
Detect if the encoding is UCS-2/4 and the length is -1 in affected API
functions and refuse to convert the string. If the string ends up
being converted somehow, abort with an error message in DecodeDirect
and ConvDirect. To convert a null terminate... |
MagickExport MagickBooleanType PlasmaImageProxy(Image *image,
CacheView *image_view,CacheView *u_view,CacheView *v_view,
RandomInfo *magick_restrict random_info,
const SegmentInfo *magick_restrict segment,size_t attenuate,size_t depth)
{
ExceptionInfo
*exception;
double
plasma;
MagickStatusType
... | 0 | [
"CWE-369"
] | ImageMagick6 | f1e68d22d1b35459421710587a0dcbab6900b51f | 110,004,246,678,587,940,000,000,000,000,000,000,000 | 204 | https://github.com/ImageMagick/ImageMagick/issues/3296 |
static OPJ_BOOL opj_j2k_build_decoder (opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
/* add here initialization of cp
copy paste of setup_decode... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 206,562,299,151,959,560,000,000,000,000,000,000,000 | 11 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PARAMETERS, int isfilename, zend_bool raw_output_default) /* {{{ */
{
char *algo, *data, *digest, *key, *K;
int algo_len, data_len, key_len;
zend_bool raw_output = raw_output_default;
const php_hash_ops *ops;
void *context;
php_stream *stream = NULL;
if (zend_... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 205,723,770,127,109,270,000,000,000,000,000,000,000 | 73 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
dns_zone_catz_enable(dns_zone_t *zone, dns_catz_zones_t *catzs) {
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(catzs != NULL);
LOCK_ZONE(zone);
INSIST(zone->catzs == NULL || zone->catzs == catzs);
dns_catz_catzs_set_view(catzs, zone->view);
if (zone->catzs == NULL)
dns_catz_catzs_attach(catzs, &zone->catzs);
UNLOCK... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 60,679,891,403,815,600,000,000,000,000,000,000,000 | 11 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
bool Item::send(Protocol *protocol, String *buffer)
{
bool UNINIT_VAR(result); // Will be set if null_value == 0
enum_field_types f_type;
switch ((f_type=field_type())) {
default:
case MYSQL_TYPE_NULL:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET:
case MYSQ... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 284,335,597,149,976,530,000,000,000,000,000,000,000 | 111 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
static pj_status_t get_name_len(int rec_counter, const pj_uint8_t *pkt,
const pj_uint8_t *start, const pj_uint8_t *max,
int *parsed_len, int *name_len)
{
const pj_uint8_t *p;
pj_status_t status;
/* Limit the number of recursion */
if (rec_counter > 10) {
/* Too many name recursion */
return... | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | 9fae8f43accef8ea65d4a8ae9cdf297c46cfe29a | 304,724,818,714,881,250,000,000,000,000,000,000,000 | 67 | Merge pull request from GHSA-p6g5-v97c-w5q4
* Prevent heap buffer overflow when parsing DNS packets
* Make sure packet parsing doesn't advance beyond max/end
* Update checks
* Remove check
Co-authored-by: sauwming <ming@teluu.com> |
TEST_P(Http2CodecImplTest, TestLargeRequestHeadersAtLimitAccepted) {
uint32_t codec_limit_kb = 64;
max_request_headers_kb_ = codec_limit_kb;
initialize();
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
std::string key = "big";
uint32_t head_room = 77;
uint32_t l... | 1 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 56,016,534,836,308,550,000,000,000,000,000,000,000 | 22 | 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... |
pci_set_cfgdata32(struct pci_vdev *dev, int offset, uint32_t val)
{
if ((offset > PCI_REGMAX - 3) || (offset & 3) != 0) {
pr_err("%s: out of range of PCI config space!\n", __func__);
return;
}
*(uint32_t *)(dev->cfgdata + offset) = val;
} | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 2b3dedfb9ba13f15887f22b935d373f36c9a59fa | 73,153,641,132,293,300,000,000,000,000,000,000,000 | 8 | dm: pci: clean up assert() in pci core
Tracked-On: #3252
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
static int nft_block_setup(struct nft_base_chain *basechain,
struct flow_block_offload *bo,
enum flow_block_command cmd)
{
int err;
switch (cmd) {
case FLOW_BLOCK_BIND:
err = nft_flow_offload_bind(bo, basechain);
break;
case FLOW_BLOCK_UNBIND:
err = nft_flow_offload_unbind(bo, basechain);
break... | 0 | [
"CWE-269"
] | nf | b1a5983f56e371046dcf164f90bfaf704d2b89f6 | 136,110,723,887,216,710,000,000,000,000,000,000,000 | 20 | netfilter: nf_tables_offload: incorrect flow offload action array size
immediate verdict expression needs to allocate one slot in the flow offload
action array, however, immediate data expression does not need to do so.
fwd and dup expression need to allocate one slot, this is missing.
Add a new offload_action inter... |
f_maparg(typval_T *argvars, typval_T *rettv)
{
get_maparg(argvars, rettv, TRUE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 199,191,473,895,650,570,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
ctl_putcal(
const char *tag,
const struct calendar *pcal
)
{
char buffer[100];
unsigned numch;
numch = snprintf(buffer, sizeof(buffer),
"%s=%04d%02d%02d%02d%02d",
tag,
pcal->year,
pcal->month,
pcal->monthday,
pcal->hour,
pcal->minute
);
INSIST(numch < sizeof(buffer));
ctl_putdata(buffer... | 0 | [
"CWE-22"
] | ntp | 184516e143ce4448ddb5b9876dd372008cc779f6 | 12,228,235,865,190,865,000,000,000,000,000,000,000 | 22 | [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command. |
int r_jwe_set_properties(jwe_t * jwe, ...) {
rhn_opt option;
int ret = RHN_OK;
int i_value;
rhn_int_t r_value;
unsigned int ui_value;
const char * str_key, * str_value;
json_t * j_value;
const unsigned char * ustr_value;
size_t size_value;
jwk_t * jwk;
jwks_t * jwks;
gnutls_privkey_t privkey;
... | 0 | [
"CWE-787"
] | rhonabwy | b4c2923a1ba4fabf9b55a89244127e153a3e549b | 67,569,647,515,619,290,000,000,000,000,000,000,000 | 148 | Fix buffer overflow on r_jwe_aesgcm_key_unwrap |
tree_print(tcpr_data_tree_t *treeroot)
{
tcpr_tree_t *node = NULL;
memset(&tree_print_buff, '\0', TREEPRINTBUFFLEN);
RB_FOREACH(node, tcpr_data_tree_s, treeroot) {
tree_printnode("my node", node);
}
return (tree_print_buff);
} | 0 | [
"CWE-476"
] | tcpreplay | 46cf964a7db636da76abeebf10482acf6f682a87 | 162,696,705,178,949,180,000,000,000,000,000,000,000 | 10 | Bug #677 - fixes for tcpprep tree |
CopyReadBinaryAttribute(CopyState cstate,
int column_no, FmgrInfo *flinfo,
Oid typioparam, int32 typmod,
bool *isnull)
{
int32 fld_size;
Datum result;
if (!CopyGetInt32(cstate, &fld_size))
ereport(ERROR,
(errcode(ERRCODE_BAD_COPY_FILE_FORMAT),
errmsg("unexpected EOF in COPY data")));
... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 227,400,184,244,745,000,000,000,000,000,000,000,000 | 48 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
unsigned long copy_fpr_from_user(struct task_struct *task,
void __user *from)
{
u64 buf[ELF_NFPREG];
int i;
if (__copy_from_user(buf, from, ELF_NFPREG * sizeof(double)))
return 1;
for (i = 0; i < (ELF_NFPREG - 1) ; i++)
task->thread.TS_FPR(i) = buf[i];
task->thread.fp_state.fpscr = buf[i];
return 0;
} | 0 | [
"CWE-20",
"CWE-284",
"CWE-369"
] | linux | d2b9d2a5ad5ef04ff978c9923d19730cb05efd55 | 247,305,453,973,756,800,000,000,000,000,000,000,000 | 14 | powerpc/tm: Block signal return setting invalid MSR state
Currently we allow both the MSR T and S bits to be set by userspace on
a signal return. Unfortunately this is a reserved configuration and
will cause a TM Bad Thing exception if attempted (via rfid).
This patch checks for this case in both the 32 and 64 bit s... |
void btrfs_dev_replace_status(struct btrfs_fs_info *fs_info,
struct btrfs_ioctl_dev_replace_args *args)
{
struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
down_read(&dev_replace->rwsem);
/* even if !dev_replace_is_valid, the values are good enough for
* the replace_status ioctl */
args->re... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 203,219,258,650,508,570,000,000,000,000,000,000,000 | 19 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
TEST(IndexBoundsBuilderTest, IntersectWithNE) {
auto testIndex = buildSimpleIndexEntry();
std::vector<BSONObj> toIntersect;
toIntersect.push_back(fromjson("{a: {$gt: 1}}"));
toIntersect.push_back(fromjson("{a: {$ne: 2}}}"));
toIntersect.push_back(fromjson("{a: {$lte: 6}}"));
OrderedIntervalList ... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 45,538,432,667,530,060,000,000,000,000,000,000,000 | 17 | SERVER-44377 generate correct plan for indexed inequalities to null |
kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
{
struct kvm_kernel_irqfd *irqfd, *tmp;
struct fd f;
struct eventfd_ctx *eventfd = NULL, *resamplefd = NULL;
int ret;
unsigned int events;
int idx;
if (!kvm_arch_intc_initialized(kvm))
return -EAGAIN;
irqfd = kzalloc(sizeof(*irqfd), GFP_KERNEL);
if ... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 | 24,801,720,007,032,905,000,000,000,000,000,000,000 | 158 | KVM: Don't accept obviously wrong gsi values via KVM_IRQFD
We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see
kvm_set_irq_routing(). Hence, there is no sense in accepting them
via KVM_IRQFD. Prevent them from entering the system in the first
place.
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Si... |
int btd_adapter_restore_powered(struct btd_adapter *adapter)
{
if (btd_adapter_get_powered(adapter))
return 0;
set_mode(adapter, MGMT_OP_SET_POWERED, 0x01);
return 0;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 19,855,905,576,002,437,000,000,000,000,000,000,000 | 9 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
int xwcstoutf(char *utf, const wchar_t *wcs, size_t utflen)
{
if (!wcs || !utf || utflen < 1) {
errno = EINVAL;
return -1;
}
utflen = WideCharToMultiByte(CP_UTF8, 0, wcs, -1, utf, utflen, NULL, NULL);
if (utflen)
return utflen - 1;
errno = ERANGE;
return -1;
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 297,578,843,502,631,400,000,000,000,000,000,000,000 | 12 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
static Image *ReadWEBPImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
int
webp_status;
MagickBooleanType
status;
register unsigned char
*p;
size_t
length;
ssize_t
count,
y;
unsigned char
header[12],
*stream;
WebPDecoderConfig
... | 1 | [
"CWE-400"
] | ImageMagick | cb63560ba25e4a6c51ab282538c24877fff7d471 | 43,218,061,479,359,240,000,000,000,000,000,000,000 | 185 | https://github.com/ImageMagick/ImageMagick/issues/641 |
static void EndList(GF_SceneDumper *sdump, const char *name)
{
if (!sdump->trace) return;
DUMP_IND(sdump);
if (!sdump->XMLDump) {
gf_fprintf(sdump->trace, "]\n");
} else {
gf_fprintf(sdump->trace, "</%s>\n", name);
}
} | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 206,090,166,474,944,570,000,000,000,000,000,000,000 | 10 | fixed #2232 |
bool FromkLinuxStat(const struct klinux_stat *input, struct stat *output) {
if (!input || !output) return false;
output->st_atime = input->klinux_st_atime;
output->st_blksize = input->klinux_st_blksize;
output->st_blocks = input->klinux_st_blocks;
output->st_mtime = input->klinux_st_mtime;
output->st_dev = ... | 0 | [
"CWE-787"
] | asylo | bda9772e7872b0d2b9bee32930cf7a4983837b39 | 161,877,782,940,340,290,000,000,000,000,000,000,000 | 17 | Check input length in FromLinuxSockAddr
PiperOrigin-RevId: 333785506
Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9 |
static void cap_msg_msg_free_security(struct msg_msg *msg)
{
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 180,384,570,037,894,300,000,000,000,000,000,000,000 | 3 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static float _patchmatch(const CImg<T>& img1, const CImg<T>& img2,
const unsigned int psizew, const unsigned int psizeh, const unsigned int psized,
const int x1, const int y1, const int z1,
const int x2, const int y2, const int ... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 66,091,817,008,791,190,000,000,000,000,000,000,000 | 30 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb)
{
struct cbq_sched_data *q = qdisc_priv(sch);
unsigned char *b = skb->tail;
struct rtattr *rta;
rta = (struct rtattr*)b;
RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
if (cbq_dump_attr(skb, &q->link) < 0)
goto rtattr_failure;
rta->rta_len = skb->tail - b;
re... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 223,292,219,180,890,820,000,000,000,000,000,000,000 | 17 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
u8 tos, struct net_device *dev)
{
struct fib_result res;
struct in_device *in_dev = __in_dev_get_rcu(dev);
struct flowi4 fl4;
unsigned int flags = 0;
u32 itag = 0;
struct rtable *rth;
int err = -EINVAL;
struct net *ne... | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 191,998,900,480,352,300,000,000,000,000,000,000,000 | 182 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
ldns_key2buffer_str(ldns_buffer *output, const ldns_key *k)
{
ldns_status status = LDNS_STATUS_OK;
unsigned char *bignum;
#ifdef HAVE_SSL
# ifndef S_SPLINT_S
uint16_t i;
# endif
/* not used when ssl is not defined */
/*@unused@*/
ldns_rdf *b64_bignum = NULL;
RSA *rsa;
DSA *dsa;
#endif /* HAVE_SSL */
if (!... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 131,505,890,683,581,250,000,000,000,000,000,000,000 | 392 | CAA and URI |
do_make_directory (GVfsBackend *backend,
GVfsJobMakeDirectory *job,
const char *filename)
{
SoupMessage *msg;
SoupURI *uri;
guint status;
uri = g_vfs_backend_dav_uri_for_path (backend, filename, TRUE);
msg = soup_message_new_from_uri (SOUP_M... | 0 | [] | gvfs | f81ff2108ab3b6e370f20dcadd8708d23f499184 | 64,444,337,875,240,420,000,000,000,000,000,000,000 | 26 | dav: don't unescape the uri twice
path_equal tries to unescape path before comparing. Unfortunately
this function is used also for already unescaped paths. Therefore
unescaping can fail. This commit reverts changes which was done in
commit 50af53d and unescape just uris, which aren't unescaped yet.
https://bugzilla.g... |
static int ca_dn_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
{
return(X509_NAME_cmp(*a,*b));
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 24,832,801,681,489,873,000,000,000,000,000,000,000 | 4 | Add Next Protocol Negotiation. |
xmlXPathFreeValueTree(xmlNodeSetPtr obj) {
int i;
if (obj == NULL) return;
if (obj->nodeTab != NULL) {
for (i = 0;i < obj->nodeNr;i++) {
if (obj->nodeTab[i] != NULL) {
if (obj->nodeTab[i]->type == XML_NAMESPACE_DECL) {
xmlXPathNodeSetFreeNs((xmlNsPtr) obj->nodeTab[i]);
} else {
xmlFr... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 66,390,590,283,961,800,000,000,000,000,000,000,000 | 19 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static int sctp_setsockopt_disable_fragments(struct sock *sk, int *val,
unsigned int optlen)
{
if (optlen < sizeof(int))
return -EINVAL;
sctp_sk(sk)->disable_fragments = (*val == 0) ? 0 : 1;
return 0;
} | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 155,599,591,912,888,530,000,000,000,000,000,000,000 | 8 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
TEST(ExpressionStrLenBytes, ComputesLengthOfEmptyString) {
assertExpectedResults("$strLenBytes", {{{Value(StringData())}, Value(0)}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 28,914,437,951,184,155,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
String *Item_func_coalesce::str_op(String *str)
{
DBUG_ASSERT(fixed == 1);
null_value=0;
for (uint i=0 ; i < arg_count ; i++)
{
String *res;
if ((res=args[i]->val_str(str)))
return res;
}
null_value=1;
return 0;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 29,468,796,982,035,650,000,000,000,000,000,000,000 | 13 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static bool timer_fixup_assert_init(void *addr, enum debug_obj_state state)
{
struct timer_list *timer = addr;
switch (state) {
case ODEBUG_STATE_NOTAVAILABLE:
setup_timer(timer, stub_timer, 0);
return true;
default:
return false;
}
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 303,411,913,558,939,330,000,000,000,000,000,000,000 | 12 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
OFCondition DcmSCP::sendSTOREResponse(T_ASC_PresentationContextID presID,
const T_DIMSE_C_StoreRQ &reqMessage,
const Uint16 rspStatusCode)
{
// Call the method doing the real work
return sendSTOREResponse(presID, reqMessage.MessageID, reqMe... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 156,331,257,838,584,100,000,000,000,000,000,000,000 | 8 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
static void Ins_MD( INS_ARG )
{
Long K, L;
TT_F26Dot6 D;
K = args[1];
L = args[0];
if( BOUNDS( args[0], CUR.zp2.n_points ) ||
BOUNDS( args[1], CUR.zp1.n_points ) )
{
CUR.error = TT_Err_Invalid_Reference;
return;
}
if ( CUR.opcode & 1 )
D = CUR_Func... | 0 | [
"CWE-125"
] | ghostpdl | c7c55972758a93350882c32147801a3485b010fe | 52,809,132,598,426,050,000,000,000,000,000,000,000 | 24 | Bug 698024: bounds check zone pointer in Ins_MIRP() |
void set_thd(THD *thd_arg)
{
/*
Only called for top-level select_results, usually select_send,
and for the results of subquery engines
(select_<something>_subselect).
*/
DBUG_ASSERT(false); /* purecov: inspected */
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 134,014,637,230,589,940,000,000,000,000,000,000,000 | 9 | 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... |
static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
{
struct super_block *sbp;
struct superblock_smack *sbsp;
struct inode_smack *isp;
char *csp = current_security();
char *fetched;
char *final;
struct dentry *dp;
if (inode == NULL)
return;
isp = inode->i_security;
mutex_lock(... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 273,254,439,317,439,630,000,000,000,000,000,000,000 | 143 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static char *parse_params(
imp_xxh_t *imp_xxh,
pTHX_ MYSQL *sock,
char *statement,
STRLEN *slen_ptr,
imp_sth_ph_t* params,
int num_params,
... | 0 | [
"CWE-416"
] | DBD-mysql | a56ae87a4c1c1fead7d09c3653905841ccccf1cc | 323,772,621,439,041,630,000,000,000,000,000,000,000 | 280 | fix use-after-free crash in RT #97625 |
* not in the DNS pool */
bool lookup_validated;
_DNSLookupInfo()
: attempts(0), os_addr_style(OS_ADDR_TRY_DEFAULT),
lookup_success(false), lookup_name(NULL), looking_up(UNDEFINED_LOOKUP),
srv_lookup_success(false), srv_port(0), lookup_validated(true)
{
srv_hostname[0] = '\0'; | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 101,170,698,625,696,660,000,000,000,000,000,000,000 | 9 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
static int ssl_write_certificate_request( mbedtls_ssl_context *ssl )
{
int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE;
const mbedtls_ssl_ciphersuite_t *ciphersuite_info =
ssl->transform_negotiate->ciphersuite_info;
size_t dn_size, total_dn_size; /* excluding length bytes */
size_t ct_len, sa_len;... | 0 | [
"CWE-20",
"CWE-190"
] | mbedtls | 83c9f495ffe70c7dd280b41fdfd4881485a3bc28 | 63,369,661,774,487,770,000,000,000,000,000,000,000 | 166 | Prevent bounds check bypass through overflow in PSK identity parsing
The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is
unsafe because `*p + n` might overflow, thus bypassing the check. As
`n` is a user-specified value up to 65K, this is relevant if the
library happens to be located in the last 65K o... |
ldns_rr_class2str(const ldns_rr_class klass)
{
ldns_buffer *buf;
char *str;
buf = ldns_buffer_new(10);
if (!buf) {
return NULL;
}
str = NULL;
if (ldns_rr_class2buffer_str(buf, klass) == LDNS_STATUS_OK) {
str = ldns_buffer_export2str(buf);
}
ldns_buffer_free(buf);
return str;
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 43,831,304,013,696,965,000,000,000,000,000,000,000 | 17 | CAA and URI |
void DeleteGradient(PyObject* tensor) const final { Py_XDECREF(tensor); } | 0 | [
"CWE-476",
"CWE-908"
] | tensorflow | 237822b59fc504dda2c564787f5d3ad9c4aa62d9 | 283,873,251,505,102,240,000,000,000,000,000,000,000 | 1 | Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types.
When iterating through the tensor to extract shape values, an underlying missing kernel
(`StridedSlice` for quantized types) causes an error, which then results in a `nullptr`
being passed to `ParseDimensionValue()`, causing a segfault.
The... |
irc_server_outqueue_free_all (struct t_irc_server *server, int priority)
{
while (server->outqueue[priority])
{
irc_server_outqueue_free (server, priority,
server->outqueue[priority]);
}
} | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 61,283,755,340,851,770,000,000,000,000,000,000,000 | 8 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
ff_layout_free_layout_hdr(struct pnfs_layout_hdr *lo)
{
struct nfs4_flexfile_layout *ffl = FF_LAYOUT_FROM_HDR(lo);
struct nfs4_ff_layout_ds_err *err, *n;
list_for_each_entry_safe(err, n, &ffl->error_list, list) {
list_del(&err->list);
kfree(err);
}
kfree_rcu(ffl, generic_hdr.plh_rcu);
} | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 92,842,182,919,553,590,000,000,000,000,000,000,000 | 11 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
cachedb_clear(struct module_qstate* qstate, int id)
{
struct cachedb_qstate* iq;
if(!qstate)
return;
iq = (struct cachedb_qstate*)qstate->minfo[id];
if(iq) {
/* free contents of iq */
/* TODO */
}
qstate->minfo[id] = NULL;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 16,804,260,615,712,761,000,000,000,000,000,000,000 | 12 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
void SSL_CTX_set_client_CA_list(SSL_CTX *ctx,STACK_OF(X509_NAME) *name_list)
{
set_client_CA_list(&(ctx->client_CA),name_list);
} | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 66,320,646,970,243,850,000,000,000,000,000,000,000 | 4 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
static int qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue)
{
struct qeth_qdio_out_buffer *buffer;
int flush_count = 0;
if (queue->do_pack) {
if (atomic_read(&queue->used_buffers)
<= QETH_LOW_WATERMARK_PACK) {
/* switch PACKING -> non-PACKING */
QETH_CARD_TEXT(queue->card, 6, "pack->... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 80,757,667,510,671,050,000,000,000,000,000,000,000 | 29 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
int gnutls_x509_crt_get_pk_rsa_raw(gnutls_x509_crt_t crt,
gnutls_datum_t * m, gnutls_datum_t * e)
{
int ret;
mpi_t params[MAX_PUBLIC_PARAMS_SIZE];
int params_size = MAX_PUBLIC_PARAMS_SIZE;
int i;
if (crt == NULL) {
gnutls_assert();
return GNUTLS_E_INVALID_REQUEST;
}
ret = gnutls_x... | 0 | [] | gnutls | 112d537da5f3500f14316db26d18c37d678a5e0e | 161,491,412,324,095,590,000,000,000,000,000,000,000 | 46 | some changes for 64bit machines. |
TRIO_PUBLIC_STRING int trio_string_size TRIO_ARGS1((self), trio_string_t* self)
{
assert(self);
return self->allocated;
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 19,356,613,190,201,248,000,000,000,000,000,000,000 | 6 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
int dtls1_get_record(SSL *s)
{
int ssl_major, ssl_minor;
int i, n;
SSL3_RECORD *rr;
unsigned char *p = NULL;
unsigned short version;
DTLS1_BITMAP *bitmap;
unsigned int is_next_epoch;
rr = &(s->s3->rrec);
again:
/*
* The epoch may have changed. If so, process all the pending ... | 0 | [
"CWE-200",
"CWE-203"
] | openssl | e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e | 263,244,916,222,742,650,000,000,000,000,000,000,000 | 170 | Go into the error state if a fatal alert is sent or received
If an application calls SSL_shutdown after a fatal alert has occured and
then behaves different based on error codes from that function then the
application may be vulnerable to a padding oracle.
CVE-2019-1559
Reviewed-by: Richard Levitte <levitte@openssl.... |
virDomainDefHasVFIOHostdev(const virDomainDef *def)
{
size_t i;
for (i = 0; i < def->nhostdevs; i++) {
if (virHostdevIsVFIODevice(def->hostdevs[i]))
return true;
}
return false;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 278,337,731,806,364,400,000,000,000,000,000,000,000 | 11 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static void smack_task_getsecid(struct task_struct *p, u32 *secid)
{
*secid = smack_to_secid(task_security(p));
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 98,510,863,589,286,640,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
int SSL_CTX_add1_to_CA_list(SSL_CTX *ctx, const X509 *x)
{
return add_ca_name(&ctx->ca_names, x);
} | 0 | [
"CWE-835"
] | openssl | 758754966791c537ea95241438454aa86f91f256 | 259,599,418,586,467,620,000,000,000,000,000,000,000 | 4 | Fix invalid handling of verify errors in libssl
In the event that X509_verify() returned an internal error result then
libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This
subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY.
That return code is supposed to only ever be returned i... |
static void __vma_link_file(struct vm_area_struct *vma)
{
struct file *file;
file = vma->vm_file;
if (file) {
struct address_space *mapping = file->f_mapping;
if (vma->vm_flags & VM_DENYWRITE)
atomic_dec(&file_inode(file)->i_writecount);
if (vma->vm_flags & VM_SHARED)
atomic_inc(&mapping->i_mmap_writab... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 194,741,856,957,215,330,000,000,000,000,000,000,000 | 18 | 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 ... |
xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
int i;
if (cur == NULL) return;
if (val == NULL) return;
/*
* check against doublons
*/
for (i = 0;i < cur->locNr;i++)
if (cur->locTab[i] == val) break;
if (i >= cur->locNr) {
#ifdef DEBUG
xmlGener... | 0 | [
"CWE-416"
] | libxml2 | 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e | 150,540,313,396,307,640,000,000,000,000,000,000,000 | 24 | Fix XPointer paths beginning with range-to
The old code would invoke the broken xmlXPtrRangeToFunction. range-to
isn't really a function but a special kind of location step. Remove
this function and always handle range-to in the XPath code.
The old xmlXPtrRangeToFunction could also be abused to trigger a
use-after-fr... |
static struct dentry *__d_find_alias(struct inode *inode)
{
struct dentry *alias, *discon_alias;
again:
discon_alias = NULL;
hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) {
spin_lock(&alias->d_lock);
if (S_ISDIR(inode->i_mode) || !d_unhashed(alias)) {
if (IS_ROOT(alias) &&
(alias->d_flag... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 315,164,648,843,387,830,000,000,000,000,000,000,000 | 33 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
PHP_MINFO_FUNCTION(miconv)
{
zval iconv_impl, iconv_ver;
zend_get_constant("ICONV_IMPL", sizeof("ICONV_IMPL")-1, &iconv_impl TSRMLS_CC);
zend_get_constant("ICONV_VERSION", sizeof("ICONV_VERSION")-1, &iconv_ver TSRMLS_CC);
php_info_print_table_start();
php_info_print_table_row(2, "iconv support", "enabled");
php... | 0 | [
"CWE-835"
] | php-src | 06d309fd7a917575d65c7a6f4f57b0e6bb0f9711 | 192,943,574,087,144,200,000,000,000,000,000,000,000 | 18 | Fix bug #76249 - fail on invalid sequences |
static int megasas_mgmt_fasync(int fd, struct file *filep, int mode)
{
int rc;
mutex_lock(&megasas_async_queue_mutex);
rc = fasync_helper(fd, filep, mode, &megasas_async_queue);
mutex_unlock(&megasas_async_queue_mutex);
if (rc >= 0) {
/* For sanity check when we get ioctl */
filep->private_data = filep;
... | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 32,501,372,628,262,454,000,000,000,000,000,000,000 | 20 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
bool pn_ssl_get_cipher_name(pn_ssl_t *ssl0, char *buffer, size_t size )
{
pni_ssl_t *ssl = get_ssl_internal(ssl0);
*buffer = '\0';
if (ssl->state != RUNNING || !SecIsValidHandle(&ssl->ctxt_handle))
return false;
SecPkgContext_ConnectionInfo info;
if (QueryContextAttributes(&ssl->ctxt_handle, SECPKG_ATTR_C... | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 35,306,818,927,665,130,000,000,000,000,000,000,000 | 17 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
yang_check_list(struct lys_module *module, struct lys_node_list *list, struct lys_node **child,
int options, struct unres_schema *unres)
{
struct lys_node *node;
if (yang_check_typedef(module, (struct lys_node *)list, unres)) {
goto error;
}
if (yang_check_iffeatures(module, NU... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 295,516,680,924,470,900,000,000,000,000,000,000,000 | 66 | yang parser BUGFIX double free
Fixes #742 |
struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev,
u8 type, u32 data_size)
{
int hlen = type == LLC_PDU_TYPE_U ? 3 : 4;
struct sk_buff *skb;
hlen += llc_mac_header_len(dev->type);
skb = alloc_skb(hlen + data_size, GFP_ATOMIC);
if (skb) {
skb_reset_mac_header(skb);
skb_reserve(skb, h... | 0 | [
"CWE-20",
"CWE-401"
] | linux | 8b74d439e1697110c5e5c600643e823eb1dd0762 | 38,566,854,251,862,347,000,000,000,000,000,000,000 | 21 | net/llc: avoid BUG_ON() in skb_orphan()
It seems nobody used LLC since linux-3.12.
Fortunately fuzzers like syzkaller still know how to run this code,
otherwise it would be no fun.
Setting skb->sk without skb->destructor leads to all kinds of
bugs, we now prefer to be very strict about it.
Ideally here we would use... |
static void test_insert()
{
MYSQL_STMT *stmt;
int rc;
char str_data[50];
char tiny_data;
MYSQL_RES *result;
MYSQL_BIND my_bind[2];
ulong length;
myheader("test_insert");
rc= mysql_autocommit(mysql, TRUE);
myquery(rc);
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_pr... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 35,694,360,775,871,350,000,000,000,000,000,000,000 | 75 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static inline void GetMinimumPixelList(PixelList *pixel_list,Quantum *pixel)
{
register SkipList
*p;
size_t
color,
minimum;
ssize_t
count;
/*
Find the minimum value for each of the color.
*/
p=(&pixel_list->skip_list);
count=0;
color=65536UL;
minimum=p->nodes[color].next[0];
d... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 025e77fcb2f45b21689931ba3bf74eac153afa48 | 84,732,733,180,277,550,000,000,000,000,000,000,000 | 28 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
void setDetails(absl::string_view details) {
// It is probably a mistake to call setDetails() twice, so
// assert that details_ is empty.
ASSERT(details_.empty());
details_ = details;
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 278,362,939,456,465,850,000,000,000,000,000,000,000 | 7 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
handle_deauth(netdissect_options *ndo,
const uint8_t *src, const u_char *p, u_int length)
{
struct mgmt_body_t pbody;
const char *reason = NULL;
memset(&pbody, 0, sizeof(pbody));
if (!ND_TTEST2(*p, IEEE802_11_REASON_LEN))
return 0;
if (length < IEEE802_11_REASON_LEN)
return 0;
pbody.reason_co... | 0 | [
"CWE-125"
] | tcpdump | 4846b3c5d0a850e860baf4f07340495d29837d09 | 312,592,817,912,095,870,000,000,000,000,000,000,000 | 25 | (for 4.9.3) CVE-2018-16227/IEEE 802.11: add a missing bounds check
ieee802_11_print() tried to access the Mesh Flags subfield of the Mesh
Control field to find the size of the latter and increment the expected
802.11 header length before checking it is fully present in the input
buffer. Add an intermediate bounds chec... |
int skcipher_walk_aead(struct skcipher_walk *walk, struct aead_request *req,
bool atomic)
{
walk->total = req->cryptlen;
return skcipher_walk_aead_common(walk, req, atomic);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 | 98,152,413,900,562,670,000,000,000,000,000,000,000 | 7 | crypto: skcipher - Add missing API setkey checks
The API setkey checks for key sizes and alignment went AWOL during the
skcipher conversion. This patch restores them.
Cc: <stable@vger.kernel.org>
Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...")
Reported-by: Baozeng <sploving1@gmail.com>
Signed-of... |
static void __ftrace_hash_rec_update(struct ftrace_ops *ops,
int filter_hash,
bool inc)
{
struct ftrace_hash *hash;
struct ftrace_hash *other_hash;
struct ftrace_page *pg;
struct dyn_ftrace *rec;
int count = 0;
int all = 0;
/* Only update if the ops has been registered */
if (!(ops->flags & F... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 317,268,998,508,294,900,000,000,000,000,000,000,000 | 92 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
i64 nCellKey = 0;
int rc;
u32 szHdr; /* Size of the header */
u32 typeRowid; /* Serial type of the rowid */
u32 lenRowid; /* Size of the rowid */
Mem m, v;
/* Get the size of the index entry. Only indices entries of less
*... | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 75,439,586,457,600,780,000,000,000,000,000,000,000 | 67 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
static void rt_mutex_init_task(struct task_struct *p)
{
raw_spin_lock_init(&p->pi_lock);
#ifdef CONFIG_RT_MUTEXES
plist_head_init(&p->pi_waiters);
p->pi_blocked_on = NULL;
#endif
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | e66eded8309ebf679d3d3c1f5820d1f2ca332c71 | 73,322,032,140,930,690,000,000,000,000,000,000,000 | 8 | userns: Don't allow CLONE_NEWUSER | CLONE_FS
Don't allowing sharing the root directory with processes in a
different user namespace. There doesn't seem to be any point, and to
allow it would require the overhead of putting a user namespace
reference in fs_struct (for permission checks) and incrementing that
reference... |
scroll_csr_backward(NCURSES_SP_DCLx
int n,
int top,
int bot,
int miny,
int maxy,
NCURSES_CH_T blank)
{
int i;
if (n == 1 && scroll_reverse && top == miny && bot == maxy) {
GoTo(NCURSES_SP_ARGx top, 0);
UpdateAttrs(SP_PARM, blank);
NCURSES_PUTP2("scroll_reverse", scroll_re... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 154,685,815,040,383,330,000,000,000,000,000,000,000 | 61 | 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... |
Pl_PNGFilter::decodeUp()
{
QTC::TC("libtests", "Pl_PNGFilter decodeUp");
unsigned char* buffer = this->cur_row + 1;
unsigned char* above_buffer = this->prev_row + 1;
for (unsigned int i = 0; i < this->bytes_per_row; ++i)
{
unsigned char up = above_buffer[i];
buffer[i] += up;
}
} | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 187,336,632,405,343,400,000,000,000,000,000,000,000 | 12 | 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 void SVGEndElement(void *context,const xmlChar *name)
{
SVGInfo
*svg_info;
/*
Called when the end of an element has been detected.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" SAX.endElement(%s)",name);
svg_info=(SVGInfo *) context;
if (strchr((char *) name,':') != (char *) ... | 0 | [
"CWE-20",
"CWE-674",
"CWE-787"
] | ImageMagick | ec9c8944af2bfc65c697ca44f93a727a99b405f1 | 139,606,477,031,997,780,000,000,000,000,000,000,000 | 351 | [FG-VD-19-136] ImageMagick Convert SVG MacOS Denial Of Service |
TPMI_TDES_KEY_BITS_Unmarshal(TPMI_SM4_KEY_BITS *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPMI_SM4_KEY_BITS orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = TPM_KEY_BITS_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
switch (*target)... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 201,886,154,507,342,450,000,000,000,000,000,000,000 | 20 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
exe_substitute_instr(void)
{
ectx_T *ectx = substitute_instr->subs_ectx;
isn_T *save_instr = ectx->ec_instr;
int save_iidx = ectx->ec_iidx;
char_u *res;
ectx->ec_instr = substitute_instr->subs_instr;
if (exec_instructions(ectx) == OK)
{
typval_T *tv = STACK_TV_BOT(-1);
res = typval2stri... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 20,062,517,583,224,513,000,000,000,000,000,000,000 | 27 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
static void retype_callee_arg(RzAnalysis *analysis, const char *callee_name, bool in_stack, const char *place, int size, RZ_BORROW RzType *type) {
RzAnalysisFunction *fcn = rz_analysis_get_function_byname(analysis, callee_name);
if (!fcn) {
return;
}
if (in_stack) {
RzAnalysisVar *var = rz_analysis_function_get... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 58,480,734,059,236,160,000,000,000,000,000,000,000 | 27 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
file_info_set_content_type (GFileInfo *info, const char *type)
{
g_file_info_set_content_type (info, type);
g_file_info_set_attribute_string (info,
G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE,
type);
} | 0 | [] | gvfs | f81ff2108ab3b6e370f20dcadd8708d23f499184 | 27,273,150,129,955,793,000,000,000,000,000,000,000 | 8 | dav: don't unescape the uri twice
path_equal tries to unescape path before comparing. Unfortunately
this function is used also for already unescaped paths. Therefore
unescaping can fail. This commit reverts changes which was done in
commit 50af53d and unescape just uris, which aren't unescaped yet.
https://bugzilla.g... |
static void perf_event_context_sched_in(struct perf_event_context *ctx,
struct task_struct *task)
{
struct perf_cpu_context *cpuctx;
cpuctx = __get_cpu_context(ctx);
if (cpuctx->task_ctx == ctx)
return;
perf_ctx_lock(cpuctx, ctx);
perf_pmu_disable(ctx->pmu);
/*
* We want to keep the following priority ... | 0 | [
"CWE-190"
] | linux | 1572e45a924f254d9570093abde46430c3172e3d | 97,407,746,783,421,940,000,000,000,000,000,000,000 | 25 | perf/core: Fix the perf_cpu_time_max_percent check
Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input
value from user-space.
If not, we can set a big value and some vars will overflow like
"sysctl_perf_event_sample_rate" which will cause a lot of unexpected
problems.
Signed-off-by: Tan Xiaojun ... |
const Type_handler *type_handler() const { return &type_handler_datetime2; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 186,945,105,592,473,300,000,000,000,000,000,000,000 | 1 | 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... |
static zend_string *php_gethostbyname(char *name)
{
struct hostent *hp;
struct in_addr in;
char *address;
hp = php_network_gethostbyname(name);
if (!hp || !*(hp->h_addr_list)) {
return zend_string_init(name, strlen(name), 0);
}
memcpy(&in.s_addr, *(hp->h_addr_list), sizeof(in.s_addr));
address = inet_ntoa... | 0 | [
"CWE-125"
] | php-src | 8d3dfabef459fe7815e8ea2fd68753fd17859d7b | 213,991,746,576,532,340,000,000,000,000,000,000,000 | 17 | Fix #77369 - memcpy with negative length via crafted DNS response |
layer_free (Layer *layer)
{
if (G_UNLIKELY (!layer))
return;
if (layer->kids) {
g_list_foreach (layer->kids, (GFunc)layer_free, nullptr);
g_list_free (layer->kids);
}
if (layer->label) {
g_free (layer->label);
}
g_slice_free (Layer, layer);
} | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 102,485,163,169,200,090,000,000,000,000,000,000,000 | 16 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
Http2RingHashIntegrationTest::~Http2RingHashIntegrationTest() {
if (codec_client_) {
codec_client_->close();
codec_client_ = nullptr;
}
for (auto& fake_upstream_connection : fake_upstream_connections_) {
AssertionResult result = fake_upstream_connection->close();
RELEASE_ASSERT(result, result.mess... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 139,215,263,804,058,950,000,000,000,000,000,000,000 | 12 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.