func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static ram_addr_t ram_save_remaining(void)
{
return migration_dirty_pages;
} | 0 | [
"CWE-20"
] | qemu | 0be839a2701369f669532ea5884c15bead1c6e08 | 7,248,106,806,892,546,000,000,000,000,000,000,000 | 4 | migration: fix parameter validation on ram load
During migration, the values read from migration stream during ram load
are not validated. Especially offset in host_from_stream_offset() and
also the length of the writes in the callers of said function.
To fix this, we need to make sure that the [offset, offset + leng... |
//! Wait for any event occuring either on the display \c disp1 or \c disp2.
static void wait(CImgDisplay& disp1, CImgDisplay& disp2) {
disp1._is_event = disp2._is_event = false;
while ((!disp1._is_closed || !disp2._is_closed) &&
!disp1._is_event && !disp2._is_event) wait_all(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 107,003,110,766,199,580,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
end_superexec(i_ctx_t *i_ctx_p)
{
i_ctx_p->in_superexec--;
return 0;
} | 1 | [] | ghostpdl | d683d1e6450d74619e6277efeebfc222d9a5cb91 | 102,792,120,197,847,810,000,000,000,000,000,000,000 | 5 | Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps.
We were under the impression that the Windows driver 'PScript5.dll' used
superexec, but after testing with our extensive suite of PostScript file,
and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear
that this operator is ... |
SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode)
{
return do_mkdirat(dfd, pathname, mode);
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | d0cb50185ae942b03c4327be322055d622dc79f6 | 272,889,456,814,233,840,000,000,000,000,000,000,000 | 4 | do_last(): fetch directory ->i_mode and ->i_uid before it's too late
may_create_in_sticky() call is done when we already have dropped the
reference to dir.
Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
void session_destroy(Session *session)
{
cm_return_if_fail(session != NULL);
cm_return_if_fail(session->destroy != NULL);
session_register_ping(session, NULL);
session_close(session);
session->destroy(session);
g_free(session->server);
g_string_free(session->read_msg_buf, TRUE);
g_byte_array_free(session->rea... | 0 | [] | claws | fcc25329049b6f9bd8d890f1197ed61eb12e14d5 | 133,324,954,325,637,880,000,000,000,000,000,000,000 | 22 | fix STARTTLS protocol violation
with thanks to, and patch by Damian Poddebniak and Hanno Böck |
TIFFWriteDirectoryTagCheckedSlong8(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int64 value)
{
int64 m;
assert(sizeof(int64)==8);
assert(tif->tif_flags&TIFF_BIGTIFF);
m=value;
if (tif->tif_flags&TIFF_SWAB)
TIFFSwabLong8((uint64*)(&m));
return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG8,1,8... | 0 | [
"CWE-20"
] | libtiff | 3144e57770c1e4d26520d8abee750f8ac8b75490 | 212,308,043,165,430,080,000,000,000,000,000,000,000 | 10 | * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings
of double to other data types to avoid undefined behaviour if the output range
isn't big enough to hold the input value.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643
http://bugzilla.maptools.org/show_bug.cgi?id=2642
http://bugzil... |
testcase_str2jobsel(Pool *pool, const char *caller, char **pieces, int npieces, Id *whatp)
{
Id job, what;
if (!strcmp(pieces[0], "pkg") && npieces == 2)
{
job = SOLVER_SOLVABLE;
what = testcase_str2solvid(pool, pieces[1]);
if (!what)
return pool_error(pool, -1, "%s: unknown package '%s'", ca... | 0 | [
"CWE-120"
] | libsolv | 0077ef29eb46d2e1df2f230fc95a1d9748d49dec | 156,585,440,151,599,100,000,000,000,000,000,000,000 | 88 | testcase_read: error out if repos are added or the system is changed too late
We must not add new solvables after the considered map was created, the solver
was created, or jobs were added. We may not changed the system after jobs have
been added.
(Jobs may point inside the whatproviedes array, so we must not invalid... |
TEST_F(EncryptedRecordTest, TestWriteEmpty) {
TLSMessage msg{ContentType::application_data, folly::IOBuf::create(0)};
auto outBuf = write_.write(std::move(msg));
EXPECT_TRUE(outBuf.data->empty());
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-770"
] | fizz | 6bf67137ef1ee5cd70c842b014c322b7deaf994b | 18,167,097,331,148,344,000,000,000,000,000,000,000 | 5 | Reject zero length handshake records.
Summary:
Zero length (all padding) handshake are forbidden by RFC. Allowing
these was a regression in D13754697 (2c6f78a).
This is a partial fix for CVE-2019-11924
Reviewed By: xybu
Differential Revision: D16285100
fbshipit-source-id: 05a19d31ad74601ce89156a0e59517aaad8dd928 |
pblock_done(Slapi_PBlock *pb)
{
#ifdef PBLOCK_ANALYTICS
pblock_analytics_report(pb);
pblock_analytics_destroy(pb);
#endif
if (pb->pb_op != NULL) {
operation_free(&pb->pb_op, pb->pb_conn);
pb->pb_op = NULL;
}
slapi_ch_free((void **)&(pb->pb_dse));
slapi_ch_free((void **)&(pb->pb_t... | 0 | [
"CWE-415"
] | 389-ds-base | a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b | 259,557,486,827,393,180,000,000,000,000,000,000,000 | 25 | Issue 5218 - double-free of the virtual attribute context in persistent search (#5219)
description:
A search is processed by a worker using a private pblock.
If the search is persistent, the worker spawn a thread
and kind of duplicate its private pblock so that the spawn
thread continue to process the p... |
int wait_for_token(pkcs11_handle_t *h,
int wanted_slot_id,
const char *wanted_token_label,
unsigned int *slot_num)
{
int rv;
do {
/* see if the card we're looking for is inserted */
rv = find_slot_by_number_and_label (h, wanted_slot_id, wanted_token... | 0 | [] | pam_pkcs11 | cc51b3e2720ea862d500cab2ea517518ff39a497 | 37,864,917,176,055,820,000,000,000,000,000,000,000 | 21 | verify using a nonce from the system, not the card
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problem. |
static int cluster_pages_for_defrag(struct inode *inode,
struct page **pages,
unsigned long start_index,
int num_pages)
{
unsigned long file_end;
u64 isize = i_size_read(inode);
u64 page_start;
u64 page_end;
u64 page_cnt;
int ret;
int i;
int i_done;
struct btrfs_ordered_extent *ordered;... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 101,034,374,766,774,510,000,000,000,000,000,000,000 | 142 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
static void pragmaVtabCursorClear(PragmaVtabCursor *pCsr){
int i;
sqlite3_finalize(pCsr->pPragma);
pCsr->pPragma = 0;
for(i=0; i<ArraySize(pCsr->azArg); i++){
sqlite3_free(pCsr->azArg[i]);
pCsr->azArg[i] = 0;
}
} | 0 | [
"CWE-754"
] | sqlite | ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd | 188,785,940,815,545,430,000,000,000,000,000,000,000 | 9 | Fix the NOT NULL verification logic in PRAGMA integrity_check so that it
works for generated columns whose value is the result of a comparison operator.
Ticket [bd8c280671ba44a7]
FossilOrigin-Name: f3b39c71b88cb6721f443de56cdce4c08252453a5e340b00a2bd88dc10c42400 |
int process_stat(ProcessHandle process, const char *fname, struct stat *s) {
int rv = process_stat_nofail(process, fname, s);
if (rv) {
fprintf(stderr, "Error: cannot stat /proc/%d/%s: %s\n", process->pid, fname, strerror(errno));
exit(1);
}
return rv;
} | 1 | [
"CWE-269",
"CWE-94"
] | firejail | dab835e7a0eb287822016f5ae4e87f46e1d363e7 | 214,668,523,082,883,800,000,000,000,000,000,000,000 | 9 | CVE-2022-31214: fixing the fix |
uint32_t CiffDirectory::doWrite(Blob& blob,
ByteOrder byteOrder,
uint32_t offset)
{
#ifdef EXIV2_DEBUG_MESSAGES
std::cout << "Writing directory 0x" << std::hex << tag() << "---->\n";
#endif
// Ciff offsets are relative ... | 0 | [
"CWE-190"
] | exiv2 | 9b7a19f957af53304655ed1efe32253a1b11a8d0 | 47,401,197,459,114,270,000,000,000,000,000,000,000 | 46 | Fix integer overflow. |
untrusted_launcher_response_callback (GtkDialog *dialog,
int response_id,
ActivateParametersDesktop *parameters)
{
GdkScreen *screen;
char *uri;
GFile *file;
switch (response_id)
{
... | 1 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 90,979,177,181,035,830,000,000,000,000,000,000,000 | 42 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static void sun4v_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
mc->desc = "Sun4v platform";
mc->init = sun4v_init;
mc->block_default_type = IF_IDE;
mc->max_cpus = 1; /* XXX for now */
mc->default_boot_order = "c";
mc->default_cpu_type = SPARC_CPU_TYPE_NAME... | 0 | [
"CWE-476"
] | qemu | ad280559c68360c9f1cd7be063857853759e6a73 | 83,154,558,711,340,880,000,000,000,000,000,000,000 | 11 | sun4u: add power_mem_read routine
Define skeleton 'power_mem_read' routine. Avoid NULL dereference.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> |
code_props_type_string (code_props_type kind)
{
switch (kind)
{
case destructor:
return "%destructor";
case printer:
return "%printer";
}
abort ();
} | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 55,268,129,863,486,010,000,000,000,000,000,000,000 | 11 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
*/
static int
xmlXPathCompareNodeSetValue(xmlXPathParserContextPtr ctxt, int inf, int strict,
xmlXPathObjectPtr arg, xmlXPathObjectPtr val) {
if ((val == NULL) || (arg == NULL) ||
((arg->type != XPATH_NODESET) && (arg->type != XPATH_XSLT_TREE)))
return(0);
switch(val->type) {
... | 0 | [
"CWE-416"
] | libxml2 | 0f3b843b3534784ef57a4f9b874238aa1fda5a73 | 125,295,194,984,895,660,000,000,000,000,000,000,000 | 30 | Fix XPath stack frame logic
Move the calls to xmlXPathSetFrame and xmlXPathPopFrame around in
xmlXPathCompOpEvalPositionalPredicate to make sure that the context
object on the stack is actually protected. Otherwise, memory corruption
can occur when calling sloppily coded XPath extension functions.
Fixes bug 783160. |
cpu_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
struct cgroup *old_cont, struct task_struct *tsk)
{
sched_move_task(tsk);
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 230,051,700,945,096,600,000,000,000,000,000,000,000 | 5 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
int sc_pkcs15emu_itacns_init_ex(sc_pkcs15_card_t *p15card, struct sc_aid *aid,
sc_pkcs15emu_opt_t *opts)
{
sc_card_t *card = p15card->card;
SC_FUNC_CALLED(card->ctx, 1);
/* Check card */
if (!(opts && opts->flags & SC_PKCS15EMU_FLAGS_NO_CHECK)) {
if (! (
(card->type > SC_CARD_TYPE_ITACNS_BASE &&
card->... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 295,047,491,785,145,600,000,000,000,000,000,000,000 | 19 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
int ldb_kv_index_del_element(struct ldb_module *module,
struct ldb_kv_private *ldb_kv,
const struct ldb_message *msg,
struct ldb_message_element *el)
{
const char *dn_str;
int ret;
unsigned int i;
if (!ldb_kv->cache->attribute_indexes) {
/* no indexed fields */
return LDB_SUCCESS;
}
... | 0 | [
"CWE-20"
] | samba | 0998f2f1bced019db4000ef4b55887abcb65f6d2 | 153,627,345,904,266,750,000,000,000,000,000,000,000 | 35 | CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374 |
static int avrcp_target_server_probe(struct btd_profile *p,
struct btd_adapter *adapter)
{
sdp_record_t *record;
struct avrcp_server *server;
DBG("path %s", adapter_get_path(adapter));
server = find_server(servers, adapter);
if (server != NULL)
goto done;
server = avrcp_server_register(adapter);
if (s... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 43,469,387,775,876,440,000,000,000,000,000,000,000 | 34 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
dissect_tcpopt_timestamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *ts_tree;
proto_item *length_item;
int offset = 0;
guint32 ts_val, ts_ecr;
int len = tvb_reported_length(tvb);
ti = proto_tree_add_item(tree, proto_tcp_option_timestamp... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 108,262,474,006,557,670,000,000,000,000,000,000,000 | 37 | 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... |
grub_ext2_iterate_dir (grub_fshelp_node_t dir,
int (*hook) (const char *filename,
enum grub_fshelp_filetype filetype,
grub_fshelp_node_t node,
void *closure),
void *closure)
{
unsigned int fpos = 0;
struct grub_fshelp_node *diro = (struct grub_fshelp_node *) dir;
if (! d... | 0 | [
"CWE-703",
"CWE-787"
] | radare2 | 796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191 | 118,051,218,569,274,450,000,000,000,000,000,000,000 | 108 | Fix ext2 buffer overflow in r2_sbu_grub_memmove |
RemoteDevicePropertiesWidget::RemoteDevicePropertiesWidget(QWidget *parent)
: QWidget(parent)
, modified(false)
, saveable(false)
{
setupUi(this);
if (qobject_cast<QTabWidget *>(parent)) {
verticalLayout->setMargin(4);
}
type->addItem(tr("Samba Share"), (int)Type_Samba);
type->ad... | 1 | [
"CWE-20",
"CWE-22"
] | cantata | afc4f8315d3e96574925fb530a7004cc9e6ce3d3 | 127,697,057,662,316,850,000,000,000,000,000,000,000 | 14 | Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested |
static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
struct device_node *np)
{
unsigned int dcrs;
/* setup the dcr address mapping if it's in the device tree */
dcrs = dcr_resource_start(np, 0);
if (dcrs != 0) {
lp->sdma_dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0));
lp->dma_... | 0 | [
"CWE-120",
"CWE-787"
] | linux | c364df2489b8ef2f5e3159b1dff1ff1fdb16040d | 71,407,923,960,874,540,000,000,000,000,000,000,000 | 18 | net: ll_temac: Fix TX BD buffer overwrite
Just as the initial check, we need to ensure num_frag+1 buffers available,
as that is the number of buffers we are going to use.
This fixes a buffer overflow, which might be seen during heavy network
load. Complete lockup of TEMAC was reproducible within about 10 minutes of
a... |
bool create_directory_if_missing_recursive(const std::string& dirname)
{
return create_directory_if_missing_recursive(path(dirname));
} | 0 | [
"CWE-200"
] | wesnoth | f8914468182e8d0a1551b430c0879ba236fe4d6d | 313,062,919,146,892,600,000,000,000,000,000,000,000 | 4 | Disallow inclusion of .pbl files from WML (bug #23504)
Note that this will also cause Lua wesnoth.have_file() to return false
on .pbl files. |
my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
{
MYSQL *mysql= stmt->mysql;
int rc= 0;
DBUG_ENTER("mysql_stmt_close");
free_root(&stmt->result.alloc, MYF(0));
free_root(&stmt->mem_root, MYF(0));
free_root(&stmt->extension->fields_mem_root, MYF(0));
if (mysql)
{
mysql->stmts= list_delete(mysql-... | 1 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 151,277,202,281,192,020,000,000,000,000,000,000,000 | 48 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
CNF_GetRtcOnUtc(void)
{
return rtc_on_utc;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 13,029,770,107,108,539,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static int x509_subject_cmp(X509 **a, X509 **b)
{
return X509_subject_name_cmp(*a, *b);
} | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 263,869,322,324,174,600,000,000,000,000,000,000,000 | 4 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
free_resub_eval_result(void)
{
int i;
for (i = 0; i < MAX_REGSUB_NESTING; ++i)
VIM_CLEAR(eval_result[i]);
} | 0 | [
"CWE-416"
] | vim | 32acf1f1a72ebb9d8942b9c9d80023bf1bb668ea | 321,602,756,659,635,950,000,000,000,000,000,000,000 | 7 | patch 9.0.0047: using freed memory with recursive substitute
Problem: Using freed memory with recursive substitute.
Solution: Always make a copy for reg_prev_sub. |
static int vmx_vcpu_create(struct kvm_vcpu *vcpu)
{
struct vmx_uret_msr *tsx_ctrl;
struct vcpu_vmx *vmx;
int i, err;
BUILD_BUG_ON(offsetof(struct vcpu_vmx, vcpu) != 0);
vmx = to_vmx(vcpu);
INIT_LIST_HEAD(&vmx->pi_wakeup_list);
err = -ENOMEM;
vmx->vpid = allocate_vpid();
/*
* If PML is turned on, failure... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 65,961,793,584,700,760,000,000,000,000,000,000,000 | 101 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
tty_cell(struct tty *tty, const struct grid_cell *gc,
const struct window_pane *wp)
{
const struct grid_cell *gcp;
/* Skip last character if terminal is stupid. */
if ((tty->term->flags & TERM_EARLYWRAP) &&
tty->cy == tty->sy - 1 &&
tty->cx == tty->sx - 1)
return;
/* If this is a padding character... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 61,095,556,080,464,345,000,000,000,000,000,000,000 | 30 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
bool Image::isPrintXMP(uint16_t type, Exiv2::PrintStructureOption option)
{
return type == 700 && option == kpsXMP;
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 73,732,829,668,477,610,000,000,000,000,000,000,000 | 4 | Fix https://github.com/Exiv2/exiv2/issues/55 |
Status ValidateInputTypeAndPlacement(
EagerContext* ctx, EagerOperation* op,
const core::RefCountPtr<KernelAndDevice>& kernel) {
profiler::TraceMe activity("ValidateInputTypeAndPlacement",
profiler::TraceMeLevel::kInfo);
const int n_inputs = op->Inputs().size();
if (kernel->nu... | 0 | [
"CWE-476",
"CWE-475"
] | tensorflow | a5b89cd68c02329d793356bda85d079e9e69b4e7 | 231,213,481,209,251,400,000,000,000,000,000,000,000 | 58 | Fix empty resource handle vulnerability.
Some ops that attempt to extract a resource handle from user input
can lead to nullptr dereferences. This returns an error in such
a case.
PiperOrigin-RevId: 445571938 |
TPMI_CAMELLIA_KEY_BITS_Unmarshal(TPMI_CAMELLIA_KEY_BITS *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPMI_CAMELLIA_KEY_BITS orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = TPM_KEY_BITS_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 305,066,972,720,381,800,000,000,000,000,000,000,000 | 19 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static void reset_all_predictors(PredictorState *ps)
{
int i;
for (i = 0; i < MAX_PREDICTORS; i++)
reset_predict_state(&ps[i]);
} | 0 | [
"CWE-703"
] | FFmpeg | 6e42ccb9dbc13836cd52cda594f819d17af9afa2 | 18,373,043,240,122,997,000,000,000,000,000,000,000 | 6 | avcodec/aacdec: Fix pulse position checks in decode_pulses()
Fixes out of array read
Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void var_field_free(RAnalVarField *field) {
if (!field) {
return;
}
free (field->name);
free (field);
} | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 168,695,745,331,770,620,000,000,000,000,000,000,000 | 7 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
ztype0_adjust_FDepVector(gs_font_type0 * pfont)
{
gs_memory_t *mem = pfont->memory;
/* HACK: We know the font was allocated by the interpreter. */
gs_ref_memory_t *imem = (gs_ref_memory_t *)mem;
gs_font **pdep = pfont->data.FDepVector;
ref newdep;
uint fdep_size = pfont->data.fdep_size;
ref ... | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 201,756,396,457,587,900,000,000,000,000,000,000,000 | 27 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
DSA_PrivateKey::create_signature_op(RandomNumberGenerator& rng,
const std::string& params,
const std::string& provider) const
{
if(provider == "base" || provider.empty())
return std::unique_ptr<PK_Ops::Signature>(new DSA_Signature_Opera... | 0 | [
"CWE-200"
] | botan | 48fc8df51d99f9d8ba251219367b3d629cc848e3 | 237,679,503,619,129,420,000,000,000,000,000,000,000 | 8 | Address DSA/ECDSA side channel |
int fuse_do_setattr(struct dentry *dentry, struct iattr *attr,
struct file *file)
{
struct inode *inode = d_inode(dentry);
struct fuse_mount *fm = get_fuse_mount(inode);
struct fuse_conn *fc = fm->fc;
struct fuse_inode *fi = get_fuse_inode(inode);
FUSE_ARGS(args);
struct fuse_setattr_in inarg;
struct fuse_... | 1 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 200,041,788,392,848,350,000,000,000,000,000,000,000 | 165 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
CImg<T>& load_dcraw_external(const char *const filename) {
if (!filename)
throw CImgArgumentException(_cimg_instance
"load_dcraw_external(): Specified filename is (null).",
cimg_instance);
cimg::fclose(cimg::fopen(filename,"... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 5,325,436,196,250,766,000,000,000,000,000,000,000 | 48 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void unmask_payload(handler_ctx *hctx) {
buffer * const b = hctx->frame.payload;
for (size_t i = 0, used = buffer_clen(b); i < used; ++i) {
b->ptr[i] ^= hctx->frame.ctl.mask[hctx->frame.ctl.mask_cnt];
hctx->frame.ctl.mask_cnt = (hctx->frame.ctl.mask_cnt + 1) % 4;
}
} | 0 | [
"CWE-476"
] | lighttpd1.4 | 971773f1fae600074b46ef64f3ca1f76c227985f | 143,662,673,141,926,990,000,000,000,000,000,000,000 | 7 | [mod_wstunnel] fix crash with bad hybivers (fixes #3165)
(thx Michał Dardas)
x-ref:
"mod_wstunnel null pointer dereference"
https://redmine.lighttpd.net/issues/3165 |
static int mailimf_oparenth_parse(const char * message, size_t length,
size_t * indx)
{
return mailimf_char_parse(message, length, indx, '(');
} | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 137,736,017,404,981,480,000,000,000,000,000,000,000 | 5 | Fixed crash #274 |
static void pcpu_init_value(struct bpf_htab *htab, void __percpu *pptr,
void *value, bool onallcpus)
{
/* When using prealloc and not setting the initial value on all cpus,
* zero-fill element values for other cpus (just as what happens when
* not using prealloc). Otherwise, bpf program has no way to ensure... | 0 | [
"CWE-787"
] | bpf | c4eb1f403243fc7bbb7de644db8587c03de36da6 | 147,033,493,026,141,630,000,000,000,000,000,000,000 | 25 | bpf: Fix integer overflow involving bucket_size
In __htab_map_lookup_and_delete_batch(), hash buckets are iterated
over to count the number of elements in each bucket (bucket_size).
If bucket_size is large enough, the multiplication to calculate
kvmalloc() size could overflow, resulting in out-of-bounds write
as repor... |
inline int handler::ha_write_tmp_row(uchar *buf)
{
int error;
MYSQL_INSERT_ROW_START(table_share->db.str, table_share->table_name.str);
increment_statistics(&SSV::ha_tmp_write_count);
TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_WRITE_ROW, MAX_KEY, 0,
{ error= write_row(buf); })
MYSQL_INSERT_ROW_DO... | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 45,419,824,092,298,960,000,000,000,000,000,000,000 | 10 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
nm_gconf_get_all_connections (GConfClient *client)
{
GSList *connections;
guint32 stamp = 0;
GError *error = NULL;
stamp = (guint32) gconf_client_get_int (client, APPLET_PREFS_STAMP, &error);
if (error) {
g_error_free (error);
stamp = 0;
}
nm_gconf_migrate_0_7_connection_uuid (client);
nm_gconf_migrate_0_... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 190,267,788,909,734,230,000,000,000,000,000,000,000 | 39 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
vim_regexec_string(
regmatch_T *rmp,
char_u *line, // string to match against
colnr_T col, // column to start looking for match
int nl)
{
int result;
regexec_T rex_save;
int rex_in_use_save = rex_in_use;
// Cannot use the same prog recursively, it contains state.
if (rmp->reg... | 0 | [
"CWE-416"
] | vim | 32acf1f1a72ebb9d8942b9c9d80023bf1bb668ea | 101,861,055,748,082,920,000,000,000,000,000,000,000 | 65 | patch 9.0.0047: using freed memory with recursive substitute
Problem: Using freed memory with recursive substitute.
Solution: Always make a copy for reg_prev_sub. |
static void nfs_commit_release_pages(struct nfs_commit_data *data)
{
struct nfs_page *req;
int status = data->task.tk_status;
struct nfs_commit_info cinfo;
while (!list_empty(&data->pages)) {
req = nfs_list_entry(data->pages.next);
nfs_list_remove_request(req);
nfs_clear_page_commit(req->wb_page);
dprintk... | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 154,133,109,101,896,970,000,000,000,000,000,000,000 | 42 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
int ethtool_op_get_perm_addr(struct net_device *dev, struct ethtool_perm_addr *addr, u8 *data)
{
unsigned char len = dev->addr_len;
if ( addr->size < len )
return -ETOOSMALL;
addr->size = len;
memcpy(data, dev->perm_addr, len);
return 0;
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 10,375,224,442,306,558,000,000,000,000,000,000,000 | 10 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
void PE_(write_image_section_header)(RBuffer *b, ut64 addr, PE_(image_section_header) *section_header) {
ut8 buf[sizeof (PE_(image_section_header))];
memcpy (buf, section_header->Name, PE_IMAGE_SIZEOF_SHORT_NAME);
r_write_at_le32 (buf, section_header->Misc.PhysicalAddress, PE_IMAGE_SIZEOF_SHORT_NAME);
r_write_at_le... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 188,317,885,929,142,100,000,000,000,000,000,000,000 | 14 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
const SegmentSplitInfo* Binary::segment_split_info() const {
return command<SegmentSplitInfo>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 178,392,561,977,877,870,000,000,000,000,000,000,000 | 3 | Resolve #764 |
static int _server_handle_qAttached(libgdbr_t *g, int (*cmd_cb) (void*, const char*, char*, size_t), void *core_ptr) {
if (send_ack (g) < 0) {
return -1;
}
// TODO check if process was attached or created
// Right now, says that process was created
return send_msg (g, "0");
} | 0 | [
"CWE-703",
"CWE-787"
] | radare2 | 796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191 | 146,280,590,172,533,440,000,000,000,000,000,000,000 | 8 | Fix ext2 buffer overflow in r2_sbu_grub_memmove |
sctp_disposition_t sctp_sf_do_9_2_reshutack(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = (struct sctp_chunk *) arg;
struct sctp_chunk *reply;
/* Since we are not going... | 0 | [] | linux-2.6 | 7c3ceb4fb9667f34f1599a062efecf4cdc4a4ce5 | 171,023,073,130,269,640,000,000,000,000,000,000,000 | 32 | [SCTP]: Allow spillover of receive buffer to avoid deadlock.
This patch fixes a deadlock situation in the receive path by allowing
temporary spillover of the receive buffer.
- If the chunk we receive has a tsn that immediately follows the ctsn,
accept it even if we run out of receive buffer space and renege data wi... |
struct page *kvm_vcpu_gfn_to_page(struct kvm_vcpu *vcpu, gfn_t gfn)
{
kvm_pfn_t pfn;
pfn = kvm_vcpu_gfn_to_pfn(vcpu, gfn);
return kvm_pfn_to_page(pfn);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 254,449,893,337,549,500,000,000,000,000,000,000,000 | 8 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
Lex_input_stream::get_escape_func(THD *thd, my_wc_t sep) const
{
return thd->backslash_escapes() ?
(sep == '"' ? my_wc_mb_utf8_escape_double_quote_and_backslash:
my_wc_mb_utf8_escape_single_quote_and_backslash) :
(sep == '"' ? my_wc_mb_utf8_escape_double_quote:
... | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 266,615,021,866,027,200,000,000,000,000,000,000,000 | 8 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
GF_Err trpy_box_size(GF_Box *s)
{
s->size += 8;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 306,349,077,756,726,870,000,000,000,000,000,000,000 | 5 | fixed #1587 |
static void addrconf_dad_kick(struct inet6_ifaddr *ifp)
{
unsigned long rand_num;
struct inet6_dev *idev = ifp->idev;
if (ifp->flags & IFA_F_OPTIMISTIC)
rand_num = 0;
else
rand_num = prandom_u32() % (idev->cnf.rtr_solicit_delay ? : 1);
ifp->dad_probes = idev->cnf.dad_transmits;
addrconf_mod_dad_work(ifp, ra... | 0 | [
"CWE-20"
] | linux | 77751427a1ff25b27d47a4c36b12c3c8667855ac | 32,954,678,320,177,794,000,000,000,000,000,000,000 | 13 | ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running... |
bool sctp_verify_asconf(const struct sctp_association *asoc,
struct sctp_chunk *chunk, bool addr_param_needed,
struct sctp_paramhdr **errp)
{
struct sctp_addip_chunk *addip;
bool addr_param_seen = false;
union sctp_params param;
addip = (struct sctp_addip_chunk *)chunk->chunk_hdr;
sctp_walk_params(param, ad... | 0 | [
"CWE-20"
] | linux | 07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c | 164,940,170,188,831,000,000,000,000,000,000,000,000 | 65 | sctp: verify size of a new chunk in _sctp_make_chunk()
When SCTP makes INIT or INIT_ACK packet the total chunk length
can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when
transmitting these packets, e.g. the crash on sending INIT_ACK:
[ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168
... |
mwifiex_wmm_del_pkts_in_ralist(struct mwifiex_private *priv,
struct list_head *ra_list_head)
{
struct mwifiex_ra_list_tbl *ra_list;
list_for_each_entry(ra_list, ra_list_head, list)
mwifiex_wmm_del_pkts_in_ralist_node(priv, ra_list);
} | 0 | [
"CWE-787"
] | linux | 3a9b153c5591548612c3955c9600a98150c81875 | 280,712,492,312,984,650,000,000,000,000,000,000,000 | 8 | mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status()
mwifiex_ret_wmm_get_status() calls memcpy() without checking the
destination size.Since the source is given from remote AP which
contains illegal wmm elements , this may trigger a heap buffer
overflow.
Fix it by putting the length check before call... |
static int navigation_mapping(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
unsigned int key = usage->hid & HID_USAGE;
if (key >= ARRAY_SIZE(sixaxis_keymap))
retur... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 187,329,677,424,580,070,000,000,000,000,000,000,000 | 46 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
gdm_manager_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdmManager *self;
self = GDM_MANAGER (object);
switch (prop_id) {
case PROP_XDMCP_ENABLED:
... | 0 | [] | gdm | ff98b2817014684ae1acec78ff06f0f461a56a9f | 217,716,945,683,117,400,000,000,000,000,000,000,000 | 21 | manager: if falling back to X11 retry autologin
Right now, we get one shot to autologin. If it fails, we fall back to
the greeter. We should give it another go if the reason for the failure
was wayland fallback to X.
https://bugzilla.gnome.org/show_bug.cgi?id=780520 |
ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
{
struct ccp_aes_engine *aes = &cmd->u.aes;
struct ccp_dm_workarea key, ctx, final_wa, tag;
struct ccp_data src, dst;
struct ccp_data aad;
struct ccp_op op;
unsigned int dm_offset;
unsigned int authsize;
unsigned int jobid;
unsigned int ilen... | 1 | [
"CWE-703",
"CWE-401"
] | linux | 505d9dcb0f7ddf9d075e729523a33d38642ae680 | 106,903,489,194,098,500,000,000,000,000,000,000,000 | 280 | crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
There are three bugs in this code:
1) If we ccp_init_data() fails for &src then we need to free aad.
Use goto e_aad instead of goto e_ctx.
2) The label to free the &final_wa was named incorrectly as "e_tag" but
it should have been "e_final_wa". One erro... |
void clear() { Item_cache::clear(); str_value_cached= FALSE; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 60,254,813,517,324,730,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
int normalize)
{
xmlChar limit = 0;
const xmlChar *in = NULL, *start, *end, *last;
xmlChar *ret = NULL;
GROW;
in = (xmlChar *) CUR_PTR;
if (*in != '"' && *in != '\'') {
xmlFatalErr(ctxt, XML_E... | 0 | [
"CWE-119"
] | libxml2 | 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d | 173,109,326,534,091,170,000,000,000,000,000,000,000 | 166 | Fix potential out of bound access |
static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kc, int event)
{
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
u16 gain_reg;
u16 reg;
int val;
int offset_val = 0;
if (!(strcmp(w->name, "RX INT0 INTERP"))) {
reg = WCD9335_CDC_RX0_RX_PATH_... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 18,589,432,939,342,796,000,000,000,000,000,000,000 | 61 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old,
struct rpc_program *program,
u32 vers)
{
struct rpc_clnt *clnt;
struct rpc_version *version;
int err;
BUG_ON(vers >= program->nrvers || !program->version[vers]);
version = program->version[vers];
clnt = rpc_clone_client(old);
if (IS... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 282,450,584,746,261,700,000,000,000,000,000,000,000 | 27 | 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... |
cliprdr_packet_unlock_clipdata_new(const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData)
{
wStream* s;
if (!unlockClipboardData)
return NULL;
s = cliprdr_packet_new(CB_LOCK_CLIPDATA, 0, 4);
if (!s)
return NULL;
cliprdr_write_unlock_clipdata(s, unlockClipboardData);
return s;
} | 0 | [
"CWE-125"
] | FreeRDP | b73143cf7ee5fe4cdabcbf56908aa15d8a883821 | 277,396,643,092,091,240,000,000,000,000,000,000,000 | 15 | Fixed oob read in cliprdr_read_format_list |
static void sig_print_starting(TEXT_DEST_REC *dest)
{
NETJOIN_SERVER_REC *rec;
if (printing_joins)
return;
if (!IS_IRC_SERVER(dest->server))
return;
if (!server_ischannel(dest->server, dest->target))
return;
rec = netjoin_find_server(IRC_SERVER(dest->server));
if (rec != NULL && rec->netjoins != NULL)
... | 1 | [
"CWE-416"
] | irssi | 38ba3ca2c40fc8ccccec8dc3f360c4087e7dd498 | 285,616,865,764,821,780,000,000,000,000,000,000,000 | 17 | Merge pull request #824 from dequis/more-netsplit-revert
Revert more of the netsplit print optimisation to fix crashes
(cherry picked from commit cfcc021c81eea84bd982a64764f62e163128acf3) |
check_valid_filter_name_or_fail(const char *filter_name)
{
gboolean found_invalid = proto_check_field_name(filter_name);
/* Additionally forbid upper case characters. */
if (!found_invalid) {
for (guint i = 0; filter_name[i]; i++) {
if (g_ascii_isupper(filter_name[i])) {
found_invalid = TRUE;
break;
... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 192,970,059,175,830,350,000,000,000,000,000,000,000 | 20 | 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. |
static void rtsp_reply_header(HTTPContext *c, enum RTSPStatusCode error_number)
{
const char *str;
time_t ti;
struct tm *tm;
char buf2[32];
str = RTSP_STATUS_CODE2STRING(error_number);
if (!str)
str = "Unknown Error";
avio_printf(c->pb, "RTSP/1.0 %d %s\r\n", error_number, str);
... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156 | 37,720,836,320,240,207,000,000,000,000,000,000,000 | 20 | ffserver: Check chunk size
Fixes out of array access
Fixes: poc_ffserver.py
Found-by: Paul Cher <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
real_need_secrets (NMVpnServicePlugin *plugin,
NMConnection *connection,
const char **out_setting_name,
GError **error)
{
NMSettingVpn *s_vpn;
NMSettingSecretFlags pw_flags;
const char *pw = NULL;
g_return_val_if_fail (NM_IS_VPN_SERVICE_PLUGIN (plugin), FALS... | 0 | [] | NetworkManager-vpnc | 07ac18a32b4e361a27ef48ac757d36cbb46e8e12 | 273,902,377,613,878,660,000,000,000,000,000,000,000 | 40 | service: disallow newlinies in configuration values (CVE-2018-10900)
The vpnc configuration format doesn't allow those. vpnc(8):
The values start exactly one space after the keywords, and run to the end
of line. This lets you put any kind of weird character (except CR, LF and
NUL) in your strings
We have no ch... |
MagickExport MagickBooleanType ExportImagePixels(const Image *image,
const ssize_t x,const ssize_t y,const size_t width,const size_t height,
const char *map,const StorageType type,void *pixels,ExceptionInfo *exception)
{
MagickBooleanType
status;
QuantumType
*quantum_map;
RectangleInfo
roi;
r... | 0 | [
"CWE-190"
] | ImageMagick | 406da3af9e09649cda152663c179902edf5ab3ac | 111,443,901,285,972,380,000,000,000,000,000,000,000 | 181 | https://github.com/ImageMagick/ImageMagick/issues/1732 |
ldns_rdf_address_reverse(ldns_rdf *rd)
{
uint8_t buf_4[LDNS_IP4ADDRLEN];
uint8_t buf_6[LDNS_IP6ADDRLEN * 2];
ldns_rdf *rev;
ldns_rdf *in_addr;
ldns_rdf *ret_dname;
uint8_t octet;
uint8_t nnibble;
uint8_t nibble;
uint8_t i, j;
char *char_dname;
int nbit;
if (ldns_rdf_get_type(rd) != LDNS_RDF_TYPE_A &&
l... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 310,415,439,072,848,670,000,000,000,000,000,000,000 | 116 | CAA and URI |
static int perf_read_one(struct perf_event *event,
u64 read_format, char __user *buf)
{
u64 enabled, running;
u64 values[4];
int n = 0;
values[n++] = perf_event_read_value(event, &enabled, &running);
if (read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
values[n++] = enabled;
if (read_format & PERF_FORMAT_TOT... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 337,334,628,613,937,400,000,000,000,000,000,000,000 | 20 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
void qemu_spice_del_memslot(SimpleSpiceDisplay *ssd, uint32_t gid, uint32_t sid)
{
trace_qemu_spice_del_memslot(ssd->qxl.id, gid, sid);
spice_qxl_del_memslot(&ssd->qxl, gid, sid);
} | 0 | [
"CWE-200"
] | qemu | ab9509cceabef28071e41bdfa073083859c949a7 | 268,319,616,803,098,480,000,000,000,000,000,000,000 | 5 | spice: make sure we don't overflow ssd->buf
Related spice-only bug. We have a fixed 16 MB buffer here, being
presented to the spice-server as qxl video memory in case spice is
used with a non-qxl card. It's also used with qxl in vga mode.
When using display resolutions requiring more than 16 MB of memory we
are goi... |
static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOGPU *g = VIRTIO_GPU(vdev);
VirtQueueElement *elem;
size_t s;
struct virtio_gpu_update_cursor cursor_info;
if (!virtio_queue_ready(vq)) {
return;
}
for (;;) {
elem = virtqueue_pop(vq, sizeof(VirtQ... | 0 | [] | qemu | acfc4846508a02cc4c83aa27799fd74ac280bdb2 | 210,502,667,334,134,320,000,000,000,000,000,000,000 | 30 | virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS
The value is defined in virtio_gpu.h already (changing from 4 to 16).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
const T* data(const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0) const {
return const_cast<CImg<T>*>(this)->data(x,y,z,c);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 66,218,736,423,808,050,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. |
GF_Err asrt_box_read(GF_Box *s, GF_BitStream *bs)
{
unsigned int i;
GF_AdobeSegmentRunTableBox *ptr = (GF_AdobeSegmentRunTableBox *)s;
ISOM_DECREASE_SIZE(ptr, 1)
ptr->quality_entry_count = gf_bs_read_u8(bs);
if (ptr->size < ptr->quality_entry_count)
return GF_ISOM_INVALID_FILE;
for (i=0; i<ptr->quality_entry_... | 0 | [
"CWE-401",
"CWE-787"
] | gpac | a51f951b878c2b73c1d8e2f1518c7cdc5fb82c3f | 288,522,194,191,089,100,000,000,000,000,000,000,000 | 42 | fixed #1782 (fuzz) |
static void sd_stop0(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
if (!gspca_dev->present)
return;
switch (sd->model) {
case CIT_MODEL0:
/* HDG windows does this, but it causes the cams autogain to
restart from a gain of 0, which does not look good when
changing resolution... | 0 | [
"CWE-476"
] | linux | a246b4d547708f33ff4d4b9a7a5dbac741dc89d8 | 280,193,898,943,090,000,000,000,000,000,000,000,000 | 75 | media: xirlink_cit: add missing descriptor sanity checks
Make sure to check that we have two alternate settings and at least one
endpoint before accessing the second altsetting structure and
dereferencing the endpoint arrays.
This specifically avoids dereferencing NULL-pointers or corrupting
memory when a device does... |
png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type)
{
png_byte buf[6];
png_debug(1, "in png_write_bKGD");
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
(png_ptr->num_palette != 0 ||
(png_ptr->mng_features_permitted &... | 0 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 235,197,029,563,686,000,000,000,000,000,000,000,000 | 57 | [libpng16] Reject attempt to write over-length PLTE chunk |
void PackLinuxElf64::unpack(OutputFile *fo)
{
unsigned const c_phnum = get_te16(&ehdri.e_phnum);
upx_uint64_t old_data_off = 0;
upx_uint64_t old_data_len = 0;
upx_uint64_t old_dtinit = 0;
unsigned szb_info = sizeof(b_info);
{
upx_uint64_t const e_entry = get_te64(&ehdri.e_entry);
... | 1 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 235,732,349,996,130,120,000,000,000,000,000,000,000 | 241 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
cleanup(void)
{
outs(exit_attribute_mode);
if (!outs(orig_colors))
outs(orig_pair);
outs(clear_screen);
outs(cursor_normal);
fflush(stdout);
fprintf(stderr, "\n\n%ld total cells, rate %.2f/sec\n",
total_chars,
((double) (total_chars) / (double) (time((time_t *) 0) - started)));
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 332,853,402,340,643,600,000,000,000,000,000,000,000 | 13 | 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... |
static int check_rdtsc(struct x86_emulate_ctxt *ctxt)
{
u64 cr4 = ctxt->ops->get_cr(ctxt, 4);
if (cr4 & X86_CR4_TSD && ctxt->ops->cpl(ctxt))
return emulate_ud(ctxt);
return X86EMUL_CONTINUE;
} | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 128,809,913,411,535,500,000,000,000,000,000,000,000 | 9 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
__weak unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)
{
return vma_kernel_pagesize(vma);
} | 0 | [
"CWE-362"
] | linux | 17743798d81238ab13050e8e2833699b54e15467 | 320,686,893,288,463,400,000,000,000,000,000,000,000 | 4 | mm/hugetlb: fix a race between hugetlb sysctl handlers
There is a race between the assignment of `table->data` and write value
to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on
the other thread.
CPU0: CPU1:
proc_sys_write
... |
struct dce_i2c_hw *dce110_i2c_hw_create(
struct dc_context *ctx,
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
kzalloc(sizeof(struct dce_i2c_hw), GFP_KERNEL);
if (!dce_i2c_hw)
return NULL;
dce100_i2c_hw_construct(dce_i2c_hw, ctx, inst,
&i2c_hw_regs[inst], &i2c_shifts, &i2c_masks);
return dce_i2c... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 250,459,829,121,134,060,000,000,000,000,000,000,000 | 15 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
static int atalk_release(struct socket *sock)
{
struct sock *sk = sock->sk;
if (sk) {
sock_orphan(sk);
sock->sk = NULL;
atalk_destroy_socket(sk);
}
return 0;
} | 0 | [] | history | 7ab442d7e0a76402c12553ee256f756097cae2d2 | 305,389,990,904,513,000,000,000,000,000,000,000,000 | 11 | [DDP]: Convert to new protocol interface.
Convert ddp to the new protocol interface which means it has to
handle fragmented skb's. The only big change is in the checksum
routine which has to do more work (like skb_checksum).
Minor speedup is folding the carry to avoid a branch.
Tested against a 2.4 system and by ru... |
switch (yych) {
case 'a': goto yy37;
default: goto yy36;
} | 1 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 317,438,805,821,151,000,000,000,000,000,000,000,000 | 4 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
static int dib7070_set_param_override(struct dvb_frontend *fe)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
struct dvb_usb_adapter *adap = fe->dvb->priv;
struct dib0700_adapter_state *state = adap->priv;
u16 offset;
u8 band = BAND_OF_FREQUENCY(p->frequency/1000);
switch (band) {
case BAND_VHF:... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3f190e3aec212fc8c61e202c51400afa7384d4bc | 235,671,449,371,578,770,000,000,000,000,000,000,000 | 18 | [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.
As dvb_usb_generic_rw handles a re... |
void cred_to_ucred(struct pid *pid, const struct cred *cred,
struct ucred *ucred)
{
ucred->pid = pid_vnr(pid);
ucred->uid = ucred->gid = -1;
if (cred) {
struct user_namespace *current_ns = current_user_ns();
ucred->uid = from_kuid(current_ns, cred->euid);
ucred->gid = from_kgid(current_ns, cred->egid);
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 3e10986d1d698140747fcfc2761ec9cb64c1d582 | 332,420,114,297,398,880,000,000,000,000,000,000,000 | 12 | net: guard tcp_set_keepalive() to tcp sockets
Its possible to use RAW sockets to get a crash in
tcp_set_keepalive() / sk_reset_timer()
Fix is to make sure socket is a SOCK_STREAM one.
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@da... |
static size_t resp_hdr_cb(void *ptr, size_t size, size_t nmemb, void *user_data)
{
struct header_info *hi = (struct header_info *)user_data;
size_t remlen, slen, ptrlen = size * nmemb;
char *rem, *val = NULL, *key = NULL;
void *tmp;
val = (char *)calloc(1, ptrlen);
key = (char *)calloc(1, ptrlen);
if (!key || !... | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 200,340,236,402,091,200,000,000,000,000,000,000,000 | 77 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
get_node(const char *name, oid * objid, size_t * objidlen)
{
const char *cp;
char ch;
int res;
cp = name;
while ((ch = *cp))
if (('0' <= ch && ch <= '9')
|| ('a' <= ch && ch <= 'z')
|| ('A' <= ch && ch <= 'Z')
|| ch == '-')
... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 88,778,284,819,408,580,000,000,000,000,000,000,000 | 46 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
all_visible_variables ()
{
return (vapply (visible_var));
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 15,119,184,086,097,407,000,000,000,000,000,000,000 | 4 | commit bash-20120224 snapshot |
static int mmu_page_zap_pte(struct kvm *kvm, struct kvm_mmu_page *sp,
u64 *spte, struct list_head *invalid_list)
{
u64 pte;
struct kvm_mmu_page *child;
pte = *spte;
if (is_shadow_present_pte(pte)) {
if (is_last_spte(pte, sp->role.level)) {
drop_spte(kvm, spte);
} else {
child = to_shadow_page(pte ... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 10,628,064,285,877,804,000,000,000,000,000,000,000 | 29 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
_cimg_math_parser():
code(_code),p_code_end(0),p_break((CImg<ulongT>*)(cimg_ulong)-2),
imgin(CImg<T>::const_empty()),listin(CImgList<T>::const_empty()),
imgout(CImg<T>::empty()),listout(CImgList<T>::empty()),
img_stats(_img_stats),list_stats(_list_stats),list_median(_list_median),... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 166,609,620,061,816,180,000,000,000,000,000,000,000 | 10 | . |
vrend_renderer_fini(void)
{
if (!vrend_state.inited)
return;
typedef void (*destroy_callback)(void *);
vrend_resource_set_destroy_callback((destroy_callback)vrend_renderer_resource_destroy);
vrend_free_sync_thread();
if (vrend_state.eventfd != -1) {
close(vrend_state.eventfd);
vrend_... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 139,520,644,343,505,560,000,000,000,000,000,000,000 | 23 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static int handle_interrupt_window(struct kvm_vcpu *vcpu)
{
u32 cpu_based_vm_exec_control;
/* clear pending irq */
cpu_based_vm_exec_control = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL);
cpu_based_vm_exec_control &= ~CPU_BASED_VIRTUAL_INTR_PENDING;
vmcs_write32(CPU_BASED_VM_EXEC_CONTROL, cpu_based_vm_exec_control);
... | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 136,686,350,829,933,960,000,000,000,000,000,000,000 | 23 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
TYPELIB *ha_known_exts(void)
{
if (!known_extensions.type_names || mysys_usage_id != known_extensions_id)
{
List<char> found_exts;
const char **ext, *old_ext;
known_extensions_id= mysys_usage_id;
found_exts.push_back((char*) TRG_EXT);
found_exts.push_back((char*) TRN_EXT);
plugin_foreach(N... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 188,700,719,503,618,300,000,000,000,000,000,000,000 | 29 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
RangeVarCallbackForRenameTrigger(const RangeVar *rv, Oid relid, Oid oldrelid,
void *arg)
{
HeapTuple tuple;
Form_pg_class form;
tuple = SearchSysCache1(RELOID, ObjectIdGetDatum(relid));
if (!HeapTupleIsValid(tuple))
return; /* concurrently dropped */
form = (Form_pg_class) GETSTRUCT(tuple);
/* on... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 91,813,746,842,442,370,000,000,000,000,000,000,000 | 28 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob,
bool retry, qemuDomainLogContextPtr logCtxt)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
qemuMonitorPtr mon = NULL;
unsigned long long timeout = 0;
if (qemuSecuritySetDaemonSocketLabel(driver->securit... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 44,499,491,509,904,050,000,000,000,000,000,000,000 | 59 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.