func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
do_set(
char_u *arg_start, // option string (may be written to!)
int opt_flags)
{
char_u *arg = arg_start;
int opt_idx;
char *errmsg;
char errbuf[80];
char_u *startarg;
int prefix; // 1: nothing, 0: "no", 2: "inv" in front of name
int nextchar; // next non-white char after op... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 652dee448618589de5528a9e9a36995803f5557a | 181,389,898,272,381,540,000,000,000,000,000,000,000 | 993 | patch 8.2.4245: ":retab 0" may cause illegal memory access
Problem: ":retab 0" may cause illegal memory access.
Solution: Limit the value of 'tabstop' to 10000. |
evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char *const filename) {
int res;
EVDNS_LOCK(base);
res = evdns_base_resolv_conf_parse_impl(base, flags, filename);
EVDNS_UNLOCK(base);
return res;
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 318,581,681,406,046,060,000,000,000,000,000,000,000 | 7 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
void intel_engines_free(struct intel_gt *gt)
{
struct intel_engine_cs *engine;
enum intel_engine_id id;
/* Free the requests! dma-resv keeps fences around for an eternity */
rcu_barrier();
for_each_engine(engine, gt, id) {
intel_engine_free_request_pool(engine);
kfree(engine);
gt->engine[id] = NULL;
}
} | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 243,374,400,575,022,220,000,000,000,000,000,000,000 | 14 | 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... |
static GF_Node *lsr_read_animateTransform(GF_LASeRCodec *lsr, SVG_Element *parent)
{
u32 type;
u32 flag;
GF_FieldInfo info;
GF_Node *elt= gf_node_new(lsr->sg, TAG_SVG_animateTransform);
lsr_read_id(lsr, elt);
lsr_read_rare(lsr, elt);
lsr_read_attribute_name(lsr, elt);
/*enumeration rotate{0} scale{1} skewX{2} ... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 247,825,230,249,138,640,000,000,000,000,000,000,000 | 66 | fixed #2213 |
static my_bool xarollback_handlerton(THD *unused1, plugin_ref plugin,
void *arg)
{
handlerton *hton= plugin_hton(plugin);
if (hton->state == SHOW_OPTION_YES && hton->recover)
{
hton->rollback_by_xid(hton, ((struct xahton_st *)arg)->xid);
((struct xahton_st *)arg)->resu... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 93,363,843,359,384,840,000,000,000,000,000,000,000 | 11 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
static int is_authenticated(struct ceph_auth_client *ac)
{
struct ceph_auth_none_info *xi = ac->private;
return !xi->starting;
} | 0 | [] | ceph-client | 2cb33cac622afde897aa02d3dcd9fbba8bae839e | 305,517,187,187,117,430,000,000,000,000,000,000,000 | 6 | libceph: Fix NULL pointer dereference in auth client code
A malicious monitor can craft an auth reply message that could cause a
NULL function pointer dereference in the client's kernel.
To prevent this, the auth_none protocol handler needs an empty
ceph_auth_client_ops->build_request() function.
CVE-2013-1059
Sign... |
LEX::sp_variable_declarations_with_ref_finalize(THD *thd, int nvars,
Qualified_column_ident *ref,
Item *def)
{
return ref->db.length == 0 && ref->table.length == 0 ?
sp_variable_declarations_vartype_finalize(thd, nvars... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 170,568,681,660,701,940,000,000,000,000,000,000,000 | 8 | 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... |
logger_timer_cb (const void *pointer, void *data, int remaining_calls)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) remaining_calls;
logger_flush ();
return WEECHAT_RC_OK;
} | 0 | [
"CWE-119",
"CWE-787"
] | weechat | f105c6f0b56fb5687b2d2aedf37cb1d1b434d556 | 145,647,102,092,093,580,000,000,000,000,000,000,000 | 11 | logger: call strftime before replacing buffer local variables |
virtual void SetUp()
{
fill_candidate_participant_key();
permissions_file = "permissions_access_control_tests.smime";
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 83,130,696,435,198,110,000,000,000,000,000,000,000 | 5 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
static int cifs_launder_page(struct page *page)
{
int rc = 0;
loff_t range_start = page_offset(page);
loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1);
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL,
.nr_to_write = 0,
.range_start = range_start,
.range_end = range_end,
};
cifs_db... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | 281,610,230,705,203,180,000,000,000,000,000,000,000 | 20 | 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 ... |
process_message_channel_data(struct stream* s)
{
int chan_id = 0;
int chan_flags = 0;
int rv = 0;
int length = 0;
int total_length = 0;
in_uint16_le(s, chan_id);
in_uint16_le(s, chan_flags);
in_uint16_le(s, length);
in_uint32_le(s, total_length);
LOG(10, ("process_message_channel_data: chan_id %d "... | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 237,864,583,111,173,850,000,000,000,000,000,000,000 | 32 | move temp files from /tmp to /tmp/.xrdp |
static void usb_ehci_pci_finalize(Object *obj)
{
EHCIPCIState *i = PCI_EHCI(obj);
EHCIState *s = &i->ehci;
usb_ehci_finalize(s);
} | 0 | [
"CWE-772",
"CWE-401"
] | qemu | d710e1e7bd3d5bfc26b631f02ae87901ebe646b0 | 221,178,500,597,826,040,000,000,000,000,000,000,000 | 7 | usb: ehci: fix memory leak in ehci
In usb_ehci_init function, it initializes 's->ipacket', but there
is no corresponding function to free this. As the ehci can be hotplug
and unplug, this will leak host memory leak. In order to make the
hierarchy clean, we should add a ehci pci finalize function, then call
the clean f... |
static unsigned long ftrace_location_range(unsigned long start, unsigned long end)
{
struct ftrace_page *pg;
struct dyn_ftrace *rec;
struct dyn_ftrace key;
key.ip = start;
key.flags = end; /* overload flags, as it is unsigned long */
for (pg = ftrace_pages_start; pg; pg = pg->next) {
if (end < pg->records[0].... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 139,317,054,837,936,940,000,000,000,000,000,000,000 | 22 | 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... |
static BOOL update_recv_window_info_order(rdpUpdate* update, wStream* s,
WINDOW_ORDER_INFO* orderInfo)
{
rdpContext* context = update->context;
rdpWindowUpdate* window = update->window;
BOOL result = TRUE;
if (Stream_GetRemainingLength(s) < 4)
return FALSE;
Stream_Read... | 0 | [
"CWE-125"
] | FreeRDP | 6b2bc41935e53b0034fe5948aeeab4f32e80f30f | 263,605,982,094,224,570,000,000,000,000,000,000,000 | 70 | Fix #6010: Check length in read_icon_info |
static int partition_sort_compare(const void *v1, const void *v2)
{
const struct dsdb_partition *p1;
const struct dsdb_partition *p2;
p1 = *((struct dsdb_partition * const*)v1);
p2 = *((struct dsdb_partition * const*)v2);
return ldb_dn_compare(p1->ctrl->dn, p2->ctrl->dn);
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 270,841,436,596,676,270,000,000,000,000,000,000,000 | 10 | 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... |
void CTimer::SetModule(CModule* p) { m_pModule = p; } | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 48,192,965,453,180,510,000,000,000,000,000,000,000 | 1 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static inline bool slab_free_freelist_hook(struct kmem_cache *s,
void **head, void **tail)
{
void *object;
void *next = *head;
void *old_tail = *tail ? *tail : *head;
int rsize;
/* Head and tail of the reconstructed freelist */
*head = NULL;
*tail = NULL;
do {
object = next;
next = get_freepointe... | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 197,487,796,989,694,270,000,000,000,000,000,000,000 | 44 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
rsvg_handle_has_sub (RsvgHandle * handle,
const char *id)
{
g_return_val_if_fail (handle, FALSE);
if (G_UNLIKELY (!id || !id[0]))
return FALSE;
return rsvg_defs_lookup (handle->priv->defs, id) != NULL;
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 310,786,064,910,576,900,000,000,000,000,000,000,000 | 10 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
__nvmet_fc_fod_op_abort(struct nvmet_fc_fcp_iod *fod, bool abort)
{
struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq;
struct nvmet_fc_tgtport *tgtport = fod->tgtport;
/* if in the middle of an io and we need to tear down */
if (abort) {
if (fcpreq->op == NVMET_FCOP_WRITEDATA) {
nvmet_req_complete(&fod->req, NV... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0c319d3a144d4b8f1ea2047fd614d2149b68f889 | 33,020,897,684,354,960,000,000,000,000,000,000,000 | 18 | nvmet-fc: ensure target queue id within range.
When searching for queue id's ensure they are within the expected range.
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
Map1to1(SDL_Palette * src, SDL_Palette * dst, int *identical)
{
Uint8 *map;
int i;
if (identical) {
if (src->ncolors <= dst->ncolors) {
/* If an identical palette, no need to map */
if (src == dst
||
(SDL_memcmp
(src->colors, ... | 1 | [
"CWE-703",
"CWE-787"
] | SDL | 8c91cf7dba5193f5ce12d06db1336515851c9ee9 | 97,057,597,835,318,500,000,000,000,000,000,000,000 | 31 | Always create a full 256-entry map in case color values are out of range
Fixes https://github.com/libsdl-org/SDL/issues/5042 |
static int bnxt_re_check_packet_type(u16 raweth_qp1_flags,
u16 raweth_qp1_flags2)
{
bool is_ipv6 = false, is_ipv4 = false;
/* raweth_qp1_flags Bit 9-6 indicates itype */
if ((raweth_qp1_flags & CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE)
!= CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE)
return -1... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4a9d46a9fe14401f21df69cea97c62396d5fb053 | 48,434,305,445,933,150,000,000,000,000,000,000,000 | 25 | RDMA: Fix goto target to release the allocated memory
In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory
should be released by goto fail.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com
Si... |
PHP_METHOD(Phar, canWrite)
{
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL(!PHAR_G(readonly));
} | 0 | [
"CWE-416"
] | php-src | b2cf3f064b8f5efef89bb084521b61318c71781b | 270,143,153,565,684,100,000,000,000,000,000,000,000 | 7 | Fixed bug #68901 (use after free) |
static void wq_watchdog_init(void)
{
wq_watchdog_set_thresh(wq_watchdog_thresh);
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 133,361,344,576,224,680,000,000,000,000,000,000,000 | 4 | 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... |
xt_get_this_cpu_counter(struct xt_counters *cnt)
{
if (nr_cpu_ids > 1)
return this_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt);
return cnt;
} | 0 | [] | linux | 175e476b8cdf2a4de7432583b49c871345e4f8a1 | 151,240,333,526,223,090,000,000,000,000,000,000,000 | 7 | netfilter: x_tables: Use correct memory barriers.
When a new table value was assigned, it was followed by a write memory
barrier. This ensured that all writes before this point would complete
before any writes after this point. However, to determine whether the
rules are unused, the sequence counter is read. To ensure... |
gsicc_extract_profile(gs_graphics_type_tag_t graphics_type_tag,
cmm_dev_profile_t *profile_struct,
cmm_profile_t **profile, gsicc_rendering_param_t *render_cond)
{
switch (graphics_type_tag & ~GS_DEVICE_ENCODES_TAGS) {
case GS_UNKNOWN_TAG:
case GS_UNTOUC... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 67,577,087,007,683,250,000,000,000,000,000,000,000 | 37 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
static int fuse_fsync(struct file *file, loff_t start, loff_t end,
int datasync)
{
struct inode *inode = file->f_mapping->host;
struct fuse_conn *fc = get_fuse_conn(inode);
int err;
if (fuse_is_bad(inode))
return -EIO;
inode_lock(inode);
/*
* Start writeback against all dirty pages of the inode, th... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 319,603,906,992,492,180,000,000,000,000,000,000,000 | 49 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
static cmark_node *try_opening_table_row(cmark_syntax_extension *self,
cmark_parser *parser,
cmark_node *parent_container,
unsigned char *input, int len) {
cmark_node *table_row_block;
table_ro... | 1 | [
"CWE-190"
] | cmark-gfm | b1687e6af1367c596ab75428b03af55666a66530 | 156,075,112,762,772,060,000,000,000,000,000,000,000 | 48 | prevent integer overflow in row_from_string
* added explicit check for UINT16_MAX boundary on row->n_columns
* added additional checks for row_from_string NULL returns to prevent NULL
dereferences on error cases
* added additional check to ensure n_columns between marker and header rows
always match prior to any ali... |
static inline bool enabled_nat_bits(struct f2fs_sb_info *sbi,
struct cp_control *cpc)
{
bool set = is_set_ckpt_flags(sbi, CP_NAT_BITS_FLAG);
return (cpc) ? (cpc->reason & CP_UMOUNT) && set : set;
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 29,031,453,041,122,973,000,000,000,000,000,000,000 | 7 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
GF_Err gppc_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_3GPPConfigBox *ptr = (GF_3GPPConfigBox *)s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->cfg.vendor);
gf_bs_write_u8(bs, ptr->cfg.decoder_version);
switch (ptr->cfg.type) {
case GF_ISOM_SUBTYPE_3GP_H263:
gf_bs... | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 3,912,046,162,355,243,500,000,000,000,000,000,000 | 28 | fixed #1768 |
int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp)
{
struct ippp_struct *is = ippp_table[lp->ppp_slot];
u_int16_t proto;
int drop = 0;
switch (ntohs(skb->protocol)) {
case ETH_P_IP:
proto = PPP_IP;
break;
case ETH_P_IPX:
proto = PPP_IPX;
break;
default:
printk(KERN_ERR "isdn_ppp_aut... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 104,073,234,996,286,450,000,000,000,000,000,000,000 | 41 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
bool match (const std::string &suffix, const PixelType type) const
{
if (_type != type) return false;
if (_caseInsensitive)
{
std::string tmp(suffix);
std::transform(tmp.begin(), tmp.end(), tmp.begin(), tolower);
return tmp == _suffix;
}
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 254,329,981,117,628,700,000,000,000,000,000,000,000 | 13 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static bool ParseSampler(Sampler *sampler, std::string *err, const json &o,
bool store_original_json_for_extras_and_extensions) {
ParseStringProperty(&sampler->name, err, o, "name", false);
int minFilter = -1;
int magFilter = -1;
int wrapS = TINYGLTF_TEXTURE_WRAP_REPEAT;
int wrapT = ... | 1 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 84,524,621,700,568,960,000,000,000,000,000,000,000 | 44 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
static nodemask_t *policy_nodemask(gfp_t gfp, struct mempolicy *policy)
{
/* Lower zones don't get a nodemask applied for MPOL_BIND */
if (unlikely(policy->mode == MPOL_BIND) &&
gfp_zone(gfp) >= policy_zone &&
cpuset_nodemask_valid_mems_allowed(&policy->v.nodes))
return &policy->v.nodes;
return NULL;
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 277,296,929,725,093,900,000,000,000,000,000,000,000 | 10 | 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(... |
void Http2Handler::start_settings_timer() {
ev_timer_start(sessions_->get_loop(), &settings_timerev_);
} | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 190,618,043,963,056,200,000,000,000,000,000,000,000 | 3 | Don't read too greedily |
pfm_get_pmc_reset(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
{
pfarg_reg_t *req = (pfarg_reg_t *)arg;
unsigned int cnum;
int i;
int ret = -EINVAL;
for (i = 0; i < count; i++, req++) {
cnum = req->reg_num;
if (!PMC_IS_IMPL(cnum)) goto abort_mission;
req->reg_value = PMC_DFL_VAL(cnum);... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 255,223,366,532,838,340,000,000,000,000,000,000,000 | 25 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
TEST_F(TcpHealthCheckerImplTest, PassiveFailure) {
InSequence s;
setupNoData();
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())};
expectSessionCreate();
expectClientCreate();
EXPECT_CALL(*connection_, write(_, _)).Times(0);
EXPECT... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 267,060,163,943,421,100,000,000,000,000,000,000,000 | 59 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
bool CModules::OnChanBufferStarting(CChan& Chan, CClient& Client) {
MODHALTCHK(OnChanBufferStarting(Chan, Client));
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 180,948,518,736,790,920,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
bgp_str2route_type (int afi, const char *str)
{
if (! str)
return 0;
if (afi == AFI_IP)
{
if (strncmp (str, "k", 1) == 0)
return ZEBRA_ROUTE_KERNEL;
else if (strncmp (str, "c", 1) == 0)
return ZEBRA_ROUTE_CONNECT;
else if (strncmp (str, "s", 1) == 0)
return ZEBRA_ROUTE_STATIC;
el... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 139,202,848,130,571,580,000,000,000,000,000,000,000 | 33 | [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... |
_lyd_unlink_hash(struct lyd_node *node, struct lyd_node *orig_parent, int keyless_list_check)
{
#ifndef NDEBUG
struct lyd_node *iter;
/* it must already be unlinked otherwise keyless lists would get wrong hash */
if (keyless_list_check && orig_parent) {
LY_TREE_FOR(orig_parent->child, iter) {
... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 247,739,233,800,547,660,000,000,000,000,000,000,000 | 42 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr,
unsigned long data)
{
int copied;
copied = ptrace_access_vm(tsk, addr, &data, sizeof(data),
FOLL_FORCE | FOLL_WRITE);
return (copied == sizeof(data)) ? 0 : -EIO;
} | 0 | [
"CWE-264",
"CWE-269"
] | linux | 6994eefb0053799d2e07cd140df6c2ea106c41ee | 56,946,680,776,322,990,000,000,000,000,000,000,000 | 9 | ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME
Fix two issues:
When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU
reference to the parent's objective credentials, then give that pointer
to get_cred(). However, the object lifetime rules for things like
struct cred do not permit unconditionally ... |
kg_unseal_v1(context, minor_status, ctx, ptr, bodysize, message_buffer,
conf_state, qop_state, toktype)
krb5_context context;
OM_uint32 *minor_status;
krb5_gss_ctx_id_rec *ctx;
unsigned char *ptr;
int bodysize;
gss_buffer_t message_buffer;
int *conf_state;
gss_qop_t *qop_sta... | 1 | [
"CWE-119",
"CWE-125"
] | krb5 | e6ae703ae597d798e310368d52b8f38ee11c6a73 | 311,388,807,489,115,920,000,000,000,000,000,000,000 | 384 | Handle invalid RFC 1964 tokens [CVE-2014-4341...]
Detect the following cases which would otherwise cause invalid memory
accesses and/or integer underflow:
* An RFC 1964 token being processed by an RFC 4121-only context
[CVE-2014-4342]
* A header with fewer than 22 bytes after the token ID or an
incomplete checks... |
dnsc_apply_cfg(struct dnsc_env *env, struct config_file *cfg)
{
if(dnsc_parse_certs(env, cfg) <= 0) {
fatal_exit("dnsc_apply_cfg: no cert file loaded");
}
if(dnsc_parse_keys(env, cfg) <= 0) {
fatal_exit("dnsc_apply_cfg: no key file loaded");
}
randombytes_buf(env->hash_key, sizeof en... | 0 | [
"CWE-190"
] | unbound | 02080f6b180232f43b77f403d0c038e9360a460f | 274,371,774,079,246,940,000,000,000,000,000,000,000 | 43 | - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec. |
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
encode(path, bl);
encode(etag, bl);
encode(size_bytes, bl);
ENCODE_FINISH(bl);
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 102,798,281,882,711,240,000,000,000,000,000,000,000 | 7 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
getLastTableList ()
{
if (lastTrans == NULL)
return NULL;
strncpy (scratchBuf, lastTrans->tableList, lastTrans->tableListLength);
scratchBuf[lastTrans->tableListLength] = 0;
return scratchBuf;
} | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 243,021,695,783,602,200,000,000,000,000,000,000,000 | 8 | Merge branch 'table_resolver' |
write_two(int c, FILE *f)
{
putc((c >> 8) & 255, f);
putc(c & 255, f);
} | 0 | [
"CWE-119",
"CWE-787"
] | t1utils | 6b9d1aafcb61a3663c883663eb19ccdbfcde8d33 | 19,157,669,130,243,204,000,000,000,000,000,000,000 | 5 | Security fixes.
- Don't overflow the small cs_start buffer (reported by Niels
Thykier via the debian tracker (Jakub Wilk), found with a
fuzzer ("American fuzzy lop")).
- Cast arguments to <ctype.h> functions to unsigned char. |
static TEE_Result get_prop_tee_sys_time_prot_level(
struct tee_ta_session *sess __unused,
void *buf, size_t *blen)
{
uint32_t prot;
if (*blen < sizeof(prot)) {
*blen = sizeof(prot);
return TEE_ERROR_SHORT_BUFFER;
}
*blen = sizeof(prot);
prot = tee_time_get_sys_time_protection_level();
return tee_svc_co... | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | d5c5b0b77b2b589666024d219a8007b3f5b6faeb | 279,272,931,047,224,300,000,000,000,000,000,000,000 | 14 | core: svc: always check ta parameters
Always check TA parameters from a user TA. This prevents a user TA from
passing invalid pointers to a pseudo TA.
Fixes: OP-TEE-2018-0007: "Buffer checks missing when calling pseudo
TAs".
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Joakim Bech <joakim.bec... |
d_lite_jd(VALUE self)
{
get_d1(self);
return m_real_local_jd(dat);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 267,686,950,804,919,540,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
xfs_attr_rmtval_copyout(
struct xfs_mount *mp,
struct xfs_buf *bp,
xfs_ino_t ino,
int *offset,
int *valuelen,
__uint8_t **dst)
{
char *src = bp->b_addr;
xfs_daddr_t bno = bp->b_bn;
int len = BBTOB(bp->b_length);
ASSERT(len >= XFS_LBSIZE(mp));
while (len > 0 && *valuelen > 0) {
int hdr_size = 0;
int... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59 | 184,917,358,324,782,440,000,000,000,000,000,000,000 | 45 | xfs: remote attribute overwrite causes transaction overrun
Commit e461fcb ("xfs: remote attribute lookups require the value
length") passes the remote attribute length in the xfs_da_args
structure on lookup so that CRC calculations and validity checking
can be performed correctly by related code. This, unfortunately h... |
static int nfs4_xdr_dec_access(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
struct nfs4_accessres *res)
{
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (status)
goto out;
status = decode_sequence(xdr, &res->seq_res, rqstp);
if (status)
goto out;
status = decod... | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 298,140,182,141,163,320,000,000,000,000,000,000,000 | 23 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
Status ValidateInputs(const CSRSparseMatrix& sparse_matrix,
const Tensor& permutation_indices, int* batch_size,
int64* num_rows) {
if (sparse_matrix.dtype() != DataTypeToEnum<T>::value)
return errors::InvalidArgument(
"Asked for a CSRSparseMatrix of ... | 0 | [
"CWE-476"
] | tensorflow | e6a7c7cc18c3aaad1ae0872cb0a959f5c923d2bd | 71,539,368,152,818,310,000,000,000,000,000,000,000 | 43 | Remove `OP_REQUIRES` call from helper function.
Since `OP_REQUIRES` macro expands to a `return;` (among other), calling it in a helper function only ends the helper function's execution earlier, but the kernel will still run from start to end. Thus, all the expected validations are actually broken/useless as the code ... |
Header::version() const
{
return typedAttribute <IntAttribute> ("version").value();
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 112,190,899,962,186,800,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
Status ConvertGraphDefToGraph(const GraphConstructorOptions& opts,
const GraphDef& gdef, Graph* g) {
ShapeRefiner refiner(gdef.versions().producer(), g->op_registry());
return GraphConstructor::Construct(
opts, gdef.node(), &gdef.versions(), &gdef.library(), g, &refiner,
/*... | 0 | [
"CWE-125",
"CWE-369",
"CWE-908"
] | tensorflow | 0cc38aaa4064fd9e79101994ce9872c6d91f816b | 189,994,220,198,216,630,000,000,000,000,000,000,000 | 8 | Prevent unitialized memory access in `GraphConstructor::MakeEdge`
The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr... |
void ipv4_sk_redirect(struct sk_buff *skb, struct sock *sk)
{
const struct iphdr *iph = (const struct iphdr *) skb->data;
struct flowi4 fl4;
struct rtable *rt;
struct net *net = sock_net(sk);
__build_flow_key(net, &fl4, sk, iph, 0, 0, 0, 0, 0);
rt = __ip_route_output_key(net, &fl4);
if (!IS_ERR(rt)) {
__ip_do... | 0 | [
"CWE-476"
] | linux | bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205 | 200,865,169,066,244,900,000,000,000,000,000,000,000 | 14 | net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set
Syzkaller hit 'general protection fault in fib_dump_info' bug on
commit 4.13-rc5..
Guilty file: net/ipv4/fib_semantics.c
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked... |
static void set_flag(struct ImapData *idata, int aclbit, int flag,
const char *str, char *flags, size_t flsize)
{
if (mutt_bit_isset(idata->ctx->rights, aclbit))
if (flag && imap_has_flag(&idata->flags, str))
mutt_str_strcat(flags, flsize, str);
} | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | 17,296,262,835,739,296,000,000,000,000,000,000,000 | 7 | Quote path in imap_subscribe |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
TfLiteTensor* output = GetOutput(context, node, 0);
TfLiteTensor* hits = GetOutput(context, node, 1);
const TfLiteTensor* lookup = GetInput(context, node, 0);
const TfLiteTensor* key = GetInput(context, node, 1);
const TfLiteTensor* value = GetInpu... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 286,853,494,493,247,630,000,000,000,000,000,000,000 | 44 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct tcp_iter_state *st = seq->private;
void *rc = NULL;
if (v == SEQ_START_TOKEN) {
rc = tcp_get_idx(seq, 0);
goto out;
}
switch (st->state) {
case TCP_SEQ_STATE_OPENREQ:
case TCP_SEQ_STATE_LISTENING:
rc = listening_get_next(seq, ... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 233,921,442,308,877,260,000,000,000,000,000,000,000 | 31 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
node_new_backref(int back_num, int* backrefs, int by_name,
#ifdef USE_BACKREF_WITH_LEVEL
int exist_level, int nest_level,
#endif
ScanEnv* env)
{
int i;
Node* node = node_new();
CHECK_NULL_RETURN(node);
NODE_SET_TYPE(node, NODE_BACKREF);
BACKREF_(node)->back_num = back_num;
... | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 123,084,769,532,586,840,000,000,000,000,000,000,000 | 48 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
static void wake_lock_waiters(struct rbd_device *rbd_dev, int result)
{
struct rbd_img_request *img_req;
dout("%s rbd_dev %p result %d\n", __func__, rbd_dev, result);
lockdep_assert_held_write(&rbd_dev->lock_rwsem);
cancel_delayed_work(&rbd_dev->lock_dwork);
if (!completion_done(&rbd_dev->acquire_wait)) {
rbd_... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 95,279,119,850,629,990,000,000,000,000,000,000,000 | 25 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
cr_tknzr_parse_name (CRTknzr * a_this,
CRString ** a_str)
{
guint32 tmp_char = 0;
CRInputPos init_pos;
enum CRStatus status = CR_OK;
gboolean str_needs_free = FALSE,
is_first_nmchar=TRUE ;
glong i = 0;
CRParsingLocation loc = {0} ;
... | 0 | [
"CWE-119"
] | libcroco | 9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 | 133,482,215,805,691,370,000,000,000,000,000,000,000 | 49 | tknzr: support only max long rgb values
This fixes a possible out of bound when reading rgbs which
are longer than the support MAXLONG |
bgp_encode_prefixes(struct bgp_proto *p, byte *w, struct bgp_bucket *buck, uint remains)
{
byte *start = w;
ip_addr a;
int bytes;
while (!EMPTY_LIST(buck->prefixes) && (remains >= (5+sizeof(ip_addr))))
{
struct bgp_prefix *px = SKIP_BACK(struct bgp_prefix, bucket_node, HEAD(buck->prefixes));
DB... | 0 | [
"CWE-787"
] | bird | 1657c41c96b3c07d9265b07dd4912033ead4124b | 135,780,255,347,771,460,000,000,000,000,000,000,000 | 31 | BGP: Fix bugs in handling of shutdown messages
There is an improper check for valid message size, which may lead to
stack overflow and buffer leaks to log when a large message is received.
Thanks to Daniel McCarney for bugreport and analysis. |
bool Hints::readSharedObjectsTable(Stream *str)
{
StreamBitReader sbr(str);
const unsigned int firstSharedObjectNumber = sbr.readBits(32);
const unsigned int firstSharedObjectOffset = sbr.readBits(32) + hintsLength;
const unsigned int nSharedGroupsFirst = sbr.readBits(32);
const unsigned int nSh... | 0 | [] | poppler | 81044c64b9ed9a10ae82a28bac753060bdfdac74 | 217,885,925,410,349,750,000,000,000,000,000,000,000 | 100 | Hints::readTables: bail out if we run out of file when reading
Fixes #1230 |
TRIO_PUBLIC_STRING int trio_string_match_case TRIO_ARGS2((self, other), trio_string_t* self,
trio_string_t* other)
{
assert(self);
assert(other);
return trio_match_case(self->content, other->content);
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 273,397,571,167,501,660,000,000,000,000,000,000,000 | 8 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
async_data_free (EwsAsyncData *async_data)
{
g_free (async_data->custom_data);
g_free (async_data);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 110,116,770,475,417,930,000,000,000,000,000,000,000 | 5 | 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 |
_dbus_concat_dir_and_file (DBusString *dir,
const DBusString *next_component)
{
dbus_bool_t dir_ends_in_slash;
dbus_bool_t file_starts_with_slash;
if (_dbus_string_get_length (dir) == 0 ||
_dbus_string_get_length (next_component) == 0)
return TRUE;
dir_ends_in_slash ... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 182,733,245,568,265,000,000,000,000,000,000,000,000 | 28 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
static int ext4_quota_on_mount(struct super_block *sb, int type)
{
return dquot_quota_on_mount(sb, get_qf_name(sb, EXT4_SB(sb), type),
EXT4_SB(sb)->s_jquota_fmt, type);
} | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 45,116,755,958,766,100,000,000,000,000,000,000,000 | 5 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
static void settings_changed(struct btd_adapter *adapter, uint32_t settings)
{
uint32_t changed_mask;
changed_mask = adapter->current_settings ^ settings;
adapter->current_settings = settings;
adapter->pending_settings &= ~changed_mask;
DBG("Changed settings: 0x%08x", changed_mask);
DBG("Pending settings: 0x%0... | 1 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 234,365,301,441,743,470,000,000,000,000,000,000,000 | 49 | 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 kernel_sendpage_locked(struct sock *sk, struct page *page, int offset,
size_t size, int flags)
{
struct socket *sock = sk->sk_socket;
if (sock->ops->sendpage_locked)
return sock->ops->sendpage_locked(sk, page, offset, size,
flags);
return sock_no_sendpage_locked(sk, page, offset, size, flags);
... | 0 | [
"CWE-362"
] | linux | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | 267,244,369,965,734,350,000,000,000,000,000,000,000 | 11 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereferenc... |
InnerPointerToCodeCache* inner_pointer_to_code_cache() {
return inner_pointer_to_code_cache_;
} | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 239,573,259,238,264,000,000,000,000,000,000,000,000 | 3 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
T& operator()(const unsigned int x, const unsigned int y) {
return _data[x + y*_width]; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 18,087,041,607,292,026,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
void RGWRESTMgr::register_default_mgr(RGWRESTMgr *mgr)
{
delete default_mgr;
default_mgr = mgr;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 237,804,072,278,935,900,000,000,000,000,000,000,000 | 5 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
add_data_free (AddData *add_data)
{
g_hash_table_unref (add_data->files_to_add);
g_free (add_data);
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 236,885,649,368,630,200,000,000,000,000,000,000,000 | 5 | libarchive: sanitize filenames before extracting |
ns_initparse(const unsigned char *msg, int msglen, ns_msg *handle)
{
const u_char *eom = msg + msglen;
int i;
handle->_msg = msg;
handle->_eom = eom;
if (msg + NS_INT16SZ > eom) {
errno = EMSGSIZE;
return -1;
}
NS_GET16(handle->_id, msg);
if (msg + NS_INT16SZ > eom) {
errno = EMSGSIZE;
return -1;
}
... | 0 | [
"CWE-79"
] | uclibc-ng | 0f822af0445e5348ce7b7bd8ce1204244f31d174 | 73,192,453,086,259,920,000,000,000,000,000,000,000 | 48 | libc/inet/resolv.c: add __hnbad to check DNS entries for validity…
… using the same rules glibc does
also call __hnbad in some places to check answers |
Header::tileDescription () const
{
return typedAttribute <TileDescriptionAttribute> ("tiles").value();
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 35,905,086,588,025,965,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
QPDFObjectHandle::getOperatorValue()
{
if (isOperator())
{
return dynamic_cast<QPDF_Operator*>(m->obj.getPointer())->getVal();
}
else
{
typeWarning("operator", "returning fake value");
QTC::TC("qpdf", "QPDFObjectHandle operator returning fake value");
return "QPDFFAKE... | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 96,516,929,954,946,690,000,000,000,000,000,000,000 | 13 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
GC_API int GC_CALL GC_get_kind_and_size(const void * p, size_t * psize)
{
hdr * hhdr = HDR(p);
if (psize != NULL) {
*psize = hhdr -> hb_sz;
}
return hhdr -> hb_obj_kind;
} | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 76,243,935,837,498,000,000,000,000,000,000,000,000 | 9 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static void qdisc_list_add(struct Qdisc *q)
{
if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS))
list_add_tail(&q->list, &qdisc_root_sleeping(q)->list);
} | 0 | [
"CWE-909"
] | linux-2.6 | 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b | 228,610,794,860,564,450,000,000,000,000,000,000,000 | 5 | tc: Fix unitialized kernel memory leak
Three bytes of uninitialized kernel memory are currently leaked to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static void create_refuse_error(int which)
{
/* The "which" value is the index + OPT_REFUSED_BASE. */
struct poptOption *op = &long_options[which - OPT_REFUSED_BASE];
int n = snprintf(err_buf, sizeof err_buf,
"The server is configured to refuse --%s\n",
op->longName) - 1;
if (op->shortName) {
snprintf(err... | 0 | [] | rsync | eac858085e3ac94ec0ab5061d11f52652c90a869 | 292,872,943,372,785,500,000,000,000,000,000,000,000 | 12 | Add compat flag to allow proper seed checksum order.
Fixes the equivalent of librsync's CVE-2014-8242 issue. |
DEFUN (bgp_redistribute_ipv4_metric_rmap,
bgp_redistribute_ipv4_metric_rmap_cmd,
"redistribute (connected|kernel|ospf|rip|static) metric <0-4294967295> route-map WORD",
"Redistribute information from another routing protocol\n"
"Connected\n"
"Kernel routes\n"
"Open Shurtest Pat... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 135,144,802,224,368,280,000,000,000,000,000,000,000 | 29 | [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 int __init ipc_init(void)
{
sem_init();
msg_init();
shm_init();
register_hotmemory_notifier(&ipc_memory_nb);
register_ipcns_notifier(&init_ipc_ns);
return 0;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 196,579,637,881,812,000,000,000,000,000,000,000,000 | 9 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
static int replmd_delete(struct ldb_module *module, struct ldb_request *req)
{
return replmd_delete_internals(module, req, false);
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 168,472,139,393,478,690,000,000,000,000,000,000,000 | 4 | 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... |
void set_default_scaling_lists(scaling_list_data* sclist)
{
// 4x4
for (int matrixId=0;matrixId<6;matrixId++) {
fill_scaling_factor(&sclist->ScalingFactor_Size0[matrixId][0][0],
default_ScalingList_4x4, 0);
}
// 8x8
for (int matrixId=0;matrixId<3;matrixId++) {
fill_scaling_f... | 0 | [
"CWE-787"
] | libde265 | 8e89fe0e175d2870c39486fdd09250b230ec10b8 | 5,829,359,941,985,416,000,000,000,000,000,000,000 | 34 | error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590) |
static void init_setups(apr_pool_t *p, server_rec *base_server)
{
log_server = base_server;
apr_pool_cleanup_register(p, NULL, cleanup_setups, apr_pool_cleanup_null);
} | 0 | [
"CWE-476"
] | mod_md | e71001955809247b3aa4d269e1e0741b4fe0fc3d | 159,538,334,849,049,750,000,000,000,000,000,000,000 | 5 | v1.1.12, notifycmd improvements |
void address_space_dispatch_compact(AddressSpaceDispatch *d)
{
if (d->phys_map.skip) {
phys_page_compact(d->uc, &d->phys_map, d->map.nodes);
}
} | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 263,013,467,474,283,320,000,000,000,000,000,000,000 | 6 | Fix crash when mapping a big memory and calling uc_close |
void Gfx::doFunctionShFill1(GfxFunctionShading *shading,
double x0, double y0,
double x1, double y1,
GfxColor *colors, int depth) {
GfxColor fillColor;
GfxColor color0M, color1M, colorM0, colorM1, colorMM;
GfxColor colors2[4];
double *matrix;
double xM, yM;
int nComps, i, j;
nComps =... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 57,144,318,497,963,170,000,000,000,000,000,000,000 | 108 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
JsVar *jspEvaluateModule(JsVar *moduleContents) {
assert(jsvIsString(moduleContents) || jsvIsFunction(moduleContents));
if (jsvIsFunction(moduleContents)) {
moduleContents = jsvObjectGetChild(moduleContents,JSPARSE_FUNCTION_CODE_NAME,0);
if (!jsvIsString(moduleContents)) {
jsvUnLock(moduleContents);
... | 0 | [
"CWE-125",
"CWE-674"
] | Espruino | 51380baf17241728b6d48cdb84140b931e3e3cc5 | 119,430,046,540,245,180,000,000,000,000,000,000,000 | 29 | Fix stack overflow if interpreting a file full of '{' (fix #1448) |
static struct fs_struct *__copy_fs_struct(struct fs_struct *old)
{
struct fs_struct *fs = kmem_cache_alloc(fs_cachep, GFP_KERNEL);
/* We don't need to lock fs - think why ;-) */
if (fs) {
atomic_set(&fs->count, 1);
rwlock_init(&fs->lock);
fs->umask = old->umask;
read_lock(&old->lock);
fs->root = old->root;... | 0 | [
"CWE-264"
] | linux-2.6 | 2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205 | 89,061,887,005,926,040,000,000,000,000,000,000,000 | 17 | copy_process: fix CLONE_PARENT && parent_exec_id interaction
CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use ->parent_exec_id to make
sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed
task exits.
Also, move down the "p->parent_ex... |
FstringParser_Init(FstringParser *state)
{
state->last_str = NULL;
state->fmode = 0;
ExprList_Init(&state->expr_list);
FstringParser_check_invariants(state);
} | 0 | [
"CWE-125"
] | cpython | a4d78362397fc3bced6ea80fbc7b5f4827aec55e | 104,656,101,461,522,470,000,000,000,000,000,000,000 | 7 | bpo-36495: Fix two out-of-bounds array reads (GH-12641)
Research and fix by @bradlarsen. |
int ssl3_get_client_hello(SSL *s)
{
int i,j,ok,al,ret= -1;
unsigned int cookie_len;
long n;
unsigned long id;
unsigned char *p,*d,*q;
SSL_CIPHER *c;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp=NULL;
#endif
STACK_OF(SSL_CIPHER) *ciphers=NULL;
/* We do this so that we will respond with our native type.
* If we ar... | 0 | [] | openssl | 0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c | 49,877,250,052,031,705,000,000,000,000,000,000,000 | 502 | Backport support for fixed DH ciphersuites (from HEAD) |
static void tulip_desc_write(TULIPState *s, hwaddr p,
struct tulip_descriptor *desc)
{
if (s->csr[0] & CSR0_DBO) {
stl_be_pci_dma(&s->dev, p, desc->status);
stl_be_pci_dma(&s->dev, p + 4, desc->control);
stl_be_pci_dma(&s->dev, p + 8, desc->buf_addr1);
stl_be_pci_dma(&s->dev,... | 0 | [
"CWE-787"
] | qemu | 8ffb7265af64ec81748335ec8f20e7ab542c3850 | 140,469,482,626,430,780,000,000,000,000,000,000,000 | 15 | net: tulip: check frame size and r/w data length
Tulip network driver while copying tx/rx buffers does not check
frame size against r/w data length. This may lead to OOB buffer
access. Add check to avoid it.
Limit iterations over descriptors to avoid potential infinite
loop issue in tulip_xmit_list_update.
Reported-... |
static void smb1cli_req_cancel_done(struct tevent_req *subreq)
{
/* we do not care about the result */
TALLOC_FREE(subreq);
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 75,260,508,032,096,810,000,000,000,000,000,000,000 | 5 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
static int emulate_pop(struct x86_emulate_ctxt *ctxt,
void *dest, int len)
{
int rc;
struct segmented_address addr;
addr.ea = reg_read(ctxt, VCPU_REGS_RSP) & stack_mask(ctxt);
addr.seg = VCPU_SREG_SS;
rc = segmented_read(ctxt, addr, dest, len);
if (rc != X86EMUL_CONTINUE)
return rc;
rsp_increment(ct... | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 309,415,610,582,137,080,000,000,000,000,000,000,000 | 15 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
static CImg<T> matrix(const T& a0, const T& a1, const T& a2, const T& a3,
const T& a4, const T& a5, const T& a6, const T& a7,
const T& a8, const T& a9, const T& a10, const T& a11,
const T& a12, const T& a13, const T& a14, const T& a15) {
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 103,591,965,252,074,270,000,000,000,000,000,000,000 | 11 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
GF_Err udta_Read(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_array_read(s, bs, udta_AddBox);
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 125,003,575,678,540,130,000,000,000,000,000,000,000 | 4 | fixed 2 possible heap overflows (inc. #1088) |
bgp_default_withdraw_send (struct peer *peer, afi_t afi, safi_t safi)
{
struct stream *s;
struct stream *packet;
struct prefix p;
unsigned long pos;
unsigned long cp;
bgp_size_t unfeasible_len;
bgp_size_t total_attr_len;
char buf[BUFSIZ];
if (DISABLE_BGP_ANNOUNCE)
return;
if (afi == AFI_IP)
... | 0 | [
"CWE-119"
] | quagga | 5861739f8c38bc36ea9955e5cb2be2bf2f482d70 | 329,567,397,998,838,370,000,000,000,000,000,000,000 | 71 | bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS
* bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are
detected, and the code will stop processing the OPEN and return. However
it does so without calling bgp_notify_send to send a NOTIFY - which means
the peer FSM doesn't g... |
int ath6kl_wmi_set_bitrate_mask(struct wmi *wmi, u8 if_idx,
const struct cfg80211_bitrate_mask *mask)
{
struct ath6kl *ar = wmi->parent_dev;
if (test_bit(ATH6KL_FW_CAPABILITY_64BIT_RATES,
ar->fw_capabilities))
return ath6kl_set_bitrate_mask64(wmi, if_idx, mask);
else
return ath6kl_set_bitrate_mask32(... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 41,136,972,708,014,770,000,000,000,000,000,000,000 | 11 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
void AuthorizationManager::_invalidateRelevantCacheData(const char* op,
const char* ns,
const BSONObj& o,
const BSONObj* o2) {
if (ns == Authorizati... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 287,345,288,588,850,470,000,000,000,000,000,000,000 | 31 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
u32 gf_dom_listener_count(GF_Node *node)
{
if (!node || !node->sgprivate->interact || !node->sgprivate->interact->dom_evt) return 0;
return gf_list_count(node->sgprivate->interact->dom_evt->listeners);
} | 0 | [
"CWE-416"
] | gpac | 9723dd0955894f2cb7be13b94cf7a47f2754b893 | 226,597,250,242,548,840,000,000,000,000,000,000,000 | 5 | fixed #2109 |
static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS)
{
zval *IM;
gdImagePtr im;
long tmp, blocksize;
zend_bool mode = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll|b", &IM, &tmp, &blocksize, &mode) == FAILURE) {
RETURN_FALSE;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image... | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 243,686,612,297,375,500,000,000,000,000,000,000,000 | 23 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
xf86LoadModules(const char **list, void **optlist)
{
int errmaj;
void *opt;
int i;
char *name;
Bool failed = FALSE;
if (!list)
return TRUE;
for (i = 0; list[i] != NULL; i++) {
/* Normalise the module name */
name = xf86NormalizeName(list[i]);
/* Skip empty... | 0 | [
"CWE-863"
] | xserver | 8a59e3b7dbb30532a7c3769c555e00d7c4301170 | 120,074,164,932,980,020,000,000,000,000,000,000,000 | 40 | Disable -logfile and -modulepath when running with elevated privileges
Could cause privilege elevation and/or arbitrary files overwrite, when
the X server is running with elevated privileges (ie when Xorg is
installed with the setuid bit set and started by a non-root user).
CVE-2018-14665
Issue reported by Narendra ... |
static double mp_list_ixyzc(_cimg_math_parser& mp) {
const unsigned int
ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()),
interpolation = (unsigned int)_mp_arg(7),
boundary_conditions = (unsigned int)_mp_arg(8);
const CImg<T> &img = mp.imglist[ind];
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 128,972,525,179,011,080,000,000,000,000,000,000,000 | 78 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.