func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
bool Permissions::return_permissions_credential_token(
PermissionsCredentialToken* token,
SecurityException&)
{
delete token;
return true;
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 249,550,180,165,832,850,000,000,000,000,000,000,000 | 7 | 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... |
napi_status napi_delete_reference(napi_env env, napi_ref ref) {
// Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw
// JS exceptions.
CHECK_ENV(env);
CHECK_ARG(env, ref);
v8impl::Reference::Delete(reinterpret_cast<v8impl::Reference*>(ref));
return napi_clear_last_error(env);
} | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 49,964,017,706,641,700,000,000,000,000,000,000,000 | 10 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
static void usbhid_mark_busy(struct usbhid_device *usbhid)
{
struct usb_interface *intf = usbhid->intf;
usb_mark_last_busy(interface_to_usbdev(intf));
} | 0 | [
"CWE-125",
"CWE-787"
] | linux | f043bfc98c193c284e2cd768fefabe18ac2fed9b | 79,287,349,332,712,080,000,000,000,000,000,000,000 | 6 | HID: usbhid: fix out-of-bounds bug
The hid descriptor identifies the length and type of subordinate
descriptors for a device. If the received hid descriptor is smaller than
the size of the struct hid_descriptor, it is possible to cause
out-of-bounds.
In addition, if bNumDescriptors of the hid descriptor have an incor... |
R_API int r_sys_chdir(const char *s) {
return r_sandbox_chdir (s)==0;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 319,708,047,619,075,680,000,000,000,000,000,000,000 | 3 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
void ares__addrinfo_cat_nodes(struct ares_addrinfo_node **head,
struct ares_addrinfo_node *tail)
{
struct ares_addrinfo_node *last = *head;
if (!last)
{
*head = tail;
return;
}
while (last->ai_next)
{
last = last->ai_next;
}
last->ai_next = tail;... | 0 | [
"CWE-416",
"CWE-310",
"CWE-415"
] | c-ares | 1cc7e83c3bdfaafbc5919c95025592d8de3a170e | 50,643,549,431,789,280,000,000,000,000,000,000,000 | 17 | Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called
In the event that ares_destroy() is called prior to ares_getaddrinfo() completing,
it would result in an invalid read and double-free due to calling end_hquery() twice.
Reported By: Jann Horn @ Google Project Zero |
xutcTimeNormalize(
Syntax *syntax,
struct berval *val,
struct berval *normalized )
{
int parts[9], rc;
rc = check_time_syntax(val, 1, parts, NULL);
if (rc != LDAP_SUCCESS) {
return rc;
}
normalized->bv_val = ch_malloc( 14 );
if ( normalized->bv_val == NULL ) {
return LBER_ERROR_MEMORY;
}
sprintf( norm... | 0 | [
"CWE-617"
] | openldap | 67670f4544e28fb09eb7319c39f404e1d3229e65 | 317,815,165,696,719,330,000,000,000,000,000,000,000 | 24 | ITS#9383 remove assert in certificateListValidate |
int ReadTile(TIFF* tiff, UINT32 col, UINT32 row, UINT32* buffer) {
uint16 photometric;
TIFFGetField(tiff, TIFFTAG_PHOTOMETRIC, &photometric);
// To avoid dealing with YCbCr subsampling, let libtiff handle it
if (photometric == PHOTOMETRIC_YCBCR) {
UINT32 tile_width, tile_height, swap_line_size... | 0 | [
"CWE-190",
"CWE-787"
] | Pillow | 4e2def2539ec13e53a82e06c4b3daf00454100c4 | 1,368,970,976,676,568,700,000,000,000,000,000,000 | 56 | Overflow checks for realloc for tiff decoding |
innodb_allocate(
/*============*/
ENGINE_HANDLE* handle, /*!< in: Engine handle */
const void* cookie, /*!< in: connection cookie */
item ** item, /*!< out: item to allocate */
const void* key, /*!< in: key */
const size_t nkey, /*!< in: key length */
const size_t nbytes, /*!< in: estimated value length */... | 0 | [] | mysql-server | 659514dc83299a7d8c7defeb543be4339fbe1ee1 | 314,964,123,617,858,300,000,000,000,000,000,000,000 | 69 | Bug #25147515 SET DAEMON_MEMCACHED_R_BATCH_SIZE GREATER THAN 1 MAKE MYSQLD CRASHED
PROBLEM
-------
User starts a "get" the the connection with SET DAEMON_MEMCACHED_R_BATCH_SIZE= 5
and with binlog on. Since "get" is a read transaction this connection is not
allocated any conn_data->thd (which is used for bin log commit... |
nautilus_file_peek_top_left_text (NautilusFile *file,
gboolean need_large_text,
gboolean *needs_loading)
{
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
if (!nautilus_file_should_get_top_left_text (file)) {
if (needs_loading) {
*needs_loading = FALSE;
}
return NULL;
}
if (needs_load... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 302,182,112,348,600,950,000,000,000,000,000,000,000 | 32 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
Segment::~Segment() {
if (cluster_list_) {
for (int32_t i = 0; i < cluster_list_size_; ++i) {
Cluster* const cluster = cluster_list_[i];
delete cluster;
}
delete[] cluster_list_;
}
if (frames_) {
for (int32_t i = 0; i < frames_size_; ++i) {
Frame* const frame = frames_[i];
... | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 250,883,492,401,698,140,000,000,000,000,000,000,000 | 33 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
int v9fs_vfs_unlink(struct inode *i, struct dentry *d)
{
return v9fs_remove(i, d, 0);
} | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 263,736,396,782,211,400,000,000,000,000,000,000,000 | 4 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
_XimEncodingNegotiation(
Xim im)
{
char *name_ptr = 0;
int name_len = 0;
char *detail_ptr = 0;
int detail_len = 0;
CARD8 *buf;
CARD16 *buf_s;
INT16 len;
CARD32 reply32[BUFSIZE/4];
char *reply = (char *)reply32;
XPointer preply;
int buf_size;
int ret_code;... | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 278,019,798,182,956,280,000,000,000,000,000,000,000 | 101 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
static int network_config_add_server (const oconfig_item_t *ci) /* {{{ */
{
sockent_t *se;
int status;
int i;
if ((ci->values_num < 1) || (ci->values_num > 2)
|| (ci->values[0].type != OCONFIG_TYPE_STRING)
|| ((ci->values_num > 1) && (ci->values[1].type != OCONFIG_TYPE_STRING)))
{
ERROR ("net... | 0 | [
"CWE-119",
"CWE-787"
] | collectd | b589096f907052b3a4da2b9ccc9b0e2e888dfc18 | 21,656,136,163,699,650,000,000,000,000,000,000,000 | 84 | network plugin: Fix heap overflow in parse_packet().
Emilien Gaspar has identified a heap overflow in parse_packet(), the
function used by the network plugin to parse incoming network packets.
This is a vulnerability in collectd, though the scope is not clear at
this point. At the very least specially crafted network... |
static ssize_t send_cb(nghttp2_session *ngh2,
const uint8_t *data, size_t length,
int flags, void *userp)
{
h2_session *session = (h2_session *)userp;
apr_status_t status;
(void)ngh2;
(void)flags;
status = h2_conn_io_write(&session->io, (const char ... | 0 | [] | mod_h2 | 5e75e5685dd043fe93a5a08a15edd087a43f6968 | 32,682,488,210,006,717,000,000,000,000,000,000,000 | 20 | v1.11.0
--------------------------------------------------------------------------------
* connection IO event handling reworked. Instead of reacting on incoming bytes, the
state machine now acts on incoming frames that are affecting it. This reduces
state transitions.
* pytest suite now covers some basic tests... |
struct brcmf_cfg80211_vif *brcmf_alloc_vif(struct brcmf_cfg80211_info *cfg,
enum nl80211_iftype type)
{
struct brcmf_cfg80211_vif *vif_walk;
struct brcmf_cfg80211_vif *vif;
bool mbss;
brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n",
sizeof(*vif));
vif = kzalloc(sizeof(*vif), GFP_KERNEL);
... | 0 | [
"CWE-119",
"CWE-703"
] | linux | ded89912156b1a47d940a0c954c43afbabd0c42c | 167,591,760,550,978,730,000,000,000,000,000,000,000 | 32 | brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the... |
xmlGenericErrorContextNodeSet(FILE *output, xmlNodeSetPtr obj) {
int i;
if (output == NULL) output = xmlGenericErrorContext;
if (obj == NULL) {
fprintf(output, "NodeSet == NULL !\n");
return;
}
if (obj->nodeNr == 0) {
fprintf(output, "NodeSet is empty\n");
return;
}
if (o... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 230,308,795,430,115,720,000,000,000,000,000,000,000 | 30 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
inline void ResizeBilinear(const float* input_data, const Dims<4>& input_dims,
const int32* output_size_data,
const Dims<4>& output_size_dims, float* output_data,
const Dims<4>& output_dims) {
ResizeBilinear<float>(input_data, input_dims... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 787,754,259,732,252,600,000,000,000,000,000,000 | 8 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
void __fastcall TSCPFileSystem::UpdateFromMain(TCustomFileSystem * /*MainFileSystem*/)
{
// noop
}
| 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 296,614,244,656,648,500,000,000,000,000,000,000,000 | 4 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
GF_Err odkm_box_dump(GF_Box *a, FILE * trace)
{
gf_isom_box_dump_start(a, "OMADRMKMSBox", trace);
gf_fprintf(trace, ">\n");
gf_isom_box_dump_done("OMADRMKMSBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 44,648,277,879,105,880,000,000,000,000,000,000,000 | 7 | fixed #2138 |
static enum dc_status build_mapped_resource(
const struct dc *dc,
struct dc_state *context,
struct dc_stream_state *stream)
{
struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
if (!pipe_ctx)
return DC_ERROR_UNEXPECTED;
dce110_resource_build_pipe_hw_param(pipe_ctx);
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 312,885,077,627,628,970,000,000,000,000,000,000,000 | 16 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
static int check_restart(struct sem_array *sma, struct sem_queue *q)
{
struct sem *curr;
struct sem_queue *h;
/* if the operation didn't modify the array, then no restart */
if (q->alter == 0)
return 0;
/* pending complex operations are too difficult to analyse */
if (sma->complex_count)
return 1;
/* we w... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 3,881,031,169,225,346,000,000,000,000,000,000,000 | 53 | 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 void openpic_update_irq(OpenPICState *opp, int n_IRQ)
{
IRQSource *src;
bool active, was_active;
int i;
src = &opp->src[n_IRQ];
active = src->pending;
if ((src->ivpr & IVPR_MASK_MASK) && !src->nomask) {
/* Interrupt source is disabled */
DPRINTF("%s: IRQ %d is disabled\n... | 0 | [
"CWE-119"
] | qemu | 73d963c0a75cb99c6aaa3f6f25e427aa0b35a02e | 270,674,460,953,133,980,000,000,000,000,000,000,000 | 62 | openpic: avoid buffer overrun on incoming migration
CVE-2013-4534
opp->nb_cpus is read from the wire and used to determine how many
IRQDest elements to read into opp->dst[]. If the value exceeds the
length of opp->dst[], MAX_CPU, opp->dst[] can be overrun with arbitrary
data from the wire.
Fix this by failing migrat... |
decode_xform (char *file_name, void *data)
{
int type = *(int*)data;
switch (type)
{
case XFORM_SYMLINK:
/* FIXME: It is not quite clear how and to which extent are the symbolic
links subject to filename transformation. In the absence of another
solution, symbolic links are exempt from component... | 0 | [
"CWE-125"
] | tar | d9d4435692150fa8ff68e1b1a473d187cc3fd777 | 202,456,846,554,373,420,000,000,000,000,000,000,000 | 33 | Fix memory leak in read_header
Bug reported in https://savannah.gnu.org/bugs/?59897
* src/list.c (read_header): Don't return directly from the loop.
Instead set the status and break. Return the status. Free
next_long_name and next_long_link before returning. |
sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
{
int mxsize, cmd_size, k;
int input_size, blocking;
unsigned char opcode;
Sg_device *sdp;
Sg_fd *sfp;
Sg_request *srp;
struct sg_header old_hdr;
sg_io_hdr_t *hp;
unsigned char cmnd[SG_MAX_CDB_SIZE];
if (unlikely(segment_eq(get_... | 0 | [
"CWE-119"
] | linux | bf33f87dd04c371ea33feb821b60d63d754e3124 | 127,869,308,129,120,200,000,000,000,000,000,000,000 | 109 | scsi: sg: check length passed to SG_NEXT_CMD_LEN
The user can control the size of the next command passed along, but the
value passed to the ioctl isn't checked against the usable max command
size.
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Chang <dpf@google.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.co... |
BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quality)
{
gdIOCtx *out = gdNewFileCtx(outFile);
if (out == NULL) {
return;
}
gdImageWebpCtx(im, out, quality);
out->gd_free(out);
} | 1 | [
"CWE-415"
] | libgd | a49feeae76d41959d85ee733925a4cf40bac61b2 | 240,228,000,719,702,650,000,000,000,000,000,000,000 | 9 | Fix double-free in gdImageWebPtr()
The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and
the other WebP output functions to do the real work) does not return whether
it succeeded or failed, so this is not checked in gdImageWebpPtr() and the
function wrongly assumes everything is okay, which is no... |
ReturnCode_t DataWriterImpl::get_liveliness_lost_status(
LivelinessLostStatus& status)
{
if (writer_ == nullptr)
{
return ReturnCode_t::RETCODE_NOT_ENABLED;
}
std::unique_lock<RecursiveTimedMutex> lock(writer_->getMutex());
status.total_count = writer_->liveliness_lost_status_.tota... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 271,145,174,831,759,980,000,000,000,000,000,000,000 | 17 | 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... |
void ikev2_delete_out(struct state *st)
{
struct state *pst = NULL;
if (st->st_clonedfrom != 0) {
/*child SA*/
pst = state_with_serialno(st->st_clonedfrom);
if (!pst) {
DBG(DBG_CONTROL,
DBG_log("IKE SA does not exist for this child SA"));
DBG(DBG_CONTROL,
DBG_log(
"INFORMATIONAL ex... | 0 | [
"CWE-20"
] | libreswan | 2899351224fe2940aec37d7656e1e392c0fe07f0 | 24,917,341,391,552,175,000,000,000,000,000,000,000 | 212 | SECURITY: Properly handle IKEv2 I1 notification packet without KE payload |
static void insert_part_info_log_entry_list(partition_info *part_info,
DDL_LOG_MEMORY_ENTRY *log_entry)
{
log_entry->next_active_log_entry= part_info->first_log_entry;
part_info->first_log_entry= log_entry;
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 230,849,163,830,215,620,000,000,000,000,000,000,000 | 6 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
GF_Err hlit_box_dump(GF_Box *a, FILE * trace)
{
GF_TextHighlightBox*p = (GF_TextHighlightBox*)a;
gf_isom_box_dump_start(a, "TextHighlightBox", trace);
gf_fprintf(trace, "startcharoffset=\"%d\" endcharoffset=\"%d\">\n", p->startcharoffset, p->endcharoffset);
gf_isom_box_dump_done("TextHighlightBox", a, trace);
retu... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 186,292,854,442,065,200,000,000,000,000,000,000,000 | 8 | fixed #2138 |
void CLASS kodak_65000_load_raw()
{
short buf[256];
int row, col, len, pred[2], ret, i;
for (row=0; row < height; row++)
for (col=0; col < width; col+=256) {
pred[0] = pred[1] = 0;
len = MIN (256, width-col);
ret = kodak_65000_decode (buf, len);
for (i=0; i < len; i++)
if ((RAW(row,c... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 140,562,640,200,685,040,000,000,000,000,000,000,000 | 15 | cumulated data checks patch |
OPJ_BOOL opj_t2_decode_packets(opj_t2_t *p_t2,
OPJ_UINT32 p_tile_no,
opj_tcd_tile_t *p_tile,
OPJ_BYTE *p_src,
OPJ_UINT32 * p_data_read,
OPJ_UINT32 p_max_len,
... | 0 | [
"CWE-416",
"CWE-787"
] | openjpeg | c535531f03369623b9b833ef41952c62257b507e | 80,673,125,464,823,860,000,000,000,000,000,000,000 | 156 | opj_t2_encode_packet(): fix potential write heap buffer overflow (#992) |
static int check_pseudo_btf_id(struct bpf_verifier_env *env,
struct bpf_insn *insn,
struct bpf_insn_aux_data *aux)
{
const struct btf_var_secinfo *vsi;
const struct btf_type *datasec;
struct btf_mod_pair *btf_mod;
const struct btf_type *t;
const char *sym_name;
bool percpu = false;
u32 type, ... | 0 | [
"CWE-787"
] | linux | 64620e0a1e712a778095bd35cbb277dc2259281f | 278,097,763,770,920,330,000,000,000,000,000,000,000 | 129 | bpf: Fix out of bounds access for ringbuf helpers
Both bpf_ringbuf_submit() and bpf_ringbuf_discard() have ARG_PTR_TO_ALLOC_MEM
in their bpf_func_proto definition as their first argument. They both expect
the result from a prior bpf_ringbuf_reserve() call which has a return type of
RET_PTR_TO_ALLOC_MEM_OR_NULL.
Meani... |
int ext4_break_layouts(struct inode *inode)
{
struct ext4_inode_info *ei = EXT4_I(inode);
struct page *page;
int error;
if (WARN_ON_ONCE(!rwsem_is_locked(&ei->i_mmap_sem)))
return -EINVAL;
do {
page = dax_layout_busy_page(inode->i_mapping);
if (!page)
return 0;
error = ___wait_var_event(&page->_refco... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 21,803,030,968,099,340,000,000,000,000,000,000,000 | 22 | 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 int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
struct vm_area_struct *vma = walk->vma;
struct pagemapread *pm = walk->private;
spinlock_t *ptl;
pte_t *pte, *orig_pte;
int err = 0;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
ptl = pmd_trans_huge_lock(pmdp, ... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 94,663,321,965,008,550,000,000,000,000,000,000,000 | 72 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
codegen_realloc(codegen_scope *s, void *p, size_t len)
{
p = mrb_realloc_simple(s->mrb, p, len);
if (!p && len > 0) codegen_error(s, "mrb_realloc");
return p;
} | 0 | [
"CWE-415",
"CWE-122"
] | mruby | 38b164ace7d6ae1c367883a3d67d7f559783faad | 141,170,546,143,805,240,000,000,000,000,000,000,000 | 7 | codegen.c: fix a bug in `gen_values()`.
- Fix limit handling that fails 15 arguments method calls.
- Fix too early argument packing in arrays. |
acl_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, char *sol,
struct acl_expr *expr, struct acl_test *test)
{
struct http_txn *txn = l7;
struct hdr_idx *idx = &txn->hdr_idx;
struct hdr_ctx *ctx = (struct hdr_ctx *)test->ctx.a;
if (!txn)
return 0;
if (!(test->flags & ACL_TEST_F_F... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 300,162,946,854,954,600,000,000,000,000,000,000,000 | 29 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
Krecipes::Krecipes(): KXmlGuiWindow( 0 )
{
m_view = new KrecipesView( this );
setObjectName( "Krecipes" );
// accept dnd
setAcceptDrops( true );
// tell the KMainWindow that this is indeed the main widget
setCentralWidget( m_view );
// then, setup our actions
setupActions();
// and a status bar
statusBar()... | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 163,028,472,821,590,940,000,000,000,000,000,000,000 | 54 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
static int input_dev_suspend(struct device *dev)
{
struct input_dev *input_dev = to_input_dev(dev);
spin_lock_irq(&input_dev->event_lock);
/*
* Keys that are pressed now are unlikely to be
* still pressed when we resume.
*/
input_dev_release_keys(input_dev);
/* Turn off LEDs and sounds, if any are active.... | 0 | [
"CWE-703",
"CWE-787"
] | linux | cb222aed03d798fc074be55e59d9a112338ee784 | 296,861,858,587,310,350,000,000,000,000,000,000,000 | 19 | Input: add safety guards to input_set_keycode()
If we happen to have a garbage in input device's keycode table with values
too big we'll end up doing clear_bit() with offset way outside of our
bitmaps, damaging other objects within an input device or even outside of
it. Let's add sanity checks to the returned old keyc... |
vmxnet3_get_rx_ring_gen(VMXNET3State *s, int qidx, int ridx)
{
return s->rxq_descr[qidx].rx_ring[ridx].gen;
} | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 110,872,103,639,466,430,000,000,000,000,000,000,000 | 4 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
all_variables_matching_prefix (prefix)
const char *prefix;
{
SHELL_VAR **varlist;
char **rlist;
int vind, rind, plen;
plen = STRLEN (prefix);
varlist = all_visible_variables ();
for (vind = 0; varlist && varlist[vind]; vind++)
;
if (varlist == 0 || vind == 0)
return ((char **)NULL);
rlist ... | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 318,044,548,753,126,070,000,000,000,000,000,000,000 | 24 | commit bash-20120224 snapshot |
istermoption_idx(int opt_idx)
{
return istermoption(&options[opt_idx]);
} | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 64,432,003,953,849,710,000,000,000,000,000,000,000 | 4 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
void dump_epoch_header(struct req_state *s, const char *name, real_time t)
{
utime_t ut(t);
char buf[65];
const auto len = snprintf(buf, sizeof(buf), "%lld.%09lld",
(long long)ut.sec(),
(long long)ut.nsec());
return dump_header(s, name, boost::string_ref(... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 253,563,932,059,001,770,000,000,000,000,000,000,000 | 10 | 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 <... |
TRIO_PRIVATE void TrioInStreamFileDescriptor TRIO_ARGS2((self, intPointer), trio_class_t* self,
int* intPointer)
{
int fd = *((int*)self->location);
int size;
unsigned char input;
assert(VALID(self));
self->actually.cached = 0;
size = read(fd, &input, siz... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 61,772,164,854,166,440,000,000,000,000,000,000,000 | 32 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
cdata_read (cdata_t *cd, guint8 res_data, gint comptype,
GDataInputStream *in, GCancellable *cancellable, GError **error)
{
gboolean success = FALSE;
int ret, zret = Z_OK;
gint compression = comptype & GCAB_COMPRESSION_MASK;
guint8 *buf = compression == GCAB_COMPRESSION_NONE ? cd->out : cd-... | 0 | [
"CWE-787"
] | gcab | c512f6ff0c82a1139b36db2b28f93edc01c74b4b | 100,069,401,825,814,000,000,000,000,000,000,000,000 | 124 | trivial: Allocate cdata_t on the heap
Using a 91kB stack allocation for one object isn't awesome, and it also allows
us to use g_autoptr() to simplify gcab_folder_extract() |
Status AuthorizationSession::checkAuthForAggregate(const NamespaceString& ns,
const BSONObj& cmdObj) {
std::string db(ns.db().toString());
auto inputResource = ResourcePattern::forExactNamespace(ns);
uassert(
17138, mongoutils::str::stream() << "Inv... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 126,347,625,481,836,650,000,000,000,000,000,000,000 | 52 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static int netns_exec(int argc, char **argv)
{
/* Setup the proper environment for apps that are not netns
* aware, and execute a program in that environment.
*/
const char *cmd;
if (argc < 1 && !do_all) {
fprintf(stderr, "No netns name specified\n");
return -1;
}
if ((argc < 2 && !do_all) || (argc < 1 &&... | 0 | [
"CWE-416"
] | iproute2 | 9bf2c538a0eb10d66e2365a655bf6c52f5ba3d10 | 196,445,725,068,434,200,000,000,000,000,000,000,000 | 34 | ipnetns: use-after-free problem in get_netnsid_from_name func
Follow the following steps:
# ip netns add net1
# export MALLOC_MMAP_THRESHOLD_=0
# ip netns list
then Segmentation fault (core dumped) will occur.
In get_netnsid_from_name func, answer is freed before
rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers... |
sock_set_v6only(int s)
{
#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
int on = 1;
debug3("%s: set socket %d IPV6_V6ONLY", __func__, s);
if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) == -1)
error("setsockopt IPV6_V6ONLY: %s", strerror(errno));
#endif
} | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 230,060,057,119,192,580,000,000,000,000,000,000,000 | 10 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
void dump_page(struct page *page, const char *reason)
{
__dump_page(page, reason);
dump_page_owner(page);
} | 0 | [
"CWE-416"
] | linux | 7a9cdebdcc17e426fb5287e4a82db1dfe86339b2 | 108,656,527,220,132,990,000,000,000,000,000,000,000 | 5 | mm: get rid of vmacache_flush_all() entirely
Jann Horn points out that the vmacache_flush_all() function is not only
potentially expensive, it's buggy too. It also happens to be entirely
unnecessary, because the sequence number overflow case can be avoided by
simply making the sequence number be 64-bit. That doesn't... |
int sched_rr_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
int ret;
static DEFINE_MUTEX(mutex);
mutex_lock(&mutex);
ret = proc_dointvec(table, write, buffer, lenp, ppos);
/* make sure that internally we keep jiffies */
/* also, writing zero resets timeslice to... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 325,339,873,706,518,370,000,000,000,000,000,000,000 | 18 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
explicit BoostedTreesSparseAggregateStatsOp(
OpKernelConstruction* const context)
: OpKernel(context) {
OP_REQUIRES_OK(context, context->GetAttr("max_splits", &max_splits_));
OP_REQUIRES_OK(context, context->GetAttr("num_buckets", &num_buckets_));
} | 0 | [
"CWE-125",
"CWE-369"
] | tensorflow | e84c975313e8e8e38bb2ea118196369c45c51378 | 65,309,286,613,952,240,000,000,000,000,000,000,000 | 6 | In tf.raw_ops.BoostedTreesSparseCalculateBestFeatureSplit, limit stat_dim in stats_summary_indices to under stats_dims in stats_summary_shape
PiperOrigin-RevId: 387171191
Change-Id: I83ca8a75b22aa78c037e8b98779da6cced16bfaa |
QPDFObjectHandle::getTypeCode()
{
if (this->m->initialized)
{
dereference();
return this->m->obj->getTypeCode();
}
else
{
return QPDFObject::ot_uninitialized;
}
} | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 203,395,174,449,122,000,000,000,000,000,000,000,000 | 12 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
NumberFormatTest::TestCurrencySign(void)
{
UErrorCode status = U_ZERO_ERROR;
DecimalFormatSymbols* sym = new DecimalFormatSymbols(Locale::getUS(), status);
UnicodeString pat;
UChar currency = 0x00A4;
if (U_FAILURE(status)) {
errcheckln(status, "Fail to create DecimalFormatSymbols - %s", u_er... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 162,644,992,210,578,250,000,000,000,000,000,000,000 | 45 | ICU-20246 Fixing another integer overflow in number parsing. |
brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct wiphy *wiphy = ifp->drvr->wiphy;
struct brcmf_cfg80211_profile *profile = &ifp->vif->profile;
s32 val;
s32 err;
const struct brcmf_tlv *rsn_ie;
const u8 *ie;
u32 ie_len;
u32 offse... | 0 | [
"CWE-787"
] | linux | 1b5e2423164b3670e8bc9174e4762d297990deff | 172,720,161,189,071,300,000,000,000,000,000,000,000 | 120 | 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 void vxlan_config_apply(struct net_device *dev,
struct vxlan_config *conf,
struct net_device *lowerdev,
struct net *src_net,
bool changelink)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
struct vxlan_rdst *dst = &vxlan->default_dst;
unsigned short needed_headroom = ETH... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 100,238,889,396,010,730,000,000,000,000,000,000,000 | 56 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
static double mp_list_set_ioff(_cimg_math_parser& mp) {
const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width());
CImg<T> &img = mp.listout[ind];
const longT
off = (longT)_mp_arg(3),
whds = (longT)img.size();
const double val = _mp_ar... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 5,104,624,266,627,525,700,000,000,000,000,000,000 | 10 | Fix other issues in 'CImg<T>::load_bmp()'. |
mono_thread_suspend (MonoInternalThread *thread)
{
ensure_synch_cs_set (thread);
EnterCriticalSection (thread->synch_cs);
if ((thread->state & ThreadState_Unstarted) != 0 ||
(thread->state & ThreadState_Aborted) != 0 ||
(thread->state & ThreadState_Stopped) != 0)
{
LeaveCriticalSection (thread->synch_cs)... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 32,838,327,549,167,320,000,000,000,000,000,000,000 | 29 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
finish_writing_to_file(open_file_t *file_data)
{
return finish_writing_to_file_impl(file_data, 0);
} | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 46,648,392,381,346,520,000,000,000,000,000,000,000 | 4 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static int lp_preempt(void *handle)
{
struct lp_struct *this_lp = (struct lp_struct *)handle;
set_bit(LP_PREEMPT_REQUEST, &this_lp->bits);
return (1);
} | 0 | [
"CWE-787"
] | linux | 3e21f4af170bebf47c187c1ff8bf155583c9f3b1 | 199,033,956,660,712,740,000,000,000,000,000,000,000 | 6 | char: lp: fix possible integer overflow in lp_setup()
The lp_setup() code doesn't apply any bounds checking when passing
"lp=none", and only in this case, resulting in an overflow of the
parport_nr[] array. All versions in Git history are affected.
Reported-By: Roee Hay <roee.hay@hcl.com>
Cc: Ben Hutchings <ben@decad... |
bool CmdAuthenticate::run(const string& dbname,
BSONObj& cmdObj,
int,
string& errmsg,
BSONObjBuilder& result,
bool fromRepl) {
mutablebson::Document cmdToLog... | 0 | [
"CWE-20"
] | mongo | c151e0660b9736fe66b224f1129a16871165251b | 89,836,698,433,585,100,000,000,000,000,000,000,000 | 48 | SERVER-13573 Fix x.509 auth exception |
static int __ffs_func_bind_do_nums(enum ffs_entity_type type, u8 *valuep,
struct usb_descriptor_header *desc,
void *priv)
{
struct ffs_function *func = priv;
unsigned idx;
u8 newValue;
switch (type) {
default:
case FFS_DESCRIPTOR:
/* Handled in previous pass by __ffs_func_bind_do_descs() */
ret... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 38740a5b87d53ceb89eb2c970150f6e94e00373a | 190,134,218,662,015,380,000,000,000,000,000,000,000 | 54 | usb: gadget: f_fs: Fix use-after-free
When using asynchronous read or write operations on the USB endpoints the
issuer of the IO request is notified by calling the ki_complete() callback
of the submitted kiocb when the URB has been completed.
Calling this ki_complete() callback will free kiocb. Make sure that the
str... |
static void vmxnet3_net_init(VMXNET3State *s)
{
DeviceState *d = DEVICE(s);
VMW_CBPRN("vmxnet3_net_init called...");
qemu_macaddr_default_if_unset(&s->conf.macaddr);
/* Windows guest will query the address that was set on init */
memcpy(&s->perm_mac.a, &s->conf.macaddr.a, sizeof(s->perm_mac.a));
... | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 318,138,255,528,664,800,000,000,000,000,000,000,000 | 39 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
static unsigned long sbusfb_mmapsize(long size, unsigned long fbsize)
{
if (size == SBUS_MMAP_EMPTY) return 0;
if (size >= 0) return size;
return fbsize * (-size);
} | 0 | [
"CWE-200"
] | linux | 250c6c49e3b68756b14983c076183568636e2bde | 95,195,626,033,807,890,000,000,000,000,000,000,000 | 6 | fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper().
Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in
sbusfb_ioctl_helper().
'index' is defined as an int in sbusfb_ioctl_helper().
We retrieve this from the user:
if (get_user(index, &c->index) ||
__get_user(count, &c->co... |
static void io_iopoll_complete(struct io_ring_ctx *ctx, unsigned int *nr_events,
struct list_head *done)
{
struct req_batch rb;
struct io_kiocb *req;
/* order with ->result store in io_complete_rw_iopoll() */
smp_rmb();
io_init_req_batch(&rb);
while (!list_empty(done)) {
int cflags = 0;
req = lis... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 286,004,790,192,814,360,000,000,000,000,000,000,000 | 36 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
OwnedBufferFragmentImpl(absl::string_view data, const Releasor& releasor)
: releasor_(releasor), size_(data.size()) {
ASSERT(releasor != nullptr);
memcpy(data_, data.data(), data.size());
} | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 103,050,824,064,635,660,000,000,000,000,000,000,000 | 5 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
static void mysql_close_free_options(MYSQL *mysql)
{
DBUG_ENTER("mysql_close_free_options");
my_free(mysql->options.user);
my_free(mysql->options.host);
my_free(mysql->options.password);
my_free(mysql->options.unix_socket);
my_free(mysql->options.db);
my_free(mysql->options.my_cnf_file);
my_free(mysql-... | 0 | [
"CWE-254"
] | server | f0d774d48416bb06063184380b684380ca005a41 | 167,854,903,333,142,580,000,000,000,000,000,000,000 | 46 | MDEV-9212 ssl-validate-cert incorrect hostname check
Reimplement ssl_verify_server_cert() using the logic
from https://wiki.openssl.org/index.php/Hostname_validation
The bug was discovered by Alex Gaynor. |
TPM_ALG_ID_Marshal(TPM_ALG_ID *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += UINT16_Marshal(source, buffer, size);
return written;
} | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 262,884,892,311,198,030,000,000,000,000,000,000,000 | 6 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
SPL_METHOD(GlobIterator, count)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (php_stream_is(intern->u.dir.dirp ,&php_glob_stream_ops)) {
RETURN_LONG(php_glob_stream_get_count(intern->u.d... | 0 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 123,931,961,406,034,270,000,000,000,000,000,000,000 | 15 | Fix bug #72262 - do not overflow int |
static int fts3AllocateSegdirIdx(
Fts3Table *p,
int iLangid, /* Language id */
int iIndex, /* Index for p->aIndex */
int iLevel,
int *piIdx
){
int rc; /* Return Code */
sqlite3_stmt *pNextIdx; /* Query for next idx at level iLevel */... | 1 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 20,003,406,267,964,867,000,000,000,000,000,000,000 | 43 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
static void qxl_secondary_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->realize = qxl_realize_secondary;
k->class_id = PCI_CLASS_DISPLAY_OTHER;
dc->desc = "Spice QXL GPU (secondary)";
} | 0 | [
"CWE-476"
] | qemu | d52680fc932efb8a2f334cc6993e705ed1e31e99 | 201,018,280,289,413,400,000,000,000,000,000,000,000 | 9 | qxl: check release info object
When releasing spice resources in release_resource() routine,
if release info object 'ext.info' is null, it leads to null
pointer dereference. Add check to avoid it.
Reported-by: Bugs SysSec <bugs-syssec@rub.de>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 20190425... |
static void __init hugetlb_init_hstates(void)
{
struct hstate *h, *h2;
for_each_hstate(h) {
if (minimum_order > huge_page_order(h))
minimum_order = huge_page_order(h);
/* oversize hugepages were init'ed in early boot */
if (!hstate_is_gigantic(h))
hugetlb_hstate_alloc_pages(h);
/*
* Set demote ord... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 215,136,966,939,710,900,000,000,000,000,000,000,000 | 34 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
bool is_empty() const
/*{\Mop returns true if |\Mvar| is empty, false otherwise.}*/
{ Const_decorator D(pm());
Face_const_iterator f = D.faces_begin();
if(check_tag(typename Is_extended_kernel<Extended_kernel>::
value_type()))
return (D.number_of_vertices()==4 &&
D.num... | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 212,140,879,818,292,100,000,000,000,000,000,000,000 | 16 | Fix Nef_2 and Nef_S2 IO |
void Chapter::Init(unsigned int* seed) {
id_ = NULL;
start_timecode_ = 0;
end_timecode_ = 0;
displays_ = NULL;
displays_size_ = 0;
displays_count_ = 0;
uid_ = MakeUID(seed);
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 68,384,319,701,389,660,000,000,000,000,000,000,000 | 9 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static int encrypt_and_sign_nss_2_2 (
struct crypto_instance *instance,
const unsigned char *buf_in,
const size_t buf_in_len,
unsigned char *buf_out,
size_t *buf_out_len)
{
if (encrypt_nss(instance,
buf_in, buf_in_len,
buf_out + sizeof(struct crypto_config_header), buf_out_len) < 0) {
return -1;
}
*buf... | 0 | [
"CWE-703"
] | corosync | b3f456a8ceefac6e9f2e9acc2ea0c159d412b595 | 316,586,379,566,411,900,000,000,000,000,000,000,000 | 24 | totemcrypto: fix hmac key initialization
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com> |
TEST_F(DateExpressionTest, RejectsEmptyArray) {
auto expCtx = getExpCtx();
for (auto&& expName : dateExpressions) {
BSONObj spec = BSON(expName << BSONArray());
// It will parse as an ExpressionArray, and fail at runtime.
ASSERT_THROWS_CODE(Expression::parseExpression(expCtx, spec, expCt... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 322,066,376,971,013,740,000,000,000,000,000,000,000 | 10 | SERVER-38070 fix infinite loop in agg expression |
int ext4_try_to_evict_inline_data(handle_t *handle,
struct inode *inode,
int needed)
{
int error;
struct ext4_xattr_entry *entry;
struct ext4_inode *raw_inode;
struct ext4_iloc iloc;
error = ext4_get_inode_loc(inode, &iloc);
if (error)
return error;
raw_inode = ext4_raw_inode(&iloc);
entry = (st... | 1 | [
"CWE-787"
] | linux | 8bc1379b82b8e809eef77a9fedbb75c6c297be19 | 123,722,114,301,665,780,000,000,000,000,000,000,000 | 27 | ext4: avoid running out of journal credits when appending to an inline file
Use a separate journal transaction if it turns out that we need to
convert an inline file to use an data block. Otherwise we could end
up failing due to not having journal credits.
This addresses CVE-2018-10883.
https://bugzilla.kernel.org/... |
static inline void __flush_tlb_global(void)
{
PVOP_VCALL0(mmu.flush_tlb_kernel);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 152,834,452,230,028,780,000,000,000,000,000,000,000 | 4 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
{
zend_bool nested;
zend_op_array *op_array = EX(op_array);
EG(current_execute_data) = EX(prev_execute_data);
EG(opline_ptr) = NULL;
if (!EG(active_symbol_table)) {
zval ***cv = EX(CVs);
zval ***end = cv + EX(op_array)->last_var;
whil... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 293,438,628,580,868,060,000,000,000,000,000,000,000 | 105 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void Gfx::opConcat(Object args[], int numArgs) {
state->concatCTM(args[0].getNum(), args[1].getNum(),
args[2].getNum(), args[3].getNum(),
args[4].getNum(), args[5].getNum());
out->updateCTM(state, args[0].getNum(), args[1].getNum(),
args[2].getNum(), args[3].getNum(),
args[4].getNum(), args[5].getNu... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 199,618,562,734,336,100,000,000,000,000,000,000,000 | 9 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
void addStreamEncoderFilter(StreamEncoderFilterSharedPtr filter,
Matcher::MatchTreeSharedPtr<HttpMatchingData> match_tree) override {
if (match_tree) {
addStreamEncoderFilterWorker(
filter,
std::make_shared<FilterMatchState>(std::move(match_tree),
... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 145,400,291,242,055,780,000,000,000,000,000,000,000 | 13 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int ext4_do_update_inode(handle_t *handle,
struct inode *inode,
struct ext4_iloc *iloc)
{
struct ext4_inode *raw_inode = ext4_raw_inode(iloc);
struct ext4_inode_info *ei = EXT4_I(inode);
struct buffer_head *bh = iloc->bh;
struct super_block *sb = inode->i_sb;
int err = 0, rc, block;
int need_datasy... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 21,922,850,585,667,695,000,000,000,000,000,000,000 | 138 | 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 int translate_compat_table(const char *name,
unsigned int valid_hooks,
struct xt_table_info **pinfo,
void **pentry0,
unsigned int total_size,
unsigned int number,
unsigned int *hook_entries,
unsigned int *underflows)
{
unsigned int i, j;
struct xt_table_info *newinfo, ... | 0 | [
"CWE-284",
"CWE-264"
] | linux | ce683e5f9d045e5d67d1312a42b359cb2ab2a13c | 220,548,165,331,984,820,000,000,000,000,000,000,000 | 158 | netfilter: x_tables: check for bogus target offset
We're currently asserting that targetoff + targetsize <= nextoff.
Extend it to also check that targetoff is >= sizeof(xt_entry).
Since this is generic code, add an argument pointing to the start of the
match/target, we can then derive the base structure size from the... |
static DWORD WINAPI win_stdio_thread(LPVOID param)
{
CharDriverState *chr = param;
WinStdioCharState *stdio = chr->opaque;
int ret;
DWORD dwSize;
while (1) {
/* Wait for one byte */
ret = ReadFile(stdio->hStdIn, &stdio->win_stdio_buf, 1, &dwSize, NUL... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 256,091,452,480,502,150,000,000,000,000,000,000,000 | 38 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
static struct socket *vxlan_create_sock(struct net *net, bool ipv6,
__be16 port, u32 flags, int ifindex)
{
struct socket *sock;
struct udp_port_cfg udp_conf;
int err;
memset(&udp_conf, 0, sizeof(udp_conf));
if (ipv6) {
udp_conf.family = AF_INET6;
udp_conf.use_udp6_rx_checksums =
!(flags & VXLAN_F_... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 55,847,493,956,773,550,000,000,000,000,000,000,000 | 28 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
static ssize_t raw_send(nghttp2_session *ngh2, const uint8_t *data,
size_t length, int flags, void *user_data)
{
h2_proxy_session *session = user_data;
apr_bucket *b;
apr_status_t status;
int flush = 1;
if (data) {
b = apr_bucket_transient_create((const char*)data, l... | 0 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 227,413,074,405,018,170,000,000,000,000,000,000,000 | 25 | * fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now,
mpm event backport to 2.4.x up for vote).
* Fixes stream cleanup when connection throttling is in place.
* Counts stream resets by client on streams initiated by client as cause
for connection throttling.
* Header length checks are no... |
iakerb_gss_wrap_iov(OM_uint32 *minor_status, gss_ctx_id_t context_handle,
int conf_req_flag, gss_qop_t qop_req, int *conf_state,
gss_iov_buffer_desc *iov, int iov_count)
{
iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle;
if (ctx->gssc == GSS_C_NO_CONTEXT)
r... | 0 | [
"CWE-18"
] | krb5 | e04f0283516e80d2f93366e0d479d13c9b5c8c2a | 67,618,219,903,281,830,000,000,000,000,000,000,000 | 12 | Fix IAKERB context aliasing bugs [CVE-2015-2696]
The IAKERB mechanism currently replaces its context handle with the
krb5 mechanism handle upon establishment, under the assumption that
most GSS functions are only called after context establishment. This
assumption is incorrect, and can lead to aliasing violations for... |
static void fts3DeclareVtab(int *pRc, Fts3Table *p){
if( *pRc==SQLITE_OK ){
int i; /* Iterator variable */
int rc; /* Return code */
char *zSql; /* SQL statement passed to declare_vtab() */
char *zCols; /* List of user def... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 225,771,639,223,108,130,000,000,000,000,000,000,000 | 33 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
bool Virtual_column_info::fix_session_expr(THD *thd)
{
if (!need_refix())
return false;
DBUG_ASSERT(!expr->fixed);
if (fix_expr(thd))
return true;
return false;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 5,976,893,182,532,330,000,000,000,000,000,000,000 | 10 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *vf)
{
struct usb_usbvision *usbvision = video_drvdata(file);
int format_idx;
/* Find requested format in available ones */
for (format_idx = 0; format_idx < USBVISION_SUPPORTED_PALETTES; format_idx++) {
if (vf->fmt.pix... | 0 | [
"CWE-17"
] | media_tree | fa52bd506f274b7619955917abfde355e3d19ffe | 278,585,116,321,762,650,000,000,000,000,000,000,000 | 28 | [media] usbvision: fix crash on detecting device with invalid configuration
The usbvision driver crashes when a specially crafted usb device with invalid
number of interfaces or endpoints is detected. This fix adds checks that the
device has proper configuration expected by the driver.
Reported-by: Ralf Spenneberg <r... |
bfad_im_hw_version_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct Scsi_Host *shost = class_to_shost(dev);
struct bfad_im_port_s *im_port =
(struct bfad_im_port_s *) shost->hostdata[0];
struct bfad_s *bfad = im_port->bfad;
char hw_ver[BFA_VERSION_LEN];
bfa_get_pci_chip_rev(&bfad... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 0e62395da2bd5166d7c9e14cbc7503b256a34cb0 | 15,962,029,645,808,870,000,000,000,000,000,000,000 | 12 | scsi: bfa: release allocated memory in case of error
In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to
be released.
Link: https://lore.kernel.org/r/20190910234417.22151-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Martin K. Petersen <m... |
int dd_rename(struct dump_dir *dd, const char *new_path)
{
if (!dd->locked)
{
error_msg("unlocked problem directory %s cannot be renamed", dd->dd_dirname);
return -1;
}
int res = rename(dd->dd_dirname, new_path);
if (res == 0)
{
free(dd->dd_dirname);
dd->dd_dirna... | 1 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 161,012,730,427,099,660,000,000,000,000,000,000,000 | 16 | lib: fix races in dump directory handling code
Florian Weimer <fweimer@redhat.com>:
dd_opendir() should keep a file handle (opened with O_DIRECTORY) and
use openat() and similar functions to access files in it.
...
The file system manipulation functions should guard against hard
links (check tha... |
filter_open(const char *file_access, uint buffer_size, ref * pfile,
const stream_procs * procs, const stream_template * templat,
const stream_state * st, gs_memory_t *mem)
{
stream *s;
uint ssize = gs_struct_type_size(templat->stype);
stream_state *sst = 0;
int code;
if (tem... | 0 | [] | ghostpdl | 407cc61e87b0fd9d44d72ca740af7d3c85dee78d | 83,838,586,091,041,560,000,000,000,000,000,000,000 | 46 | "starting_arg_file" should only apply once.
The "starting_arg_file == true" setting should apply to the *first* call to
lib_file_open() in the context of a given call to runarg(). Previously, it
remained set for the entire duration of the runarg() call, resulting in the
current directory being searched for any resourc... |
static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_report_akcipher rakcipher;
strncpy(rakcipher.type, "akcipher", sizeof(rakcipher.type));
if (nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER,
sizeof(struct crypto_report_akcipher), &rakcipher))
goto nla_put_failure;
retu... | 0 | [
"CWE-200"
] | linux | f43f39958beb206b53292801e216d9b8a660f087 | 52,159,595,211,425,610,000,000,000,000,000,000,000 | 14 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG... |
DnD_CreateStagingDirectory(void)
{
const char *realRoot;
const char *apparentRoot;
char *existingDir;
/*
* On XDG platforms, there are two roots:
*
* 1. Per-user real root ($HOME/.cache/vmware/drag_and_drop)
*
* Files are stored here, leaving cleanup to discretion of users and
* ... | 0 | [] | open-vm-tools | e88f91b00a715b79255de6576506d80ecfdb064c | 260,822,298,163,407,920,000,000,000,000,000,000,000 | 69 | Fix possible security issue with the permissions of the intermediate
staging directory and path
/tmp/VMwareDnD is a staging directory used for DnD and CnP. It should be
a regular directory, but malicious code or user may create the /tmp/VMwareDnD
as a symbolic link which points elsewhere on the system. This may prov... |
_gnutls_hash_reset (digest_hd_st * handle)
{
if (handle->handle == NULL)
{
return;
}
handle->reset (handle->handle);
} | 0 | [
"CWE-310"
] | gnutls | 8dc2822966f64dd9cf7dde9c7aacd80d49d3ffe5 | 43,298,187,216,752,010,000,000,000,000,000,000,000 | 9 | Fixes to avoid a timing attack in TLS CBC record parsing. |
pppoe_info_new (GladeXML *xml,
NMApplet *applet,
DBusGMethodInvocation *context,
NMConnection *connection,
NMActiveConnection *active_connection)
{
NMPppoeInfo *info;
info = g_new0 (NMPppoeInfo, 1);
info->username_entry = GTK_ENTRY (glade_xml_get_wid... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 2,535,178,243,802,704,200,000,000,000,000,000,000 | 25 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
int sldns_str2wire_hip_buf(const char* str, uint8_t* rd, size_t* len)
{
char* s, *end;
int e;
size_t hitlen, pklen = 0;
/* presentation format:
* pk-algo HIThex pubkeybase64
* wireformat:
* hitlen[1byte] pkalgo[1byte] pubkeylen[2byte] [hit] [pubkey] */
if(*len < 4)
return LDNS_WIREPARSE_ERR_BUFFER_TOO_SM... | 0 | [] | unbound | 3f3cadd416d6efa92ff2d548ac090f42cd79fee9 | 243,487,101,272,224,200,000,000,000,000,000,000,000 | 49 | - Fix Out of Bounds Write in sldns_str2wire_str_buf(),
reported by X41 D-Sec. |
type_option (const gchar *type,
const gchar *option,
const gchar *default_str)
{
if (type && cockpit_conf_string (type, option))
return cockpit_conf_string (type, option);
return default_str;
} | 0 | [
"CWE-1021"
] | cockpit | 46f6839d1af4e662648a85f3e54bba2d57f39f0e | 118,271,718,326,602,380,000,000,000,000,000,000,000 | 9 | ws: Restrict our cookie to the login host only
Mark our cookie as `SameSite: Strict` [1]. The current `None` default
will soon be moved to `Lax` by Firefox and Chromium, and recent versions
started to throw a warning about it.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
https://... |
ZEND_API int zend_ts_hash_exists(TsHashTable *ht, char *arKey, uint nKeyLength)
{
int retval;
begin_read(ht);
retval = zend_hash_exists(TS_HASH(ht), arKey, nKeyLength);
end_read(ht);
return retval;
} | 0 | [] | php-src | 24125f0f26f3787c006e4a51611ba33ee3b841cb | 147,676,074,159,206,900,000,000,000,000,000,000,000 | 10 | Fixed bug #68676 (Explicit Double Free) |
char *FLTGetSpatialComparisonCommonExpression(FilterEncodingNode *psNode, layerObj *lp)
{
char *pszExpression = NULL;
shapeObj *psQueryShape = NULL;
double dfDistance = -1;
int nUnit = -1, nLayerUnit = -1;
char *pszWktText = NULL;
char szBuffer[256];
char *pszTmp=NULL;
projectionObj sProjTmp;
rectObj ... | 0 | [
"CWE-200",
"CWE-119"
] | mapserver | e52a436c0e1c5e9f7ef13428dba83194a800f4df | 71,236,188,191,928,340,000,000,000,000,000,000,000 | 164 | security fix (patch by EvenR) |
TIFFFdOpen(int ifd, const char* name, const char* mode)
{
TIFF* tif;
int fSuppressMap;
int m;
fSuppressMap=0;
for (m=0; mode[m]!=0; m++)
{
if (mode[m]=='u')
{
fSuppressMap=1;
break;
}
}
tif = TIFFClientOpen(name, mode, (thandle_t)ifd, /* FIXME: WIN64 cast to pointer warning */
_tiffReadProc, _tif... | 0 | [
"CWE-119"
] | libtiff | d60332057b9575ada4f264489582b13e30137be1 | 123,574,636,376,880,280,000,000,000,000,000,000,000 | 23 | * libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc()
* libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero
initialize tif_rawdata.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.