func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int StopInfoCompare(const void *x,const void *y)
{
StopInfo
*stop_1,
*stop_2;
stop_1=(StopInfo *) x;
stop_2=(StopInfo *) y;
if (stop_1->offset > stop_2->offset)
return(1);
if (fabs(stop_1->offset-stop_2->offset) <= MagickEpsilon)
return(0);
return(-1);
} | 0 | [
"CWE-399",
"CWE-119"
] | ImageMagick | 726812fa2fa7ce16bcf58f6e115f65427a1c0950 | 58,274,079,920,034,940,000,000,000,000,000,000,000 | 14 | Prevent buffer overflow in magick/draw.c |
static int enable_irq_window(struct kvm_vcpu *vcpu)
{
u32 cpu_based_vm_exec_control;
if (is_guest_mode(vcpu) && nested_exit_on_intr(vcpu))
/*
* We get here if vmx_interrupt_allowed() said we can't
* inject to L1 now because L2 must run. The caller will have
* to make L2 exit right after entry, so we can i... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 327,648,703,965,907,800,000,000,000,000,000,000,000 | 18 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
clean_thread_main(void *f_)
{
struct conntrack *ct = f_;
while (!latch_is_set(&ct->clean_thread_exit)) {
long long next_wake;
long long now = time_msec();
next_wake = conntrack_clean(ct, now);
if (next_wake < now) {
poll_timer_wait_until(now + CT_CLEAN_MIN_INTERVAL... | 0 | [
"CWE-400"
] | ovs | 35c280072c1c3ed58202745b7d27fbbd0736999b | 67,677,095,941,744,650,000,000,000,000,000,000,000 | 21 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static int mem_control_numa_stat_open(struct inode *unused, struct file *file)
{
struct cgroup *cont = file->f_dentry->d_parent->d_fsdata;
file->f_op = &mem_control_numa_stat_file_operations;
return single_open(file, mem_control_numa_stat_show, cont);
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 2,056,307,348,979,058,000,000,000,000,000,000,000 | 7 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
stack_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc)
{
stack_param_list *const splist = (stack_param_list *) plist;
ref_stack_t *pstack = splist->pstack;
/* This implementation is slow, but it probably doesn't matter. */
uint index = splist->skip + 1;
uint count = splist->coun... | 0 | [] | ghostpdl | bfa6b2ecbe48edc69a7d9d22a12419aed25960b8 | 30,233,150,473,240,503,000,000,000,000,000,000,000 | 21 | Bug 697548: use the correct param list enumerator
When we encountered dictionary in a ref_param_list, we were using the enumerator
for the "parent" param_list, rather than the enumerator for the param_list
we just created for the dictionary. That parent was usually the stack
list enumerator, and caused a segfault.
Us... |
static RList *symbols(RBinFile *arch) {
RList *shared = r_list_newf ((RListFree)r_list_free);
if (!shared) {
return NULL;
}
RList *cobjs = r_list_newf ((RListFree)free);
if (!cobjs) {
r_list_free (shared);
return NULL;
}
interned_table = r_list_newf ((RListFree)free);
if (!interned_table) {
r_list_free ... | 0 | [
"CWE-415"
] | radare2 | 049de62730f4954ef9a642f2eeebbca30a8eccdc | 35,824,244,027,544,485,000,000,000,000,000,000,000 | 38 | Fix #18679 - UAF when parsing corrupted pyc files ##bin |
e_ews_backend_ref_connection_sync (EEwsBackend *backend,
ESourceAuthenticationResult *result,
GCancellable *cancellable,
GError **error)
{
EEwsConnection *connection = NULL;
ESourceAuthenticationResult local_result;
CamelEwsSettings *settin... | 1 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 86,694,434,385,999,040,000,000,000,000,000,000,000 | 52 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static void iscsi_complete_task(struct iscsi_task *task, int state)
{
struct iscsi_conn *conn = task->conn;
ISCSI_DBG_SESSION(conn->session,
"complete task itt 0x%x state %d sc %p\n",
task->itt, task->state, task->sc);
if (task->state == ISCSI_TASK_COMPLETED ||
task->state == ISCSI_TASK_ABRT_TMF ||
... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 116,151,836,592,324,880,000,000,000,000,000,000,000 | 21 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
TEST_F(QuotedString_ExtractFrom_Tests, MissingClosingQuote) {
whenInputIs("\"hello world");
resultMustBe(0);
} | 0 | [
"CWE-415",
"CWE-119"
] | ArduinoJson | 5e7b9ec688d79e7b16ec7064e1d37e8481a31e72 | 338,977,053,201,637,680,000,000,000,000,000,000,000 | 5 | Fix buffer overflow (pull request #81) |
virtual AP4_Result GetSize(AP4_LargeSize& size) { size = m_Size; return AP4_SUCCESS; } | 0 | [
"CWE-703"
] | Bento4 | 33331ce2d35d45d855af7441db6116b4a9e2b70f | 212,059,869,211,217,070,000,000,000,000,000,000,000 | 1 | fix #691 |
static void set_ppflags(const vpx_codec_alg_priv_t *ctx, vp9_ppflags_t *flags) {
flags->post_proc_flag = ctx->postproc_cfg.post_proc_flag;
flags->deblocking_level = ctx->postproc_cfg.deblocking_level;
flags->noise_level = ctx->postproc_cfg.noise_level;
} | 0 | [
"CWE-125"
] | libvpx | 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 | 150,701,007,506,743,190,000,000,000,000,000,000,000 | 6 | vp9: fix OOB read in decoder_peek_si_internal
Profile 1 or 3 bitstreams may require 11 bytes for the header in the
intra-only case.
Additionally add a check on the bit reader's error handler callback to
ensure it's non-NULL before calling to avoid future regressions.
This has existed since at least (pre-1.4.0):
09bf... |
BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * outFile, int level)
{
gdIOCtx *out = gdNewFileCtx (outFile);
if (out == NULL) return;
gdImagePngCtxEx (im, out, level);
out->gd_free (out);
} | 0 | [
"CWE-415"
] | libgd | 56ce6ef068b954ad28379e83cca04feefc51320c | 118,892,376,115,002,570,000,000,000,000,000,000,000 | 7 | Fix #381: libgd double-free vulnerability
The issue is that `gdImagePngCtxEx` (which is called by `gdImagePngPtr`
and the other PNG output functions to do the real work) does not return
whether it succeeded or failed, so this is not checked in
`gdImagePngPtr` and the function wrongly assumes everything is okay,
which ... |
inline void init (hb_face_t *face,
hb_tag_t _hea_tag, hb_tag_t _mtx_tag,
unsigned int default_advance_)
{
this->default_advance = default_advance_;
this->num_metrics = face->get_num_glyphs ();
hb_blob_t *_hea_blob = OT::Sanitizer<OT::_hea>::sanitize (face->reference_table (_hea_tag));
c... | 1 | [
"CWE-703"
] | harfbuzz | 63ef0b41dc48d6112d1918c1b1de9de8ea90adb5 | 174,728,750,005,777,700,000,000,000,000,000,000,000 | 22 | [ot-font] Fix hmtx wrong table length check
Discovered by libFuzzer. Ouch!
https://github.com/behdad/harfbuzz/issues/139#issuecomment-148289957 |
spell_print_tree(wordnode_T *root)
{
if (root != NULL)
{
/* Clear the "wn_u1.index" fields, used to remember what has been
* done. */
spell_clear_flags(root);
/* Recursively print the tree. */
spell_print_node(root, 0);
}
} | 0 | [
"CWE-190"
] | vim | 399c297aa93afe2c0a39e2a1b3f972aebba44c9d | 162,371,889,887,406,350,000,000,000,000,000,000,000 | 12 | patch 8.0.0322: possible overflow with corrupted spell file
Problem: Possible overflow with spell file where the tree length is
corrupted.
Solution: Check for an invalid length (suggested by shqking) |
nfssvc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p,
struct nfsd_symlinkargs *args)
{
if ( !(p = decode_fh(p, &args->ffh))
|| !(p = decode_filename(p, &args->fname, &args->flen))
|| !(p = decode_pathname(p, &args->tname, &args->tlen)))
return 0;
p = decode_sattr(p, &args->attrs);
return x... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | 168,042,913,888,219,720,000,000,000,000,000,000,000 | 11 | nfsd: stricter decoding of write-like NFSv2/v3 ops
The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer. This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could b... |
bool isCPUDevice() {
return false;
} | 0 | [
"CWE-369"
] | tensorflow | 4aacb30888638da75023e6601149415b39763d76 | 303,803,319,561,294,100,000,000,000,000,000,000,000 | 3 | Disallow division by zero FPE in `tf.raw_ops.ResourceScatterDiv`
Had to update a test that was broken.
PiperOrigin-RevId: 388516976
Change-Id: Ic358e6bf0559e011539974d453fc7aa18b427e9c |
void __ext4_error(struct super_block *sb, const char *function,
const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
printk(KERN_CRIT "EXT4-fs error (device %s): %s: ", sb->s_id, function);
vprintk(fmt, args);
printk("\n");
va_end(args);
ext4_handle_error(sb);
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 76,501,788,208,925,120,000,000,000,000,000,000,000 | 13 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
int my_redel(const char *org_name, const char *tmp_name,
time_t backup_time_stamp, myf MyFlags)
{
int error=1;
DBUG_ENTER("my_redel");
DBUG_PRINT("my",("org_name: '%s' tmp_name: '%s' MyFlags: %d",
org_name,tmp_name,MyFlags));
if (my_copystat(org_name,tmp_name,MyFlags) < 0)
goto end;
if... | 1 | [
"CWE-362"
] | server | 347eeefbfc658c8531878218487d729f4e020805 | 326,573,829,792,658,600,000,000,000,000,000,000,000 | 26 | don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE |
void server_disconnect(SERVER_REC *server)
{
int chans;
g_return_if_fail(IS_SERVER(server));
if (server->disconnected)
return;
if (server->connect_tag != -1) {
/* still connecting to server.. */
if (server->connect_pid != -1)
net_disconnect_nonblock(server->connect_pid);
server_connect_failed(server, ... | 0 | [
"CWE-20"
] | irssi-proxy | 85bbc05b21678e80423815d2ef1dfe26208491ab | 154,225,743,854,073,540,000,000,000,000,000,000,000 | 45 | Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
static int samldb_generate_next_linkid(struct samldb_ctx *ac,
struct dsdb_schema *schema,
int32_t *next_linkID)
{
int ret;
struct ldb_context *ldb;
struct ldb_dn *schema_dn;
bool linkID_used = true;
/*
* Windows starts at about 0xB0000000 in order to stop potential
* collisions with futu... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 260,787,345,756,947,360,000,000,000,000,000,000,000 | 31 | 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... |
prctl_caps (uint32_t *caps, bool do_cap_bounding, bool do_set_ambient)
{
unsigned long cap;
/* We ignore both EINVAL and EPERM, as we are actually relying
* on PR_SET_NO_NEW_PRIVS to ensure the right capabilities are
* available. EPERM in particular can happen with old, buggy
* kernels. See:
* https... | 0 | [
"CWE-20",
"CWE-269"
] | bubblewrap | efc89e3b939b4bde42c10f065f6b7b02958ed50e | 266,553,456,176,982,400,000,000,000,000,000,000,000 | 46 | Don't create our own temporary mount point for pivot_root
An attacker could pre-create /tmp/.bubblewrap-$UID and make it a
non-directory, non-symlink (in which case mounting our tmpfs would fail,
causing denial of service), or make it a symlink under their control
(potentially allowing bad things if the protected_syml... |
Field *Item_ref::create_tmp_field_ex(TABLE *table,
Tmp_field_src *src,
const Tmp_field_param *param)
{
Item *item= real_item();
DBUG_ASSERT(is_result_field());
if (item->type() == Item::FIELD_ITEM)
{
Field *result;
Item_field *fie... | 0 | [] | server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | 173,341,956,165,894,050,000,000,000,000,000,000,000 | 21 | MDEV-28094 Window function in expression in ORDER BY
call item->split_sum_func() in setup_order() just as
it's done in setup_fields() |
cifs_direct_io(int rw, struct kiocb *iocb, const struct iovec *iov,
loff_t pos, unsigned long nr_segs)
{
/*
* FIXME
* Eventually need to support direct IO for non forcedirectio mounts
*/
return -EINVAL;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | 292,944,093,881,563,500,000,000,000,000,000,000,000 | 9 | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... |
int cil_gen_catset(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_LIST,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
char *key = NULL;
struct cil_catset *catset = NULL;
int rc... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 286,163,452,408,271,500,000,000,000,000,000,000,000 | 44 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
int capture_ask_packet( int *caplen, int just_grab )
{
time_t tr;
struct timeval tv;
struct tm *lt;
fd_set rfds;
long nb_pkt_read;
int i, j, n, mi_b=0, mi_s=0, mi_d=0, mi_t=0, mi_r=0, is_wds=0, key_index_offset;
int ret, z;
FILE *f_cap_out;
struct pcap_file_header pfh_out;
stru... | 0 | [
"CWE-787"
] | aircrack-ng | 091b153f294b9b695b0b2831e65936438b550d7b | 235,112,585,800,444,800,000,000,000,000,000,000,000 | 333 | Aireplay-ng: Fixed tcp_test stack overflow (Closes #14 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2417 28c6078b-6c39-48e3-add9-af49d547ecab |
TIFFReadRawTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size)
{
static const char module[] = "TIFFReadRawTile";
TIFFDirectory *td = &tif->tif_dir;
uint64 bytecount64;
tmsize_t bytecountm;
if (!TIFFCheckRead(tif, 1))
return ((tmsize_t)(-1));
if (tile >= td->td_nstrips) {
TIFFErrorExt(tif->tif_clientdata, ... | 0 | [
"CWE-189"
] | libtiff | 0ba5d8814a17a64bdb8d9035f4c533f3f3f4b496 | 93,833,003,399,035,430,000,000,000,000,000,000,000 | 32 | * libtiff/tif_read.c: Fix out-of-bounds read on
memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1()
when stripoffset is beyond tmsize_t max value (reported by
Mathias Svensson) |
void set_pose_roll(float pose_roll) { pose_roll_ = pose_roll; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 14,950,951,487,574,461,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
int evm_inode_setxattr(struct dentry *dentry, const char *xattr_name,
const void *xattr_value, size_t xattr_value_len)
{
const struct evm_ima_xattr_data *xattr_data = xattr_value;
if (strcmp(xattr_name, XATTR_NAME_EVM) == 0) {
if (!xattr_value_len)
return -EINVAL;
if (xattr_data->type != EVM_IMA_XATT... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 613317bd212c585c20796c10afe5daaa95d4b0a1 | 143,130,358,356,582,960,000,000,000,000,000,000,000 | 14 | EVM: Use crypto_memneq() for digest comparisons
This patch fixes vulnerability CVE-2016-2085. The problem exists
because the vm_verify_hmac() function includes a use of memcmp().
Unfortunately, this allows timing side channel attacks; specifically
a MAC forgery complexity drop from 2^128 to 2^12. This patch changes
... |
TEST_P(Http2FloodMitigationTest, ZerolenHeaderAllowed) {
config_helper_.addConfigModifier(
[](envoy::config::filter::network::http_connection_manager::v2::HttpConnectionManager& hcm)
-> void {
hcm.mutable_http2_protocol_options()->set_stream_error_on_invalid_http_messaging(true);
});
a... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 99,210,207,001,454,960,000,000,000,000,000,000,000 | 32 | 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 test_iterators()
{
int i;
json_t *object, *foo, *bar, *baz;
const char *iter_keys[3];
int have_key[3] = { 0, 0, 0 };
json_t *iter_values[3];
void *iter;
if(json_object_iter(NULL))
fail("able to iterate over NULL");
if(json_object_iter_next(NULL, NULL))
fail(... | 0 | [
"CWE-310"
] | jansson | 8f80c2d83808150724d31793e6ade92749b1faa4 | 63,196,625,495,560,750,000,000,000,000,000,000,000 | 104 | CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing. |
GF_AV1Config *gf_isom_av1_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex)
{
GF_TrackBox *trak;
GF_MPEGVisualSampleEntryBox *entry;
if (gf_isom_get_reference_count(the_file, trackNumber, GF_ISOM_REF_TBAS)) {
u32 ref_track;
GF_Err e = gf_isom_get_reference(the_file, trackNumber, GF_ISOM_REF... | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 268,050,769,669,527,150,000,000,000,000,000,000,000 | 17 | fixed #1785 (fuzz) |
static int hclge_pfc_setup_hw(struct hclge_dev *hdev)
{
u8 enable_bitmap = 0;
if (hdev->tm_info.fc_mode == HCLGE_FC_PFC)
enable_bitmap = HCLGE_TX_MAC_PAUSE_EN_MSK |
HCLGE_RX_MAC_PAUSE_EN_MSK;
return hclge_pfc_pause_en_cfg(hdev, enable_bitmap,
hdev->tm_info.pfc_en);
} | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 121,949,001,166,131,130,000,000,000,000,000,000,000 | 11 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
static void io_req_task_cancel(struct callback_head *cb)
{
struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work);
struct io_ring_ctx *ctx = req->ctx;
/* ctx is guaranteed to stay alive while we hold uring_lock */
mutex_lock(&ctx->uring_lock);
io_req_complete_failed(req, req->result);
mutex_unlock(&... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 26,181,920,084,127,260,000,000,000,000,000,000,000 | 10 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
void st_select_lex_node::add_slave(st_select_lex_node *slave_arg)
{
for (; slave; slave= slave->next)
if (slave == slave_arg)
return;
if (slave)
{
st_select_lex_node *slave_arg_slave= slave_arg->slave;
/* Insert in the front of list of slaves if any. */
slave_arg->include_neighbour(slave);
... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 125,971,966,849,526,400,000,000,000,000,000,000,000 | 24 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
listener_add_ck_ref_entry (GSListener *listener,
int entry_type,
DBusConnection *connection,
DBusMessage *message,
guint32 *cookiep)
{
GSListenerRefEntry *entry;
entry =... | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 138,922,465,154,573,650,000,000,000,000,000,000,000 | 23 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
{
int idx;
int s_idx = cb->family;
if (s_idx == 0)
s_idx = 1;
for (idx = 1; idx <= RTNL_FAMILY_MAX; idx++) {
int type = cb->nlh->nlmsg_type-RTM_BASE;
if (idx < s_idx || idx == PF_PACKET)
continue;
if (rtnl_msg_handlers[idx] == NU... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 284,585,009,169,463,500,000,000,000,000,000,000,000 | 26 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static void register_profile(void *data, void *user_data)
{
struct gatt_app *app = user_data;
GDBusProxy *proxy = data;
const char *iface = g_dbus_proxy_get_interface(proxy);
const char *path = g_dbus_proxy_get_path(proxy);
if (app->failed)
return;
if (g_strcmp0(iface, GATT_PROFILE_IFACE) == 0) {
struct ext... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 317,059,310,022,537,570,000,000,000,000,000,000,000 | 20 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
uint32 CSoundFile::GetFreqFromPeriod(uint32 period, uint32 c5speed, int32 nPeriodFrac) const
{
if (!period) return 0;
if (GetType() == MOD_TYPE_XM)
{
if(m_playBehaviour[kFT2Periods])
{
// FT2 compatibility: Period is a 16-bit value in FT2, and it overflows happily.
// Test case: FreqWraparound.xm
period... | 0 | [
"CWE-125"
] | openmpt | 7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c | 301,092,623,175,717,760,000,000,000,000,000,000,000 | 67 | [Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz.
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27 |
bgp_show_summary_vty (struct vty *vty, const char *name,
afi_t afi, safi_t safi)
{
struct bgp *bgp;
if (name)
{
bgp = bgp_lookup_by_name (name);
if (! bgp)
{
vty_out (vty, "%% No such BGP instance exist%s", VTY_NEWLINE);
return CMD_WARNING;
}
bgp_show_s... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 101,821,782,609,942,210,000,000,000,000,000,000,000 | 26 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static ssize_t duplex_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct net_device *netdev = to_net_dev(dev);
int ret = -EINVAL;
if (!rtnl_trylock())
return restart_syscall();
if (netif_running(netdev)) {
struct ethtool_link_ksettings cmd;
if (!__ethtool_get_link_ksettings(... | 0 | [
"CWE-401"
] | linux | 895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab | 238,364,677,871,016,000,000,000,000,000,000,000,000 | 32 | net-sysfs: Fix mem leak in netdev_register_kobject
syzkaller report this:
BUG: memory leak
unreferenced object 0xffff88837a71a500 (size 256):
comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ... |
static void ath6kl_usb_stop(struct ath6kl *ar)
{
hif_stop(ar);
} | 0 | [
"CWE-476"
] | linux | 39d170b3cb62ba98567f5c4f40c27b5864b304e5 | 121,214,243,734,264,690,000,000,000,000,000,000,000 | 4 | ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe()
The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects
are initialized to point to the containing `ath6kl_usb` object
according to endpoint descriptors read from the device side, as shown
below in `ath6kl_usb_setup_pipe_resources`:
for (i = 0; i <... |
alternatingHttpStyle(FILE *out, char *id)
{
fprintf(out,
"<style type=\"text/css\">\n"
"#%s tbody tr.even td { background-color: #eee; }\n"
"#%s tbody tr.odd td { background-color: #fff; }\n"
"</style>\n", id, id);
} | 0 | [
"CWE-617"
] | polipo | 0e2b44af619e46e365971ea52b97457bc0778cd3 | 313,384,247,832,249,640,000,000,000,000,000,000,000 | 8 | Try to read POST requests to local configuration interface correctly. |
static void smi_add_watch(struct ipmi_smi *intf, unsigned int flags)
{
unsigned long iflags;
if (!intf->handlers->set_need_watch)
return;
spin_lock_irqsave(&intf->watch_lock, iflags);
if (flags & IPMI_WATCH_MASK_CHECK_MESSAGES)
intf->response_waiters++;
if (flags & IPMI_WATCH_MASK_CHECK_WATCHDOG)
intf->wa... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab | 188,564,820,940,173,150,000,000,000,000,000,000,000 | 24 | ipmi: Fix memory leak in __ipmi_bmc_register
In the impelementation of __ipmi_bmc_register() the allocated memory for
bmc should be released in case ida_simple_get() fails.
Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Message-Id... |
CustomizableInitialize(void)
{
#ifdef WIN32
snprintf(WALFilePath, MAXPGPATH, "%s\\%s", archiveLocation, nextWALFileName);
switch (restoreCommandType)
{
case RESTORE_COMMAND_LINK:
SET_RESTORE_COMMAND("mklink", WALFilePath, xlogFilePath);
break;
case RESTORE_COMMAND_COPY:
default:
SET_RESTORE_COMMAND("c... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 160,661,187,211,768,370,000,000,000,000,000,000,000 | 42 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
brcmf_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
enum nl80211_iftype type,
struct vif_params *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_cfg80211_vif *vif = ifp->vif;
s32 infra = 0;
s32 ap = 0;
s32 err = ... | 0 | [
"CWE-787"
] | linux | 1b5e2423164b3670e8bc9174e4762d297990deff | 304,089,232,971,918,000,000,000,000,000,000,000,000 | 97 | brcmfmac: assure SSID length from firmware is limited
The SSID length as received from firmware should not exceed
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by:... |
static bool FNAME(is_bad_mt_xwr)(struct rsvd_bits_validate *rsvd_check, u64 gpte)
{
#if PTTYPE != PTTYPE_EPT
return false;
#else
return __is_bad_mt_xwr(rsvd_check, gpte);
#endif
} | 0 | [] | linux | b1bd5cba3306691c771d558e94baa73e8b0b96b7 | 24,112,614,785,674,400,000,000,000,000,000,000,000 | 8 | KVM: X86: MMU: Use the correct inherited permissions to get shadow page
When computing the access permissions of a shadow page, use the effective
permissions of the walk up to that point, i.e. the logic AND of its parents'
permissions. Two guest PxE entries that point at the same table gfn need to
be shadowed with di... |
IntFormatSpec(T val, const SpecT &spec = SpecT())
: SpecT(spec), value_(val) {} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 173,114,207,844,247,600,000,000,000,000,000,000,000 | 2 | Fix segfault on complex pointer formatting (#642) |
static void ext4_da_page_release_reservation(struct page *page,
unsigned long offset)
{
int to_release = 0;
struct buffer_head *head, *bh;
unsigned int curr_off = 0;
head = page_buffers(page);
bh = head;
do {
unsigned int next_off = curr_off + bh->b_size;
if ((offset <= curr_off) && (buffer_delay(... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 330,448,281,641,228,670,000,000,000,000,000,000,000 | 20 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
static inline void *crypto_shash_ctx_aligned(struct crypto_shash *tfm)
{
return crypto_tfm_ctx_aligned(&tfm->base);
} | 0 | [
"CWE-835"
] | linux | ef0579b64e93188710d48667cb5e014926af9f1b | 83,167,115,684,358,530,000,000,000,000,000,000,000 | 4 | crypto: ahash - Fix EINPROGRESS notification callback
The ahash API modifies the request's callback function in order
to clean up after itself in some corner cases (unaligned final
and missing finup).
When the request is complete ahash will restore the original
callback and everything is fine. However, when the requ... |
void intel_engine_dump(struct intel_engine_cs *engine,
struct drm_printer *m,
const char *header, ...)
{
struct i915_gpu_error * const error = &engine->i915->gpu_error;
struct i915_request *rq;
intel_wakeref_t wakeref;
unsigned long flags;
ktime_t dummy;
if (header) {
va_list ap;
va_start(... | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 308,886,730,257,346,300,000,000,000,000,000,000,000 | 98 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
soup_ntlm_parse_challenge (const char *challenge,
char **nonce,
char **default_domain,
gboolean *ntlmv2_session,
gboolean *negotiate_target,
char **target_info,
size_t *target_info_sz)
{
gsize clen;
NTLMString domain;
NTLMString target;
guchar *chall;
guint32 flag... | 0 | [
"CWE-125"
] | libsoup | f8a54ac85eec2008c85393f331cdd251af8266ad | 133,536,250,968,026,430,000,000,000,000,000,000,000 | 69 | NTLM: Avoid a potential heap buffer overflow in v2 authentication
Check the length of the decoded v2 challenge before attempting to
parse it, to avoid reading past it.
Fixes #173 |
static int ext4_da_map_blocks(struct inode *inode, sector_t iblock,
struct ext4_map_blocks *map,
struct buffer_head *bh)
{
struct extent_status es;
int retval;
sector_t invalid_block = ~((sector_t) 0xffff);
#ifdef ES_AGGRESSIVE_TEST
struct ext4_map_blocks orig_map;
memcpy(&orig_map, map, sizeof(... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 81,953,828,443,917,860,000,000,000,000,000,000,000 | 127 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static bool ParseJSONProperty(std::map<std::string, double> *ret,
std::string *err, const json &o,
const std::string &property, bool required) {
json_const_iterator it;
if (!FindMember(o, property.c_str(), it)) {
if (required) {
if (err) {
... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 90,104,274,071,432,460,000,000,000,000,000,000,000 | 36 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
xmlSchemaGetPropNodeNs(xmlNodePtr node, const char *uri, const char *name)
{
xmlAttrPtr prop;
if ((node == NULL) || (name == NULL))
return(NULL);
prop = node->properties;
while (prop != NULL) {
if ((prop->ns != NULL) &&
xmlStrEqual(prop->name, BAD_CAST name) &&
xmlStrEqual(prop->ns->href, B... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 313,796,725,019,713,230,000,000,000,000,000,000,000 | 16 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
struct ipt_entry *ipt_next_entry(const struct ipt_entry *entry)
{
return (void *)entry + entry->next_offset;
} | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 22,299,654,024,707,110,000,000,000,000,000,000,000 | 4 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
static int rtw_wx_get_nick(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
if (extra) {
wrqu->data.length = 14;
wrqu->data.flags = 1;
memcpy(extra, "<WIFI@REALTEK>", 14);
}
/* dump debug info here */
return 0;
} | 0 | [
"CWE-787"
] | linux | 74b6b20df8cfe90ada777d621b54c32e69e27cd7 | 236,306,625,294,251,170,000,000,000,000,000,000,000 | 13 | staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.
Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@o... |
static double mp_matrix_svd(_cimg_math_parser& mp) {
double *ptrd = &_mp_arg(1) + 1;
const double *ptr1 = &_mp_arg(2) + 1;
const unsigned int
k = (unsigned int)mp.opcode[3],
l = (unsigned int)mp.opcode[4];
CImg<doubleT> U, S, V;
CImg<doubleT>(ptr1,k,l,1... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 134,012,431,365,047,760,000,000,000,000,000,000,000 | 13 | . |
static void set_disk_ro_uevent(struct gendisk *gd, int ro)
{
char event[] = "DISK_RO=1";
char *envp[] = { event, NULL };
if (!ro)
event[8] = '0';
kobject_uevent_env(&disk_to_dev(gd)->kobj, KOBJ_CHANGE, envp);
} | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 103,487,915,211,413,280,000,000,000,000,000,000,000 | 9 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
void init_tree_desc(struct tree_desc *desc, const void *buffer, unsigned long size)
{
struct strbuf err = STRBUF_INIT;
if (init_tree_desc_internal(desc, buffer, size, &err))
die("%s", err.buf);
strbuf_release(&err);
} | 0 | [
"CWE-20"
] | git | e1d911dd4c7b76a5a8cec0f5c8de15981e34da83 | 132,077,518,225,778,260,000,000,000,000,000,000,000 | 7 | mingw: disallow backslash characters in tree objects' file names
The backslash character is not a valid part of a file name on Windows.
Hence it is dangerous to allow writing files that were unpacked from
tree objects, when the stored file name contains a backslash character:
it will be misinterpreted as directory sep... |
utf32le_get_case_fold_codes_by_str(OnigCaseFoldType flag,
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
{
return onigenc_unicode_get_case_fold_codes_by_str(ONIG_ENCODING_UTF32_LE,
flag, p, end, items);
} | 0 | [
"CWE-125"
] | php-src | 9d6c59eeea88a3e9d7039cb4fed5126ef704593a | 63,123,871,209,275,830,000,000,000,000,000,000,000 | 6 | Fix bug #77418 - Heap overflow in utf32be_mbc_to_code |
ldns_rr_list_push_rr(ldns_rr_list *rr_list, const ldns_rr *rr)
{
size_t rr_count;
size_t cap;
rr_count = ldns_rr_list_rr_count(rr_list);
cap = rr_list->_rr_capacity;
/* grow the array */
if(rr_count+1 > cap) {
ldns_rr **rrs;
if(cap == 0)
cap = LDNS_RRLIST_INIT; /* initial list size */
else cap *= 2;
... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 221,149,662,022,464,940,000,000,000,000,000,000,000 | 29 | CAA and URI |
static bool skb_still_in_host_queue(const struct sock *sk,
const struct sk_buff *skb)
{
if (unlikely(skb_fclone_busy(sk, skb))) {
NET_INC_STATS(sock_net(sk),
LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES);
return true;
}
return false;
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 303,795,544,253,919,730,000,000,000,000,000,000,000 | 10 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
void ssl_set_cbc_record_splitting( ssl_context *ssl, char split )
{
ssl->split_done = split;
} | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 260,618,495,835,530,650,000,000,000,000,000,000,000 | 4 | Added max length checking of hostname |
void ConnectionManagerImpl::RdsRouteConfigUpdateRequester::requestRouteConfigUpdate(
const std::string host_header, Event::Dispatcher& thread_local_dispatcher,
Http::RouteConfigUpdatedCallbackSharedPtr route_config_updated_cb) {
route_config_provider_->requestVirtualHostsUpdate(host_header, thread_local_dispa... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 140,686,670,682,882,220,000,000,000,000,000,000,000 | 6 | 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... |
bool log_error(const std::string& error) {
assert(false);
return false;
} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 195,313,630,089,522,200,000,000,000,000,000,000,000 | 4 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
rdp_process_bitmap_caps(STREAM s)
{
uint16 depth;
logger(Protocol, Debug, "%s()", __func__);
in_uint16_le(s, depth);
in_uint8s(s, 6);
in_uint16_le(s, g_session_width);
in_uint16_le(s, g_session_height);
logger(Protocol, Debug,
"rdp_process_bitmap_caps(), setting desktop size and depth to: %dx%dx%d",... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 32,419,351,390,047,136,000,000,000,000,000,000,000 | 55 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
is_first_match(compl_T *match)
{
return match == compl_first_match;
} | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 93,518,254,914,851,060,000,000,000,000,000,000,000 | 4 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t... | 0 | [
"CWE-125"
] | jasper | 839b1bcf0450ff036c28e8db40a7abf886e02891 | 237,437,868,456,989,300,000,000,000,000,000,000,000 | 358 | jp2_dec: fix `numchans` mixup
When iterating over `dec->cdef->data.cdef.ents`, we need to use its
`numchans` variable, not the one in `jp2_dec_t`.
Fixes CVE-2018-19543
Fixes CVE-2017-9782
Closes https://github.com/jasper-maint/jasper/issues/13
Closes https://github.com/jasper-maint/jasper/issues/18
Closes https://gi... |
_zip_read2(unsigned char **a)
{
unsigned short ret;
ret = (*a)[0]+((*a)[1]<<8);
*a += 2;
return ret;
} | 0 | [
"CWE-189"
] | php-src | ef8fc4b53d92fbfcd8ef1abbd6f2f5fe2c4a11e5 | 242,675,205,764,342,360,000,000,000,000,000,000,000 | 9 | Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary |
void
mono_reflection_free_dynamic_generic_class (MonoGenericClass *gclass)
{
MonoDynamicGenericClass *dgclass;
int i;
g_assert (gclass->is_dynamic);
dgclass = (MonoDynamicGenericClass *)gclass;
for (i = 0; i < dgclass->count_fields; ++i) {
MonoClassField *field = dgclass->fields + i;
mono_metadata_free_type... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 89d1455a80ef13cddee5d79ec00c06055da3085c | 153,628,998,648,867,960,000,000,000,000,000,000,000 | 15 | Don't use finalization to cleanup dynamic methods.
* reflection.c: Use a reference queue to cleanup
dynamic methods instead of finalization.
* runtime.c: Shutdown the dynamic method queue
before runtime cleanup begins.
* DynamicMethod.cs: No longer finalizable.
* icall-def.h: Remove unused dynamic method ical... |
static void test_simple_update()
{
MYSQL_STMT *stmt;
int rc;
char szData[25];
int nData= 1;
MYSQL_RES *result;
MYSQL_BIND my_bind[2];
ulong length[2];
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_simple_update");
rc= mysql_autocommit(mysql, TRUE);
myquery(rc);
r... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 260,542,343,679,987,740,000,000,000,000,000,000,000 | 76 | 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... |
long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
unsigned long bitmap_size)
{
unsigned long nr_compat_longs;
/* align bitmap up to nearest compat_long_t boundary */
bitmap_size = ALIGN(bitmap_size, BITS_PER_COMPAT_LONG);
nr_compat_longs = BITS_TO_COMPAT_LONGS(bitmap_size);
if (!... | 1 | [
"CWE-20"
] | linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | 181,524,018,081,008,800,000,000,000,000,000,000,000 | 27 | make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being i... |
void perf_event_update_userpage(struct perf_event *event)
{
struct perf_event_mmap_page *userpg;
struct ring_buffer *rb;
u64 enabled, running, now;
rcu_read_lock();
rb = rcu_dereference(event->rb);
if (!rb)
goto unlock;
/*
* compute total_time_enabled, total_time_running
* based on snapshot values taken ... | 0 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 332,447,033,193,697,600,000,000,000,000,000,000,000 | 49 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
PlayerBase* PlayerGeneric::getPreferredPlayer(XModule* module) const
{
switch (getPreferredPlayerType(module))
{
#ifndef MILKYTRACKER
case PlayerBase::PlayerType_FAR:
return new PlayerFAR(frequency);
case PlayerBase::PlayerType_IT:
return new PlayerIT(frequency);
#endif
case PlayerBase::PlayerType_Generic... | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 211,931,163,267,574,800,000,000,000,000,000,000,000 | 17 | Fix use-after-free in PlayerGeneric destructor |
static void bin_elf_versioninfo(RCore *r, int mode) {
const char *format = "bin/cur/info/versioninfo/%s%d";
int num_versym;
int num_verneed = 0;
int num_version = 0;
Sdb *sdb = NULL;
const char *oValue = NULL;
bool firstit_for_versym = true;
if (IS_MODE_JSON (mode)) {
r_cons_printf ("{\"versym\":[");
}
for ... | 0 | [
"CWE-78"
] | radare2 | 5411543a310a470b1257fb93273cdd6e8dfcb3af | 182,681,567,843,321,760,000,000,000,000,000,000,000 | 160 | More fixes for the CVE-2019-14745 |
static inline bool pt_output_base_valid(struct kvm_vcpu *vcpu, u64 base)
{
/* The base must be 128-byte aligned and a legal physical address. */
return kvm_vcpu_is_legal_aligned_gpa(vcpu, base, 128);
} | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 30,469,001,983,105,860,000,000,000,000,000,000,000 | 5 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
f_term_getattr(typval_T *argvars, typval_T *rettv)
{
int attr;
size_t i;
char_u *name;
static struct {
char *name;
int attr;
} attrs[] = {
{"bold", HL_BOLD},
{"italic", HL_ITALIC},
{"underline", HL_UNDERLINE},
{"strike", HL_STRIKETHROUGH},
{"reverse", HL_INVERSE},
... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 186,633,284,292,396,170,000,000,000,000,000,000,000 | 29 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
QPDF::removePage(QPDFObjectHandle page)
{
int pos = findPage(page); // also ensures flat /Pages
QTC::TC("qpdf", "QPDF remove page",
(pos == 0) ? 0 : // remove at beginning
(pos == static_cast<int>(
this->m->all_pages.size() - 1)) ? 1 : // end
... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 306,424,035,139,355,300,000,000,000,000,000,000,000 | 24 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, u32 param_len)
{
int ret = 0;
u32 wep_key_idx, wep_key_len, wep_total_len;
struct ndis_802_11_wep *pwep = NULL;
struct adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *... | 0 | [
"CWE-787"
] | linux | 74b6b20df8cfe90ada777d621b54c32e69e27cd7 | 184,561,122,299,749,750,000,000,000,000,000,000,000 | 145 | staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.
Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@o... |
RList *r_bin_wasm_get_sections(RBinWasmObj *bin) {
RList *ret = NULL;
RBinWasmSection *ptr = NULL;
if (!bin) {
return NULL;
}
if (bin->g_sections) {
return bin->g_sections;
}
if (!(ret = r_list_newf ((RListFree)wasm_sec_free))) {
return NULL;
}
RBuffer *b = bin->buf;
ut64 bound = r_buf_size (b) - 1;
r... | 0 | [
"CWE-787"
] | radare2 | b4ca66f5d4363d68a6379e5706353b3bde5104a4 | 89,363,939,375,775,120,000,000,000,000,000,000,000 | 125 | Fix #20336 - wasm bin parser ##crash |
CtPtr ProtocolV2::reuse_connection(const AsyncConnectionRef& existing,
ProtocolV2 *exproto) {
ldout(cct, 20) << __func__ << " existing=" << existing
<< " reconnect=" << reconnecting << dendl;
connection->inject_delay();
std::lock_guard<std::mutex> l(existing->... | 0 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 61,215,511,912,421,030,000,000,000,000,000,000,000 | 138 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
template<typename tp, typename tc>
CImg<T>& object3dtoCImg3d(const CImgList<tp>& primitives,
const CImgList<tc>& colors,
const bool full_check=true) {
return get_object3dtoCImg3d(primitives,colors,full_check).move_to(*this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 163,724,385,752,489,620,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
static unsigned int matches(const gnutls_datum_t *raw1, const gnutls_datum_t *raw2,
dane_match_type_t match)
{
uint8_t digest[64];
int ret;
if (match == DANE_MATCH_EXACT) {
if (raw1->size != raw2->size)
return gnutls_assert_val(0);
if (memcmp(raw1->data, raw2->data, raw1->size) != 0)
return gnutls_a... | 0 | [
"CWE-119"
] | gnutls | ed51e5e53cfbab3103d6b7b85b7ba4515e4f30c3 | 193,900,414,770,950,840,000,000,000,000,000,000,000 | 43 | Adding dane_raw_tlsa to allow initialization of dane_query_t from DANE records based on external DNS resolutions. Also fixing a buffer overflow.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org> |
CtPtr ProtocolV1::handle_message_footer(char *buffer, int r) {
ldout(cct, 20) << __func__ << " r=" << r << dendl;
if (r < 0) {
ldout(cct, 1) << __func__ << " read footer data error " << dendl;
return _fault();
}
ceph_msg_footer footer;
ceph_msg_footer_old old_footer;
if (connection->has_feature(C... | 0 | [
"CWE-294"
] | ceph | 4c11203122d729c832a645c9e3f5092db4963840 | 41,294,488,462,562,873,000,000,000,000,000,000,000 | 164 | msg/async/ProtocolV1: resurrect "implement cephx_*require_version options"
This was added in commit 9bcbc2a3621f ("mon,msg: implement
cephx_*_require_version options") and inadvertently dropped in
commit e6f043f7d2dc ("msgr/async: huge refactoring of protocol V1").
As a result, service daemons don't enforce cephx_requ... |
static void inotify_freeing_mark(struct fsnotify_mark *fsn_mark, struct fsnotify_group *group)
{
inotify_ignored_and_remove_idr(fsn_mark, group);
} | 0 | [
"CWE-399"
] | linux | d0de4dc584ec6aa3b26fffea320a8457827768fc | 239,113,779,193,822,900,000,000,000,000,000,000,000 | 4 | inotify: fix double free/corruption of stuct user
On an error path in inotify_init1 a normal user can trigger a double
free of struct user. This is a regression introduced by a2ae4cc9a16e
("inotify: stop kernel memory leak on file creation failure").
We fix this by making sure that if a group exists the user referen... |
gst_matroska_demux_send_tags (GstMatroskaDemux * demux)
{
gint i;
if (G_UNLIKELY (demux->common.global_tags_changed)) {
GstEvent *tag_event;
gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE,
GST_TAG_CONTAINER_FORMAT, "Matroska", NULL);
GST_DEBUG_OBJECT (demux, "Sending global_... | 0 | [] | gst-plugins-good | 9181191511f9c0be6a89c98b311f49d66bd46dc3 | 295,820,799,734,670,020,000,000,000,000,000,000,000 | 41 | matroskademux: Fix extraction of multichannel WavPack
The old code had a couple of issues that all lead to potential memory
safety bugs.
- Use a constant for the Wavpack4Header size instead of using sizeof.
It's written out into the data and not from the struct and who knows
what special alignment/padding r... |
zzip_mem_disk_fdopen(int fd)
{
ZZIP_DISK *disk = zzip_disk_mmap(fd);
if (! disk)
{
debug2("can not open disk fd %i", fd);
return 0;
}
___ ZZIP_MEM_DISK *dir = zzip_mem_disk_new();
if (zzip_mem_disk_load(dir, disk) == -1)
{
debug2("unable to load disk fd %s", fd);
}
... | 0 | [] | zziplib | 72ec933663f738d8e166979aa7fd5590b2104a07 | 30,800,544,834,374,590,000,000,000,000,000,000,000 | 16 | need to check on endbuf for stored files #15 |
read_module(const char *name)
{
return netsnmp_read_module(name);
} | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 234,316,642,002,113,060,000,000,000,000,000,000,000 | 4 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
void Tags::Tag::ShallowCopy(Tag& rhs) const {
rhs.m_simple_tags = m_simple_tags;
rhs.m_simple_tags_size = m_simple_tags_size;
rhs.m_simple_tags_count = m_simple_tags_count;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 65,453,859,430,948,440,000,000,000,000,000,000,000 | 5 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
loader_init_callback (lt_dlhandle handle)
{
lt_get_vtable *vtable_func = (lt_get_vtable *) lt_dlsym (handle, "get_vtable");
return loader_init (vtable_func, 0);
} | 0 | [] | libtool | e91f7b960032074a55fc91273c1917e3082b5338 | 252,155,377,718,617,350,000,000,000,000,000,000,000 | 5 | Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current d... |
void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
int (*cb) (SSL *ssl,
unsigned char *cookie,
unsigned int *cookie_len))
{
ctx->app_gen_cookie_cb = cb;
} | 0 | [
"CWE-362"
] | openssl | 939b4960276b040fc0ed52232238fcc9e2e9ec21 | 60,099,214,889,556,970,000,000,000,000,000,000,000 | 7 | Fix race condition in NewSessionTicket
If a NewSessionTicket is received by a multi-threaded client when
attempting to reuse a previous ticket then a race condition can occur
potentially leading to a double free of the ticket data.
CVE-2015-1791
This also fixes RT#3808 where a session ID is changed for a session alr... |
static int regex_match_middle(char *str, struct regex *r, int len)
{
if (!len)
return strstr(str, r->pattern) != NULL;
return strnstr(str, r->pattern, len) != NULL;
} | 0 | [
"CWE-787"
] | linux | 70303420b5721c38998cf987e6b7d30cc62d4ff1 | 18,821,297,137,038,115,000,000,000,000,000,000,000 | 7 | tracing: Check for no filter when processing event filters
The syzkaller detected a out-of-bounds issue with the events filter code,
specifically here:
prog[N].pred = NULL; /* #13 */
prog[N].target = 1; /* TRUE */
prog[N+1].pred = NULL;
prog[N+1].target = 0; /* FALSE */
-> prog[N-1].target = N;
prog[N-1].w... |
inline void ReluX(const tflite::ReluParams& params,
const RuntimeShape& input_shape, const T* input_data,
const RuntimeShape& output_shape, T* output_data) {
ruy::profiler::ScopeLabel label("Quantized ReluX (not fused)");
const int flat_size = MatchingFlatSize(input_shape, output... | 0 | [
"CWE-125"
] | tensorflow | 595a65a3e224a0362d7e68c2213acfc2b499a196 | 252,904,442,041,902,760,000,000,000,000,000,000,000 | 16 | Return a TFLite error if gather_nd will result in reading invalid memory
PiperOrigin-RevId: 463054033 |
void* LibRaw:: malloc(size_t t)
{
void *p = memmgr.malloc(t);
if(!p)
throw LIBRAW_EXCEPTION_ALLOC;
return p;
} | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 121,032,293,734,813,080,000,000,000,000,000,000,000 | 7 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef |
static TraceNo trace_findfree(jit_State *J)
{
MSize osz, lim;
if (J->freetrace == 0)
J->freetrace = 1;
for (; J->freetrace < J->sizetrace; J->freetrace++)
if (traceref(J, J->freetrace) == NULL)
return J->freetrace++;
/* Need to grow trace array. */
lim = (MSize)J->param[JIT_P_maxtrace] + 1;
if... | 0 | [
"CWE-125"
] | LuaJIT | 12ab596997b9cb27846a5b254d11230c3f9c50c8 | 240,120,030,135,434,600,000,000,000,000,000,000,000 | 19 | Fix handling of errors during snapshot restore. |
try_close_write (GVfsBackend *backend,
GVfsJobCloseWrite *job,
GVfsBackendHandle handle)
{
GOutputStream *stream;
SoupMessage *msg;
gsize length;
gchar *data;
stream = G_OUTPUT_STREAM (handle);
msg = g_object_get_data (G_OBJECT (stream), "-gvfs-stream-msg");
g_object_re... | 0 | [] | gvfs | 0abdd97989d5274d84017490aff3bf07a71fd672 | 167,421,527,611,526,380,000,000,000,000,000,000,000 | 27 | 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 bus_socket_write_auth(sd_bus *b) {
ssize_t k;
assert(b);
assert(b->state == BUS_AUTHENTICATING);
if (!bus_socket_auth_needs_write(b))
return 0;
if (b->prefer_writev)
k = writev(b->output_fd, b->auth_iovec + b->auth_index, ELEMENTSOF(b... | 0 | [
"CWE-787"
] | systemd | 6d586a13717ae057aa1b4127400c3de61cd5b9e7 | 43,331,914,370,833,070,000,000,000,000,000,000,000 | 31 | sd-bus: if we receive an invalid dbus message, ignore and proceeed
dbus-daemon might have a slightly different idea of what a valid msg is
than us (for example regarding valid msg and field sizes). Let's hence
try to proceed if we can and thus drop messages rather than fail the
connection if we fail to validate a mess... |
static int do_insn_fetch_byte(struct x86_emulate_ctxt *ctxt, u8 *dest)
{
struct fetch_cache *fc = &ctxt->fetch;
int rc;
int size, cur_size;
if (ctxt->_eip == fc->end) {
unsigned long linear;
struct segmented_address addr = { .seg = VCPU_SREG_CS,
.ea = ctxt->_eip };
cur_size = fc->end - fc->start;
... | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 161,651,507,762,694,480,000,000,000,000,000,000,000 | 26 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
struct mm_struct *mm)
{
const struct cred *cred;
unsigned int i, len;
/* first copy the parameters from user space */
memset(psinfo, 0, sizeof(struct elf_prpsinfo));
len = mm->arg_end - mm->arg_start;
if (len >= ELF_PRARGSZ)
... | 0 | [
"CWE-476"
] | linux | c8e252586f8d5de906385d8cf6385fee289a825e | 188,593,652,951,106,940,000,000,000,000,000,000,000 | 42 | 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 ... |
MONGO_EXPORT size_t bson_buffer_size( const bson *b ) {
return (b->cur - b->data + 1);
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 73,481,734,690,308,450,000,000,000,000,000,000,000 | 3 | 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.