func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
tcp_dst_value(packet_info *pinfo)
{
return p_get_proto_data(pinfo->pool, pinfo, hf_tcp_dstport, pinfo->curr_layer_num);
} | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 129,362,666,005,724,030,000,000,000,000,000,000,000 | 4 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
static void free_gigantic_page(struct page *page, unsigned int order)
{
free_contig_range(page_to_pfn(page), 1 << order);
} | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 48,373,990,402,426,600,000,000,000,000,000,000,000 | 4 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
get_int64_value(proto_tree *tree, tvbuff_t *tvb, gint start, guint length, const guint encoding)
{
guint64 value = get_uint64_value(tree, tvb, start, length, encoding);
switch (length) {
case 7:
value = ws_sign_ext64(value, 56);
break;
case 6:
value = ws_sign_ext64(value, 48);
break;
case 5:
val... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 181,210,830,954,741,400,000,000,000,000,000,000,000 | 30 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
void delegpt_free_mlc(struct delegpt* dp)
{
struct delegpt_ns* n, *nn;
struct delegpt_addr* a, *na;
if(!dp) return;
log_assert(dp->dp_type_mlc);
n = dp->nslist;
while(n) {
nn = n->next;
free(n->name);
free(n);
n = nn;
}
a = dp->target_list;
while(a) {
na = a->next_target;
free(a->tls_auth_name);
... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 107,352,485,247,910,830,000,000,000,000,000,000,000 | 23 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
bool __weak is_trap_insn(uprobe_opcode_t *insn)
{
return is_swbp_insn(insn);
} | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 237,793,306,671,140,850,000,000,000,000,000,000,000 | 4 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
void CLASS Canon_WBCTpresets(short WBCTversion)
{
if (WBCTversion == 0)
for (int i = 0; i < 15; i++) // tint, as shot R, as shot B, CСT
{
imgdata.color.WBCT_Coeffs[i][2] = imgdata.color.WBCT_Coeffs[i][4] = 1.0f;
fseek(ifp, 2, SEEK_CUR);
imgdata.color.WBCT_Coeffs[i][1] = 1024.0f / fMAX(get2()... | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 9,987,053,208,277,413,000,000,000,000,000,000,000 | 49 | parse_qt: possible integer overflow |
static void btrfs_double_inode_unlock(struct inode *inode1, struct inode *inode2)
{
inode_unlock(inode1);
inode_unlock(inode2);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 68,711,012,097,578,780,000,000,000,000,000,000,000 | 5 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
HValue* HGraphBuilder::HandleKeyedElementAccess(HValue* obj,
HValue* key,
HValue* val,
Expression* expr,
BailoutId ast_id,
... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 269,839,223,706,774,900,000,000,000,000,000,000,000 | 35 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
process_rename(u_int32_t id)
{
char *oldpath, *newpath;
int r, status;
struct stat sb;
if ((r = sshbuf_get_cstring(iqueue, &oldpath, NULL)) != 0 ||
(r = sshbuf_get_cstring(iqueue, &newpath, NULL)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r));
debug3("request %u: rename", id);
logit("rename o... | 0 | [
"CWE-732",
"CWE-703",
"CWE-269"
] | src | a6981567e8e215acc1ef690c8dbb30f2d9b00a19 | 109,781,491,992,405,060,000,000,000,000,000,000,000 | 51 | disallow creation (of empty files) in read-only mode; reported by
Michal Zalewski, feedback & ok deraadt@ |
UnicodeStringAppendable::reserveAppendCapacity(int32_t appendCapacity) {
return str.cloneArrayIfNeeded(str.length() + appendCapacity);
} | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 80,029,007,181,233,460,000,000,000,000,000,000,000 | 3 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
version_check(void)
{
struct utsname uts;
if (uname(&uts) == -1) return;
unsigned version_min[3] = {};
unsigned version_cur[3] = {};
version_convert(uts.release, version_cur, 3);
version_convert(MIN_LINUX_KERNEL_VERSION, version_min, 3);
if (version_min[0] > version_cur[0] ||
(version_min[0] == version_cur[... | 0 | [
"CWE-617",
"CWE-703"
] | lldpd | 9221b5c249f9e4843f77c7f888d5705348d179c0 | 69,028,426,960,417,410,000,000,000,000,000,000,000 | 19 | protocols: don't use assert on paths that can be reached
Malformed packets should not make lldpd crash. Ensure we can handle them
by not using assert() in this part. |
check_options(void)
{
int opt_idx;
for (opt_idx = 0; options[opt_idx].fullname != NULL; opt_idx++)
if ((options[opt_idx].flags & P_STRING) && options[opt_idx].var != NULL)
check_string_option((char_u **)get_varp(&(options[opt_idx])));
} | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 38,333,633,730,231,830,000,000,000,000,000,000,000 | 8 | patch 8.0.0056
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'. |
pdf14_custom_put_image(gx_device * dev, gs_gstate * pgs, gx_device * target)
{
pdf14_device * pdev = (pdf14_device *)dev;
pdf14_buf *buf = pdev->ctx->stack;
gs_int_rect rect = buf->rect;
int x0 = rect.p.x, y0 = rect.p.y;
int planestride = buf->planestride;
int rowstride = buf->rowstride;
int... | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 183,184,708,646,456,000,000,000,000,000,000,000,000 | 27 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
parse_diff_unified(
char_u *line,
diffhunk_T *hunk)
{
char_u *p;
long oldline, oldcount, newline, newcount;
// Parse unified diff hunk header:
// @@ -oldline,oldcount +newline,newcount @@
p = line;
if (*p++ == '@' && *p++ == '@' && *p++ == ' ' && *p++ == '-')
{
oldline = getdigit... | 0 | [
"CWE-787"
] | vim | c101abff4c6756db4f5e740fde289decb9452efa | 106,902,111,242,538,180,000,000,000,000,000,000,000 | 51 | patch 8.2.5164: invalid memory access after diff buffer manipulations
Problem: Invalid memory access after diff buffer manipulations.
Solution: Use zero offset when change removes all lines in a diff block. |
yaffsfs_read_chunk(YAFFSFS_INFO *yfs,
YaffsHeader **header, YaffsSpare **spare, TSK_OFF_T offset)
{
TSK_OFF_T header_offset = offset;
TSK_OFF_T spare_offset = offset + yfs->page_size;
if (header == NULL || spare == NULL) {
return 1;
}
if (yaffsfs_read_header(yfs, header, header_of... | 0 | [
"CWE-125",
"CWE-787"
] | sleuthkit | 459ae818fc8dae717549810150de4d191ce158f1 | 240,679,951,570,827,350,000,000,000,000,000,000,000 | 22 | 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. |
int mz_deflateReset(mz_streamp pStream) {
if ((!pStream) || (!pStream->state) || (!pStream->zalloc) ||
(!pStream->zfree))
return MZ_STREAM_ERROR;
pStream->total_in = pStream->total_out = 0;
tdefl_init((tdefl_compressor *)pStream->state, NULL, NULL,
((tdefl_compressor *)pStream->state)->m_fl... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 215,902,189,200,460,700,000,000,000,000,000,000,000 | 9 | Make line_no with too large value(2**20) invalid. Fixes #124 |
static int selinux_sb_alloc_security(struct super_block *sb)
{
return superblock_alloc_security(sb);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 238,737,128,704,086,240,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static ssize_t accumulator_send_callback(nghttp2_session *session,
const uint8_t *buf, size_t len,
int flags, void *user_data) {
accumulator *acc = ((my_user_data *)user_data)->acc;
(void)session;
(void)flags;
assert(acc->length ... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 152,050,529,351,171,350,000,000,000,000,000,000,000 | 12 | Add nghttp2_option_set_max_outbound_ack |
ZEND_API void zend_ts_hash_clean(TsHashTable *ht)
{
ht->reader = 0;
begin_write(ht);
zend_hash_clean(TS_HASH(ht));
end_write(ht);
} | 0 | [] | php-src | 2bcf69d073190e4f032d883f3416dea1b027a39e | 190,586,440,358,881,180,000,000,000,000,000,000,000 | 7 | Fixed bug #68676 (Explicit Double Free) |
static void on_next_btn_cb(GtkWidget *btn, gpointer user_data)
{
gint current_page_no = gtk_notebook_get_current_page(g_assistant);
gint next_page_no = select_next_page_no(current_page_no, NULL);
/* if pageno is not change 'switch-page' signal is not emitted */
if (current_page_no == next_page_no)
... | 0 | [
"CWE-200"
] | libreport | 257578a23d1537a2d235aaa2b1488ee4f818e360 | 258,547,609,316,815,700,000,000,000,000,000,000,000 | 11 | wizard: fix save users changes after reviewing dump dir files
If the user reviewed the dump dir's files during reporting the crash, the
changes was thrown away and original data was passed to the bugzilla bug
report.
report-gtk saves the first text view buffer and then reloads data from the
reported problem directory... |
DEFUN (clear_bgp_as_in_prefix_filter,
clear_bgp_as_in_prefix_filter_cmd,
"clear bgp <1-65535> in prefix-filter",
CLEAR_STR
BGP_STR
"Clear peers with the AS number\n"
"Soft reconfig inbound update\n"
"Push out prefix-list ORF and do inbound soft reconfig\n")
{
return bg... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 11,134,202,207,741,278,000,000,000,000,000,000,000 | 12 | [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... |
void do_chmod_file(struct st_command *command)
{
long mode= 0;
int err_code;
static DYNAMIC_STRING ds_mode;
static DYNAMIC_STRING ds_file;
const struct command_arg chmod_file_args[] = {
{ "mode", ARG_STRING, TRUE, &ds_mode, "Mode of file(octal) ex. 0660"},
{ "filename", ARG_STRING, TRUE, &ds_file, "F... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 137,182,742,466,574,100,000,000,000,000,000,000,000 | 31 | 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 LanLinkProvider::dataReceived()
{
QSslSocket* socket = qobject_cast<QSslSocket*>(sender());
#if QT_VERSION < QT_VERSION_CHECK(5,7,0)
if (!socket->canReadLine())
return;
#else
socket->startTransaction();
#endif
const QByteArray data = socket->readLine();
qCDebug(KDECONNECT_CORE) << "La... | 1 | [
"CWE-400",
"CWE-703"
] | kdeconnect-kde | 4fbd01a3d44a0bcca888c49a77ec7cfd10e113d7 | 6,646,800,168,810,832,000,000,000,000,000,000,000 | 67 | Limit identity packets to 8KiB
Healthy identity packages shouldn't be that big and we don't want to
allow systems around us to send us ever humongous packages that will
just leave us without any memory.
Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this. |
static int analyzeAggregate(Walker *pWalker, Expr *pExpr){
int i;
NameContext *pNC = pWalker->u.pNC;
Parse *pParse = pNC->pParse;
SrcList *pSrcList = pNC->pSrcList;
AggInfo *pAggInfo = pNC->uNC.pAggInfo;
assert( pNC->ncFlags & NC_UAggInfo );
switch( pExpr->op ){
case TK_AGG_COLUMN:
case TK_COLUMN... | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 12,799,247,266,161,543,000,000,000,000,000,000,000 | 126 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
pgp_erase_card(sc_card_t *card)
{
/* Special series of commands to erase OpenPGP card,
* according to https://www.crypto-stick.com/en/faq
* (How to reset a Crypto Stick? question).
* Gnuk is known not to support this feature. */
const char *apdu_hex[] = {
/* block PIN1 */
"00:20:00:81:08:40:40:40:40:40:40:4... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 315,486,674,398,342,640,000,000,000,000,000,000,000 | 73 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void linf_dump(GF_LHVCLayerInformation *ptr, FILE * trace)
{
u32 i, count;
if (!ptr) {
gf_fprintf(trace, "<LayerInformation num_layers=\"\">\n");
gf_fprintf(trace, "<LayerInfoItem layer_id=\"\" min_temporalId=\"\" max_temporalId=\"\" sub_layer_presence_flags=\"\"/>\n");
gf_fprintf(trace, "</LayerInformat... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 128,922,580,607,710,150,000,000,000,000,000,000,000 | 19 | fixed #2138 |
TEST_F(QueryPlannerTest, NoMergeSortIfNoSortWanted) {
addIndex(BSON("a" << 1 << "c" << 1));
addIndex(BSON("b" << 1 << "c" << 1));
runQuerySortProj(fromjson("{$or: [{a:1}, {b:1}]}"), BSONObj(), BSONObj());
ASSERT_EQUALS(getNumSolutions(), 2U);
assertSolutionExists("{cscan: {dir: 1, filter: {$or: [{a... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 176,414,212,959,604,000,000,000,000,000,000,000,000 | 12 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
inline void Quantize(const int32_t* multiplier, const int32_t* shift,
int32_t channel_size, int32_t total_size,
int32_t output_zp, int32_t output_min, int32_t output_max,
int32_t* scratch, int8_t* output) {
ruy::profiler::ScopeLabel label("Quantize/int8")... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 166,911,607,172,060,600,000,000,000,000,000,000,000 | 90 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
inline unsigned char from_hex(unsigned char ch) {
if (ch <= '9' && ch >= '0')
ch -= '0';
else if (ch <= 'f' && ch >= 'a')
ch -= 'a' - 10;
else if (ch <= 'F' && ch >= 'A')
ch -= 'A' - 10;
else
ch = 0;
return ch;
} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 150,479,835,013,309,720,000,000,000,000,000,000,000 | 11 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
bool CClient::OnModeMessage(CModeMessage& Message) {
CString sTarget = Message.GetTarget();
if (m_pNetwork && m_pNetwork->IsChan(sTarget) && !Message.HasModes()) {
// If we are on that channel and already received a
// /mode reply from the server, we can answer this
// request ourself.
... | 0 | [
"CWE-476"
] | znc | 2390ad111bde16a78c98ac44572090b33c3bd2d8 | 287,409,066,717,257,800,000,000,000,000,000,000,000 | 23 | Fix null pointer dereference in echo-message
The bug was introduced while fixing #1705. If a client did not enable
echo-message, and doesn't have a network, it crashes.
Thanks to LunarBNC for reporting this |
rsvg_handle_set_base_gfile (RsvgHandle *handle,
GFile *base_file)
{
RsvgHandlePrivate *priv;
g_return_if_fail (RSVG_IS_HANDLE (handle));
g_return_if_fail (G_IS_FILE (base_file));
priv = handle->priv;
g_object_ref (base_file);
if (priv->base_gfile)
g_ob... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 207,589,464,525,770,680,000,000,000,000,000,000,000 | 20 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
nautilus_directory_remove_file_monitors (NautilusDirectory *directory,
NautilusFile *file)
{
GList *result, **list, *node, *next;
Monitor *monitor;
g_assert (NAUTILUS_IS_DIRECTORY (directory));
g_assert (NAUTILUS_IS_FILE (file));
g_assert (file->details->directory == directory);
result = NULL;
list = &d... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 172,221,709,992,095,950,000,000,000,000,000,000,000 | 31 | 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-... |
TfLiteRegistration* Register_TOPK_V2() {
static TfLiteRegistration r = {nullptr, nullptr, topk_v2::Prepare,
topk_v2::Eval};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 236,246,370,786,187,430,000,000,000,000,000,000,000 | 5 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
gst_qtdemux_stream_segment_get_boundaries (GstQTDemux * qtdemux,
QtDemuxStream * stream, GstClockTime offset,
GstClockTime * _start, GstClockTime * _stop, GstClockTime * _time)
{
GstClockTime seg_time;
GstClockTime start, stop, time;
QtDemuxSegment *segment;
segment = &stream->segments[stream->segment_... | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 303,391,879,763,749,630,000,000,000,000,000,000,000 | 62 | qtdemux: Fix out of bounds read in tag parsing code
We can't simply assume that the length of the tag value as given
inside the stream is correct but should also check against the amount of
data we have actually available.
https://bugzilla.gnome.org/show_bug.cgi?id=775451 |
ofputil_encode_table_stats_reply(const struct ofp_header *request)
{
return ofpraw_alloc_stats_reply(request, 0);
} | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 28,236,963,155,006,050,000,000,000,000,000,000,000 | 4 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void SSL_SESSION_free(SSL_SESSION *ss)
{
int i;
if(ss == NULL)
return;
i=CRYPTO_add(&ss->references,-1,CRYPTO_LOCK_SSL_SESSION);
#ifdef REF_PRINT
REF_PRINT("SSL_SESSION",ss);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"SSL_SESSION_free, bad reference count\n");
abort(); /... | 0 | [] | openssl | 36ca4ba63d083da6f9d4598f18f17a8c32c8eca2 | 209,620,887,142,031,700,000,000,000,000,000,000,000 | 44 | Implement the Supported Point Formats Extension for ECC ciphersuites
Submitted by: Douglas Stebila |
static inline ut16 r_read_at_le16(const void *src, size_t offset) {
if (!src) {
return UT16_MAX;
}
const ut8 *s = (const ut8*)src + offset;
return r_read_le16 (s);
} | 0 | [
"CWE-476"
] | radare2 | 1ea23bd6040441a21fbcfba69dce9a01af03f989 | 325,822,833,446,246,830,000,000,000,000,000,000,000 | 7 | Fix #6816 - null deref in r_read_* |
u_blockfree(buf_T *buf)
{
while (buf->b_u_oldhead != NULL)
u_freeheader(buf, buf->b_u_oldhead, NULL);
vim_free(buf->b_u_line_ptr);
} | 0 | [
"CWE-190"
] | vim | 3eb1637b1bba19519885dd6d377bd5596e91d22c | 195,982,091,426,538,160,000,000,000,000,000,000,000 | 6 | patch 8.0.0377: possible overflow when reading corrupted undo file
Problem: Possible overflow when reading corrupted undo file.
Solution: Check if allocated size is not too big. (King) |
static void tg3_mac_loopback(struct tg3 *tp, bool enable)
{
if (enable) {
tp->mac_mode &= ~(MAC_MODE_HALF_DUPLEX |
MAC_MODE_PORT_MODE_MASK);
tp->mac_mode |= MAC_MODE_PORT_INT_LPBACK;
if (!tg3_flag(tp, 5705_PLUS))
tp->mac_mode |= MAC_MODE_LINK_POLARITY;
if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY)
... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 160,038,353,040,385,350,000,000,000,000,000,000,000 | 27 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
static void smack_file_set_fowner(struct file *file)
{
struct smack_known **blob = smack_file(file);
*blob = smk_of_current();
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 244,655,056,816,527,450,000,000,000,000,000,000,000 | 6 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
void CiffComponent::decode(Image& image, ByteOrder byteOrder) const
{
doDecode(image, byteOrder);
} | 0 | [
"CWE-400"
] | exiv2 | b3d077dcaefb6747fff8204490f33eba5a144edb | 91,331,452,212,744,190,000,000,000,000,000,000,000 | 4 | Fix #460 by adding more checks in CiffDirectory::readDirectory |
static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC) /* {{{ */
{
#ifdef PHP_WIN32
unsigned long key = realpath_cache_key(path, path_len TSRMLS_CC);
#else
unsigned long key = realpath_cache_key(path, path_len);
#endif
unsigned long n = key % (sizeof(CWDG(realpa... | 1 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 198,977,414,509,050,240,000,000,000,000,000,000,000 | 32 | Fix for bug #72513 |
static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 293,245,305,095,956,800,000,000,000,000,000,000,000 | 4 | - 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 |
template<typename t>
CImg<T>& operator/=(const CImg<t>& img) {
return (*this*img.get_invert()).move_to(*this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 190,241,642,660,924,600,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int ssl_session_cmp(const SSL_SESSION *a,const SSL_SESSION *b)
{
if (a->ssl_version != b->ssl_version)
return(1);
if (a->session_id_length != b->session_id_length)
return(1);
return(memcmp(a->session_id,b->session_id,a->session_id_length));
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 31,521,410,695,669,814,000,000,000,000,000,000,000 | 8 | Add Next Protocol Negotiation. |
QList<int> ServerDB::getBootServers() {
QList<int> ql = getAllServers();
TransactionHolder th;
QSqlQuery &query = *th.qsqQuery;
QList<int> bootlist;
foreach(int i, ql) {
SQLPREP("SELECT `value` FROM `%1config` WHERE `server_id` = ? AND `key` = ?");
query.addBindValue(i);
query.addBindValue(QLatin1String("b... | 0 | [
"CWE-20"
] | mumble | 6b33dda344f89e5a039b7d79eb43925040654242 | 61,919,219,855,448,710,000,000,000,000,000,000,000 | 17 | Don't crash on long usernames |
nfp_flower_repr_netdev_clean(struct nfp_app *app, struct net_device *netdev)
{
struct nfp_repr *repr = netdev_priv(netdev);
kfree(repr->app_priv);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 8572cea1461a006bce1d06c0c4b0575869125fa4 | 265,140,126,723,410,200,000,000,000,000,000,000,000 | 6 | nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
In nfp_flower_spawn_phy_reprs, in the for loop over eth_tbl if any of
intermediate allocations or initializations fail memory is leaked.
requiered releases are added.
Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload")
Signed-of... |
int propfind_addmember(const xmlChar *name, xmlNsPtr ns,
struct propfind_ctx *fctx,
xmlNodePtr prop __attribute__((unused)),
xmlNodePtr resp __attribute__((unused)),
struct propstat propstat[],
void *rock ... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 29,961,226,599,844,804,000,000,000,000,000,000,000 | 32 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
socks_proxy_info_matches(const struct proxy_info *data,
const struct proxy_info *needle)
{
if(!proxy_info_matches(data, needle))
return FALSE;
/* the user information is case-sensitive
or at least it is not defined as case-insensitive
see https://datatracker.ietf.org/doc/html... | 0 | [] | curl | 852aa5ad351ea53e5f01d2f44b5b4370c2bf5425 | 231,096,622,553,638,280,000,000,000,000,000,000,000 | 25 | url: check sasl additional parameters for connection reuse.
Also move static function safecmp() as non-static Curl_safecmp() since
its purpose is needed at several places.
Bug: https://curl.se/docs/CVE-2022-22576.html
CVE-2022-22576
Closes #8746 |
archive_read_format_zip_cleanup(struct archive_read *a)
{
struct zip *zip;
struct zip_entry *zip_entry, *next_zip_entry;
zip = (struct zip *)(a->format->data);
#ifdef HAVE_ZLIB_H
if (zip->stream_valid)
inflateEnd(&zip->stream);
#endif
#if HAVA_LZMA_H && HAVE_LIBLZMA
if (zip->zipx_lzma_valid) {
lzma_end(&... | 1 | [
"CWE-399",
"CWE-401"
] | libarchive | ba641f73f3d758d9032b3f0e5597a9c6e593a505 | 14,641,635,586,937,530,000,000,000,000,000,000,000 | 51 | Fix typo in preprocessor macro in archive_read_format_zip_cleanup()
Frees lzma_stream on cleanup()
Fixes #1165 |
static void cmd_parse_vanished(struct ImapAccountData *adata, char *s)
{
bool earlier = false;
int rc;
unsigned int uid = 0;
struct ImapMboxData *mdata = adata->mailbox->mdata;
mutt_debug(LL_DEBUG2, "Handling VANISHED\n");
if (mutt_str_startswith(s, "(EARLIER)", CASE_IGNORE))
{
/* The RFC says we s... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 269,292,910,998,210,870,000,000,000,000,000,000,000 | 84 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation,
int idct_permutation_type)
{
int i;
switch(idct_permutation_type){
case FF_NO_IDCT_PERM:
for(i=0; i<64; i++)
idct_permutation[i]= i;
break;
case FF_LIBMPEG2_IDCT_... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 124,786,543,043,629,420,000,000,000,000,000,000,000 | 34 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
GF_Err gf_isom_set_audio_info(GF_ISOFile *movie, u32 trackNumber, u32 StreamDescriptionIndex, u32 sampleRate, u32 nbChannels, u8 bitsPerSample, GF_AudioSampleEntryImportMode asemode)
{
GF_Err e;
u32 i, old_qtff_mode=GF_ISOM_AUDIO_QTFF_NONE;
GF_TrackBox *trak;
GF_SampleEntryBox *entry;
GF_AudioSampleEntryBox*aud_en... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 239,821,203,395,444,740,000,000,000,000,000,000,000 | 181 | fixed #1706 |
GF_Err gf_isom_remove_sample_group(GF_ISOFile *movie, u32 track, u32 grouping_type)
{
GF_Err e;
GF_TrackBox *trak;
u32 count, i;
e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
if (e) return e;
trak = gf_isom_get_track_from_file(movie, track);
if (!trak) return GF_BAD_PARAM;
if (trak->Media->information->samp... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 235,976,237,856,539,600,000,000,000,000,000,000,000 | 38 | fixed #1706 |
static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out)
{
int x, y, pos;
Wbmp *wbmp;
/* create the WBMP */
if ((wbmp = createwbmp (gdImageSX (image), gdImageSY (image), WBMP_WHITE)) == NULL) {
gd_error("Could not create WBMP");
return 1;
}
/* fill up the WBMP structure */
pos = 0;
for (y = 0; y... | 0 | [
"CWE-415"
] | php-src | 089f7c0bc28d399b0420aa6ef058e4c1c120b2ae | 16,840,596,302,072,373,000,000,000,000,000,000,000 | 31 | Sync with upstream
Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
the binding doesn't use the `gdImage*Ptr()` functions at all, we're
porting the fix to stay in sync here. |
IPV6DefragInOrderSimpleTest(void)
{
Packet *p1 = NULL, *p2 = NULL, *p3 = NULL;
Packet *reassembled = NULL;
int id = 12;
int i;
int ret = 0;
DefragInit();
p1 = IPV6BuildTestPacket(id, 0, 1, 'A', 8);
if (p1 == NULL)
goto end;
p2 = IPV6BuildTestPacket(id, 1, 1, 'B', 8);
if... | 1 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 322,483,351,766,025,720,000,000,000,000,000,000,000 | 63 | defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host. |
static u32 *ipv4_cow_metrics(struct dst_entry *dst, unsigned long old)
{
WARN_ON(1);
return NULL;
} | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 188,537,914,835,100,300,000,000,000,000,000,000,000 | 5 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
void removeCallbacks(StreamCallbacks& callbacks) override { removeCallbacksHelper(callbacks); } | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 207,380,651,363,339,100,000,000,000,000,000,000,000 | 1 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
CImg<T>& atan2(const CImg<t>& img) {
const ulongT siz = size(), isiz = img.size();
if (siz && isiz) {
if (is_overlapped(img)) return atan2(+img);
T *ptrd = _data, *const ptre = _data + siz;
if (siz>isiz) for (ulongT n = siz/isiz; n; --n)
for (const t *ptrs = img._data, ... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 263,781,756,235,411,200,000,000,000,000,000,000,000 | 12 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void collectDecls(ESTree::Node *V) {
if (auto VD = llvh::dyn_cast<ESTree::VariableDeclaratorNode>(V)) {
return decls.push_back(VD);
}
if (auto FD = llvh::dyn_cast<ESTree::FunctionDeclarationNode>(V)) {
return closures.push_back(FD);
}
} | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 294,820,389,757,339,480,000,000,000,000,000,000,000 | 9 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
void mp_encode_bytes(lua_State *L, mp_buf *buf, const unsigned char *s, size_t len) {
unsigned char hdr[5];
int hdrlen;
if (len < 32) {
hdr[0] = 0xa0 | (len&0xff); /* fix raw */
hdrlen = 1;
} else if (len <= 0xff) {
hdr[0] = 0xd9;
hdr[1] = len;
hdrlen = 2;
} ... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 52a00201fca331217c3b4b8b634f6a0f57d6b7d3 | 100,211,614,404,010,100,000,000,000,000,000,000,000 | 27 | Security: fix Lua cmsgpack library stack overflow.
During an auditing effort, the Apple Vulnerability Research team discovered
a critical Redis security issue affecting the Lua scripting part of Redis.
-- Description of the problem
Several years ago I merged a pull request including many small changes at
the Lua Msg... |
trace_malloc(void *arg, size_t size)
{
trace_info *info = (trace_info *) arg;
trace_header *p;
if (size == 0)
return NULL;
p = malloc(size + sizeof(trace_header));
if (p == NULL)
return NULL;
p[0].size = size;
info->current += size;
info->total += size;
if (info->current > info->peak)
info->peak = info->... | 0 | [
"CWE-369",
"CWE-22"
] | mupdf | 22c47acbd52949421f8c7cb46ea1556827d0fcbf | 182,675,071,201,544,770,000,000,000,000,000,000,000 | 16 | Bug 704834: Fix division by zero for zero width pages in muraster. |
hyphenHashLookup(HyphenHashTab *hashTab, const CharsString *key) {
int i, j;
HyphenHashEntry *e;
if (key->length == 0) return 0;
i = hyphenStringHash(key) % HYPHENHASHSIZE;
for (e = hashTab->entries[i]; e; e = e->next) {
if (key->length != e->key->length) continue;
for (j = 0; j < key->length; j++)
if (key-... | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 258,766,621,218,106,350,000,000,000,000,000,000,000 | 13 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
static GF_Err gf_m4v_parse_frame_mpeg12(GF_M4VParser *m4v, GF_M4VDecSpecInfo *dsi, u8 *frame_type, u32 *time_inc, u64 *size, u64 *start, Bool *is_coded)
{
u8 go, hasVOP, firstObj, val;
s32 o_type;
if (!m4v || !size || !start || !frame_type) return GF_BAD_PARAM;
*size = 0;
firstObj = 1;
hasVOP = 0;
*is_coded = ... | 0 | [
"CWE-190"
] | gpac | 0cd19f4db70615d707e0e6202933c2ea0c1d36df | 250,337,073,446,048,250,000,000,000,000,000,000,000 | 72 | fixed #2067 |
int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_csa_settings *params)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
int err;
mutex_lock(&local->mtx);
err = __ieee80211_channel_switch(wiphy, dev,... | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 191,075,462,805,298,200,000,000,000,000,000,000,000 | 13 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
GF_TrackBox *gf_isom_get_track_from_id(GF_MovieBox *moov, GF_ISOTrackID trackID)
{
u32 i, count;
if (!moov || !trackID) return NULL;
count = gf_list_count(moov->trackList);
for (i = 0; i<count; i++) {
GF_TrackBox *trak = (GF_TrackBox*)gf_list_get(moov->trackList, i);
if (trak->Header->trackID == trackID) retur... | 0 | [
"CWE-401"
] | gpac | fe5155cf047252d1c4cb91602048bfa682af0ea7 | 65,181,484,995,535,400,000,000,000,000,000,000,000 | 12 | fixed #1783 (fuzz) |
TEST_F(LoaderTest, SavedModelInitOpV2Format) {
SavedModelBundle bundle;
SessionOptions session_options;
RunOptions run_options;
const string export_dir =
io::JoinPath(testing::TensorFlowSrcRoot(), kTestDataInitOpV2);
TF_ASSERT_OK(LoadSavedModel(session_options, run_options, export_dir,
... | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | adf095206f25471e864a8e63a0f1caef53a0e3a6 | 308,093,656,969,077,800,000,000,000,000,000,000,000 | 11 | Validate `NodeDef`s from `FunctionDefLibrary` of a `GraphDef`.
We already validated `NodeDef`s from a `GraphDef` but missed validating those from the `FunctionDefLibrary`. Thus, some maliciously crafted models could evade detection and cause denial of service due to a `CHECK`-fail.
PiperOrigin-RevId: 332536309
Change... |
void _process_finish(Message *m) override { } | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 111,475,243,539,408,930,000,000,000,000,000,000,000 | 1 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
ssize_t Http2Session::ConsumeHTTP2Data() {
CHECK_NOT_NULL(stream_buf_.base);
CHECK_LE(stream_buf_offset_, stream_buf_.len);
size_t read_len = stream_buf_.len - stream_buf_offset_;
// multiple side effects.
Debug(this, "receiving %d bytes [wants data? %d]",
read_len,
nghttp2_session_want_read(... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 232,724,602,389,515,000,000,000,000,000,000,000,000 | 47 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static inline void glue(rop_32_, ROP_NAME)(CirrusVGAState *s,
uint32_t dstaddr, uint32_t src)
{
uint32_t *dst = (uint32_t *)
(&s->vga.vram_ptr[dstaddr & s->cirrus_addr_mask & ~3]);
*dst = ROP_FN(*dst, src);
} | 0 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 7,032,947,702,328,738,000,000,000,000,000,000,000 | 7 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
f_le_p(VALUE x, VALUE y)
{
if (FIXNUM_P(x) && FIXNUM_P(y))
return f_boolcast(FIX2LONG(x) <= FIX2LONG(y));
return rb_funcall(x, id_le_p, 1, y);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 216,513,487,970,816,140,000,000,000,000,000,000,000 | 6 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
bool Binary::has_data_in_code() const {
return has_command<DataInCode>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 320,146,783,022,643,550,000,000,000,000,000,000,000 | 3 | Resolve #764 |
static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
spin_lock(&vmx_vpid_lock);
if (vmx->vpid != 0)
__clear_bit(vmx->vpid, vmx_vpid_bitmap);
spin_unlock(&vmx_vpid_lock);
vmx_free_vmcs(vcpu);
kfree(vmx->host_msrs);
kfree(vmx->guest_msrs);
kvm_vcpu_uninit(vcpu);
kmem_cache_f... | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 242,261,741,459,660,270,000,000,000,000,000,000,000 | 14 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
GF_Err udta_Read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e = gf_isom_box_array_read(s, bs, udta_AddBox);
if (e) return e;
if (s->size==4) {
u32 val = gf_bs_read_u32(bs);
s->size = 0;
if (val) {
GF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, ("[iso file] udta has 4 remaining bytes set to %08X but they should be 0\n... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 185,578,079,372,594,560,000,000,000,000,000,000,000 | 13 | prevent dref memleak on invalid input (#1183) |
ecma_prop_name_is_symbol (ecma_string_t *string_p) /**< ecma-string */
{
JERRY_ASSERT (string_p != NULL);
return (!ECMA_IS_DIRECT_STRING (string_p)
&& ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_SYMBOL);
} /* ecma_prop_name_is_symbol */ | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 239,988,546,409,407,270,000,000,000,000,000,000,000 | 7 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
void yang_dnode_get_prefix(struct prefix *prefix, const struct lyd_node *dnode,
const char *xpath_fmt, ...)
{
const char *canon;
/*
* Initialize prefix to avoid static analyzer complaints about
* uninitialized memory.
*/
memset(prefix, 0, sizeof(*prefix));
/* XXX ip_prefix is a native type now in ly2, ... | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 108,537,174,112,552,650,000,000,000,000,000,000,000 | 14 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
struct ext4_ext_path *path,
struct partial_cluster *partial,
ext4_lblk_t start, ext4_lblk_t end)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
int err = 0, correct_index = 0;
int depth = ext_depth(inode), credits;
struct ext4_extent_header *eh;
... | 0 | [
"CWE-200",
"CWE-908"
] | linux | 592acbf16821288ecdc4192c47e3774a4c48bb64 | 77,136,473,419,942,770,000,000,000,000,000,000,000 | 189 | ext4: zero out the unused memory region in the extent tree block
This commit zeroes out the unused memory region in the buffer_head
corresponding to the extent metablock after writing the extent header
and the corresponding extent node entries.
This is done to prevent random uninitialized data from getting into
the f... |
static int sco_sock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
int err = 0;
BT_DBG("sock %p, sk %p", sock, sk);
if (!sk)
return 0;
sco_sock_close(sk);
if (sock_flag(sk, SOCK_LINGER) && sk->sk_lingertime) {
lock_sock(sk);
err = bt_sock_wait_state(sk, BT_CLOSED, sk->sk_lingertime);
relea... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 146,805,217,658,658,530,000,000,000,000,000,000,000 | 22 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
{
PACKET *pkt;
int rc;
KBNODE keyblock = NULL, node, lastnode;
IOBUF a;
int in_cert = 0;
int pk_no = 0;
int uid_no = 0;
int save_mode;
if (ret_kb)
*ret_kb = NULL;
if (!hd->found.kr)
return -1; /* no succes... | 0 | [
"CWE-416"
] | gnupg | f0f71a721ccd7ab9e40b8b6b028b59632c0cc648 | 118,952,947,885,896,170,000,000,000,000,000,000,000 | 164 | gpg: Prevent an invalid memory read using a garbled keyring.
* g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
types.
* g10/keydb.c (parse_keyblock_image): Ditto.
--
The keyring DB code did not reject packets which don't belong into a
keyring. If for example the keyblock contains a literal data packet... |
void svm_switch_vmcb(struct vcpu_svm *svm, struct kvm_vmcb_info *target_vmcb)
{
svm->current_vmcb = target_vmcb;
svm->vmcb = target_vmcb->ptr;
} | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 121,416,613,986,131,540,000,000,000,000,000,000,000 | 5 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
PHP_METHOD(Phar, webPhar)
{
zval *mimeoverride = NULL, *rewrite = NULL;
char *alias = NULL, *error, *index_php = NULL, *f404 = NULL, *ru = NULL;
size_t alias_len = 0, f404_len = 0, free_pathinfo = 0;
int ru_len = 0;
char *fname, *path_info, *mime_type = NULL, *entry, *pt;
const char *basename;
size_t fname_len,... | 0 | [
"CWE-20"
] | php-src | 1e9b175204e3286d64dfd6c9f09151c31b5e099a | 324,552,329,867,046,680,000,000,000,000,000,000,000 | 313 | Fix bug #71860: Require valid paths for phar filenames |
static struct fb_info *get_fb_info(unsigned int idx)
{
struct fb_info *fb_info;
if (idx >= FB_MAX)
return ERR_PTR(-ENODEV);
mutex_lock(®istration_lock);
fb_info = registered_fb[idx];
if (fb_info)
atomic_inc(&fb_info->count);
mutex_unlock(®istration_lock);
return fb_info;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | fc9bbca8f650e5f738af8806317c0a041a48ae4a | 32,992,348,851,457,740,000,000,000,000,000,000,000 | 15 | vm: convert fb_mmap to vm_iomap_memory() helper
This is my example conversion of a few existing mmap users. The
fb_mmap() case is a good example because it is a bit more complicated
than some: fb_mmap() mmaps one of two different memory areas depending
on the page offset of the mmap (but happily there is never any mi... |
static void avdtp_set_state(struct avdtp *session,
avdtp_session_state_t new_state)
{
GSList *l;
avdtp_session_state_t old_state = session->state;
session->state = new_state;
for (l = state_callbacks; l != NULL;) {
struct avdtp_state_callback *cb = l->data;
l = g_slist_next(l);
if (session->device !=... | 0 | [
"CWE-703"
] | bluez | 7a80d2096f1b7125085e21448112aa02f49f5e9a | 304,336,079,498,556,200,000,000,000,000,000,000,000 | 19 | avdtp: Fix accepting invalid/malformed capabilities
Check if capabilities are valid before attempting to copy them. |
static int set_sadb_kmaddress(struct sk_buff *skb, const struct xfrm_kmaddress *k)
{
struct sadb_x_kmaddress *kma;
u8 *sa;
int family = k->family;
int socklen = pfkey_sockaddr_len(family);
int size_req;
size_req = (sizeof(struct sadb_x_kmaddress) +
pfkey_sockaddr_pair_size(family));
kma = skb_put_zero(sk... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 56,746,547,998,073,760,000,000,000,000,000,000,000 | 23 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
void isor_sai_bytes_removed(ISOMChannel *ch, u32 pos, u32 removed)
{
u32 offset = 0;
u8 *sai;
u32 sai_size, cur_pos;
u32 sub_count_size = 0;
u32 i, subs_count = 0;
if (!ch->cenc_ki || !ch->sai_buffer) return;
sai = ch->sai_buffer;
sai_size = ch->sai_buffer_size;
//multikey
if (ch->cenc_ki->value.data.ptr[0... | 0 | [
"CWE-703",
"CWE-835"
] | gpac | 71460d72ec07df766dab0a4d52687529f3efcf0a | 58,356,216,929,005,890,000,000,000,000,000,000,000 | 69 | fixed #1876 |
catch(std::exception& e)
{
cerr<<"Fatal: "<<e.what()<<endl;
} | 0 | [
"CWE-787"
] | pdns | f9c57c98da1b1007a51680629b667d57d9b702b8 | 271,711,032,065,343,620,000,000,000,000,000,000,000 | 4 | dnsreplay: Bail out on a too small outgoing buffer |
virDomainDefCheckABIStability(virDomainDefPtr src,
virDomainDefPtr dst,
virDomainXMLOptionPtr xmlopt)
{
return virDomainDefCheckABIStabilityFlags(src, dst, xmlopt, 0);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 141,503,534,440,855,230,000,000,000,000,000,000,000 | 6 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
gdImageRotateGeneric(gdImagePtr src, const float degrees, const int bgColor)
{
float _angle = ((float) (-degrees / 180.0f) * (float)M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = (unsigned int)(abs((int)(src_w * cos(_angle))) + abs((int)(src_h * sin(_angle... | 0 | [
"CWE-399"
] | libgd | 4751b606fa38edc456d627140898a7ec679fcc24 | 131,310,063,879,034,140,000,000,000,000,000,000,000 | 67 | gdImageScaleTwoPass memory leak fix
Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and
confirmed by @vapier. This bug actually bit me in production and I'm
very thankful that it was reported with an easy fix.
Fixes #173. |
Status InferenceContext::WithRank(ShapeHandle shape, int64_t rank,
ShapeHandle* out) {
if (rank > kint32max) {
return errors::InvalidArgument("Rank cannot exceed kint32max");
}
const int32_t existing = Rank(shape);
if (existing == rank) {
*out = shape;
return Status... | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 102,560,091,932,694,130,000,000,000,000,000,000,000 | 24 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
EXPORTED strarray_t *mailbox_extract_flags(const struct mailbox *mailbox,
const struct index_record *record,
const char *userid)
{
int i;
strarray_t *flags = strarray_new();
/* Note: we don't handle the external seen db h... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 58,201,680,187,358,750,000,000,000,000,000,000,000 | 30 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
static inline void tcp_synq_overflow(struct sock *sk)
{
tcp_sk(sk)->rx_opt.ts_recent_stamp = jiffies;
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 245,660,526,480,739,840,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
int io_wq_cpu_affinity(struct io_wq *wq, cpumask_var_t mask)
{
int i;
rcu_read_lock();
for_each_node(i) {
struct io_wqe *wqe = wq->wqes[i];
if (mask)
cpumask_copy(wqe->cpu_mask, mask);
else
cpumask_copy(wqe->cpu_mask, cpumask_of_node(i));
}
rcu_read_unlock();
return 0;
} | 0 | [
"CWE-200"
] | linux | 713b9825a4c47897f66ad69409581e7734a8728e | 75,520,461,904,130,780,000,000,000,000,000,000,000 | 16 | io-wq: fix cancellation on create-worker failure
WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test
fs/io_uring.c:1151 [inline]
WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test
fs/io_uring.c:1146 [inline]
WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151
io_req_complete_post+0xf5... |
static struct usb_request *dwc3_gadget_ep_alloc_request(struct usb_ep *ep,
gfp_t gfp_flags)
{
struct dwc3_request *req;
struct dwc3_ep *dep = to_dwc3_ep(ep);
req = kzalloc(sizeof(*req), gfp_flags);
if (!req)
return NULL;
req->epnum = dep->number;
req->dep = dep;
dep->allocated_requests++;
trace_dwc3_a... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 252,898,005,366,848,470,000,000,000,000,000,000,000 | 19 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... |
pkt_hash_rrset_first(sldns_buffer* pkt, uint8_t* dname)
{
/* works together with pkt_hash_rrset_rest */
/* note this MUST be identical to rrset_key_hash in packed_rrset.c */
/* this routine handles compressed names */
hashvalue_type h = 0xab;
h = dname_pkt_hash(pkt, dname, h);
return h;
} | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 199,736,964,307,114,640,000,000,000,000,000,000,000 | 9 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
static int input_proc_devices_open(struct inode *inode, struct file *file)
{
return seq_open(file, &input_devices_seq_ops);
} | 0 | [
"CWE-703",
"CWE-787"
] | linux | cb222aed03d798fc074be55e59d9a112338ee784 | 75,469,417,808,827,790,000,000,000,000,000,000,000 | 4 | 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... |
TPM_RESULT SWTPM_NVRAM_GetStateBlob(unsigned char **data,
uint32_t *length,
uint32_t tpm_number,
const char *name,
TPM_BOOL decrypt,
TPM_BOO... | 0 | [] | swtpm | cae5991423826f21b11f7a5bc7f7b2b538bde2a2 | 58,645,251,155,765,010,000,000,000,000,000,000,000 | 88 | swtpm: Do not follow symlinks when opening lockfile (CVE-2020-28407)
This patch addresses CVE-2020-28407.
Prevent us from following symliks when we open the lockfile
for writing.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
struct sk_buff_head *hitlist)
{
struct sk_buff *skb;
struct sk_buff *next;
spin_lock(&x->sk_receive_queue.lock);
receive_queue_for_each_skb(x, next, skb) {
/*
* Do we have file descriptors ?
*/
if (UNIXCB(skb).fp) {
bool ... | 0 | [] | linux-2.6 | 6209344f5a3795d34b7f2c0061f49802283b6bdd | 87,716,068,523,827,430,000,000,000,000,000,000,000 | 46 | net: unix: fix inflight counting bug in garbage collector
Previously I assumed that the receive queues of candidates don't
change during the GC. This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may s... |
int ssl_cipher_list_to_bytes(SSL *s,STACK_OF(SSL_CIPHER) *sk,unsigned char *p,
int (*put_cb)(const SSL_CIPHER *, unsigned char *))
{
int i,j=0;
SSL_CIPHER *c;
unsigned char *q;
#ifndef OPENSSL_NO_KRB5
int nokrb5 = !kssl_tgt_is_available(s->kssl_ctx);
#endif /* OPENSSL_NO_KRB5 */
if (sk == NULL) return(0)... | 0 | [] | openssl | 0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c | 121,593,516,026,962,800,000,000,000,000,000,000,000 | 52 | Backport support for fixed DH ciphersuites (from HEAD) |
QPDFObjectHandle::getKey(std::string const& key)
{
QPDFObjectHandle result;
if (isDictionary())
{
result = dynamic_cast<QPDF_Dictionary*>(
m->obj.getPointer())->getKey(key);
}
else
{
typeWarning(
"dictionary", "returning null for attempted key retrieval");... | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 269,876,529,317,381,500,000,000,000,000,000,000,000 | 27 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
std::vector<std::shared_ptr<Box>> Box::get_child_boxes(uint32_t short_type) const
{
std::vector<std::shared_ptr<Box>> result;
for (auto& box : m_children) {
if (box->get_short_type()==short_type) {
result.push_back(box);
}
}
return result;
} | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 78,949,992,842,398,080,000,000,000,000,000,000,000 | 11 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.