func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
efi_thunk_update_capsule(efi_capsule_header_t **capsules,
unsigned long count, unsigned long sg_list)
{
/*
* To properly support this function we would need to repackage
* 'capsules' because the firmware doesn't understand 64-bit
* pointers.
*/
return EFI_UNSUPPORTED;
} | 0 | [
"CWE-388"
] | tip | 4e78921ba4dd0aca1cc89168f45039add4183f8e | 8,338,717,825,687,690,000,000,000,000,000,000,000 | 10 | efi/x86/Add missing error handling to old_memmap 1:1 mapping code
The old_memmap flow in efi_call_phys_prolog() performs numerous memory
allocations, and either does not check for failure at all, or it does
but fails to propagate it back to the caller, which may end up calling
into the firmware with an incomplete 1:1 ... |
stmt_type_to_string(enum stmt_type type)
{
if (type >= _STMT_NUM_VALUES)
return NULL;
return stmt_type_strings[type];
} | 0 | [
"CWE-476"
] | libxkbcommon | e3cacae7b1bfda0d839c280494f23284a1187adf | 187,245,980,287,149,430,000,000,000,000,000,000,000 | 6 | xkbcomp: fix crashes in the parser when geometry tokens appear
In the XKB format, floats and various keywords can only be used in the
xkb_geometry section. xkbcommon removed support xkb_geometry, but still
parses it for backward compatibility. As part of ignoring it, the float
AST node and various keywords were remove... |
Status KernelAndDeviceFunc::Init(const Context& ctx, const NodeDef& ndef,
GraphCollector* graph_collector) {
TF_RETURN_IF_ERROR(InstantiateFunc(ctx, ndef, graph_collector));
return pflr_->GetOutputDevices(handle_, &output_devices_,
ctx.eager_lazy_cop... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | da8558533d925694483d2c136a9220d6d49d843c | 300,161,328,366,532,930,000,000,000,000,000,000,000 | 6 | Fix undefined behavior in `tf.raw_ops.Switch` in eager mode.
PiperOrigin-RevId: 332578058
Change-Id: I9727571d2f21476b10d8aa27c1b7176564b76ac9 |
inline char option(const char *const name, const int argc, const char *const *const argv,
const char _default, const char *const usage=0) {
const char *const s = cimg::option(name,argc,argv,(char*)0);
const char res = s?*s:_default;
char tmp[8];
*tmp = res; tmp[1] = 0;... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 236,073,491,924,876,070,000,000,000,000,000,000,000 | 9 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
string_count(PyStringObject *self, PyObject *args)
{
PyObject *sub_obj;
const char *str = PyString_AS_STRING(self), *sub;
Py_ssize_t sub_len;
Py_ssize_t start = 0, end = PY_SSIZE_T_MAX;
if (!stringlib_parse_args_finds("count", args, &sub_obj, &start, &end))
return NULL;
if (PyString_Ch... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 227,347,269,650,636,000,000,000,000,000,000,000,000 | 33 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
static inline int cx23888_ir_and_or4(struct cx23885_dev *dev, u32 addr,
u32 and_mask, u32 or_value)
{
cx_andor(addr, ~and_mask, or_value);
return 0;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | a7b2df76b42bdd026e3106cf2ba97db41345a177 | 238,487,813,214,698,220,000,000,000,000,000,000,000 | 6 | media: rc: prevent memory leak in cx23888_ir_probe
In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
struct list_head *head, bool internal)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_buf *bf, *bf_last;
bool puttxbuf = false;
bool edma;
/*
* Insert the frame on the outbound list and... | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 95,661,107,586,094,490,000,000,000,000,000,000,000 | 66 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
uint8_t get_current_file_lepton_version() {
return ujgversion;
} | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 87,516,930,706,042,870,000,000,000,000,000,000,000 | 3 | fix #111 |
Method* InstanceKlass::find_instance_method(const Array<Method*>* methods,
const Symbol* name,
const Symbol* signature,
PrivateLookupMode private_mode) {
Method* const meth = InstanceKla... | 0 | [] | jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 84,946,170,827,451,190,000,000,000,000,000,000,000 | 14 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
int CLASS canon_has_lowbits()
{
uchar test[0x4000];
int ret=1, i;
fseek (ifp, 0, SEEK_SET);
fread (test, 1, sizeof test, ifp);
for (i=540; i < (int) sizeof test - 1; i++)
if (test[i] == 0xff) {
if (test[i+1]) return 1;
ret=0;
}
return ret;
} | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 154,918,100,531,110,510,000,000,000,000,000,000,000 | 14 | Avoid overflow in ljpeg_start(). |
xmlRelaxNGPopErrors(xmlRelaxNGValidCtxtPtr ctxt, int level)
{
int i;
xmlRelaxNGValidErrorPtr err;
#ifdef DEBUG_ERROR
xmlGenericError(xmlGenericErrorContext,
"Pop errors till level %d\n", level);
#endif
for (i = level; i < ctxt->errNr; i++) {
err = &ctxt->errTab[i];
i... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 6,014,064,904,701,613,000,000,000,000,000,000,000 | 25 | More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
adds a new xmlEscapeFormatString() function to escape composed format
strings |
int select_compression_response_header(struct session *s, struct buffer *res)
{
struct http_txn *txn = &s->txn;
struct http_msg *msg = &txn->rsp;
struct hdr_ctx ctx;
struct comp_type *comp_type;
/* no common compression algorithm was found in request header */
if (s->comp_algo == NULL)
goto fail;
/* HTTP < 1... | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 256,318,921,680,213,840,000,000,000,000,000,000,000 | 109 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
lexer_process_char_literal (parser_context_t *context_p, /**< context */
const uint8_t *char_p, /**< characters */
size_t length, /**< length of string */
uint8_t literal_type, /**< final literal type */
bool... | 1 | [
"CWE-476"
] | jerryscript | e58f2880df608652aff7fd35c45b242467ec0e79 | 160,463,861,708,559,620,000,000,000,000,000,000,000 | 59 | Do not allocate memory for zero length strings. (#1844)
Fixes #1821.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com |
static int is_cpuid_PSE36(void)
{
return 1;
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 222,427,870,220,822,670,000,000,000,000,000,000,000 | 4 | 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... |
void rds_rdma_drop_keys(struct rds_sock *rs)
{
struct rds_mr *mr;
struct rb_node *node;
unsigned long flags;
/* Release any MRs associated with this socket */
spin_lock_irqsave(&rs->rs_rdma_lock, flags);
while ((node = rb_first(&rs->rs_rdma_keys))) {
mr = rb_entry(node, struct rds_mr, r_rb_node);
if (mr->r_t... | 0 | [
"CWE-476"
] | linux | f3069c6d33f6ae63a1668737bc78aaaa51bff7ca | 86,525,133,076,172,700,000,000,000,000,000,000,000 | 24 | rds: Fix NULL pointer dereference in __rds_rdma_map
This is a fix for syzkaller719569, where memory registration was
attempted without any underlying transport being loaded.
Analysis of the case reveals that it is the setsockopt() RDS_GET_MR
(2) and RDS_GET_MR_FOR_DEST (7) that are vulnerable.
Here is an example sta... |
TEST_P(DownstreamProtocolIntegrationTest, AddInvalidDecodedData) {
EXPECT_ENVOY_BUG(
{
useAccessLog("%RESPONSE_CODE_DETAILS%");
config_helper_.prependFilter(R"EOF(
name: add-invalid-data-filter
)EOF");
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 182,190,869,642,664,720,000,000,000,000,000,000,000 | 19 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
cmsUInt32Number CMSEXPORT cmsStageInputChannels(const cmsStage* mpe)
{
return mpe ->InputChannels;
} | 0 | [] | Little-CMS | b0d5ffd4ad91cf8683ee106f13742db3dc66599a | 293,189,737,565,320,550,000,000,000,000,000,000,000 | 4 | Memory Squeezing: LCMS2: CLUTElemDup
Check for allocation failures and tidy up if found. |
char *get_file_name(char **params, int fileparams)
{
GString *out = g_string_new(params[0]);
char *ret;
int pos;
for (pos = 1; pos < fileparams; pos++) {
out = g_string_append(out, " ");
out = g_string_append(out, params[pos]);
}
ret = out->str;
g_string_free(out, FALSE);
return ret;
} | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 326,167,842,912,716,070,000,000,000,000,000,000,000 | 15 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
int _gnutls_fips_perform_self_checks2(void)
{
int ret;
_gnutls_switch_lib_state(LIB_STATE_SELFTEST);
/* Tests the FIPS algorithms */
/* ciphers - one test per cipher */
ret = gnutls_cipher_self_test(0, GNUTLS_CIPHER_3DES_CBC);
if (ret < 0) {
gnutls_assert();
goto error;
}
ret = gnutls_cipher_self_test(0... | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 41,261,454,062,616,670,000,000,000,000,000,000,000 | 120 | env: use secure_getenv when reading environment variables |
write_viminfo_version(FILE *fp_out)
{
fprintf(fp_out, "# Viminfo version\n|%d,%d\n\n",
BARTYPE_VERSION, VIMINFO_VERSION);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 3,794,164,203,371,022,000,000,000,000,000,000,000 | 5 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
d_lite_year(VALUE self)
{
get_d1(self);
return m_real_year(dat);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 38,547,266,602,138,750,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
{
int error;
char to_log[FN_REFLEN];
LOG_INFO log_info;
MY_STAT stat_area;
THD *thd= current_thd;
DBUG_ENTER("purge_logs_before_date");
mysql_mutex_lock(&LOCK_index);
to_log[0]= 0;
if ((error=find_log_pos(&log_info, NullS, 0 /*no mutex*... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 173,452,453,122,583,400,000,000,000,000,000,000,000 | 73 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
void handshakeErr(
AsyncSSLSocket*,
const AsyncSocketException& ex) noexcept override {
except = ex;
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 106,847,607,727,417,200,000,000,000,000,000,000,000 | 5 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
void *js_savetry(js_State *J)
{
if (J->trytop == JS_TRYLIMIT)
js_error(J, "try: exception stack overflow");
J->trybuf[J->trytop].E = J->E;
J->trybuf[J->trytop].envtop = J->envtop;
J->trybuf[J->trytop].tracetop = J->tracetop;
J->trybuf[J->trytop].top = J->top;
J->trybuf[J->trytop].bot = J->bot;
J->trybuf[J->try... | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 102,313,152,392,904,390,000,000,000,000,000,000,000 | 12 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
int context_query_cmp(const void* ATTR_UNUSED(a), const void* ATTR_UNUSED(b))
{
log_assert(0);
return 0;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 293,806,706,812,514,600,000,000,000,000,000,000,000 | 5 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
cmsHPROFILE CMSEXPORT cmsCreateXYZProfile(void)
{
return cmsCreateXYZProfileTHR(NULL);
} | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 8,433,250,883,162,038,000,000,000,000,000,000,000 | 4 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
static int php_session_decode(zend_string *data) /* {{{ */
{
if (!PS(serializer)) {
php_error_docref(NULL, E_WARNING, "Unknown session.serialize_handler. Failed to decode session object");
return FAILURE;
}
if (PS(serializer)->decode(ZSTR_VAL(data), ZSTR_LEN(data)) == FAILURE) {
php_session_destroy();
php_se... | 0 | [
"CWE-476"
] | php-src | d76f7c6c636b8240e06a1fa29eebb98ad005008a | 72,494,468,839,621,870,000,000,000,000,000,000,000 | 14 | Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress |
njs_function_prototype_apply(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t unused)
{
int64_t i, length;
njs_int_t ret;
njs_frame_t *frame;
njs_value_t *this, *arr_like;
njs_array_t *arr;
njs_function_t *func;
if (!njs_is_function(njs_argument(... | 0 | [
"CWE-416"
] | njs | 6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6 | 223,910,261,475,246,700,000,000,000,000,000,000,000 | 72 | Fixed recursive async function calls.
Previously, PromiseCapability record was stored (function->context)
directly in function object during a function invocation. This is
not correct, because PromiseCapability record should be linked to
current execution context. As a result, function->context is
overwritten with c... |
longlong Item_func_between::val_int_cmp_decimal()
{
VDec dec(args[0]);
if ((null_value= dec.is_null()))
return 0; /* purecov: inspected */
VDec a_dec(args[1]), b_dec(args[2]);
if (!a_dec.is_null() && !b_dec.is_null())
return (longlong) ((dec.cmp(a_dec) >= 0 &&
dec.cmp(b_dec) ... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 90,605,464,404,439,140,000,000,000,000,000,000,000 | 17 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
SpoolssSetPrinterDataEx_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
dcerpc_info *di, guint8 *drep _U_)
{
proto_item *hidden_item;
hidden_item = proto_tree_add_uint(
tree, hf_printerdata, tvb, offset, 0, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
offset ... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 248,212,185,900,481,180,000,000,000,000,000,000,000 | 17 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
GF_Box *cprt_New()
{
ISOM_DECL_BOX_ALLOC(GF_CopyrightBox, GF_ISOM_BOX_TYPE_CPRT);
tmp->packedLanguageCode[0] = 'u';
tmp->packedLanguageCode[1] = 'n';
tmp->packedLanguageCode[2] = 'd';
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 246,918,446,919,835,900,000,000,000,000,000,000,000 | 9 | prevent dref memleak on invalid input (#1183) |
GF_Err mvhd_box_dump(GF_Box *a, FILE * trace)
{
GF_MovieHeaderBox *p;
p = (GF_MovieHeaderBox *) a;
gf_isom_box_dump_start(a, "MovieHeaderBox", trace);
gf_fprintf(trace, "CreationTime=\""LLD"\" ", p->creationTime);
gf_fprintf(trace, "ModificationTime=\""LLD"\" ", p->modificationTime);
gf_fprintf(trace, "TimeScal... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 56,039,396,143,493,340,000,000,000,000,000,000,000 | 16 | fixed #2138 |
static void mptsas_scsi_realize(PCIDevice *dev, Error **errp)
{
MPTSASState *s = MPT_SAS(dev);
Error *err = NULL;
int ret;
dev->config[PCI_LATENCY_TIMER] = 0;
dev->config[PCI_INTERRUPT_PIN] = 0x01;
if (s->msi != ON_OFF_AUTO_OFF) {
ret = msi_init(dev, 0, 1, true, false, &err);
/... | 1 | [
"CWE-416"
] | qemu | 3791642c8d60029adf9b00bcb4e34d7d8a1aea4d | 253,836,489,785,300,570,000,000,000,000,000,000,000 | 57 | mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392)
While processing SCSI i/o requests in mptsas_process_scsi_io_request(),
the Megaraid emulator appends new MPTSASRequest object 'req' to
the 's->pending' queue. In case of an error, this same object gets
dequeued in mptsas_free_request() only if SCSIRequ... |
static av_cold int ac3_parse_init(AVCodecParserContext *s1)
{
AACAC3ParseContext *s = s1->priv_data;
s->header_size = AC3_HEADER_SIZE;
s->sync = ac3_sync;
return 0;
} | 0 | [
"CWE-476"
] | FFmpeg | 00e8181bd97c834fe60751b0c511d4bb97875f78 | 206,042,555,576,266,100,000,000,000,000,000,000,000 | 7 | avcodec/ac3_parser: Check init_get_bits8() for failure
Fixes: null pointer dereference
Fixes: ffmpeg_crash_6.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void h2_session_ev_local_goaway(h2_session *session, int arg, const char *msg)
{
cleanup_unprocessed_streams(session);
if (!session->remote.shutdown) {
update_child_status(session, SERVER_CLOSING, "local goaway");
}
transit(session, "local goaway", H2_SESSION_ST_DONE);
} | 0 | [] | mod_h2 | 5e75e5685dd043fe93a5a08a15edd087a43f6968 | 156,285,676,288,374,220,000,000,000,000,000,000,000 | 8 | v1.11.0
--------------------------------------------------------------------------------
* connection IO event handling reworked. Instead of reacting on incoming bytes, the
state machine now acts on incoming frames that are affecting it. This reduces
state transitions.
* pytest suite now covers some basic tests... |
static int ntop_check_license(lua_State* vm) {
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
#ifdef NTOPNG_PRO
ntop->getPro()->check_license(false, false);
#endif
lua_pushinteger(vm,1);
return(CONST_LUA_OK);
} | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 308,975,403,441,840,980,000,000,000,000,000,000,000 | 10 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
static void recalloc_sock(struct pool *pool, size_t len)
{
size_t old, newlen;
old = strlen(pool->sockbuf);
newlen = old + len + 1;
if (newlen < pool->sockbuf_size)
return;
newlen = newlen + (RBUFSIZE - (newlen % RBUFSIZE));
// Avoid potentially recursive locking
// applog(LOG_DEBUG, "Recallocing pool sockbuf... | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 333,316,583,015,827,860,000,000,000,000,000,000,000 | 17 | 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. |
int CLASS ljpeg_diff (ushort *huff)
{
int len, diff;
#ifdef LIBRAW_LIBRARY_BUILD
if(!huff)
throw LIBRAW_EXCEPTION_IO_CORRUPT;
#endif
len = gethuff(huff);
if (len == 16 && (!dng_version || dng_version >= 0x1010000))
return -32768;
diff = getbits(len);
if ((diff & (1 << (len-1))) == 0)
diff -= (1 ... | 0 | [] | LibRaw | c4e374ea6c979a7d1d968f5082b7d0ea8cd27202 | 169,109,165,925,200,280,000,000,000,000,000,000,000 | 15 | additional data checks backported from 0.15.4 |
int check_temp_dir(char* tmp_file)
{
int fd;
MY_DIR *dirp;
char tmp_dir[FN_REFLEN];
size_t tmp_dir_size;
DBUG_ENTER("check_temp_dir");
/*
Get the directory from the temporary file.
*/
dirname_part(tmp_dir, tmp_file, &tmp_dir_size);
/*
Check if the directory exists.
*/
if (!(dirp=my_dir... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 323,118,414,060,153,570,000,000,000,000,000,000,000 | 43 | 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... |
set_perms (int fd, struct cpio_file_stat *header)
{
if (!no_chown_flag)
{
uid_t uid = CPIO_UID (header->c_uid);
gid_t gid = CPIO_GID (header->c_gid);
if ((fchown_or_chown (fd, header->c_name, uid, gid) < 0)
&& errno != EPERM)
chown_error_details (header->c_name, uid, gid);
}
/* chown ... | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 112,988,395,045,198,440,000,000,000,000,000,000,000 | 16 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev)
{
static int already_warned = 0;
struct file_list *dirlist;
char delbuf[MAXPATHLEN];
int dlen, i;
if (!fbuf) {
change_local_filter_dir(NULL, 0, 0);
return;
}
if (DEBUG_GTE(DEL, 2))
rprintf(FINFO, "delete_in_dir(%s)\n", fbuf);
... | 0 | [
"CWE-59"
] | rsync | e12a6c087ca1eecdb8eae5977be239c24f4dd3d9 | 161,247,226,618,828,130,000,000,000,000,000,000,000 | 69 | Add parent-dir validation for --no-inc-recurse too. |
static void kvaser_usb_leaf_start_chip_reply(const struct kvaser_usb *dev,
const struct kvaser_cmd *cmd)
{
struct kvaser_usb_net_priv *priv;
u8 channel = cmd->u.simple.channel;
if (channel >= dev->nchannels) {
dev_err(&dev->intf->dev,
"Invalid channel number (%d)\n", channel);
return;
}
priv = d... | 0 | [
"CWE-200",
"CWE-908"
] | linux | da2311a6385c3b499da2ed5d9be59ce331fa93e9 | 270,753,718,548,864,230,000,000,000,000,000,000,000 | 22 | can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
Uninitialized Kernel memory can leak to USB devices.
Fix this by using kzalloc() instead of kmalloc().
Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_... |
gs_main_run_string_continue(gs_main_instance * minst, const char *str,
uint length, int user_errors, int *pexit_code, ref * perror_object)
{
ref rstr;
if (length == 0)
return 0; /* empty string signals EOF */
make_const_string(&rstr, avm_foreign | a_readonly, length,
... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 57,851,036,991,633,030,000,000,000,000,000,000,000 | 12 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
relay_header_unpack(relay_header_t *dest, const uint8_t *src)
{
dest->command = get_uint8(src);
dest->recognized = ntohs(get_uint16(src+1));
dest->stream_id = ntohs(get_uint16(src+3));
memcpy(dest->integrity, src+5, 4);
dest->length = ntohs(get_uint16(src+9));
} | 0 | [
"CWE-200",
"CWE-617"
] | tor | 56a7c5bc15e0447203a491c1ee37de9939ad1dcd | 52,300,013,853,616,280,000,000,000,000,000,000,000 | 8 | TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell
On an hidden service rendezvous circuit, a BEGIN_DIR could be sent
(maliciously) which would trigger a tor_assert() because
connection_edge_process_relay_cell() thought that the circuit is an
or_circuit_t but is an origin circuit in reality.
... |
static void __mem_cgroup_commit_charge(struct mem_cgroup *memcg,
struct page *page,
unsigned int nr_pages,
struct page_cgroup *pc,
enum charge_type ctype)
{
lock_page_cgroup(pc);
if (unlikely(PageCgroupUsed(pc))) {
unlock_page_cgroup(pc);
__mem_cgroup_cancel_charge(memc... | 0 | [
"CWE-476",
"CWE-415"
] | linux | 371528caec553785c37f73fa3926ea0de84f986f | 160,441,755,948,792,630,000,000,000,000,000,000,000 | 49 | mm: memcg: Correct unregistring of events attached to the same eventfd
There is an issue when memcg unregisters events that were attached to
the same eventfd:
- On the first call mem_cgroup_usage_unregister_event() removes all
events attached to a given eventfd, and if there were no events left,
thresholds->prima... |
**/
static const CImg<Tuchar>& default_LUT256() {
static CImg<Tuchar> colormap;
cimg::mutex(8);
if (!colormap) {
colormap.assign(1,256,1,3);
for (unsigned int index = 0, r = 16; r<256; r+=32)
for (unsigned int g = 16; g<256; g+=32)
for (unsigned int b = 32... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 265,430,977,926,943,520,000,000,000,000,000,000,000 | 16 | Fix other issues in 'CImg<T>::load_bmp()'. |
cms_signeddata_create(krb5_context context,
pkinit_plg_crypto_context plg_cryptoctx,
pkinit_req_crypto_context req_cryptoctx,
pkinit_identity_crypto_context id_cryptoctx,
int cms_msg_type,
int include_certchain... | 0 | [
"CWE-476"
] | krb5 | f249555301940c6df3a2cdda13b56b5674eebc2e | 201,004,252,219,118,430,000,000,000,000,000,000,000 | 323 | PKINIT null pointer deref [CVE-2013-1415]
Don't dereference a null pointer when cleaning up.
The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process. An attacker would need to have a valid
PKINIT certificate or have ... |
xfs_attrmulti_attr_get(
struct inode *inode,
unsigned char *name,
unsigned char __user *ubuf,
__uint32_t *len,
__uint32_t flags)
{
unsigned char *kbuf;
int error = EFAULT;
if (*len > XATTR_SIZE_MAX)
return EINVAL;
kbuf = kmalloc(*len, GFP_KERNEL);
if (!kbuf)
return ENOMEM;
error = xfs_attr_get(... | 0 | [
"CWE-200"
] | linux-2.6 | af24ee9ea8d532e16883251a6684dfa1be8eec29 | 79,804,845,628,159,955,000,000,000,000,000,000,000 | 27 | xfs: zero proper structure size for geometry calls
Commit 493f3358cb289ccf716c5a14fa5bb52ab75943e5 added this call to
xfs_fs_geometry() in order to avoid passing kernel stack data back
to user space:
+ memset(geo, 0, sizeof(*geo));
Unfortunately, one of the callers of that function passes the
address of a smal... |
static void connection_reset(connection *con) {
request_st * const r = &con->request;
request_reset(r);
config_reset_config(r);
r->bytes_read_ckpt = 0;
r->bytes_written_ckpt = 0;
con->is_readable = 1;
con->bytes_written = 0;
con->bytes_written_cur_second = 0;
con->bytes_read = 0;
} | 0 | [
"CWE-703"
] | lighttpd1.4 | b03b86f47b0d5a553137f081fadc482b4af1372d | 39,614,769,648,465,727,000,000,000,000,000,000,000 | 12 | [core] fix merging large headers across mult reads (fixes #3059)
(thx mitd)
x-ref:
"Connections stuck in Close_Wait causing 100% cpu usage"
https://redmine.lighttpd.net/issues/3059 |
static XMLRPCCmd *createXMLCommand(const char *name, XMLRPCMethodFunc func)
{
XMLRPCCmd *xml = NULL;
xml = smalloc(sizeof(XMLRPCCmd));
xml->name = sstrdup(name);
xml->func = func;
xml->mod_name = NULL;
xml->core = 0;
xml->next = NULL;
return xml;
} | 0 | [
"CWE-119",
"CWE-787"
] | atheme | 87580d767868360d2fed503980129504da84b63e | 314,019,091,589,093,830,000,000,000,000,000,000,000 | 11 | Do not copy more bytes than were allocated |
NO_INLINE JsVar *jspeFactorObject() {
if (JSP_SHOULD_EXECUTE) {
JsVar *contents = jsvNewObject();
if (!contents) { // out of memory
jspSetError(false);
return 0;
}
/* JSON-style object definition */
JSP_MATCH_WITH_RETURN('{', contents);
while (!JSP_SHOULDNT_PARSE && lex->tk != '}')... | 0 | [
"CWE-787"
] | Espruino | e069be2ecc5060ef47391716e4de94999595b260 | 222,250,663,011,867,600,000,000,000,000,000,000,000 | 65 | Fix potential corruption issue caused by `delete [].__proto__` (fix #2142) |
get_clienttask(ns_clientmgr_t *manager, isc_task_t **taskp) {
MTRACE("clienttask");
int tid = isc_nm_tid();
if (tid < 0) {
tid = isc_random_uniform(manager->ncpus);
}
int rand = isc_random_uniform(CLIENT_NTASKS_PERCPU);
int nexttask = (rand * manager->ncpus) + tid;
isc_task_attach(manager->taskpool[nexttask]... | 0 | [
"CWE-617"
] | bind9 | 15996f0cb15631b95a801e3e88928494a69ad6ee | 77,594,822,352,544,790,000,000,000,000,000,000,000 | 12 | ns_client_error() could assert if rcode was overridden to NOERROR
The client->rcode_override was originally created to force the server
to send SERVFAIL in some cases when it would normally have sent FORMERR.
More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2
commit (part of GL #2790) to force the... |
static int ping_v4_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{
struct net *net = sock_net(sk);
struct flowi4 fl4;
struct inet_sock *inet = inet_sk(sk);
struct ipcm_cookie ipc;
struct icmphdr user_icmph;
struct pingfakehdr pfh;
struct rtable *rt = NULL;
struct ip_options_data opt_copy;
int free =... | 0 | [
"CWE-284"
] | linux | 0eab121ef8750a5c8637d51534d5e9143fb0633f | 120,881,606,032,482,180,000,000,000,000,000,000,000 | 158 | net: ping: check minimum size on ICMP header length
Prior to commit c0371da6047a ("put iov_iter into msghdr") in v3.19, there
was no check that the iovec contained enough bytes for an ICMP header,
and the read loop would walk across neighboring stack contents. Since the
iov_iter conversion, bad arguments are noticed, ... |
void nfs_advise_use_readdirplus(struct inode *dir)
{
struct nfs_inode *nfsi = NFS_I(dir);
if (nfs_server_capable(dir, NFS_CAP_READDIRPLUS) &&
!list_empty(&nfsi->open_files))
set_bit(NFS_INO_ADVISE_RDPLUS, &nfsi->flags);
} | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 206,502,528,515,812,570,000,000,000,000,000,000,000 | 8 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
static void destruct_tty_driver(struct kref *kref)
{
struct tty_driver *driver = container_of(kref, struct tty_driver, kref);
int i;
struct ktermios *tp;
if (driver->flags & TTY_DRIVER_INSTALLED) {
for (i = 0; i < driver->num; i++) {
tp = driver->termios[i];
if (tp) {
driver->termios[i] = NULL;
kfr... | 0 | [
"CWE-416"
] | linux | c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9 | 151,557,263,194,975,930,000,000,000,000,000,000,000 | 26 | tty: Fix ->session locking
Currently, locking of ->session is very inconsistent; most places
protect it using the legacy tty mutex, but disassociate_ctty(),
__do_SAK(), tiocspgrp() and tiocgsid() don't.
Two of the writers hold the ctrl_lock (because they already need it for
->pgrp), but __proc_set_tty() doesn't do tha... |
void binder_alloc_free_buf(struct binder_alloc *alloc,
struct binder_buffer *buffer)
{
mutex_lock(&alloc->mutex);
binder_free_buf_locked(alloc, buffer);
mutex_unlock(&alloc->mutex);
} | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 288,371,091,734,769,760,000,000,000,000,000,000,000 | 7 | binder: fix race that allows malicious free of live buffer
Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated bu... |
SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr)
{
current->clear_child_tid = tidptr;
return task_pid_vnr(current);
} | 0 | [
"CWE-264"
] | linux-2.6 | 2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205 | 229,501,896,955,537,300,000,000,000,000,000,000,000 | 6 | copy_process: fix CLONE_PARENT && parent_exec_id interaction
CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use ->parent_exec_id to make
sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed
task exits.
Also, move down the "p->parent_ex... |
gsf_infile_tar_dispose (GObject *obj)
{
GsfInfileTar *tar = GSF_INFILE_TAR (obj);
unsigned ui;
gsf_infile_tar_set_source (tar, NULL);
g_clear_error (&tar->err);
for (ui = 0; ui < tar->children->len; ui++) {
TarChild *c = &g_array_index (tar->children, TarChild, ui);
g_free (c->name);
if (c->modtime)
g_d... | 0 | [
"CWE-476"
] | libgsf | 95a8351a75758cf10b3bf6abae0b6b461f90d9e5 | 61,879,863,159,183,250,000,000,000,000,000,000,000 | 20 | tar: fix crash on broken tar file. |
static int handle_invept(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 vmx_instruction_info, types;
unsigned long type;
gva_t gva;
struct x86_exception e;
struct {
u64 eptp, gpa;
} operand;
if (!(vmx->nested.nested_vmx_secondary_ctls_high &
SECONDARY_EXEC_ENABLE_EPT) ||
!(vmx-... | 0 | [
"CWE-388"
] | linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | 94,623,514,831,858,450,000,000,000,000,000,000,000 | 67 | kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <jma... |
void bnx2x_pre_irq_nic_init(struct bnx2x *bp)
{
int i;
/* Setup NIC internals and enable interrupts */
for_each_eth_queue(bp, i)
bnx2x_init_eth_fp(bp, i);
/* ensure status block indices were read */
rmb();
bnx2x_init_rx_rings(bp);
bnx2x_init_tx_rings(bp);
if (IS_PF(bp)) {
/* Initialize MOD_ABS interrupts... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 255,452,877,127,363,900,000,000,000,000,000,000,000 | 27 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
__releases(RCU)
{
rcu_read_unlock();
} | 0 | [
"CWE-909"
] | linux-2.6 | 67286640f638f5ad41a946b9a3dc75327950248f | 131,680,106,546,596,650,000,000,000,000,000,000,000 | 4 | net: packet: fix information leak to userland
packet_getname_spkt() doesn't initialize all members of sa_data field of
sockaddr struct if strlen(dev->name) < 13. This structure is then copied
to userland. It leads to leaking of contents of kernel stack memory.
We have to fully fill sa_data with strncpy() instead of ... |
static int x509parse_verifycrl(x509_cert *crt, x509_cert *ca,
x509_crl *crl_list)
{
int flags = 0;
int hash_id;
unsigned char hash[64];
if( ca == NULL )
return( flags );
/*
* TODO: What happens if no CRL is present?
* Suggestion: Revocation state should be unknown if no C... | 1 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 16,871,333,552,270,932,000,000,000,000,000,000,000 | 63 | RSA blinding on CRT operations to counter timing attacks |
void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb)
{
struct sock *sk;
struct sk_buff *skb_copy = NULL;
__le16 opcode;
if (!atomic_read(&monitor_promisc))
return;
BT_DBG("hdev %p len %d", hdev, skb->len);
switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
opcode = __constant_cpu_to_le16... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 211,795,746,185,269,000,000,000,000,000,000,000,000 | 73 | 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... |
*/
PS_SERIALIZER_ENCODE_FUNC(wddx)
{
wddx_packet *packet;
PS_ENCODE_VARS;
packet = php_wddx_constructor();
php_wddx_packet_start(packet, NULL, 0);
php_wddx_add_chunk_static(packet, WDDX_STRUCT_S);
PS_ENCODE_LOOP(
php_wddx_serialize_var(packet, *struc, key, key_length TSRMLS_CC);
);
php_wddx_add_chunk_sta... | 0 | [] | php-src | 1785d2b805f64eaaacf98c14c9e13107bf085ab1 | 299,337,691,458,991,700,000,000,000,000,000,000,000 | 25 | Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability |
const uint8* ZrtpQueue::getSignatureData() {
if (zrtpEngine != NULL)
return zrtpEngine->getSignatureData();
return 0;
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 270,371,431,996,832,700,000,000,000,000,000,000,000 | 5 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
count_var(
const struct ctl_var *k
)
{
u_int c;
if (NULL == k)
return 0;
c = 0;
while (!(EOV & (k++)->flags))
c++;
ENSURE(c <= USHRT_MAX);
return (u_short)c;
} | 0 | [
"CWE-22"
] | ntp | 184516e143ce4448ddb5b9876dd372008cc779f6 | 273,212,417,131,421,030,000,000,000,000,000,000,000 | 16 | [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command. |
static int f2fs_write_node_page(struct page *page,
struct writeback_control *wbc)
{
return __write_node_page(page, false, NULL, wbc);
} | 0 | [
"CWE-200",
"CWE-362"
] | linux | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 | 192,643,955,358,554,900,000,000,000,000,000,000,000 | 5 | f2fs: fix race condition in between free nid allocator/initializer
In below concurrent case, allocated nid can be loaded into free nid cache
and be allocated again.
Thread A Thread B
- f2fs_create
- f2fs_new_inode
- alloc_nid
- __insert_nid_to_list(ALLOC_NID_LIST)
- f2fs_balance_fs_bg
- build_free... |
static void print_res_header(MYSQL_RES *result)
{
MYSQL_FIELD *field;
print_res_top(result);
mysql_field_seek(result,0);
putchar('|');
while ((field = mysql_fetch_field(result)))
{
printf(" %-*s|",(int) field->max_length+1,field->name);
}
putchar('\n');
print_res_top(result);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 70,199,612,153,643,390,000,000,000,000,000,000,000 | 14 | 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... |
MagickExport void XSetCursorState(Display *display,XWindows *windows,
const MagickStatusType state)
{
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(display != (Display *) NULL);
assert(windows != (XWindows *) NULL);
if (state)
{
(void) XCheckDefineCursor(display,windows->image.id... | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 324,527,128,493,075,000,000,000,000,000,000,000,000 | 32 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype *tracks)
{
struct cdrom_tochdr header;
struct cdrom_tocentry entry;
int ret, i;
tracks->data = 0;
tracks->audio = 0;
tracks->cdi = 0;
tracks->xa = 0;
tracks->error = 0;
cd_dbg(CD_COUNT_TRACKS, "entering cdrom_count_tracks\n");
/* Grab the... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 171,789,111,937,278,670,000,000,000,000,000,000,000 | 45 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
static inline int arp_devaddr_compare(const struct arpt_devaddr_info *ap,
const char *hdr_addr, int len)
{
int i, ret;
if (len > ARPT_DEV_ADDR_LEN_MAX)
len = ARPT_DEV_ADDR_LEN_MAX;
ret = 0;
for (i = 0; i < len; i++)
ret |= (hdr_addr[i] ^ ap->addr[i]) & ap->mask[i];
return ret != 0;
} | 0 | [
"CWE-200"
] | linux-2.6 | 42eab94fff18cb1091d3501cd284d6bd6cc9c143 | 37,072,283,680,203,630,000,000,000,000,000,000,000 | 14 | netfilter: arp_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
i... |
Returns the size of the IV in bytes of the algorithm specified by the descriptor td */
PHP_FUNCTION(mcrypt_enc_get_iv_size)
{
MCRYPT_GET_TD_ARG
RETURN_LONG(mcrypt_enc_get_iv_size(pm->td)); | 0 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 171,064,350,622,925,830,000,000,000,000,000,000,000 | 5 | Fix bug #72455: Heap Overflow due to integer overflows |
static void autoname_imp_trampoline(RCore *core, RAnalFunction *fcn) {
if (r_list_length (fcn->bbs) == 1 && ((RAnalBlock *) r_list_first (fcn->bbs))->ninstr == 1) {
RList *refs = r_anal_function_get_refs (fcn);
if (refs && r_list_length (refs) == 1) {
RAnalRef *ref = r_list_first (refs);
if (ref->type != R_A... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 113,756,296,859,751,600,000,000,000,000,000,000,000 | 16 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
peerflag_bits(
peer_node *pn
)
{
int peerflags;
attr_val *option;
/* translate peerflags options to bits */
peerflags = 0;
option = HEAD_PFIFO(pn->peerflags);
for (; option != NULL; option = option->link) {
switch (option->value.i) {
default:
INSIST(0);
break;
case T_Autokey:
peerflags |= FLAG... | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 255,760,962,758,785,340,000,000,000,000,000,000,000 | 53 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
static void hci_cc_le_set_default_phy(struct hci_dev *hdev, struct sk_buff *skb)
{
__u8 status = *((__u8 *) skb->data);
struct hci_cp_le_set_default_phy *cp;
BT_DBG("%s status 0x%2.2x", hdev->name, status);
if (status)
return;
cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_DEFAULT_PHY);
if (!cp)
return;
hci_... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 112,472,461,828,499,290,000,000,000,000,000,000,000 | 21 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
Init(void)
{
// Clean up if there is any deployment locks/status before
sLog(log_info, "Cleaning old state file from tmp directory. \n");
UnTouch(INPROGRESS);
UnTouch(DONE);
UnTouch(ERRORED);
/*
* Set the error message as success. This will be replaced with an error
* message when an error oc... | 0 | [
"CWE-362"
] | open-vm-tools | c1304ce8bfd9c0c33999e496bf7049d5c3d45821 | 306,760,435,287,821,400,000,000,000,000,000,000,000 | 14 | randomly generate tmp directory name, and add StrUtil_ReplaceAll() function. |
R_API ut64 r_bin_java_unknown_attr_calc_size(RBinJavaAttrInfo *attr) {
return attr ? 6 : 0;
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 337,130,642,752,820,120,000,000,000,000,000,000,000 | 3 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;
struct sk_buff *skb;
long amount;
int err;
BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
switch (cmd) {
case TIOCOUTQ:
if (sk->sk_state == BT_LISTEN)
return -EINVAL;
amount = sk->sk_sndbuf - sk_wme... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 259,870,202,820,272,750,000,000,000,000,000,000,000 | 46 | 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... |
static void launch(OpKernelContext* context, bool cudnn_use_autotune,
const Tensor& input, const Tensor& filter,
const std::array<int64, 3>& dilations,
const std::array<int64, 3>& strides, const Padding padding,
TensorFormat data_form... | 1 | [
"CWE-369"
] | tensorflow | 799f835a3dfa00a4d852defa29b15841eea9d64f | 295,552,394,647,799,420,000,000,000,000,000,000,000 | 19 | Fix 2 issues with `Conv3D`.
We have an issue where the dimensions are not matching and this causes Eigen to crash on an assert.
Then, we have an issue where we accidentally do a division by 0.
PiperOrigin-RevId: 369242785
Change-Id: Ie94067b2d41f58699af99ebb5af335ad9defd931 |
static void vmx_sync_dirty_debug_regs(struct kvm_vcpu *vcpu)
{
u32 cpu_based_vm_exec_control;
get_debugreg(vcpu->arch.db[0], 0);
get_debugreg(vcpu->arch.db[1], 1);
get_debugreg(vcpu->arch.db[2], 2);
get_debugreg(vcpu->arch.db[3], 3);
get_debugreg(vcpu->arch.dr6, 6);
vcpu->arch.dr7 = vmcs_readl(GUEST_DR7);
vcp... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 54,690,411,311,679,490,000,000,000,000,000,000,000 | 17 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
static struct io_kiocb *io_req_find_next(struct io_kiocb *req)
{
if (likely(!(req->flags & REQ_F_LINK_HEAD)))
return NULL;
return __io_req_find_next(req);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 218,018,177,464,181,900,000,000,000,000,000,000,000 | 6 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
static int vmx_set_hv_timer(struct kvm_vcpu *vcpu, u64 guest_deadline_tsc)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u64 tscl = rdtsc();
u64 guest_tscl = kvm_read_l1_tsc(vcpu, tscl);
u64 delta_tsc = max(guest_deadline_tsc, guest_tscl) - guest_tscl;
/* Convert to host delta tsc if tsc scaling is enabled */
if (vcpu-... | 0 | [
"CWE-388"
] | linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | 296,568,698,441,380,440,000,000,000,000,000,000,000 | 29 | kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <jma... |
quit(int status, const char *fmt,...)
{
va_list argp;
va_start(argp, fmt);
fprintf(stderr, "%s: ", prg_name);
vfprintf(stderr, fmt, argp);
fprintf(stderr, "\n");
va_end(argp);
ExitProgram(status);
} | 1 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 64,090,220,812,517,880,000,000,000,000,000,000,000 | 11 | 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... |
void replaceBuf(char* b) {delete [] buf; buf = b;} | 0 | [
"CWE-20",
"CWE-787"
] | tigervnc | 0943c006c7d900dfc0281639e992791d6c567438 | 210,990,243,389,346,720,000,000,000,000,000,000,000 | 1 | Use size_t for lengths in stream objects
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects. |
void Filter::resetIdleTimer() {
if (idle_timer_ != nullptr) {
ASSERT(config_->idleTimeout());
idle_timer_->enableTimer(config_->idleTimeout().value());
}
} | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 60,100,939,361,335,700,000,000,000,000,000,000,000 | 6 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void Downstream::reset_upstream_wtimer() {
auto loop = upstream_->get_client_handler()->get_loop();
auto &timeoutconf = get_config()->http2.timeout;
if (timeoutconf.stream_write != 0.) {
reset_timer(loop, &upstream_wtimer_);
}
if (timeoutconf.stream_read != 0.) {
try_reset_timer(loop, &upstream_rtime... | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 314,075,412,767,169,000,000,000,000,000,000,000,000 | 11 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
static int l2tp_eth_create(struct net *net, u32 tunnel_id, u32 session_id, u32 peer_session_id, struct l2tp_session_cfg *cfg)
{
unsigned char name_assign_type;
struct net_device *dev;
char name[IFNAMSIZ];
struct l2tp_tunnel *tunnel;
struct l2tp_session *session;
struct l2tp_eth *priv;
struct l2tp_eth_sess *spriv... | 1 | [
"CWE-416"
] | linux | f026bc29a8e093edfbb2a77700454b285c97e8ad | 64,005,369,519,649,790,000,000,000,000,000,000,000 | 84 | l2tp: pass tunnel pointer to ->session_create()
Using l2tp_tunnel_find() in pppol2tp_session_create() and
l2tp_eth_create() is racy, because no reference is held on the
returned session. These functions are only used to implement the
->session_create callback which is run by l2tp_nl_cmd_session_create().
Therefore sea... |
MockUdpListenerReadFilter::MockUdpListenerReadFilter(UdpReadFilterCallbacks& callbacks)
: UdpListenerReadFilter(callbacks) {} | 0 | [
"CWE-835"
] | envoy | c8de199e2971f79cbcbc6b5eadc8c566b28705d1 | 233,080,256,200,880,130,000,000,000,000,000,000,000 | 2 | listener: clean up accept filter before creating connection (#8922)
Signed-off-by: Yuchen Dai <silentdai@gmail.com> |
MagickPrivate unsigned int GetSignatureBlocksize(
const SignatureInfo *signature_info)
{
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
assert(signature_info != (SignatureInfo *) NULL);
assert(signature_info->signature == MagickCoreSignature);
return(signature_info->blocksize);
} | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 275,854,862,815,346,560,000,000,000,000,000,000,000 | 8 | possible divide by zero + clear buffers |
lldpd_guess_type(struct lldpd *cfg, char *frame, int s)
{
int i;
if (s < ETHER_ADDR_LEN)
return -1;
for (i=0; cfg->g_protocols[i].mode != 0; i++) {
if (!cfg->g_protocols[i].enabled)
continue;
if (cfg->g_protocols[i].guess == NULL) {
if (memcmp(frame, cfg->g_protocols[i].mac, ETHER_ADDR_LEN) == 0) {
l... | 0 | [
"CWE-617",
"CWE-703"
] | lldpd | 793526f8884455f43daecd0a2c46772388417a00 | 98,446,704,755,646,080,000,000,000,000,000,000,000 | 24 | 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. |
static void failure(void)
{
exit(1);
} | 0 | [
"CWE-310"
] | libgadu | d882b15661ee94949919ebbbc43edf0db5f619cb | 321,184,901,765,643,030,000,000,000,000,000,000,000 | 4 | Odkąd biblioteka weryfikuje certyfikaty ciężko testować z self-signed. |
template<typename t>
CImg<T>& blur_bilateral(const CImg<t>& guide,
const float sigma_s, const float sigma_r,
const float sampling_s=0, const float sampling_r=0) {
const float _sigma_s = sigma_s>=0?sigma_s:-sigma_s*cimg::max(_width,_height,_depth)/100... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 278,409,560,152,725,250,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
int report_sync_col(struct transaction_t *txn, struct meth_params *rparams,
xmlNodePtr inroot, struct propfind_ctx *fctx)
{
int ret = 0, r;
struct mailbox *mailbox = NULL;
uint32_t uidvalidity = 0;
modseq_t syncmodseq = 0;
modseq_t basemodseq = 0;
modseq_t highestmodseq = 0;
... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 202,562,666,429,872,400,000,000,000,000,000,000,000 | 185 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.