func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline int strtaglen(const char *str, rpm_count_t c, const char *end)
{
const char *start = str;
const char *s = NULL;
int len = -1; /* assume failure */
if (end) {
while (end > start && (s = memchr(start, '\0', end-start))) {
if (--c == 0)
break;
start = s + 1;
}
} else {
whi... | 0 | [
"CWE-125"
] | rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | 279,615,927,234,751,600,000,000,000,000,000,000,000 | 25 | hdrblobInit() needs bounds checks too
Users can pass untrusted data to hdrblobInit() and it must be robust
against this. |
node_new_cclass_locked(void)
{
Node* node = node_new_locked();
CHECK_NULL_RETURN(node);
SET_NTYPE(node, NT_CCLASS);
initialize_cclass(NCCLASS(node));
return node;
} | 0 | [
"CWE-125"
] | Onigmo | 29e7e6aedebafd5efbbd90655c8e0d495035d7b4 | 185,401,371,934,016,940,000,000,000,000,000,000,000 | 9 | bug: Fix out of bounds read
Add boundary check before PFETCH.
Based on the following commits on https://github.com/kkos/oniguruma ,
but not the same.
* 68c395576813b3f9812427f94d272bcffaca316c
* dc0a23eb16961f98d2a5a2128d18bd4602058a10
* 5186c7c706a7f280110e6a0b060f87d0f7d790ce
* 562bf4825b301693180c674994bf708b28b0... |
R_API RList *r_bin_java_get_field_offsets(RBinJavaObj *bin) {
RBinJavaField *fm_type = NULL;
RList *the_list = r_list_new ();
if (!the_list) {
return NULL;
}
RListIter *iter = NULL;
ut64 *paddr = NULL;
if (!bin) {
return the_list;
}
the_list->free = free;
r_list_foreach (bin->fields_list, iter, fm_type) {... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 236,991,665,753,346,370,000,000,000,000,000,000,000 | 24 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static inline void syn_ack_recalc(struct request_sock *req, const int thresh,
const int max_retries,
const u8 rskq_defer_accept,
int *expire, int *resend)
{
if (!rskq_defer_accept) {
*expire = req->num_timeout >= thresh;
*resend = 1;
return;
}
*expire = req->num_timeout >= thresh &&
(!ine... | 0 | [
"CWE-200",
"CWE-415"
] | linux | 657831ffc38e30092a2d5f03d385d710eb88b09a | 86,185,836,479,602,460,000,000,000,000,000,000,000 | 20 | dccp/tcp: do not inherit mc_list from parent
syzkaller found a way to trigger double frees from ip_mc_drop_socket()
It turns out that leave a copy of parent mc_list at accept() time,
which is very bad.
Very similar to commit 8b485ce69876 ("tcp: do not inherit
fastopen_req from parent")
Initial report from Pray3r, c... |
CURLcode Curl_http_connect(struct Curl_easy *data, bool *done)
{
CURLcode result;
struct connectdata *conn = data->conn;
/* We default to persistent connections. We set this already in this connect
function to make the re-use checks properly be able to check this bit. */
connkeep(conn, "HTTP default");
#... | 0 | [] | curl | 48d7064a49148f03942380967da739dcde1cdc24 | 287,836,912,478,442,350,000,000,000,000,000,000,000 | 45 | cookie: apply limits
- Send no more than 150 cookies per request
- Cap the max length used for a cookie: header to 8K
- Cap the max number of received Set-Cookie: headers to 50
Bug: https://curl.se/docs/CVE-2022-32205.html
CVE-2022-32205
Reported-by: Harry Sintonen
Closes #9048 |
static int add_repo_as_submodule(git_index_entry **out, git_index *index, const char *path)
{
git_repository *sub;
git_buf abspath = GIT_BUF_INIT;
git_repository *repo = INDEX_OWNER(index);
git_reference *head;
git_index_entry *entry;
struct stat st;
int error;
if (index_entry_create(&entry, INDEX_OWNER(index)... | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 232,697,550,563,323,800,000,000,000,000,000,000,000 | 39 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
static void cjson_create_object_reference_should_create_an_object_reference(void) {
cJSON *number_reference = NULL;
cJSON *number_object = cJSON_CreateObject();
cJSON *number = cJSON_CreateNumber(42);
const char key[] = "number";
TEST_ASSERT_TRUE(cJSON_IsNumber(number));
TEST_ASSERT_TRUE(cJSON_... | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 162,573,690,325,148,670,000,000,000,000,000,000,000 | 17 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
static void dump_invalid_creds(const struct cred *cred, const char *label,
const struct task_struct *tsk)
{
printk(KERN_ERR "CRED: %s credentials: %p %s%s%s\n",
label, cred,
cred == &init_cred ? "[init]" : "",
cred == tsk->real_cred ? "[real]" : "",
cred == tsk->cred ? "[eff]"... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 117,474,530,431,774,970,000,000,000,000,000,000,000 | 27 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
_XimProtoSetIMValues(
XIM xim,
XIMArg *arg)
{
Xim im = (Xim)xim;
XimDefIMValues im_values;
INT16 len;
CARD16 *buf_s;
char *tmp;
CARD32 tmp_buf32[BUFSIZE/4];
char *tmp_buf = (char *)tmp_buf32;
char *buf;
int buf_size;
char *data;
int data_len;
... | 1 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 47,017,279,157,451,600,000,000,000,000,000,000,000 | 127 | 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> |
void tpyl_box_del(GF_Box *s)
{
gf_free((GF_NTYLBox *)s);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 301,121,757,826,839,850,000,000,000,000,000,000,000 | 4 | fixed #1587 |
void opj_tcd_makelayer( opj_tcd_t *tcd,
OPJ_UINT32 layno,
OPJ_FLOAT64 thresh,
OPJ_UINT32 final)
{
OPJ_UINT32 compno, resno, bandno, precno, cblkno;
OPJ_UINT32 p... | 0 | [
"CWE-190"
] | openjpeg | 5d00b719f4b93b1445e6fb4c766b9a9883c57949 | 308,788,085,616,151,000,000,000,000,000,000,000,000 | 84 | [trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
Update issue 431 |
SMBC_attr_server(TALLOC_CTX *ctx,
SMBCCTX *context,
const char *server,
uint16_t port,
const char *share,
char **pp_workgroup,
char **pp_username,
char **pp_password)
{
int flags;
struct cli_s... | 1 | [
"CWE-20"
] | samba | 1ba49b8f389eda3414b14410c7fbcb4041ca06b1 | 262,243,789,624,055,630,000,000,000,000,000,000,000 | 162 | CVE-2015-5296: s3:libsmb: force signing when requiring encryption in SMBC_server_internal()
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> |
GF_Box *saio_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_SampleAuxiliaryInfoOffsetBox, GF_ISOM_BOX_TYPE_SAIO);
return (GF_Box *)tmp; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 265,271,879,045,300,400,000,000,000,000,000,000,000 | 5 | fixed #1587 |
return 0;
}
static int flashnode_match_index(struct device *dev, void *data)
{
struct iscsi_bus_flash_session *fnode_sess = NULL;
int ret = 0;
if (!iscsi_flashnode_bus_match(dev, NULL))
goto exit_match_index;
fnode_sess = iscsi_dev_to_flash_session(dev);
ret = (fnode_sess->target_id == *((int *)data)) ? 1 : ... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 224,532,008,584,017,860,000,000,000,000,000,000,000 | 14 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
Magick_RenderingIntentString_from_PNG_RenderingIntent(const int ping_intent)
{
switch (ping_intent)
{
case 0:
return "Perceptual Intent";
case 1:
return "Relative Intent";
case 2:
return "Saturation Intent";
case 3:
return "Absolute Intent";
default:
return "Und... | 0 | [
"CWE-476"
] | ImageMagick | 816ecab6c532ae086ff4186b3eaf4aa7092d536f | 36,685,195,610,002,484,000,000,000,000,000,000,000 | 20 | https://github.com/ImageMagick/ImageMagick/issues/58 |
gst_riff_create_audio_caps (guint16 codec_id,
gst_riff_strh * strh, gst_riff_strf_auds * strf,
GstBuffer * strf_data, GstBuffer * strd_data, char **codec_name,
gint channel_reorder_map[18])
{
gboolean block_align = FALSE, rate_chan = TRUE;
GstCaps *caps = NULL;
gint i;
if (channel_reorder_map)
... | 1 | [
"CWE-369"
] | gst-plugins-base | 81d3ba3fa212bb25fe2ac661993887c4b69af6f1 | 196,331,881,292,421,460,000,000,000,000,000,000,000 | 614 | riff-media: Check for valid channels/rate before using the values
Otherwise we might divide by zero or otherwise create invalid caps.
https://bugzilla.gnome.org/show_bug.cgi?id=777262 |
static bool is_dvbv3_delsys(u32 delsys)
{
return (delsys == SYS_DVBT) || (delsys == SYS_DVBC_ANNEX_A) ||
(delsys == SYS_DVBS) || (delsys == SYS_ATSC);
} | 0 | [
"CWE-416"
] | linux | b1cb7372fa822af6c06c8045963571d13ad6348b | 15,217,339,326,637,654,000,000,000,000,000,000,000 | 5 | dvb_frontend: don't use-after-free the frontend struct
dvb_frontend_invoke_release() may free the frontend struct.
So, the free logic can't update it anymore after calling it.
That's OK, as __dvb_frontend_free() is called only when the
krefs are zeroed, so nobody is using it anymore.
That should fix the following KA... |
void PSOutputDev::restoreState(GfxState *state) {
writePS("Q\n");
--numSaves;
} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 1,255,558,228,909,976,800,000,000,000,000,000,000 | 4 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
void NumberFormatTest::TestZeroScientific10547() {
UErrorCode status = U_ZERO_ERROR;
DecimalFormat fmt("0.00E0", status);
if (!assertSuccess("Format creation", status)) {
return;
}
UnicodeString out;
fmt.format(-0.0, out);
assertEquals("format", "-0.00E0", out, true);
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 7,367,343,289,536,131,000,000,000,000,000,000,000 | 10 | ICU-20246 Fixing another integer overflow in number parsing. |
yaffs_make_unlinked( YAFFSFS_INFO * yaffsfs, TSK_FS_FILE * a_fs_file )
{
TSK_FS_FILE * fs_file = a_fs_file;
if (tsk_verbose)
tsk_fprintf(stderr, "yaffs_make_unlinked: Making virtual unlinked node\n");
if (yaffs_make_directory(yaffsfs, fs_file, YAFFS_OBJECT_UNLINKED, YAFFS_OBJECT_UNLINKED_NAME)... | 0 | [
"CWE-125",
"CWE-787"
] | sleuthkit | 459ae818fc8dae717549810150de4d191ce158f1 | 128,457,212,225,824,040,000,000,000,000,000,000,000 | 12 | Fix stack buffer overflow in yaffsfs_istat
Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str. |
xmlBufBackToBuffer(xmlBufPtr buf) {
xmlBufferPtr ret;
if (buf == NULL)
return(NULL);
CHECK_COMPAT(buf)
if ((buf->error) || (buf->buffer == NULL)) {
xmlBufFree(buf);
return(NULL);
}
ret = buf->buffer;
/*
* What to do in case of error in the buffer ???
*/
... | 0 | [
"CWE-190"
] | libxml2 | 6c283d83eccd940bcde15634ac8c7f100e3caefd | 335,008,186,657,931,000,000,000,000,000,000,000,000 | 44 | [CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer
In several places, the code handling string buffers didn't check for
integer overflow or used wrong types for buffer sizes. This could
result in out-of-bounds writes or other memory errors when working on
large, multi-gigabyte buffers.
Thanks to Felix Wil... |
int ras_validate(jas_stream_t *in)
{
jas_uchar buf[RAS_MAGICLEN];
int i;
int n;
uint_fast32_t magic;
assert(JAS_STREAM_MAXPUTBACK >= RAS_MAGICLEN);
/* Read the validation data (i.e., the data used for detecting
the format). */
if ((n = jas_stream_read(in, buf, RAS_MAGICLEN)) < 0) {
return -1;
}
/* Put ... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 82,111,794,759,022,240,000,000,000,000,000,000,000 | 39 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
static void SFDDumpTtfInstrs(FILE *sfd,SplineChar *sc)
{
SFDDumpTtfInstrsExplicit( sfd, sc->ttf_instrs,sc->ttf_instrs_len );
} | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 160,619,115,822,003,640,000,000,000,000,000,000,000 | 4 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
mime_list_stop (NautilusDirectory *directory)
{
NautilusFile *file;
if (directory->details->mime_list_in_progress != NULL) {
file = directory->details->mime_list_in_progress->mime_list_file;
if (file != NULL) {
g_assert (NAUTILUS_IS_FILE (file));
g_assert (file->details->directory == directory);
if (is_... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 139,583,051,244,995,310,000,000,000,000,000,000,000 | 20 | 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-... |
ready_callback_key_compare (gconstpointer a, gconstpointer b)
{
const ReadyCallback *callback_a, *callback_b;
callback_a = a;
callback_b = b;
if (callback_a->file < callback_b->file) {
return -1;
}
if (callback_a->file > callback_b->file) {
return 1;
}
if (callback_a->file == NULL) {
/* ANSI C doesn't a... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 229,894,113,638,989,460,000,000,000,000,000,000,000 | 42 | 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-... |
nautilus_get_data_file_path (const char *partial_path)
{
char *path;
char *user_directory;
/* first try the user's home directory */
user_directory = nautilus_get_user_directory ();
path = g_build_filename (user_directory, partial_path, NULL);
g_free (user_directory);
if (g_file_test (path, G_FILE_TEST_EXISTS))... | 0 | [] | nautilus | a0f7bb5f2e9af8ecb463b13da834fa8559b0a481 | 312,941,536,561,954,030,000,000,000,000,000,000,000 | 23 | Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop
2009-02-25 Alexander Larsson <alexl@redhat.com>
* src/nautilus-application.c:
Use $XDG_DATA_HOME/.converted-launchers as marker for
one-time desktop file trust operation.
* libnautilus-private/nautilus-file-utilities.[ch]:
Ad... |
find_field_in_order_list (Field *field, void *data)
{
ORDER *group= (ORDER *) data;
bool part_found= 0;
for (ORDER *tmp_group= group; tmp_group; tmp_group=tmp_group->next)
{
Item *item= (*tmp_group->item)->real_item();
if (item->type() == Item::FIELD_ITEM &&
((Item_field*) item)->field->eq(field... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 248,297,169,943,715,970,000,000,000,000,000,000,000 | 16 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
qb_ipcs_context_get(struct qb_ipcs_connection *c)
{
if (c == NULL) {
return NULL;
}
return c->context;
} | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 204,659,611,893,128,420,000,000,000,000,000,000,000 | 7 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
gst_rmdemux_parse_audio_packet (GstRMDemux * rmdemux, GstRMDemuxStream * stream,
GstBuffer * in, guint offset, guint16 version,
GstClockTime timestamp, gboolean key)
{
GstFlowReturn ret;
GstBuffer *buffer;
if (gst_buffer_get_size (in) < offset)
goto not_enough_data;
buffer = gst_buffer_copy_region... | 0 | [] | gst-plugins-ugly | 9726aaf78e6643a5955864f444852423de58de29 | 195,743,971,992,811,640,000,000,000,000,000,000,000 | 54 | rmdemux: Make sure we have enough data available when parsing audio/video packets
Otherwise there will be out-of-bounds reads and potential crashes.
Thanks to Natalie Silvanovich for reporting.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37
Part-of: <https://gitlab.freedesktop.org/gstre... |
DEFUN (neighbor_capability_orf_prefix,
neighbor_capability_orf_prefix_cmd,
NEIGHBOR_CMD2 "capability orf prefix-list (both|send|receive)",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Advertise capability to the peer\n"
"Advertise ORF capability to the peer\n"
"Advertise prefixlist ... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 37,037,576,861,132,463,000,000,000,000,000,000,000 | 26 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static void core_globals_dtor(php_core_globals *core_globals)
{
if (core_globals->last_error_message) {
free(core_globals->last_error_message);
}
if (core_globals->last_error_file) {
free(core_globals->last_error_file);
}
if (core_globals->disable_functions) {
free(core_globals->disable_functions);
}
if (c... | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 64,874,676,187,903,680,000,000,000,000,000,000,000 | 20 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
Buffers::inputList& Buffers::useData()
{
return dataList_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 221,277,288,610,357,100,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, acl_type_t acltype,
cfg_aclconfctx_t *actx, dns_zone_t *zone,
void (*setzacl)(dns_zone_t *, dns_acl_t *),
void (*clearzacl)(dns_zone_t *))
{
isc_result_t result;
const cfg_obj_t *maps[5] = {NULL, NULL, ... | 0 | [
"CWE-269"
] | bind9 | e4cccf9668c7adee4724a7649ec64685f82c8677 | 72,534,790,893,653,100,000,000,000,000,000,000,000 | 103 | Update-policy 'subdomain' was incorrectly treated as 'zonesub'
resulting in names outside the specified subdomain having the wrong
restrictions for the given key. |
compile_endblock(cctx_T *cctx)
{
scope_T *scope = cctx->ctx_scope;
cctx->ctx_scope = scope->se_outer;
unwind_locals(cctx, scope->se_local_count);
vim_free(scope);
} | 0 | [
"CWE-703",
"CWE-122"
] | vim | d1d8f6bacb489036d0fd479c9dd3c0102c988889 | 71,448,230,576,229,990,000,000,000,000,000,000,000 | 8 | patch 9.0.0211: invalid memory access when compiling :lockvar
Problem: Invalid memory access when compiling :lockvar.
Solution: Don't read past the end of the line. |
static int flakey_status(struct dm_target *ti, status_type_t type,
char *result, unsigned int maxlen)
{
unsigned sz = 0;
struct flakey_c *fc = ti->private;
unsigned drop_writes;
switch (type) {
case STATUSTYPE_INFO:
result[0] = '\0';
break;
case STATUSTYPE_TABLE:
DMEMIT("%s %llu %u %u ", fc->dev->name... | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 272,381,820,754,885,400,000,000,000,000,000,000,000 | 33 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
auto& pathValidationTimeout() {
return pathValidationTimeout_;
} | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 337,635,036,406,105,470,000,000,000,000,000,000,000 | 3 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
clientmgr_attach(ns_clientmgr_t *source, ns_clientmgr_t **targetp) {
int32_t oldrefs;
REQUIRE(VALID_MANAGER(source));
REQUIRE(targetp != NULL && *targetp == NULL);
oldrefs = isc_refcount_increment0(&source->references);
isc_log_write(ns_lctx, NS_LOGCATEGORY_CLIENT, NS_LOGMODULE_CLIENT,
ISC_LOG_DEBUG(3), ... | 0 | [
"CWE-617"
] | bind9 | 15996f0cb15631b95a801e3e88928494a69ad6ee | 130,710,607,125,026,040,000,000,000,000,000,000,000 | 13 | ns_client_error() could assert if rcode was overridden to NOERROR
The client->rcode_override was originally created to force the server
to send SERVFAIL in some cases when it would normally have sent FORMERR.
More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2
commit (part of GL #2790) to force the... |
CAMLprim value caml_string_lessequal(value s1, value s2)
{
return caml_string_compare(s1, s2) <= Val_int(0) ? Val_true : Val_false;
} | 0 | [
"CWE-200"
] | ocaml | 659615c7b100a89eafe6253e7a5b9d84d0e8df74 | 71,391,665,925,242,930,000,000,000,000,000,000,000 | 4 | fix PR#7003 and a few other bugs caused by misuse of Int_val
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 |
ArgParser::argShowObject(char* parameter)
{
parse_object_id(parameter, o.show_trailer, o.show_obj, o.show_gen);
o.require_outfile = false;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 113,954,995,185,244,460,000,000,000,000,000,000,000 | 5 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
get_ftp_greeting (int csock, ccon *con)
{
uerr_t err = 0;
/* Get the server's greeting */
err = ftp_greeting (csock);
if (err != FTPOK)
{
logputs (LOG_NOTQUIET, "Error in server response. Closing.\n");
fd_close (csock);
con->csock = -1;
}
return err;
} | 0 | [
"CWE-200"
] | wget | 3cdfb594cf75f11cdbb9702ac5e856c332ccacfa | 206,994,999,519,630,460,000,000,000,000,000,000,000 | 15 | Don't save user/pw with --xattr
Also the Referer info is reduced to scheme+host+port.
* src/ftp.c (getftp): Change params of set_file_metadata()
* src/http.c (gethttp): Change params of set_file_metadata()
* src/xattr.c (set_file_metadata): Remove user/password from origin URL,
reduce Referer value to scheme/host/p... |
static void cma_set_req_event_data(struct rdma_cm_event *event,
const struct ib_cm_req_event_param *req_data,
void *private_data, int offset)
{
event->param.conn.private_data = private_data + offset;
event->param.conn.private_data_len = IB_CM_REQ_PRIVATE_DATA_SIZE - offset;
event->param.conn.responder_... | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 33,687,468,846,601,455,000,000,000,000,000,000,000 | 17 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
pq_getmessage(StringInfo s, int maxlen)
{
int32 len;
resetStringInfo(s);
/* Read message length word */
if (pq_getbytes((char *) &len, 4) == EOF)
{
ereport(COMMERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("unexpected EOF within message length word")));
return EOF;
}
len = ntohl(len);
if... | 1 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 197,447,342,475,235,600,000,000,000,000,000,000,000 | 64 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
static bool zlibToDataBuf(const byte* bytes, long length, DataBuf& result)
{
uLongf uncompressedLen = length * 2; // just a starting point
int zlibResult;
do {
result.alloc(uncompressedLen);
zlibResult = uncompress((Bytef*)result.pData_, &uncompressedLen, bytes,... | 0 | [
"CWE-190"
] | exiv2 | 491c3ebe3b3faa6d8f75fb28146186792c2439da | 81,768,230,653,470,260,000,000,000,000,000,000,000 | 29 | Avoid negative integer overflow when `iccOffset > chunkLength`.
This fixes #790.
(cherry picked from commit 6fa2e31206127bd8bcac0269311f3775a8d6ea21) |
static void pxa2xx_reset(void *opaque, int line, int level)
{
PXA2xxState *s = (PXA2xxState *) opaque;
if (level && (s->pm_regs[PCFR >> 2] & 0x10)) { /* GPR_EN */
cpu_reset(CPU(s->cpu));
/* TODO: reset peripherals */
}
} | 0 | [
"CWE-119"
] | qemu | caa881abe0e01f9931125a0977ec33c5343e4aa7 | 214,905,597,146,131,650,000,000,000,000,000,000,000 | 9 | pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_leve... |
PJ_DEF(pj_status_t) pjmedia_sdp_parse( pj_pool_t *pool,
char *buf, pj_size_t len,
pjmedia_sdp_session **p_sdp)
{
pj_scanner scanner;
pjmedia_sdp_session *session;
pjmedia_sdp_media *media = NULL;
pjmedia_sdp_attr *attr;
pjmedia_sdp_conn *conn;
pjmedia_sdp_bandw *bandw;
... | 0 | [
"CWE-121",
"CWE-120",
"CWE-787"
] | pjproject | 560a1346f87aabe126509bb24930106dea292b00 | 191,498,180,943,702,900,000,000,000,000,000,000,000 | 145 | Merge pull request from GHSA-f5qg-pqcg-765m |
bool isValidEncodedBinaryContentChar(
char c) {
return std::isalpha(c) || std::isdigit(c) || c == '+' || c == '/' || c == '=';
} | 0 | [
"CWE-787"
] | proxygen | 2f07985bef9fbae124cc63e5c0272e32da4fdaec | 292,035,071,538,549,450,000,000,000,000,000,000,000 | 4 | Fix SEGV in StructuredHeaders::decodeBase64
Summary:
The existing code can potentially cause a SEGV due to an out of bounds write.
This fixes CVE-2019-11921.
Reviewed By: knekritz
Differential Revision: D12983120
fbshipit-source-id: 1d48063595c8d518fd8afcbc941de260af7e37fd |
ntp_source_resolving_end(void)
{
NSR_SetSourceResolvingEndHandler(NULL);
if (reload) {
/* Note, we want reload to come well after the initialisation from
the real time clock - this gives us a fighting chance that the
system-clock scale for the reloaded samples still has a
semblence of vali... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 35,895,099,074,293,685,000,000,000,000,000,000,000 | 24 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
Item_hex_constant(THD *thd, const char *str, uint str_length):
Item_basic_constant(thd)
{
hex_string_init(thd, str, str_length);
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 227,099,543,670,227,300,000,000,000,000,000,000,000 | 5 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
usage(void)
{
#define KEEP(s) s "\n"
static const char msg[] =
{
KEEP("")
KEEP("Options:")
KEEP(" -S << read commands from standard input")
KEEP(" -T TERM use this instead of $TERM")
KEEP(" -V print curses-version")
KEEP(" -x do not try to clear scrollback")
KEEP("")
KEEP... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 177,311,040,666,550,640,000,000,000,000,000,000,000 | 23 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
TEST_F(HttpConnectionManagerImplTest, ServerHeaderPassthroughPresent) {
server_transformation_ = HttpConnectionManagerProto::PASS_THROUGH;
setup(false, "custom-value", false);
setUpEncoderAndDecoder(false, false);
sendRequestHeadersAndData();
const HeaderMap* altered_headers = sendResponseHeaders(
Head... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 129,033,781,416,824,790,000,000,000,000,000,000,000 | 10 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
void TY_(FreeNode)( TidyDocImpl* doc, Node *node )
{
#if !defined(NDEBUG) && defined(_MSC_VER) && defined(DEBUG_ALLOCATION)
if (node) SPRTF("Free node %p\n", node );
#endif
/* this is no good ;=((
if (node && doc && doc->lexer) {
if (node == doc->lexer->token) {
doc->lexer->token = NULL;... | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 254,315,410,110,759,320,000,000,000,000,000,000,000 | 31 | Issue #217 - avoid len going negative, ever... |
static inline u64 pdptr_rsvd_bits(struct kvm_vcpu *vcpu)
{
return vcpu->arch.reserved_gpa_bits | rsvd_bits(5, 8) | rsvd_bits(1, 2);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 29,226,480,173,741,544,000,000,000,000,000,000,000 | 4 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
SDL_MapRGBA(const SDL_PixelFormat * format, Uint8 r, Uint8 g, Uint8 b,
Uint8 a)
{
if (format->palette == NULL) {
return (r >> format->Rloss) << format->Rshift
| (g >> format->Gloss) << format->Gshift
| (b >> format->Bloss) << format->Bshift
| ((Uint32)(a >> fo... | 0 | [
"CWE-703",
"CWE-787"
] | SDL | 8c91cf7dba5193f5ce12d06db1336515851c9ee9 | 155,447,768,865,188,560,000,000,000,000,000,000,000 | 12 | Always create a full 256-entry map in case color values are out of range
Fixes https://github.com/libsdl-org/SDL/issues/5042 |
void make_send_field(THD *thd, Send_field *field)
{ item->make_send_field(thd, field); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 120,671,883,254,528,090,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
int security_vm_enough_memory(long pages)
{
WARN_ON(current->mm == NULL);
return security_ops->vm_enough_memory(current->mm, pages);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 199,596,160,757,450,100,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
int get_unused_fd_flags(unsigned flags)
{
return __get_unused_fd_flags(flags, rlimit(RLIMIT_NOFILE));
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 9,729,164,271,300,695,000,000,000,000,000,000,000 | 4 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
template<typename t>
CImg<T> operator|(const CImg<t>& img) const {
return (+*this)|=img; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 275,996,621,196,685,270,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
//! Resize image to half-size along XY axes, using an optimized filter \newinstance.
CImg<T> get_resize_halfXY() const {
if (is_empty()) return *this;
static const Tfloat kernel[9] = { 0.07842776544f, 0.1231940459f, 0.07842776544f,
0.1231940459f, 0.1935127547... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 290,711,565,151,812,740,000,000,000,000,000,000,000 | 14 | Fix other issues in 'CImg<T>::load_bmp()'. |
static sig_handler signal_handler(int sig)
{
fprintf(stderr, "mysqltest got " SIGNAL_FMT "\n", sig);
dump_backtrace();
fprintf(stderr, "Writing a core file...\n");
fflush(stderr);
my_write_core(sig);
#ifndef _WIN32
exit(1); // Shouldn't get here but just in case
#endif
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 60,762,110,040,125,840,000,000,000,000,000,000,000 | 12 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
void RGWGetObjLegalHold_ObjStore_S3::send_response()
{
if (op_ret) {
set_req_state_err(s, op_ret);
}
dump_errno(s);
end_header(s, this, "application/xml");
dump_start(s);
if (op_ret) {
return;
}
encode_xml("LegalHold", obj_legal_hold, s->formatter);
rgw_flush_formatter_and_reset(s, s->formatt... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 153,685,947,975,203,770,000,000,000,000,000,000,000 | 15 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
MagickExport int XConfirmWidget(Display *display,XWindows *windows,
const char *reason,const char *description)
{
#define CancelButtonText "Cancel"
#define DismissButtonText "Dismiss"
#define YesButtonText "Yes"
int
confirm,
x,
y;
Status
status;
unsigned int
height,
width;
size_... | 0 | [] | ImageMagick6 | 366c9708a7ca1256ee03d0d4addb2690ed42273f | 321,449,642,344,365,400,000,000,000,000,000,000,000 | 373 | https://github.com/ImageMagick/ImageMagick/issues/3333 |
static inline void brcmf_fweh_process_skb(struct brcmf_pub *drvr,
struct sk_buff *skb)
{
struct brcmf_event *event_packet;
u16 usr_stype;
/* only process events when protocol matches */
if (skb->protocol != cpu_to_be16(ETH_P_LINK_CTL))
return;
if ((skb->len + ETH_HLEN) < sizeof(*event_packet))
return;... | 1 | [
"CWE-20"
] | linux | a4176ec356c73a46c07c181c6d04039fafa34a9f | 229,145,707,997,462,100,000,000,000,000,000,000,000 | 26 | brcmfmac: add subtype check for event handling in data path
For USB there is no separate channel being used to pass events
from firmware to the host driver and as such are passed over the
data path. In order to detect mock event messages an additional
check is needed on event subtype. This check is added conditionally... |
delete_asyncio_reader(
struct asyncio_reader *reader
)
{
free(reader);
} | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 21,423,292,272,126,140,000,000,000,000,000,000,000 | 6 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
usm_free_usmStateReference(void *old)
{
struct usmStateReference *ref = old;
if (!ref)
return;
if (--ref->refcnt > 0)
return;
SNMP_FREE(ref->usr_name);
SNMP_FREE(ref->usr_engine_id);
SNMP_FREE(ref->usr_auth_protocol);
SNMP_FREE(ref->usr_priv_protocol);
if (ref->usr_au... | 0 | [
"CWE-415"
] | net-snmp | 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 | 176,564,987,416,350,550,000,000,000,000,000,000,000 | 26 | libsnmp, USM: Introduce a reference count in struct usmStateReference
This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. |
static inline pte_t pte_mknuma(pte_t pte)
{
return pte;
} | 0 | [] | linux | ee53664bda169f519ce3c6a22d378f0b946c8178 | 297,868,154,275,537,700,000,000,000,000,000,000,000 | 4 | mm: Fix NULL pointer dereference in madvise(MADV_WILLNEED) support
Sasha Levin found a NULL pointer dereference that is due to a missing
page table lock, which in turn is due to the pmd entry in question being
a transparent huge-table entry.
The code - introduced in commit 1998cc048901 ("mm: make
madvise(MADV_WILLNEE... |
static void doubleBoxSize(QPDFObjectHandle& page, char const* box_name)
{
// If there is a box of this name, replace it with a new box whose
// elements are double the values of the original box.
QPDFObjectHandle box = page.getKey(box_name);
if (box.isNull())
{
return;
}
if (! (box.isArray(... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 202,990,892,087,279,900,000,000,000,000,000,000,000 | 23 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int proc_sys_readdir(struct file *file, struct dir_context *ctx)
{
struct ctl_table_header *head = grab_header(file_inode(file));
struct ctl_table_header *h = NULL;
struct ctl_table *entry;
struct ctl_dir *ctl_dir;
unsigned long pos;
if (IS_ERR(head))
return PTR_ERR(head);
ctl_dir = container_of(head,... | 1 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 67,794,222,171,847,000,000,000,000,000,000,000,000 | 27 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
static int split_huge_pages_set(void *data, u64 val)
{
struct zone *zone;
struct page *page;
unsigned long pfn, max_zone_pfn;
unsigned long total = 0, split = 0;
if (val != 1)
return -EINVAL;
for_each_populated_zone(zone) {
max_zone_pfn = zone_end_pfn(zone);
for (pfn = zone->zone_start_pfn; pfn < max_zone... | 0 | [
"CWE-362"
] | linux | a8f97366452ed491d13cf1e44241bc0b5740b1f0 | 180,665,774,579,313,230,000,000,000,000,000,000,000 | 40 | mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().
We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE... |
print_p2r_mechanical (const unsigned char *msg, size_t msglen)
{
print_p2r_header ("PC_to_RDR_Mechanical", msg, msglen);
if (msglen < 10)
return;
printf (" bFunction .........: 0x%02x\n", msg[7]);
print_pr_data (msg, msglen, 8);
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 258,812,205,910,689,950,000,000,000,000,000,000,000 | 8 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf,
unsigned long *jpegSize, unsigned char *dstBuf, int w, int h,
int subsamp, int jpegQual, char *fileName, int tilew,
int tileh)
{
char tempStr[1024], sizeStr[24] = "\0", qualStr[13] = "\0", *ptr;
F... | 1 | [
"CWE-787"
] | libjpeg-turbo | c30b1e72dac76343ef9029833d1561de07d29bad | 181,251,105,080,903,230,000,000,000,000,000,000,000 | 172 | 64-bit tjbench: Fix signed int overflow/segfault
... that occurred when attempting to decompress images with more than
715827882 (2048*1024*1024 / 3) pixels.
Fixes #388 |
accountingReportDiff(XML_Parser rootParser,
unsigned int levelsAwayFromRootParser, const char *before,
const char *after, ptrdiff_t bytesMore, int source_line,
enum XML_Account account) {
assert(! rootParser->m_parentParser);
fprintf(stderr,
... | 0 | [
"CWE-400",
"CWE-703"
] | libexpat | 9b4ce651b26557f16103c3a366c91934ecd439ab | 280,284,537,600,347,200,000,000,000,000,000,000,000 | 35 | Prevent stack exhaustion in build_model
It is possible to trigger stack exhaustion in build_model function if
depth of nested children in DTD element is large enough. This happens
because build_node is a recursively called function within build_model.
The code has been adjusted to run iteratively. It uses the already... |
OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi) {
opj_pi_comp_t *comp = NULL;
opj_pi_resolution_t *res = NULL;
OPJ_UINT32 index = 0;
if (!pi->first) {
comp = &pi->comps[pi->compno];
goto LABEL_SKIP;
} else {
OPJ_UINT32 compno, resno;
pi->first = 0;
pi->dx = 0;
pi->dy = 0;
for (compno = 0; compno <... | 0 | [
"CWE-190"
] | openjpeg | 5d00b719f4b93b1445e6fb4c766b9a9883c57949 | 129,366,163,927,172,530,000,000,000,000,000,000,000 | 80 | [trunk] fixed a buffer overflow in opj_tcd_init_decode_tile
Update issue 431 |
const CImg<T> get_shared_row(const unsigned int y0, const unsigned int z0=0, const unsigned int c0=0) const {
return get_shared_rows(y0,y0,z0,c0);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 25,814,388,735,578,476,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
S_pidgone(pTHX_ Pid_t pid, int status)
{
SV *sv;
sv = *hv_fetch(PL_pidstatus,(const char*)&pid,sizeof(Pid_t),TRUE);
SvUPGRADE(sv,SVt_IV);
SvIV_set(sv, status);
return;
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 103,575,630,309,856,770,000,000,000,000,000,000,000 | 9 | Perl_my_setenv(); handle integer wrap
RT #133204
Wean this function off int/I32 and onto UV/Size_t.
Also, replace all malloc-ish calls with a wrapper that does
overflow checks,
In particular, it was doing (nlen + vlen + 2) which could wrap when
the combined length of the environment variable name and value
exceeded ... |
static int find_cpu_to_read(struct perf_event *event, int local_cpu)
{
int event_cpu = event->oncpu;
u16 local_pkg, event_pkg;
if (event->group_caps & PERF_EV_CAP_READ_ACTIVE_PKG) {
event_pkg = topology_physical_package_id(event_cpu);
local_pkg = topology_physical_package_id(local_cpu);
if (event_pkg == lo... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 132,736,418,299,480,150,000,000,000,000,000,000,000 | 15 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
UTI_RefidToString(uint32_t ref_id)
{
unsigned int i, j, c;
char *result;
result = NEXT_BUFFER;
for (i = j = 0; i < 4 && i < BUFFER_LENGTH - 1; i++) {
c = (ref_id >> (24 - i * 8)) & 0xff;
if (isprint(c))
result[j++] = c;
}
result[j] = '\0';
return result;
} | 0 | [
"CWE-59"
] | chrony | 7a4c396bba8f92a3ee8018620983529152050c74 | 266,294,996,696,415,930,000,000,000,000,000,000,000 | 17 | util: add functions for common file operations
Add a function to open a file for reading, writing, or appending.
In uppercase modes errors are handled as fatal, i.e. the caller doesn't
need to check for NULL. To avoid string manipulations in the callers,
the function accepts an optional directory and suffix. New files... |
static void php_image_filter_mean_removal(INTERNAL_FUNCTION_PARAMETERS)
{
PHP_GD_SINGLE_RES
if (gdImageMeanRemoval(im_src) == 1) {
RETURN_TRUE;
}
RETURN_FALSE;
} | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 153,214,095,303,814,800,000,000,000,000,000,000,000 | 10 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
cpy_option(const char *optname, char *dest, const char *src)
{
char *opt;
size_t sz;
opt = get_option(optname, src, &sz);
if (!opt)
/* the option doesn't exist */
return 0;
if (get_option(optname, dest, NULL))
/* the options is already in dest */
return 0;
if (*dest) {
dest = dest + strlen(dest);
*... | 0 | [
"CWE-399"
] | util-linux | 4b39b6aefd5dd8ac68a92adc650dc13d5d54d704 | 179,971,335,497,165,900,000,000,000,000,000,000,000 | 23 | mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- force mount(8) to use /etc/mtab.tmp file every time. The original
code used the tmp file for remount/move operations only.
- call and check fflush() return code for... |
static int CheckOtherHTTPHeaders(
/*! [in] HTTP Request message. */
http_message_t *Req,
/*! [out] Send Instruction object to data for the response. */
struct SendInstruction *RespInstr,
/*! Size of the file containing the request document. */
off_t FileSize)
{
http_header_t *header;
ListNode *node;
/*NNS: dli... | 0 | [
"CWE-284"
] | pupnp-code | be0a01bdb83395d9f3a5ea09c1308a4f1a972cbd | 307,511,865,570,732,460,000,000,000,000,000,000,000 | 113 | Don't allow unhandled POSTs to write to the filesystem by default
If there's no registered handler for a POST request, the default behaviour
is to write it to the filesystem. Several million deployed devices appear
to have this behaviour, making it possible to (at least) store arbitrary
data on them. Add a configure o... |
uint32_t Downstream::get_affinity_cookie_to_send() const {
if (new_affinity_cookie_) {
return affinity_cookie_;
}
return 0;
} | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 141,456,292,791,374,750,000,000,000,000,000,000,000 | 6 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
static struct usb_request *xudc_ep_alloc_request(struct usb_ep *_ep,
gfp_t gfp_flags)
{
struct xusb_ep *ep = to_xusb_ep(_ep);
struct xusb_req *req;
req = kzalloc(sizeof(*req), gfp_flags);
if (!req)
return NULL;
req->ep = ep;
INIT_LIST_HEAD(&req->queue);
return &req->usb_req;
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | 7f14c7227f342d9932f9b918893c8814f86d2a0d | 144,499,527,621,989,940,000,000,000,000,000,000,000 | 14 | USB: gadget: validate endpoint index for xilinx udc
Assure that host may not manipulate the index to point
past endpoint array.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
static int MP4_ReadBoxContainerRaw( stream_t *p_stream, MP4_Box_t *p_container )
{
return MP4_ReadBoxContainerChildren( p_stream, p_container, 0 );
} | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 123,674,650,284,796,260,000,000,000,000,000,000,000 | 4 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
static int em_jmp_far(struct x86_emulate_ctxt *ctxt)
{
int rc;
unsigned short sel, old_sel;
struct desc_struct old_desc, new_desc;
const struct x86_emulate_ops *ops = ctxt->ops;
u8 cpl = ctxt->ops->cpl(ctxt);
/* Assignment of RIP may only fail in 64-bit mode */
if (ctxt->mode == X86EMUL_MODE_PROT64)
ops->get_... | 1 | [
"CWE-200"
] | linux | 2117d5398c81554fbf803f5fd1dc55eb78216c0c | 237,647,313,374,537,950,000,000,000,000,000,000,000 | 30 | KVM: x86: drop error recovery in em_jmp_far and em_ret_far
em_jmp_far and em_ret_far assumed that setting IP can only fail in 64
bit mode, but syzkaller proved otherwise (and SDM agrees).
Code segment was restored upon failure, but it was left uninitialized
outside of long mode, which could lead to a leak of host kern... |
static int growOpArray(Vdbe *v, int nOp){
VdbeOp *pNew;
Parse *p = v->pParse;
/* The SQLITE_TEST_REALLOC_STRESS compile-time option is designed to force
** more frequent reallocs and hence provide more opportunities for
** simulated OOM faults. SQLITE_TEST_REALLOC_STRESS is generally used
** during testi... | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 244,382,129,786,251,730,000,000,000,000,000,000,000 | 36 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
void MonClient::handle_monmap(MMonMap *m)
{
ldout(cct, 10) << __func__ << " " << *m << dendl;
auto con_addrs = m->get_source_addrs();
string old_name = monmap.get_name(con_addrs);
const auto old_epoch = monmap.get_epoch();
auto p = m->monmapbl.cbegin();
decode(monmap, p);
ldout(cct, 10) << " got monmap ... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 157,698,249,170,911,160,000,000,000,000,000,000,000 | 49 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
static void cp2112_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{
struct cp2112_device *dev = gpiochip_get_data(chip);
struct hid_device *hdev = dev->hdev;
u8 *buf = dev->in_out_buffer;
unsigned long flags;
int ret;
spin_lock_irqsave(&dev->lock, flags);
buf[0] = CP2112_GPIO_SET;
buf[1] = value... | 1 | [
"CWE-404",
"CWE-703"
] | linux | 7a7b5df84b6b4e5d599c7289526eed96541a0654 | 225,040,896,683,987,140,000,000,000,000,000,000,000 | 22 | HID: cp2112: fix sleep-while-atomic
A recent commit fixing DMA-buffers on stack added a shared transfer
buffer protected by a spinlock. This is broken as the USB HID request
callbacks can sleep. Fix this up by replacing the spinlock with a mutex.
Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable")
... |
static void _vop_notify(struct vringh *vrh)
{
struct vop_vringh *vvrh = container_of(vrh, struct vop_vringh, vrh);
struct vop_vdev *vdev = vvrh->vdev;
struct vop_device *vpdev = vdev->vpdev;
s8 db = vdev->dc->h2c_vdev_db;
if (db != -1)
vpdev->hw_ops->send_intr(vpdev, db);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9bf292bfca94694a721449e3fd752493856710f6 | 125,374,883,151,996,030,000,000,000,000,000,000,000 | 10 | misc: mic: Fix for double fetch security bug in VOP driver
The MIC VOP driver does two successive reads from user space to read a
variable length data structure. Kernel memory corruption can result if
the data structure changes between the two reads. This patch disallows
the chance of this happening.
Bugzilla: https:... |
prng_init (const char *md_name, const int nonce_secret_len_parm)
{
prng_uninit ();
nonce_md = md_name ? md_kt_get (md_name) : NULL;
if (nonce_md)
{
ASSERT (nonce_secret_len_parm >= NONCE_SECRET_LEN_MIN && nonce_secret_len_parm <= NONCE_SECRET_LEN_MAX);
nonce_secret_len = nonce_secret_len_parm;
... | 0 | [
"CWE-200"
] | openvpn | 11d21349a4e7e38a025849479b36ace7c2eec2ee | 253,203,579,550,990,540,000,000,000,000,000,000,000 | 17 | Use constant time memcmp when comparing HMACs in openvpn_decrypt.
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Signed-off-by: Gert Doering <gert@greenie.muc.de> |
int x509v3_add_len_value_uchar(const char *name, const unsigned char *value,
size_t vallen, STACK_OF(CONF_VALUE) **extlist)
{
return x509v3_add_len_value(name, (const char *)value, vallen, extlist);
} | 0 | [
"CWE-125"
] | openssl | bb4d2ed4091408404e18b3326e3df67848ef63d0 | 250,125,120,136,917,740,000,000,000,000,000,000,000 | 5 | Fix append_ia5 function to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static int kvp_key_add_or_modify(int pool, __u8 *key, int key_size, __u8 *value,
int value_size)
{
int i;
int j, k;
int num_records;
struct kvp_record *record;
int num_blocks;
if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) ||
(value_size > HV_KVP_EXCHANGE_MAX_VALUE_SIZE))
return 1;
/*
* First update th... | 0 | [
"CWE-20"
] | linux-2.6 | bcc2c9c3fff859e0eb019fe6fec26f9b8eba795c | 204,038,123,659,569,940,000,000,000,000,000,000,000 | 54 | Tools: hv: verify origin of netlink connector message
The SuSE security team suggested to use recvfrom instead of recv to be
certain that the connector message is originated from kernel.
CVE-2012-2669
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Sebasti... |
unsigned long ossl_lh_strcasehash(const char *c)
{
unsigned long ret = 0;
long n;
unsigned long v;
int r;
if (c == NULL || *c == '\0')
return ret;
for (n = 0x100; *c != '\0'; n += 0x100) {
v = n | ossl_tolower(*c);
r = (int)((v >> 2) ^ v) & 0x0f;
/* cast to uint... | 0 | [
"CWE-404"
] | openssl | 64c85430f95200b6b51fe9475bd5203f7c19daf1 | 98,242,184,587,572,900,000,000,000,000,000,000,000 | 21 | Fix bug in OPENSSL_LH_flush
Fixes #18139.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18141)
(cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e) |
parse_delimiter(const char *script, statement **stmt, char delm)
{
char *retstr;
char *ptr= (char *)script;
statement **sptr= stmt;
statement *tmp;
uint length= strlen(script);
uint count= 0; /* We know that there is always one */
for (tmp= *sptr= (statement *)my_malloc(sizeof(statement),
... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 261,635,627,659,445,540,000,000,000,000,000,000,000 | 34 | WL#9072: Backport WL#8785 to 5.5 |
static void FVMenuCut(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
FVCopy(&fv->b,ct_fullcopy);
FVClear(&fv->b);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 300,687,577,054,702,500,000,000,000,000,000,000,000 | 5 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
task_function_call(struct task_struct *p, int (*func) (void *info), void *info)
{
struct remote_function_call data = {
.p = p,
.func = func,
.info = info,
.ret = -ESRCH, /* No such (running) process */
};
if (task_curr(p))
smp_call_function_single(task_cpu(p), remote_function, &data, 1);
return data.ret... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 9,219,776,657,201,435,000,000,000,000,000,000,000 | 14 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
static int cqspi_of_get_pdata(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct cqspi_st *cqspi = platform_get_drvdata(pdev);
cqspi->is_decoded_cs = of_property_read_bool(np, "cdns,is-decoded-cs");
if (of_property_read_u32(np, "cdns,fifo-depth", &cqspi->fifo_depth)) {
dev_err(&p... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 193e87143c290ec16838f5368adc0e0bc94eb931 | 176,046,215,509,555,300,000,000,000,000,000,000,000 | 25 | mtd: spi-nor: Off by one in cqspi_setup_flash()
There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the >
should be >=.
Fixes: 140623410536 ('mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Marek Vasut <marex@denx.de>
... |
static void gx_ttfReader__ReleaseGlyph(ttfReader *self, int glyph_index)
{
gx_ttfReader *r = (gx_ttfReader *)self;
if (r->extra_glyph_index != glyph_index)
return;
r->extra_glyph_index = -1;
gs_glyph_data_free(&r->glyph_data, "gx_ttfReader__ReleaseExtraGlyph");
} | 0 | [
"CWE-125"
] | ghostpdl | 937ccd17ac65935633b2ebc06cb7089b91e17e6b | 139,547,371,622,032,470,000,000,000,000,000,000,000 | 9 | Bug 698056: make bounds check in gx_ttfReader__Read more robust |
install_keyword(const char *string, void (*handler) (vector_t *))
{
keyword_alloc_sub(keywords, string, handler);
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 240,397,123,120,919,960,000,000,000,000,000,000,000 | 4 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
static MagickBooleanType IsBMP(const unsigned char *magick,const size_t length)
{
if (length < 2)
return(MagickFalse);
if ((LocaleNCompare((char *) magick,"BA",2) == 0) ||
(LocaleNCompare((char *) magick,"BM",2) == 0) ||
(LocaleNCompare((char *) magick,"IC",2) == 0) ||
(LocaleNCompare((char *)... | 0 | [
"CWE-190",
"CWE-703"
] | ImageMagick | 4cc6ec8a4197d4c008577127736bf7985d632323 | 38,139,356,361,468,977,000,000,000,000,000,000,000 | 13 | Prevent buffer overflow in BMP coder (bug report from pwchen of tencent). |
call_bind(struct rpc_task *task)
{
struct rpc_xprt *xprt = task->tk_xprt;
dprint_status(task);
task->tk_action = call_connect;
if (!xprt_bound(xprt)) {
task->tk_action = call_bind_status;
task->tk_timeout = xprt->bind_timeout;
xprt->ops->rpcbind(task);
}
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 284,521,529,221,520,660,000,000,000,000,000,000,000 | 13 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
ZEND_METHOD(CURLFile, __construct)
{
return_value = getThis();
curlfile_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU);
} | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 193,419,332,149,455,100,000,000,000,000,000,000,000 | 5 | Fix bug #73147: Use After Free in PHP7 unserialize() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.