func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
template <typename Pairs> void marshalPairs(const Pairs& result, char* buffer) {
char* b = buffer;
*reinterpret_cast<uint32_t*>(b) = result.size();
b += sizeof(uint32_t);
for (auto& p : result) {
*reinterpret_cast<uint32_t*>(b) = p.first.size();
b += sizeof(uint32_t);
*reinterpret_cast<uint32_t*>(b)... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 254,280,108,783,917,900,000,000,000,000,000,000,000 | 19 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
UnicodeString::~UnicodeString()
{
#ifdef UNISTR_COUNT_FINAL_STRING_LENGTHS
// Count lengths of strings at the end of their lifetime.
// Useful for discussion of a desirable stack buffer size.
// Count the contents length, not the optional NUL terminator nor further capacity.
// Ignore open-buffer strings and st... | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 277,876,373,567,912,300,000,000,000,000,000,000,000 | 18 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
static void free_playlist_list(HLSContext *c)
{
int i;
for (i = 0; i < c->n_playlists; i++) {
struct playlist *pls = c->playlists[i];
free_segment_list(pls);
free_init_section_list(pls);
av_freep(&pls->renditions);
av_freep(&pls->id3_buf);
av_dict_free(&pls->id3_i... | 0 | [
"CWE-416"
] | FFmpeg | 6959358683c7533f586c07a766acc5fe9544d8b2 | 306,013,886,805,255,300,000,000,000,000,000,000,000 | 27 | avformat/hls: check segment duration value of EXTINF
fix ticket: 8673
set the default EXTINF duration to 1ms if duration is smaller than 1ms
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
(cherry picked from commit 9dfb19baeb86a8bb02c53a441682c6e9a6e104cc) |
static int lua_ap_escape_logitem(lua_State *L)
{
char *returnValue;
request_rec *r;
const char *str;
luaL_checktype(L, 1, LUA_TUSERDATA);
r = ap_lua_check_request_rec(L, 1);
luaL_checktype(L, 2, LUA_TSTRING);
str = lua_tostring(L, 2);
returnValue = ap_escape_logitem(r->p... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 8,104,594,997,357,862,000,000,000,000,000,000,000 | 13 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
SECURITY_STATUS ntlm_write_AuthenticateMessage(NTLM_CONTEXT* context, PSecBuffer buffer)
{
wStream* s;
size_t length;
UINT32 PayloadBufferOffset;
NTLM_AUTHENTICATE_MESSAGE* message;
SSPI_CREDENTIALS* credentials = context->credentials;
message = &context->AUTHENTICATE_MESSAGE;
ZeroMemory(message, sizeof(NTLM_AUT... | 0 | [
"CWE-125"
] | FreeRDP | 48361c411e50826cb602c7aab773a8a20e1da6bc | 268,070,321,478,328,080,000,000,000,000,000,000,000 | 179 | Fixed GHSL-2020-100: oob read in ntlm_read_ChallengeMessage
* Added length checks for data read from stream
* Unified function resource cleanup
(cherry picked from commit 8357dedbbf7213b7d0d18f1026145b9a5b92235a) |
static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
bool intr_window_requested;
unsigned count = 130;
intr_window_requested = exec_controls_get(vmx) &
CPU_BASED_INTR_WINDOW_EXITING;
while (vmx->emulation_required && count-- != 0) {
if (intr_window_requested &... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 264,403,608,387,160,000,000,000,000,000,000,000,000 | 44 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
{
if (group->meth->make_affine == 0)
{
ECerr(EC_F_EC_POINT_MAKE_AFFINE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
if (group->meth != point->meth)
{
ECerr(EC_F_EC_POINT_MAKE_AFFINE, EC_R_INCOMPATIBLE_OBJECTS);
return 0;
... | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 259,489,630,941,144,300,000,000,000,000,000,000,000 | 14 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
ScanLineInputFile::isComplete () const
{
return _data->fileIsComplete;
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 117,384,614,119,821,640,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
CImg<T> operator|(const char *const expression) const {
return (+*this)|=expression;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 270,243,881,883,483,460,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. |
static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
struct scsi_cmnd *cmd)
{
char *buffer;
unsigned short use_sg;
int retvalue = 0, transfer_len = 0;
unsigned long flags;
struct CMD_MESSAGE_FIELD *pcmdmessagefld;
uint32_t controlcode = (uint32_t)cmd->cmnd[5] << 24 |
(uint32_t)cmd->cmnd[6] << 1... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 104,531,775,080,097,380,000,000,000,000,000,000,000 | 245 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... |
boost::intrusive_ptr<Expression> ExpressionRegexMatch::parse(ExpressionContext* const expCtx,
BSONElement expr,
const VariablesParseState& vpsIn) {
auto opName = "$regexMatch"_sd;
auto [inpu... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 270,750,736,510,516,000,000,000,000,000,000,000,000 | 8 | SERVER-49404 Enforce additional checks in $arrayToObject |
TEST_F(GrpcHealthCheckerImplTest, Timeout) {
setupHCWithUnhealthyThreshold(1);
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())};
expectSessionCreate();
expectHealthcheckStart(0);
EXPECT_CALL(event_logger_, logUnhealthy(_, _, _, true))... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 308,348,319,676,828,330,000,000,000,000,000,000,000 | 17 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static void cmd_read_toc_pma_atip(IDEState *s, uint8_t* buf)
{
int format, msf, start_track, len;
int max_len;
uint64_t total_sectors = s->nb_sectors >> 2;
max_len = lduw_be_p(buf + 7);
format = buf[9] >> 6;
msf = (buf[1] >> 1) & 1;
start_track = buf[6];
switch(format) {
case 0:
... | 0 | [
"CWE-125"
] | qemu | 813212288970c39b1800f63e83ac6e96588095c6 | 264,933,254,022,116,900,000,000,000,000,000,000,000 | 38 | ide: atapi: assert that the buffer pointer is in range
A case was reported where s->io_buffer_index can be out of range.
The report skimped on the details but it seems to be triggered
by s->lba == -1 on the READ/READ CD paths (e.g. by sending an
ATAPI command with LBA = 0xFFFFFFFF). For now paper over it
with asserti... |
static int qeth_alloc_qdio_buffers(struct qeth_card *card)
{
int i, j;
QETH_DBF_TEXT(SETUP, 2, "allcqdbf");
if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED,
QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED)
return 0;
card->qdio.in_q = kzalloc(sizeof(struct qeth_qdio_q),
GFP_KERNEL);
if (... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 328,365,126,856,022,780,000,000,000,000,000,000,000 | 78 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static void FVMenuShadow(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
ShadowDlg(fv,NULL,NULL,false);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 116,575,637,975,863,750,000,000,000,000,000,000,000 | 5 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
long CurlIo::CurlImpl::getFileLength()
{
curl_easy_reset(curl_); // reset all options
std::string response;
curl_easy_setopt(curl_, CURLOPT_URL, path_.c_str());
curl_easy_setopt(curl_, CURLOPT_NOBODY, 1); // HEAD
curl_easy_setopt(curl_, CURLOPT_WRITEFUNCTION, curlWriter);... | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 338,629,715,115,797,950,000,000,000,000,000,000,000 | 29 | Fix https://github.com/Exiv2/exiv2/issues/55 |
int mailimf_msg_id_parse(const char * message, size_t length,
size_t * indx,
char ** result)
{
size_t cur_token;
#if 0
char * id_left;
char * id_right;
#endif
char * msg_id;
int r;
int res;
cur_token = * indx;
r = mailimf_cfws_parse(message, length, &cur_token);
if ((r != MAILIMF_NO_ERROR) &... | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 130,136,265,311,372,830,000,000,000,000,000,000,000 | 130 | Fixed crash #274 |
virtual ~ParserCallbacks()
{
} | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 102,418,634,313,507,730,000,000,000,000,000,000,000 | 3 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
static void io_sq_thread_unpark(struct io_sq_data *sqd)
__releases(&sqd->lock)
{
WARN_ON_ONCE(sqd->thread == current);
/*
* Do the dance but not conditional clear_bit() because it'd race with
* other threads incrementing park_pending and setting the bit.
*/
clear_bit(IO_SQ_THREAD_SHOULD_PARK, &sqd->state);
... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 302,449,059,452,838,600,000,000,000,000,000,000,000 | 13 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static int nft_validate_register_load(enum nft_registers reg, unsigned int len)
{
if (reg < NFT_REG_1 * NFT_REG_SIZE / NFT_REG32_SIZE)
return -EINVAL;
if (len == 0)
return -EINVAL;
if (reg * NFT_REG32_SIZE + len > sizeof_field(struct nft_regs, data))
return -ERANGE;
return 0;
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 308,386,735,690,137,600,000,000,000,000,000,000,000 | 11 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
ISCSI_DBG_TRANS_SESSION(session, "Completed target removal\n");
}
static void __iscsi_destroy_session(struct work_struct *work)
{
struct iscsi_cls_session *session =
container_of(work, struct iscsi_cls_session, destroy_work); | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 14,006,189,598,266,594,000,000,000,000,000,000,000 | 7 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
evdev_check_min_max(struct evdev_device *device, unsigned int code)
{
struct libevdev *evdev = device->evdev;
const struct input_absinfo *absinfo;
if (!libevdev_has_event_code(evdev, EV_ABS, code))
return true;
absinfo = libevdev_get_abs_info(evdev, code);
if (absinfo->minimum == absinfo->maximum) {
/* Some ... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 172,037,481,007,371,700,000,000,000,000,000,000,000 | 33 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
static int __init drbg_init(void)
{
unsigned int i = 0; /* pointer to drbg_algs */
unsigned int j = 0; /* pointer to drbg_cores */
int ret = -EFAULT;
ret = drbg_healthcheck_sanity();
if (ret)
return ret;
if (ARRAY_SIZE(drbg_cores) * 2 > ARRAY_SIZE(drbg_algs)) {
pr_info("DRBG: Cannot register all DRBG types"... | 1 | [
"CWE-476"
] | linux | 8fded5925d0a733c46f8d0b5edd1c9b315882b1d | 137,080,984,979,450,930,000,000,000,000,000,000,000 | 32 | crypto: drbg - Convert to new rng interface
This patch converts the DRBG implementation to the new low-level
rng interface.
This allows us to get rid of struct drbg_gen by using the new RNG
API instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de> |
static int shmem_radix_tree_replace(struct address_space *mapping,
pgoff_t index, void *expected, void *replacement)
{
void **pslot;
void *item = NULL;
VM_BUG_ON(!expected);
pslot = radix_tree_lookup_slot(&mapping->page_tree, index);
if (pslot)
item = radix_tree_deref_slot_protected(pslot,
&mapping->t... | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 279,584,639,292,714,100,000,000,000,000,000,000,000 | 19 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... |
static inline void sctp_dbg_objcnt_exit(struct net *net) { return; } | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 103,132,886,225,758,860,000,000,000,000,000,000,000 | 1 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
int zend_startup_extensions_mechanism()
{
/* Startup extensions mechanism */
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
} | 0 | [] | php-src | 410eacc1a9b50ec3cb6c5fc0ff252516d0c0a4f1 | 237,828,137,875,355,180,000,000,000,000,000,000,000 | 7 | Fix Bug #71089 No check to duplicate zend_extension |
void _yr_re_fiber_append(
RE_FIBER_LIST* fiber_list,
RE_FIBER* fiber)
{
assert(fiber->prev == NULL);
assert(fiber->next == NULL);
fiber->prev = fiber_list->tail;
if (fiber_list->tail != NULL)
fiber_list->tail->next = fiber;
fiber_list->tail = fiber;
if (fiber_list->head == NULL)
fiber_li... | 0 | [
"CWE-125"
] | yara | 83d799804648c2a0895d40a19835d9b757c6fa4e | 83,060,031,263,784,010,000,000,000,000,000,000,000 | 20 | Fix issue #646 (#648)
* Fix issue #646 and some edge cases with wide regexps using \b and \B
* Rename function IS_WORD_CHAR to _yr_re_is_word_char |
static void jas_icctxt_destroy(jas_iccattrval_t *attrval)
{
jas_icctxt_t *txt = &attrval->data.txt;
if (txt->string)
jas_free(txt->string);
} | 1 | [] | jasper | 4bb93a6c49da7c1b6ad2acb60b18954a6547c637 | 99,177,281,408,037,980,000,000,000,000,000,000,000 | 6 | Add fixes for CVE-2014-8137. |
gdm_session_worker_update_environment_from_passwd_info (GdmSessionWorker *worker,
uid_t uid,
gid_t gid,
const char *home,
... | 0 | [
"CWE-362"
] | gdm | dcdbaaa04012541ad2813cf83559d91d52f208b9 | 107,723,671,093,023,220,000,000,000,000,000,000,000 | 13 | session-worker: Don't switch back VTs until session is fully exited
There's a race condition on shutdown where the session worker is
switching VTs back to the initial VT at the same time as the session
exit is being processed.
This means that manager may try to start a login screen (because of
the VT switch) when aut... |
virtual void visit(AndPredicate & /*ope*/) {} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 267,880,903,323,086,250,000,000,000,000,000,000,000 | 1 | Fix #122 |
char *ssh_scp_string_mode(int mode)
{
char buffer[16] = {0};
snprintf(buffer, sizeof(buffer), "%.4o", mode);
return strdup(buffer);
} | 0 | [] | libssh | 4aea835974996b2deb011024c53f4ff4329a95b5 | 120,944,467,200,809,450,000,000,000,000,000,000,000 | 6 | CVE-2019-14889: scp: Reformat scp.c
Fixes T181
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 42c727d0c186a1e2fa84a31ab40e16e58b404ab3) |
static inline long get_user_reg(struct task_struct *task, int offset)
{
return task_pt_regs(task)->uregs[offset];
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | a4780adeefd042482f624f5e0d577bf9cdcbb760 | 262,917,319,545,489,500,000,000,000,000,000,000,000 | 4 | ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.
There are more and more applications coming to Windows RT,
Wine could support them, but mostly they ... |
soup_cookie_jar_set_cookie_with_first_party (SoupCookieJar *jar,
SoupURI *uri,
SoupURI *first_party,
const char *cookie)
{
SoupCookie *soup_cookie;
g_return_if_fail (SOUP_IS_COOKIE_JAR (jar));
g_return_if_fail (uri != NULL);
g_return_if_fail (first_party != NULL);
g_return_if_fail (c... | 0 | [
"CWE-125"
] | libsoup | db2b0d5809d5f8226d47312b40992cadbcde439f | 26,919,580,007,270,600,000,000,000,000,000,000,000 | 19 | cookie-jar: bail if hostname is an empty string
There are several other ways to fix the problem with this function, but
skipping over all of the code is probably the simplest.
Fixes #3 |
ffs_setup_state_clear_cancelled(struct ffs_data *ffs)
{
return (enum ffs_setup_state)
cmpxchg(&ffs->setup_state, FFS_SETUP_CANCELLED, FFS_NO_SETUP);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 38740a5b87d53ceb89eb2c970150f6e94e00373a | 160,281,228,491,309,370,000,000,000,000,000,000,000 | 5 | usb: gadget: f_fs: Fix use-after-free
When using asynchronous read or write operations on the USB endpoints the
issuer of the IO request is notified by calling the ki_complete() callback
of the submitted kiocb when the URB has been completed.
Calling this ki_complete() callback will free kiocb. Make sure that the
str... |
void resizeAndFillTable(
HeaderTable& table, HPACKHeader& header, uint32_t newMax,
uint32_t fillCount) {
uint32_t newCapacity = header.bytes() * newMax;
resizeTable(table, newCapacity, newMax);
// Fill the table (with one extra) and make sure we haven't violated our
// size (bytes) limits ... | 0 | [
"CWE-416"
] | proxygen | f43b134cc5c19d8532e7fb670a1c02e85f7a8d4f | 257,541,266,039,295,160,000,000,000,000,000,000,000 | 13 | Fixing HPACK header table resize issue
Summary: On resizing the header table down and then up again, a resize can be called against the underlying vector that actually sizes it down. This causes a lot of things to break as the code that does the resizing assumes the underlying vector is only ever resized up.
Reviewe... |
static UPNP_INLINE void glob_alias_init(void)
{
struct xml_alias_t *alias = &gAliasDoc;
membuffer_init(&alias->doc);
membuffer_init(&alias->name);
alias->ct = NULL;
alias->last_modified = 0;
} | 0 | [
"CWE-284"
] | pupnp-code | be0a01bdb83395d9f3a5ea09c1308a4f1a972cbd | 101,862,358,473,093,960,000,000,000,000,000,000,000 | 9 | Don't allow unhandled POSTs to write to the filesystem by default
If there's no registered handler for a POST request, the default behaviour
is to write it to the filesystem. Several million deployed devices appear
to have this behaviour, making it possible to (at least) store arbitrary
data on them. Add a configure o... |
void HeaderMapImpl::setReference(const LowerCaseString& key, const std::string& value) {
HeaderString ref_key(key);
HeaderString ref_value(value);
remove(key);
insertByKey(std::move(ref_key), std::move(ref_value));
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 221,080,811,310,465,470,000,000,000,000,000,000,000 | 6 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n)
{
struct net *net = sock_net(skb->sk);
struct tcmsg *tcm = nlmsg_data(n);
struct nlattr *tca[TCA_MAX + 1];
struct net_device *dev;
u32 clid;
struct Qdisc *q = NULL;
struct Qdisc *p = NULL;
int err;
if ((n->nlmsg_type != RTM_GETQDISC) && !capable... | 1 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 100,776,443,475,410,840,000,000,000,000,000,000,000 | 63 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static void GTextFieldFocusChanged(GTextField *gt,int gained) {
GEvent e;
if ( (gt->g.box->flags & box_active_border_inner) &&
( gt->g.state==gs_enabled || gt->g.state==gs_active )) {
int state = gained?gs_active:gs_enabled;
if ( state!=gt->g.state ) {
gt->g.state = state;
GGadgetRedraw((GGadg... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 26,512,071,474,941,440,000,000,000,000,000,000,000 | 21 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static DWORD WINAPI irp_thread_func(LPVOID arg)
{
IRP_THREAD_DATA* data = (IRP_THREAD_DATA*)arg;
UINT error;
/* blocks until the end of the request */
if ((error = serial_process_irp(data->serial, data->irp)))
{
WLog_ERR(TAG, "serial_process_irp failed with error %" PRIu32 "", error);
goto error_out;
}
Ent... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 248,160,527,291,019,150,000,000,000,000,000,000,000 | 28 | Fixed oob read in irp_write and similar |
static inline int cpupid_to_cpu(int cpupid)
{
return -1;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 125,833,727,493,731,550,000,000,000,000,000,000,000 | 4 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
clear_installation_cache (void)
{
if (installation_cache != NULL)
g_hash_table_remove_all (installation_cache);
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 237,769,735,922,038,700,000,000,000,000,000,000,000 | 5 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static inline int slab_pad_check(struct kmem_cache *s, struct page *page)
{ return 1; } | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 304,946,035,430,562,200,000,000,000,000,000,000,000 | 2 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
int sock_get_timestamp(struct sock *sk, struct timeval __user *userstamp)
{
struct timeval tv;
if (!sock_flag(sk, SOCK_TIMESTAMP))
sock_enable_timestamp(sk, SOCK_TIMESTAMP);
tv = ktime_to_timeval(sk->sk_stamp);
if (tv.tv_sec == -1)
return -ENOENT;
if (tv.tv_sec == 0) {
sk->sk_stamp = ktime_get_real();
tv =... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 267,159,664,195,974,630,000,000,000,000,000,000,000 | 14 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
GST_START_TEST (test_GstDateTime_get_dmy)
{
GstDateTime *dt;
time_t t;
struct tm tt;
t = time (NULL);
#ifdef HAVE_LOCALTIME_R
localtime_r (&t, &tt);
#else
memcpy (&tt, localtime (&t), sizeof (struct tm));
#endif
dt = gst_date_time_new_from_unix_epoch_local_time (t);
assert_equals_int (gst_date_time_get... | 0 | [
"CWE-125"
] | gstreamer | 9398b7f1a75b38844ae7050b5a7967e4cdebe24f | 121,426,137,990,212,720,000,000,000,000,000,000,000 | 19 | datetime: fix potential out-of-bound read on malformed datetime string
https://bugzilla.gnome.org/show_bug.cgi?id=777263 |
glue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,
uint32_t dstaddr,
const uint8_t *src,
int dstpitch,
... | 1 | [
"CWE-119"
] | qemu | ffaf857778286ca54e3804432a2369a279e73aa7 | 67,360,080,230,463,770,000,000,000,000,000,000,000 | 27 | cirrus: stop passing around src pointers in the blitter
Does basically the same as "cirrus: stop passing around dst pointers in
the blitter", just for the src pointer instead of the dst pointer.
For the src we have to care about cputovideo blits though and fetch the
data from s->cirrus_bltbuf instead of vga memory. ... |
explicit Value(double n) : type_(REAL_TYPE) { real_value_ = n; } | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 104,904,288,241,827,050,000,000,000,000,000,000,000 | 1 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const auto* params = reinterpret_cast<TfLiteBidirectionalSequenceRNNParams*>(
node->builtin_data);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
const TfLiteTensor* fw_input_weights;
... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 180,074,995,878,417,750,000,000,000,000,000,000,000 | 128 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
FILE *mingw_fopen (const char *filename, const char *otype)
{
int hide = needs_hiding(filename);
FILE *file;
wchar_t wfilename[MAX_PATH], wotype[4];
if (!is_valid_win32_path(filename)) {
int create = otype && strchr(otype, 'w');
errno = create ? EINVAL : ENOENT;
return NULL;
}
if (filename && !strcmp(filena... | 0 | [
"CWE-706"
] | git | f82a97eb9197c1e3768e72648f37ce0ca3233734 | 107,556,373,900,019,800,000,000,000,000,000,000,000 | 26 | mingw: handle `subst`-ed "DOS drives"
Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path
names., 2008-03-05), Git was taught to handle absolute Windows paths,
i.e. paths that start with a drive letter and a colon.
Unbeknownst to us, while drive letters of physical drives are limited to
letters of th... |
bool setCacheOverride(JSContext *cx, unsigned argc, Value *vp) {
METHOD_HEADER(1)
if (!set_cache_override(cx, self, args[0]))
return false;
args.rval().setUndefined();
return true;
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 29,104,238,926,757,117,000,000,000,000,000,000,000 | 9 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
search_state_decref(struct search_state *const state) {
if (!state) return;
state->refcount--;
if (!state->refcount) {
struct search_domain *next, *dom;
for (dom = state->head; dom; dom = next) {
next = dom->next;
mm_free(dom);
}
mm_free(state);
}
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 182,172,215,228,480,000,000,000,000,000,000,000,000 | 12 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
TEST_F(HttpConnectionManagerImplTest, PathWithEscapedSlashesRejected) {
path_with_escaped_slashes_action_ = envoy::extensions::filters::network::http_connection_manager::
v3::HttpConnectionManager::REJECT_REQUEST;
testPathNormalization(
TestRequestHeaderMapImpl{{":authority", "host"}, {":path", "/abc%5c... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 50,897,734,904,339,130,000,000,000,000,000,000,000 | 8 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void worker_stats_clear(struct worker* worker)
{
server_stats_init(&worker->stats, worker->env.cfg);
mesh_stats_clear(worker->env.mesh);
worker->back->unwanted_replies = 0;
worker->back->num_tcp_outgoing = 0;
worker->back->num_udp_outgoing = 0;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 274,487,689,958,058,900,000,000,000,000,000,000,000 | 8 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
void gf_fs_print_unused_args(GF_FilterSession *fsess, const char *ignore_args)
{
u32 idx = 0;
char *argname;
u32 argtype;
while (1) {
Bool found = GF_FALSE;
const char *loc_arg;
if (gf_fs_enum_unmapped_options(fsess, &idx, &argname, &argtype)==GF_FALSE)
break;
loc_arg = ignore_args;
while (loc_arg) {... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 210,091,366,120,092,780,000,000,000,000,000,000,000 | 32 | fixed crashes for very long path - cf #1908 |
int sqlite3Fts3VarintLen(sqlite3_uint64 v){
int i = 0;
do{
i++;
v >>= 7;
}while( v!=0 );
return i;
} | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 85,738,154,980,325,970,000,000,000,000,000,000,000 | 8 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
do_one_cmd(
char_u **cmdlinep,
int flags,
#ifdef FEAT_EVAL
cstack_T *cstack,
#endif
char_u *(*fgetline)(int, void *, int, getline_opt_T),
void *cookie) // argument for fgetline()
{
char_u *p;
linenr_T lnum;
long n;
char *errormsg = NULL; // error message
char_u *after_modifier ... | 0 | [
"CWE-126",
"CWE-703"
] | vim | 4d97a565ae8be0d4debba04ebd2ac3e75a0c8010 | 219,218,967,295,566,430,000,000,000,000,000,000,000 | 927 | patch 8.2.5037: cursor position may be invalid after "0;" range
Problem: Cursor position may be invalid after "0;" range.
Solution: Check the cursor position when it was set by ";" in the range. |
static int __ref offline_pages(unsigned long start_pfn,
unsigned long end_pfn, unsigned long timeout)
{
unsigned long pfn, nr_pages, expire;
long offlined_pages;
int ret, drain, retry_max, node;
struct zone *zone;
struct memory_notify arg;
BUG_ON(start_pfn >= end_pfn);
/* at least, alignment against pageblo... | 0 | [] | linux-2.6 | 08dff7b7d629807dbb1f398c68dd9cd58dd657a1 | 322,433,188,732,957,180,000,000,000,000,000,000,000 | 124 | mm/hotplug: correctly add new zone to all other nodes' zone lists
When online_pages() is called to add new memory to an empty zone, it
rebuilds all zone lists by calling build_all_zonelists(). But there's a
bug which prevents the new zone to be added to other nodes' zone lists.
online_pages() {
build_all_zonelists(... |
get_arglist(garray_T *gap, char_u *str, int escaped)
{
ga_init2(gap, (int)sizeof(char_u *), 20);
while (*str != NUL)
{
if (ga_grow(gap, 1) == FAIL)
{
ga_clear(gap);
return FAIL;
}
((char_u **)gap->ga_data)[gap->ga_len++] = str;
// If str is escaped, don't handle backslashes or spaces
if (!e... | 0 | [
"CWE-416",
"CWE-125"
] | vim | 6f98371532fcff911b462d51bc64f2ce8a6ae682 | 83,095,443,039,235,400,000,000,000,000,000,000,000 | 21 | patch 8.2.3884: crash when clearing the argument list while using it
Problem: Crash when clearing the argument list while using it.
Solution: Lock the argument list for ":all". |
template<typename to>
float* _object3dtoCImg3d(const CImg<to>& opacities, float *ptrd) const {
const to *ptro = opacities._data;
cimg_foroff(opacities,o) *(ptrd++) = (float)*(ptro++);
return ptrd; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 235,125,485,439,480,760,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t n;
if( ssl == NULL || ssl->conf == NULL )
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> read" ) );
#if defined(MBEDTLS_SSL_PRO... | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 324,887,753,595,489,160,000,000,000,000,000,000,000 | 306 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
static int kvm_set_wallclock(const struct timespec *now)
{
return -1;
} | 0 | [] | kvm | 29fa6825463c97e5157284db80107d1bfac5d77b | 4,094,002,555,716,656,500,000,000,000,000,000,000 | 4 | x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit
paravirt_enabled has the following effects:
- Disables the F00F bug workaround warning. There is no F00F bug
workaround any more because Linux's standard IDT handling already
works around the F00F bug, but the warning still exists. This
... |
static void zr364xx_disconnect(struct usb_interface *intf)
{
struct zr364xx_camera *cam = usb_get_intfdata(intf);
mutex_lock(&cam->lock);
usb_set_intfdata(intf, NULL);
dev_info(&intf->dev, DRIVER_DESC " webcam unplugged\n");
video_unregister_device(&cam->vdev);
v4l2_device_disconnect(&cam->v4l2_dev);
/* stops ... | 0 | [
"CWE-476"
] | linux | 5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e | 257,028,813,328,832,900,000,000,000,000,000,000,000 | 18 | media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap
SyzKaller hit the null pointer deref while reading from uninitialized
udev->product in zr364xx_vidioc_querycap().
==================================================================
BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20
in... |
flatpak_dir_get_system_default (void)
{
g_autoptr(GFile) path = flatpak_get_system_default_base_dir_location ();
g_autoptr(DirExtraData) extra_data = dir_extra_data_new (SYSTEM_DIR_DEFAULT_ID,
SYSTEM_DIR_DEFAULT_DISPLAY_NAME,
... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 152,030,580,919,726,130,000,000,000,000,000,000,000 | 9 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
static uint8_t scale_factor_data(NeAACDecStruct *hDecoder, ic_stream *ics, bitfile *ld)
{
uint8_t ret = 0;
#ifdef PROFILE
int64_t count = faad_get_ts();
#endif
#ifdef ERROR_RESILIENCE
if (!hDecoder->aacScalefactorDataResilienceFlag)
{
#endif
ret = decode_scale_factors(ics, ld);
#ifdef ERROR_RES... | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 220,825,663,365,893,500,000,000,000,000,000,000,000 | 29 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int quiet)
{
time_t *ptime;
int i;
if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
ptime = &ctx->param->check_time;
else
ptime = NULL;
i = X509_cmp_time(X509_get_notBefore(x), ptime);
if (i == 0) {
if (quiet)
... | 0 | [
"CWE-119",
"CWE-787"
] | openssl | f48b83b4fb7d6689584cf25f61ca63a4891f5b11 | 17,095,133,595,264,929,000,000,000,000,000,000,000 | 50 | 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> |
static HashTable *spl_dllist_object_get_gc(zval *obj, zval **gc_data, int *gc_data_count) /* {{{ */
{
spl_dllist_object *intern = Z_SPLDLLIST_P(obj);
spl_ptr_llist_element *current = intern->llist->head;
int i = 0;
if (intern->gc_data_count < intern->llist->count) {
intern->gc_data_count = intern->llist->count;... | 0 | [
"CWE-415"
] | php-src | 28a6ed9f9a36b9c517e4a8a429baf4dd382fc5d5 | 236,413,752,376,033,870,000,000,000,000,000,000,000 | 20 | Fix bug #71735: Double-free in SplDoublyLinkedList::offsetSet |
static table_map get_table_map(List<Item> *items)
{
List_iterator_fast<Item> item_it(*items);
Item_field *item;
table_map map= 0;
while ((item= (Item_field *) item_it++))
map|= item->all_used_tables();
DBUG_PRINT("info", ("table_map: 0x%08lx", (long) map));
return map;
} | 0 | [
"CWE-617"
] | server | ecb6f9c894d3ebafeff1c6eb3b65cd248062296f | 238,352,992,108,286,400,000,000,000,000,000,000,000 | 11 | MDEV-28095 crash in multi-update and implicit grouping
disallow implicit grouping in multi-update.
explicit GROUP BY is not allowed by the grammar. |
TEST(HeaderIsValidTest, HeaderNameContainsUnderscore) {
EXPECT_FALSE(HeaderUtility::headerNameContainsUnderscore("cookie"));
EXPECT_FALSE(HeaderUtility::headerNameContainsUnderscore("x-something"));
EXPECT_TRUE(HeaderUtility::headerNameContainsUnderscore("_cookie"));
EXPECT_TRUE(HeaderUtility::headerNameContain... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 107,915,822,608,325,480,000,000,000,000,000,000,000 | 7 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static void xar_get_checksum_values(xmlTextReaderPtr reader, unsigned char ** cksum, int * hash)
{
xmlChar * style = xmlTextReaderGetAttribute(reader, (const xmlChar *)"style");
const xmlChar * xmlval;
*hash = XAR_CKSUM_NONE;
if (style == NULL) {
cli_dbgmsg("cli_scaxar: xmlTextReaderGetAttribut... | 1 | [
"CWE-125"
] | clamav-devel | d96a6b8bcc7439fa7e3876207aa0a8e79c8451b6 | 192,251,265,520,553,240,000,000,000,000,000,000,000 | 36 | bb11588 - fix out of bounds read. |
Item_num(THD *thd): Item_literal(thd) { collation.set_numeric(); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 295,770,023,867,688,460,000,000,000,000,000,000,000 | 1 | 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 ... |
static void agp_v2_parse_one(u32 *requested_mode, u32 *bridge_agpstat, u32 *vga_agpstat)
{
u32 tmp;
if (*requested_mode & AGP2_RESERVED_MASK) {
printk(KERN_INFO PFX "reserved bits set (%x) in mode 0x%x. Fixed.\n",
*requested_mode & AGP2_RESERVED_MASK, *requested_mode);
*requested_mode &= ~AGP2_RESERVED_MASK;
... | 0 | [
"CWE-190"
] | linux-2.6 | 194b3da873fd334ef183806db751473512af29ce | 62,861,434,551,743,230,000,000,000,000,000,000,000 | 97 | agp: fix arbitrary kernel memory writes
pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNBIND ioctl
cmds of agp_ioctl() and passed to agpioc_bind_wrap(). As said in the
comment, (pg_start + mem->page_count) may wrap in case of AGPIOC_BIND,
and it is not checked at all in case of AGPIOC_UNBIND. As a resu... |
void TensorSliceReader::LoadShard(int shard) const {
CHECK_LT(shard, sss_.size());
if (sss_[shard] || !status_.ok()) {
return; // Already loaded, or invalid.
}
string value;
SavedTensorSlices sts;
const string fname = fnames_[shard];
VLOG(1) << "Reading meta data from file " << fname << "...";
Tabl... | 0 | [
"CWE-369",
"CWE-345"
] | tensorflow | b619c6f865715ca3b15ef1842b5b95edbaa710ad | 175,094,200,747,811,980,000,000,000,000,000,000,000 | 41 | Use BuildTensorShapeBase when parsing unverified TensorShapes during checkpoint loading.
This avoids crashing when the TensorShape has negative dimensions.
PiperOrigin-RevId: 392769882
Change-Id: Id1f7ae7fcf8142193556af47abfda81b13d3cce4 |
void mg_mqtt_suback(struct mg_connection *nc, uint8_t *qoss, size_t qoss_len,
uint16_t message_id) {
size_t i;
uint16_t netbytes;
mg_send_mqtt_header(nc, MG_MQTT_CMD_SUBACK, MG_MQTT_QOS(1), 2 + qoss_len);
netbytes = htons(message_id);
mg_send(nc, &netbytes, 2);
for (i = 0; i < qoss_le... | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | mongoose | b3e0f780c34cea88f057a62213c012aa88fe2deb | 57,422,099,272,393,400,000,000,000,000,000,000,000 | 14 | Fix heap-based overflow in parse_mqtt
PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b |
int ip6_route_get_saddr(struct net *net,
struct rt6_info *rt,
const struct in6_addr *daddr,
unsigned int prefs,
struct in6_addr *saddr)
{
struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt);
int err = 0;
if (rt->rt6i_prefsrc.plen)
*saddr = rt->rt6i_prefsrc.addr;
else
err = ipv6_dev_get_sad... | 0 | [
"CWE-17"
] | linux-stable | 9d289715eb5c252ae15bd547cb252ca547a3c4f2 | 280,465,993,349,390,100,000,000,000,000,000,000,000 | 15 | ipv6: stop sending PTB packets for MTU < 1280
Reduce the attack vector and stop generating IPv6 Fragment Header for
paths with an MTU smaller than the minimum required IPv6 MTU
size (1280 byte) - called atomic fragments.
See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1]
for more information and h... |
d_lite_memsize(const void *ptr)
{
const union DateData *dat = ptr;
return complex_dat_p(dat) ? sizeof(struct ComplexDateData) : sizeof(struct SimpleDateData);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 268,538,178,192,313,000,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`... |
join_init_quick_read_record(JOIN_TAB *tab)
{
if (test_if_quick_select(tab) == -1)
return -1; /* No possible records */
return join_init_read_record(tab);
} | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 47,217,724,549,396,075,000,000,000,000,000,000,000 | 6 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
void cgsem_destroy(cgsem_t *cgsem)
{
close(cgsem->pipefd[1]);
close(cgsem->pipefd[0]);
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 59,409,005,268,430,105,000,000,000,000,000,000,000 | 5 | 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. |
asmlinkage __visible void __attribute__((weak)) smp_threshold_interrupt(void)
{
} | 0 | [
"CWE-17"
] | linux-2.6 | 6f442be2fb22be02cafa606f1769fa1e6f894441 | 162,652,937,140,333,370,000,000,000,000,000,000,000 | 3 | x86_64, traps: Stop using IST for #SS
On a 32-bit kernel, this has no effect, since there are no IST stacks.
On a 64-bit kernel, #SS can only happen in user code, on a failed iret
to user space, a canonical violation on access via RSP or RBP, or a
genuine stack segment violation in 32-bit kernel code. The first two
... |
static int ext4_block_truncate_page(handle_t *handle,
struct address_space *mapping, loff_t from)
{
unsigned offset = from & (PAGE_SIZE-1);
unsigned length;
unsigned blocksize;
struct inode *inode = mapping->host;
blocksize = inode->i_sb->s_blocksize;
length = blocksize - (offset & (blocksize - 1));
return e... | 0 | [
"CWE-200"
] | linux | 06bd3c36a733ac27962fea7d6f47168841376824 | 144,338,726,810,903,800,000,000,000,000,000,000,000 | 13 | ext4: fix data exposure after a crash
Huang has reported that in his powerfail testing he is seeing stale
block contents in some of recently allocated blocks although he mounts
ext4 in data=ordered mode. After some investigation I have found out
that indeed when delayed allocation is used, we don't add inode to
transa... |
static int simplestring_out_fptr(void *f, const char *text, int size)
{
simplestring* buf = (simplestring*)f;
if(buf) {
simplestring_addn(buf, text, size);
}
return 0;
} | 0 | [
"CWE-125"
] | php-src | 780ff63c377dc79de2c04d6b341913ab0102135b | 190,847,317,797,415,800,000,000,000,000,000,000,000 | 8 | MFH: Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error
when given bad data). |
void uwsgi_dyn_dict_del(struct uwsgi_dyn_dict *item) {
struct uwsgi_dyn_dict *prev = item->prev;
struct uwsgi_dyn_dict *next = item->next;
if (prev) {
prev->next = next;
}
if (next) {
next->prev = prev;
}
free(item);
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 93,787,666,862,542,220,000,000,000,000,000,000,000 | 15 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
dnPrettyNormal(
Syntax *syntax,
struct berval *val,
struct berval *pretty,
struct berval *normal,
void *ctx)
{
assert( val != NULL );
assert( pretty != NULL );
assert( normal != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dnPrettyNormal: <%s>\n", val->bv_val ? val->bv_val : "", 0, 0 );
if ( val->bv_len == 0 ) {
... | 0 | [
"CWE-763"
] | openldap | 5a2017d4e61a6ddc4dcb4415028e0d08eb6bca26 | 186,168,009,813,290,700,000,000,000,000,000,000,000 | 79 | ITS#9412 fix AVA_Sort on invalid RDN |
void SplashOutputDev::doUpdateFont(GfxState *state) {
GfxFont *gfxFont;
GfxFontLoc *fontLoc;
GfxFontType fontType;
SplashOutFontFileID *id = nullptr;
SplashFontFile *fontFile;
SplashFontSrc *fontsrc = nullptr;
FoFiTrueType *ff;
GooString *fileName;
char *tmpBuf;
int tmpBufLen;
int *codeToGID;
co... | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 198,014,823,666,996,740,000,000,000,000,000,000,000 | 297 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
dtls1_write_message_header(SSL *s, unsigned char *p)
{
struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
*p++ = msg_hdr->type;
l2n3(msg_hdr->msg_len, p);
s2n(msg_hdr->seq, p);
l2n3(msg_hdr->frag_off, p);
l2n3(msg_hdr->frag_len, p);
return p;
} | 0 | [
"CWE-310"
] | openssl | 34628967f1e65dc8f34e000f0f5518e21afbfc7b | 189,635,669,599,010,640,000,000,000,000,000,000,000 | 13 | Fix DTLS retransmission from previous session.
For DTLS we might need to retransmit messages from the previous session
so keep a copy of write context in DTLS retransmission buffers instead
of replacing it after sending CCS. CVE-2013-6450. |
md_process_table_cell(MD_CTX* ctx, MD_BLOCKTYPE cell_type, MD_ALIGN align, OFF beg, OFF end)
{
MD_LINE line;
MD_BLOCK_TD_DETAIL det;
int ret = 0;
while(beg < end && ISWHITESPACE(beg))
beg++;
while(end > beg && ISWHITESPACE(end-1))
end--;
det.align = align;
line.beg = be... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 42,201,384,119,069,360,000,000,000,000,000,000,000 | 22 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
read_CodersInfo(struct archive_read *a, struct _7z_coders_info *ci)
{
const unsigned char *p;
struct _7z_digests digest;
unsigned i;
memset(ci, 0, sizeof(*ci));
memset(&digest, 0, sizeof(digest));
if ((p = header_bytes(a, 1)) == NULL)
goto failed;
if (*p != kFolder)
goto failed;
/*
* Read NumFolders.
... | 0 | [
"CWE-190",
"CWE-125"
] | libarchive | e79ef306afe332faf22e9b442a2c6b59cb175573 | 251,549,563,101,225,900,000,000,000,000,000,000,000 | 103 | Issue #718: Fix TALOS-CAN-152
If a 7-Zip archive declares a rediculously large number of substreams,
it can overflow an internal counter, leading a subsequent memory
allocation to be too small for the substream data.
Thanks to the Open Source and Threat Intelligence project at Cisco
for reporting this issue. |
wait_for_safe_slave(MYSQL *connection)
{
char *read_master_log_pos = NULL;
char *slave_sql_running = NULL;
char *curr_slave_coordinates = NULL;
char *prev_slave_coordinates = NULL;
const int sleep_time = 3;
const ssize_t routine_start_time = (ssize_t)my_time(MY_WME);
const ssize_t timeout = opt_safe_slave_backu... | 0 | [
"CWE-200"
] | percona-xtrabackup | 7742f875bb289a874246fb4653b7cd9f14b588fe | 221,715,919,852,516,850,000,000,000,000,000,000,000 | 109 | PXB-2722 password is written into xtrabackup_info
https://jira.percona.com/browse/PXB-2722
Analysis:
password passed with -p option is written into backup tool_command in xtrabackup_info
Fix:
mask password before writting into xtrabackup_info |
DECODE_JSON(Byte) {
CHECK_TOKEN_BOUNDS;
CHECK_PRIMITIVE;
size_t tokenSize;
char* tokenData;
GET_TOKEN(tokenData, tokenSize);
UA_UInt64 out = 0;
UA_StatusCode s = parseUnsignedInteger(tokenData, tokenSize, &out);
*dst = (UA_Byte)out;
if(moveToken)
parseCtx->index++;
retu... | 0 | [
"CWE-703",
"CWE-787"
] | open62541 | c800e2987b10bb3af6ef644b515b5d6392f8861d | 3,461,376,942,105,133,600,000,000,000,000,000,000 | 15 | fix(json): Check max recursion depth in more places |
cleanup_subexpr(void)
{
if (rex.need_clear_subexpr)
{
if (REG_MULTI)
{
// Use 0xff to set lnum to -1
vim_memset(rex.reg_startpos, 0xff, sizeof(lpos_T) * NSUBEXP);
vim_memset(rex.reg_endpos, 0xff, sizeof(lpos_T) * NSUBEXP);
}
else
{
vim_memset(rex.reg_startp, 0, sizeof(char_u *) * NSUBEX... | 0 | [
"CWE-416"
] | vim | 4c13e5e6763c6eb36a343a2b8235ea227202e952 | 102,531,277,687,758,270,000,000,000,000,000,000,000 | 18 | patch 8.2.3949: using freed memory with /\%V
Problem: Using freed memory with /\%V.
Solution: Get the line again after getvvcol(). |
void ida_simple_remove(struct ida *ida, unsigned int id)
{
unsigned long flags;
BUG_ON((int)id < 0);
spin_lock_irqsave(&simple_ida_lock, flags);
ida_remove(ida, id);
spin_unlock_irqrestore(&simple_ida_lock, flags);
} | 0 | [] | linux | 326cf0f0f308933c10236280a322031f0097205d | 295,521,166,392,848,980,000,000,000,000,000,000,000 | 9 | idr: fix top layer handling
Most functions in idr fail to deal with the high bits when the idr
tree grows to the maximum height.
* idr_get_empty_slot() stops growing idr tree once the depth reaches
MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to
cover the whole range. The function doesn't even ... |
fr_archive_libarchive_rename (FrArchive *archive,
GList *file_list,
const char *old_name,
const char *new_name,
const char *current_dir,
gboolean is_dir,
gboolean dir_in_archive,
con... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 293,258,262,473,331,260,000,000,000,000,000,000,000 | 68 | libarchive: sanitize filenames before extracting |
void user_single_step_siginfo(struct task_struct *tsk,
struct pt_regs *regs, siginfo_t *info)
{
memset(info, 0, sizeof(*info));
info->si_signo = SIGTRAP;
info->si_code = TRAP_TRACE;
info->si_addr = (void __user *)regs->nip;
} | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 130,304,852,561,535,180,000,000,000,000,000,000,000 | 8 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc)
{
unsigned bio_bytes = bio_cur_bytes(bio);
char *data = bio_data(bio);
/*
* Overwrite the Nth byte of the data returned.
*/
if (data && bio_bytes >= fc->corrupt_bio_byte) {
data[fc->corrupt_bio_byte - 1] = fc->corrupt_bio_value;
DMDEBUG("C... | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 257,809,989,856,624,150,000,000,000,000,000,000,000 | 18 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
PHP_FUNCTION(imagefontheight)
{
php_imagefontsize(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
} | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 267,635,084,553,558,240,000,000,000,000,000,000,000 | 4 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
void credssp_encode_ts_credentials(rdpCredssp* credssp)
{
wStream* s;
int length;
length = ber_sizeof_sequence(credssp_sizeof_ts_credentials(credssp));
sspi_SecBufferAlloc(&credssp->ts_credentials, length);
s = Stream_New(credssp->ts_credentials.pvBuffer, length);
credssp_write_ts_credentials(credssp, s);
Str... | 0 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 256,020,368,416,570,370,000,000,000,000,000,000,000 | 13 | Fixed a range of BER boundary encoding bugs which would occur when any NLA packet hit the 127 character mark. Removed ber#get_content_length as it was not behaving deterministically. |
(CirrusVGAState *s,
uint8_t *dst, int dst_pitch,
int width, int height)
{
uint8_t *d, *d1;
uint32_t col;
int x, y;
col = s->cirrus_blt_fgcol;
d1 = dst;
for(y = 0; y < height; y++) {
d = d1;
for(x = 0; x < width; x += (DEPTH / 8)) {
PUTPIXEL();
... | 1 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 205,543,874,104,687,600,000,000,000,000,000,000,000 | 20 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
my_decimal *Item_ref_null_helper::val_decimal(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
my_decimal *val= (*ref)->val_decimal_result(decimal_value);
owner->was_null|= null_value= (*ref)->null_value;
return val;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 53,335,321,505,882,790,000,000,000,000,000,000,000 | 7 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static bool io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force)
{
bool ret = true;
if (test_bit(0, &ctx->check_cq_overflow)) {
/* iopoll syncs against uring_lock, not completion_lock */
if (ctx->flags & IORING_SETUP_IOPOLL)
mutex_lock(&ctx->uring_lock);
ret = __io_cqring_overflow_flush(ctx, force)... | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 242,537,355,035,389,100,000,000,000,000,000,000,000 | 15 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
void dwgRSCodec::decode251I(unsigned char *in, unsigned char *out, duint32 blk){
int k=0;
unsigned char data[255];
RScodec rsc(0xB8, 8, 2); //(255, 251)
for (duint32 i=0; i<blk; i++){
k = i;
for (int j=0; j<255; j++) {
data[j] = in[k];
k +=blk;
}
i... | 0 | [
"CWE-191"
] | libdxfrw | ba3fa95648bef948e008dfbdd31a4d21badd71f0 | 119,209,747,470,937,640,000,000,000,000,000,000,000 | 19 | fixed out-of-bounds write vulnerability CVE-2021-21898
as reported in TALOS-2021-1349 / CVE-2021-21898,
dwgCompressor::decompress18() could be abused with a malformed DWG file
to force out-of-bounds write and possibly lead to malicious code
execution. |
//! Return specified range of image slices \inplace.
CImg<T>& slices(const int z0, const int z1) {
return get_slices(z0,z1).move_to(*this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 10,633,943,560,004,256,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.