func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void atmsvc_exit(void)
{
sock_unregister(PF_ATMSVC);
} | 0 | [
"CWE-399"
] | linux-2.6 | 17b24b3c97498935a2ef9777370b1151dfed3f6f | 93,753,971,739,432,980,000,000,000,000,000,000,000 | 4 | ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
As reported by Hugo Dias that it is possible to cause a local denial
of service attack by calling the svc_listen function twice on the same
socket and reading /proc/net/atm/*vc
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: D... |
void sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost,
struct sas_rphy *rphy)
{
struct domain_device *dev;
unsigned int rcvlen = 0;
int ret = -EINVAL;
/* no rphy means no smp target support (ie aic94xx host) */
if (!rphy)
return sas_smp_host_handler(job, shost);
switch (rphy->identify.device_typ... | 0 | [
"CWE-416",
"CWE-362",
"CWE-703"
] | linux | b90cd6f2b905905fb42671009dc0e27c310a16ae | 57,107,900,965,008,580,000,000,000,000,000,000,000 | 47 | scsi: libsas: fix a race condition when smp task timeout
When the lldd is processing the complete sas task in interrupt and set the
task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be
triggered at the same time. And smp_task_timedout() will complete the task
wheter the SAS_TASK_STATE_DONE is set or n... |
static void process(char const* whoami,
char const* infile,
std::string outprefix)
{
QPDF inpdf;
inpdf.processFile(infile);
std::vector<QPDFPageObjectHelper> pages =
QPDFPageDocumentHelper(inpdf).getAllPages();
int pageno_len = QUtil::int_to_string(pages.s... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 63,227,603,960,865,250,000,000,000,000,000,000,000 | 30 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
virtual bool adminOnly() const {
return false;
} | 0 | [
"CWE-20"
] | mongo | 5c7c6729c37514760fd34da462b6961a2e385417 | 184,253,442,178,183,380,000,000,000,000,000,000,000 | 3 | SERVER-38275 ban explain with UUID |
void CLASS parse_kodak_ifd (int base)
{
unsigned entries, tag, type, len, save;
int i, c, wbi=-2, wbtemp=6500;
float mul[3]={1,1,1}, num;
static const int wbtag[] = { 64037,64040,64039,64041,-1,-1,64042 };
entries = get2();
if (entries > 1024) return;
while (entries--) {
tiff_get (base, &tag, &type, ... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | LibRaw | d13e8f6d1e987b7491182040a188c16a395f1d21 | 123,241,901,740,886,010,000,000,000,000,000,000,000 | 38 | CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access |
tree_checkincidr(tcpr_data_tree_t *treeroot, tcpr_buildcidr_t * bcdata)
{
tcpr_tree_t *node = NULL;
tcpprep_opt_t *options = tcpprep->options;
RB_FOREACH(node, tcpr_data_tree_s, treeroot) {
/* we only check types that are valid */
if (bcdata->type != DIR_ANY) /* don't check if we're ad... | 0 | [
"CWE-476"
] | tcpreplay | 46cf964a7db636da76abeebf10482acf6f682a87 | 114,741,997,718,208,480,000,000,000,000,000,000,000 | 25 | Bug #677 - fixes for tcpprep tree |
void __kprobes preempt_count_sub(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
return;
/*
* Is the spinlock portion underflowing?
*/
if (DEBUG_LOCKS_WARN_ON((val < PREEMPT_MASK) &&
!(preempt_count() & PREEMPT_MASK)))
return;
#endif
if (pre... | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 307,201,580,729,934,150,000,000,000,000,000,000,000 | 20 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
bool val_bool() { return val_int() != 0; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 155,903,679,793,190,850,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
ActivationPtr createActivation(const StreamInfo::StreamInfo& info,
const Http::RequestHeaderMap* request_headers,
const Http::ResponseHeaderMap* response_headers,
const Http::ResponseTrailerMap* response_trailers) {
auto acti... | 1 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 200,173,177,642,400,240,000,000,000,000,000,000,000 | 18 | 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 php_mysqlnd_rset_field_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_DC)
{
MYSQLND_PACKET_RES_FIELD *p= (MYSQLND_PACKET_RES_FIELD *) _packet;
/* p->metadata was passed to us as temporal buffer */
if (!stack_allocation) {
mnd_pefree(p, p->header.persistent);
} | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 28f80baf3c53e267c9ce46a2a0fadbb981585132 | 53,069,596,974,936,040,000,000,000,000,000,000,000 | 8 | Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields |
add_options(opt)
option_t *opt;
{
struct option_list *list;
list = malloc(sizeof(*list));
if (list == 0)
novm("option list entry");
list->options = opt;
list->next = extra_options;
extra_options = list;
} | 0 | [
"CWE-415",
"CWE-119"
] | ppp | 7658e8257183f062dc01f87969c140707c7e52cb | 166,165,431,221,869,670,000,000,000,000,000,000,000 | 12 | pppd: Eliminate potential integer overflow in option parsing
When we are reading in a word from an options file, we maintain a count
of the length we have seen so far in 'len', which is an int. When len
exceeds MAXWORDLEN - 1 (i.e. 1023) we cease storing characters in the
buffer but we continue to increment len. Sin... |
int ff_h264_handle_frag_packet(AVPacket *pkt, const uint8_t *buf, int len,
int start_bit, const uint8_t *nal_header,
int nal_header_len)
{
int ret;
int tot_len = len;
int pos = 0;
if (start_bit)
tot_len += sizeof(start_sequence) + nal... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | c42a1388a6d1bfd8001bf6a4241d8ca27e49326d | 130,510,785,440,746,610,000,000,000,000,000,000,000 | 20 | avformat/rtpdec_h264: Fix heap-buffer-overflow
Fixes: rtp_sdp/poc.sdp
Found-by: Bingchang <l.bing.chang.bc@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
get_recv_flags(int flags)
{
int recv_flags = 0;
if (flags & SCK_FLAG_MSG_ERRQUEUE) {
#ifdef MSG_ERRQUEUE
recv_flags |= MSG_ERRQUEUE;
#else
assert(0);
#endif
}
return recv_flags;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 15,582,888,910,068,255,000,000,000,000,000,000,000 | 14 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static XHCIStreamContext *xhci_find_stream(XHCIEPContext *epctx,
unsigned int streamid,
uint32_t *cc_error)
{
XHCIStreamContext *sctx;
dma_addr_t base;
uint32_t ctx[2], sct;
assert(streamid != 0);
if (epctx->lsa) ... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 192,690,025,506,658,800,000,000,000,000,000,000,000 | 32 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
QPDF::resolve(int objid, int generation)
{
// Check object cache before checking xref table. This allows us
// to insert things into the object cache that don't actually
// exist in the file.
QPDFObjGen og(objid, generation);
if (this->m->resolving.count(og))
{
// This can happen if an ... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 141,539,435,619,549,750,000,000,000,000,000,000,000 | 84 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
double iniparser_getdouble(const dictionary * d, const char * key, double notfound)
{
const char * str ;
str = iniparser_getstring(d, key, INI_INVALID_KEY);
if (str==INI_INVALID_KEY) return notfound ;
return atof(str);
} | 0 | [] | iniparser | 4f870752abbb756911d7b11405d49e9769d082bd | 319,185,504,992,595,470,000,000,000,000,000,000,000 | 8 | Fix #68 when reading file with only \0 char |
int imap_read_literal(FILE *fp, struct ImapData *idata, unsigned long bytes,
struct Progress *pbar)
{
char c;
bool r = false;
struct Buffer *buf = NULL;
if (DebugLevel >= IMAP_LOG_LTRL)
buf = mutt_buffer_alloc(bytes + 10);
mutt_debug(2, "reading %ld bytes\n", bytes);
for (unsign... | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | 295,375,517,316,203,200,000,000,000,000,000,000,000 | 49 | Quote path in imap_subscribe |
static void *established_get_next(struct seq_file *seq, void *cur)
{
struct sock *sk = cur;
struct hlist_nulls_node *node;
struct tcp_iter_state *st = seq->private;
struct net *net = seq_file_net(seq);
++st->num;
++st->offset;
sk = sk_nulls_next(sk);
sk_nulls_for_each_from(sk, node) {
if (sk->sk_family == ... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 142,486,877,586,017,110,000,000,000,000,000,000,000 | 21 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
const char* CMSEXPORT cmsIT8GetSheetType(cmsHANDLE hIT8)
{
return GetTable((cmsIT8*) hIT8)->SheetType;
} | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 151,746,403,863,367,740,000,000,000,000,000,000,000 | 4 | Fix some warnings from static analysis |
struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name)
{
struct lxc_lock *l;
l = malloc(sizeof(*l));
if (!l)
goto out;
if (!name) {
l->type = LXC_LOCK_ANON_SEM;
l->u.sem = lxc_new_unnamed_sem();
if (!l->u.sem) {
free(l);
l = NULL;
}
goto out;
}
l->type = LXC_LOCK_FLOCK;
l->u.f.f... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 72cf81f6a3404e35028567db2c99a90406e9c6e6 | 126,047,585,264,361,610,000,000,000,000,000,000,000 | 30 | CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc
This prevents an unprivileged user to use LXC to create arbitrary file
on the filesystem.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com> |
VideoTrack::~VideoTrack() {
delete m_colour;
delete m_projection;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 62,483,932,917,204,580,000,000,000,000,000,000,000 | 4 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
static int q2mbl(int x) {
if (x < 20) x = 20;
x = 50 + (x - 50) * 10 / 8;
return x * x / 3;
} | 0 | [
"CWE-20"
] | libvpx | 52add5896661d186dec284ed646a4b33b607d2c7 | 49,787,468,214,073,520,000,000,000,000,000,000,000 | 6 | VP8: Fix use-after-free in postproc.
The pointer in vp8 postproc refers to show_frame_mi which is only
updated on show frame. However, when there is a no-show frame which also
changes the size (thus new frame buffers allocated), show_frame_mi is
not updated with new frame buffer memory.
Change the pointer in postproc... |
int encode_ac_prg_fs( abitwriter* huffw, huffCodes* actbl, short* block, unsigned int* eobrun, int from, int to )
{
unsigned short n;
unsigned char s;
unsigned char z;
int bpos;
int hc;
int tmp;
// encode AC
z = 0;
for ( bpos = from; bpos <= to; bpos++ )
{
// if nonzer... | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 253,091,738,606,689,240,000,000,000,000,000,000,000 | 50 | fix #111 |
GF_Box *prft_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ProducerReferenceTimeBox, GF_ISOM_BOX_TYPE_PRFT);
return (GF_Box *)tmp; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 176,917,810,570,923,300,000,000,000,000,000,000,000 | 5 | fixed #1587 |
static void remove_all_media_directions(pjmedia_sdp_media *m)
{
pjmedia_sdp_media_remove_all_attr(m, "inactive");
pjmedia_sdp_media_remove_all_attr(m, "sendrecv");
pjmedia_sdp_media_remove_all_attr(m, "sendonly");
pjmedia_sdp_media_remove_all_attr(m, "recvonly");
} | 0 | [
"CWE-400",
"CWE-200",
"CWE-754"
] | pjproject | 97b3d7addbaa720b7ddb0af9bf6f3e443e664365 | 159,258,827,173,720,760,000,000,000,000,000,000,000 | 7 | Merge pull request from GHSA-hvq6-f89p-frvp |
QPDFObjectHandle::getPageContents()
{
std::string description = "page object " +
QUtil::int_to_string(this->m->objid) + " " +
QUtil::int_to_string(this->m->generation);
std::string all_description;
return this->getKey("/Contents").arrayOrStreamToStreamArray(
description, all_descript... | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 47,085,697,280,531,010,000,000,000,000,000,000,000 | 9 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
Status TrySimplify(NodeDef* node, string* simplified_node_name) override {
TF_RETURN_IF_ERROR(EnsureNodeIsSupported(node));
OptimizedNodesGroup group;
TF_RETURN_IF_ERROR(CreateOptimizedNodesGroup(node, &group));
if (!group.optimized_nodes.empty()) {
*simplified_node_name = RewriteOptimizedNode... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 153,916,835,059,782,370,000,000,000,000,000,000,000 | 12 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
writeRandomBytes_RtlGenRandom(void * target, size_t count) {
int success = 0; /* full count bytes written? */
const HMODULE advapi32 = LoadLibrary("ADVAPI32.DLL");
if (advapi32) {
const RTLGENRANDOM_FUNC RtlGenRandom
= (RTLGENRANDOM_FUNC)GetProcAddress(advapi32, "SystemFunction036");
if (RtlGenR... | 0 | [
"CWE-611"
] | libexpat | c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f | 25,346,954,353,791,730,000,000,000,000,000,000,000 | 17 | xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) |
static ssize_t fixed_length_data_source_read_callback(
nghttp2_session *session, int32_t stream_id, uint8_t *buf, size_t len,
uint32_t *data_flags, nghttp2_data_source *source, void *user_data) {
my_user_data *ud = (my_user_data *)user_data;
size_t wlen;
(void)session;
(void)stream_id;
(void)buf;
(v... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 165,255,938,341,290,700,000,000,000,000,000,000,000 | 21 | Add nghttp2_option_set_max_outbound_ack |
unsigned long arch_mmap_rnd(void)
{
unsigned long shift, rnd;
shift = mmap_rnd_bits;
#ifdef CONFIG_COMPAT
if (is_32bit_task())
shift = mmap_rnd_compat_bits;
#endif
rnd = get_random_long() % (1ul << shift);
return rnd << PAGE_SHIFT;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 112,791,034,622,022,700,000,000,000,000,000,000,000 | 13 | 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 ... |
PJ_DEF(pj_status_t) pjmedia_rtcp_build_rtcp_bye(pjmedia_rtcp_session *session,
void *buf,
pj_size_t *length,
const pj_str_t *reason)
{
pjmedia_rtcp_common *hdr;
pj_uint8_t *p;
pj_size_t len;
PJ_ASSERT_RETURN(session && buf && length, PJ_EINVAL);
/* Verify BYE reason length */
... | 0 | [
"CWE-125"
] | pjproject | 8b621f192cae14456ee0b0ade52ce6c6f258af1e | 4,480,909,091,212,740,400,000,000,000,000,000,000 | 45 | Merge pull request from GHSA-3qx3-cg72-wrh9 |
static BOOL rdp_write_general_capability_set(wStream* s, const rdpSettings* settings)
{
size_t header;
UINT16 extraFlags;
if (!Stream_EnsureRemainingCapacity(s, 64))
return FALSE;
header = rdp_capability_set_start(s);
if (header > UINT16_MAX)
return FALSE;
extraFlags = 0;
if (settings->LongCredentialsSupp... | 0 | [
"CWE-119",
"CWE-125"
] | FreeRDP | 3627aaf7d289315b614a584afb388f04abfb5bbf | 73,312,758,503,643,510,000,000,000,000,000,000,000 | 50 | Fixed #6011: Bounds check in rdp_read_font_capability_set |
ZEND_API void ZEND_FASTCALL _zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, zend_bool overwrite ZEND_FILE_LINE_DC)
{
uint32_t idx;
Bucket *p;
zval *t;
IS_CONSISTENT(source);
IS_CONSISTENT(target);
HT_ASSERT(GC_REFCOUNT(target) == 1);
if (overwrite) {
for (idx = 0;... | 0 | [
"CWE-190"
] | php-src | 4cc0286f2f3780abc6084bcdae5dce595daa3c12 | 294,155,049,404,909,570,000,000,000,000,000,000,000 | 59 | Fix #73832 - leave the table in a safe state if the size is too big. |
exif_mnote_data_olympus_load (ExifMnoteData *en,
const unsigned char *buf, unsigned int buf_size)
{
ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) en;
ExifShort c;
size_t i, tcount, o, o2, datao = 6, base = 0;
if (!n || !buf || !buf_size) {
exif_log (en->log, EXIF_LOG_CODE_CORRUPT_DATA,
"ExifMn... | 0 | [
"CWE-416",
"CWE-908"
] | libexif | ec412aa4583ad71ecabb967d3c77162760169d1f | 165,525,624,369,830,430,000,000,000,000,000,000,000 | 270 | Ensure the MakerNote data pointers are initialized with NULL.
This ensures that an uninitialized pointer isn't dereferenced later in
the case where the number of components (and therefore size) is 0.
This fixes the second issue reported at
https://sourceforge.net/p/libexif/bugs/125/
CVE-2020-13113 |
static int tomoyo_bprm_set_creds(struct linux_binprm *bprm)
{
int rc;
rc = cap_bprm_set_creds(bprm);
if (rc)
return rc;
/*
* Do only if this function is called for the first time of an execve
* operation.
*/
if (bprm->cred_prepared)
return 0;
/*
* Load policy if /sbin/tomoyo-init exists and /sbin/in... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 189,345,618,912,800,930,000,000,000,000,000,000,000 | 27 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
ins_ctrl_o(void)
{
if (State & VREPLACE_FLAG)
restart_edit = 'V';
else if (State & REPLACE_FLAG)
restart_edit = 'R';
else
restart_edit = 'I';
if (virtual_active())
ins_at_eol = FALSE; // cursor always keeps its column
else
ins_at_eol = (gchar_cursor() == NUL);
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 806d037671e133bd28a7864248763f643967973a | 233,766,062,067,293,500,000,000,000,000,000,000,000 | 13 | patch 8.2.4218: illegal memory access with bracketed paste in Ex mode
Problem: Illegal memory access with bracketed paste in Ex mode.
Solution: Reserve space for the trailing NUL. |
void Http2Session::RefreshSettings(const FunctionCallbackInfo<Value>& args) {
Http2Session* session;
ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder());
Http2Settings::Update(session, fn);
Debug(session, "settings refreshed for session");
} | 0 | [
"CWE-416"
] | node | a3c33d4ce78f74d1cf1765704af5b427aa3840a6 | 30,026,652,605,409,796,000,000,000,000,000,000,000 | 6 | http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.
The changes will remove dependency on the stream state that may allow
bypassing the checks in certai... |
static void io_mem_free(void *ptr)
{
struct page *page;
if (!ptr)
return;
page = virt_to_head_page(ptr);
if (put_page_testzero(page))
free_compound_page(page);
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 247,384,357,726,123,200,000,000,000,000,000,000,000 | 11 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static PHP_RINIT_FUNCTION(libxml)
{
/* report errors via handler rather than stderr */
xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename);
xmlOutputBufferCreateFilenameDefault(php_libxml_output_buffer_create_filename);
return S... | 0 | [
"CWE-200"
] | php-src | 8e76d0404b7f664ee6719fd98f0483f0ac4669d6 | 162,336,357,180,711,690,000,000,000,000,000,000,000 | 8 | Fixed external entity loading |
Luv32toLuv48(LogLuvState* sp, uint8* op, tmsize_t n)
{
uint32* luv = (uint32*) sp->tbuf;
int16* luv3 = (int16*) op;
while (n-- > 0) {
double u, v;
*luv3++ = (int16)(*luv >> 16);
u = 1./UVSCALE * ((*luv>>8 & 0xff) + .5);
v = 1./UVSCALE * ((*luv & 0xff) + .5);
*luv3++ = (int16)(u * (1L<<15));
*luv3++ =... | 0 | [
"CWE-787"
] | libtiff | aaab5c3c9d2a2c6984f23ccbc79702610439bc65 | 185,601,081,202,014,320,000,000,000,000,000,000,000 | 16 | * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
functions in non debug builds by replacing assert()s by regular if
checks (bugzilla #2522).
Fix potential out-of-bound reads in case of short input data. |
static int getusint(FILE *sfd, uint16 *val) {
int val2;
int ret = getint(sfd,&val2);
*val = val2;
return( ret );
} | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 151,939,730,511,230,880,000,000,000,000,000,000,000 | 6 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
Display::~Display() {
stop();
} | 0 | [
"CWE-613",
"CWE-287",
"CWE-284"
] | sddm | 147cec383892d143b5e02daa70f1e7def50f5d98 | 320,343,629,682,684,400,000,000,000,000,000,000,000 | 3 | Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service |
static double mp_self_sub(_cimg_math_parser& mp) {
return _mp_arg(1)-=_mp_arg(2); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 330,556,726,124,522,300,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
is_assoc_useless (symbol *s)
{
return s
&& s->content->assoc != undef_assoc
&& s->content->assoc != precedence_assoc
&& !used_assoc[s->content->number];
} | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 306,057,054,837,695,750,000,000,000,000,000,000,000 | 7 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
tv_get_string(typval_T *varp)
{
static char_u mybuf[NUMBUFLEN];
return tv_get_string_buf(varp, mybuf);
} | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 335,832,271,567,734,300,000,000,000,000,000,000,000 | 6 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
static int zipfileSerializeEOCD(ZipfileEOCD *p, u8 *aBuf){
u8 *a = aBuf;
zipfileWrite32(a, ZIPFILE_SIGNATURE_EOCD);
zipfileWrite16(a, p->iDisk);
zipfileWrite16(a, p->iFirstDisk);
zipfileWrite16(a, p->nEntry);
zipfileWrite16(a, p->nEntryTotal);
zipfileWrite32(a, p->nSize);
zipfileWrite32(a, p->iOffset);
... | 0 | [
"CWE-434"
] | sqlite | 54d501092d88c0cf89bec4279951f548fb0b8618 | 223,192,214,333,440,400,000,000,000,000,000,000,000 | 13 | Fix the zipfile extension so that INSERT works even if the pathname of
the file being inserted is a NULL. Bug discovered by the
Yongheng and Rui fuzzer.
FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06 |
const std::string name() override { return "stat_account"; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 60,858,516,268,879,760,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
void kvm_vcpu_reset(struct kvm_vcpu *vcpu)
{
atomic_set(&vcpu->arch.nmi_queued, 0);
vcpu->arch.nmi_pending = 0;
vcpu->arch.nmi_injected = false;
memset(vcpu->arch.db, 0, sizeof(vcpu->arch.db));
vcpu->arch.dr6 = DR6_FIXED_1;
kvm_update_dr6(vcpu);
vcpu->arch.dr7 = DR7_FIXED_1;
kvm_update_dr7(vcpu);
kvm_make_re... | 0 | [
"CWE-119",
"CWE-703",
"CWE-120"
] | linux | a08d3b3b99efd509133946056531cdf8f3a0c09b | 332,057,545,066,974,280,000,000,000,000,000,000,000 | 30 | kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_re... |
static void add_airo_dev(struct airo_info *ai)
{
/* Upper layers already keep track of PCI devices,
* so we only need to remember our non-PCI cards. */
if (!ai->pci)
list_add_tail(&ai->dev_list, &airo_devices);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 47,658,470,634,101,910,000,000,000,000,000,000,000 | 7 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static void retrieve_deps(struct dm_table *table,
struct dm_ioctl *param, size_t param_size)
{
unsigned int count = 0;
struct list_head *tmp;
size_t len, needed;
struct dm_dev_internal *dd;
struct dm_target_deps *deps;
deps = get_result_buffer(param, param_size, &len);
/*
* Count the devices.
*/
list... | 0 | [
"CWE-787"
] | linux | 4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a | 122,551,505,225,076,590,000,000,000,000,000,000,000 | 36 | dm ioctl: fix out of bounds array access when no devices
If there are not any dm devices, we need to zero the "dev" argument in
the first structure dm_name_list. However, this can cause out of
bounds write, because the "needed" variable is zero and len may be
less than eight.
Fix this bug by reporting DM_BUFFER_FULL_... |
xmlBufGetAllocationScheme(xmlBufPtr buf) {
if (buf == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
"xmlBufGetAllocationScheme: buf == NULL\n");
#endif
return(-1);
}
return(buf->alloc);
} | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 300,835,573,443,978,600,000,000,000,000,000,000,000 | 10 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
int headerAddI18NString(Header h, rpmTagVal tag, const char * string,
const char * lang)
{
indexEntry table, entry;
const char ** strArray;
int length;
int ghosts;
rpm_count_t i, langNum;
char * buf;
table = findEntry(h, RPMTAG_HEADERI18NTABLE, RPM_STRING_ARRAY_TYPE);
entry = findEntr... | 0 | [
"CWE-125"
] | rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | 229,734,753,014,982,130,000,000,000,000,000,000,000 | 137 | hdrblobInit() needs bounds checks too
Users can pass untrusted data to hdrblobInit() and it must be robust
against this. |
int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type)
{
armpmu_init(armpmu);
return perf_pmu_register(&armpmu->pmu, name, type);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8fff105e13041e49b82f92eef034f363a6b1c071 | 331,150,313,496,186,040,000,000,000,000,000,000,000 | 5 | arm64: perf: reject groups spanning multiple HW PMUs
The perf core implicitly rejects events spanning multiple HW PMUs, as in
these cases the event->ctx will differ. However this validation is
performed after pmu::event_init() is called in perf_init_event(), and
thus pmu::event_init() may be called with a group leader... |
ecma_string_get_property_index (ecma_property_t property, /**< property name type */
jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */
{
switch (ECMA_PROPERTY_GET_NAME_TYPE (property))
{
case ECMA_DIRECT_STRING_UINT:
{
return (uint32_t) prop_name_cp... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 320,176,137,521,811,130,000,000,000,000,000,000,000 | 20 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
vmIntrinsics::ID MethodHandles::signature_polymorphic_name_id(Symbol* name) {
vmSymbols::SID name_id = vmSymbols::find_sid(name);
switch (name_id) {
// The ID _invokeGeneric stands for all non-static signature-polymorphic methods, except built-ins.
case vmSymbols::VM_SYMBOL_ENUM_NAME(invoke_name): ret... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 126,310,428,466,773,130,000,000,000,000,000,000,000 | 25 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static int spl_dllist_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
{
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(object TSRMLS_CC);
if (intern->fptr_count) {
zval *rv;
zend_call_method_with_0_params(&object, intern->std.ce, &intern->fptr_count, "count", &r... | 0 | [
"CWE-416"
] | php-src | 863bf294feb9ad425eadb94f288bc7f18673089d | 19,622,812,338,706,532,000,000,000,000,000,000,000 | 22 | Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList) |
long _do_fork(unsigned long clone_flags,
unsigned long stack_start,
unsigned long stack_size,
int __user *parent_tidptr,
int __user *child_tidptr,
unsigned long tls)
{
struct completion vfork;
struct pid *pid;
struct task_struct *p;
int trace = 0;
long nr;
/*
* Determine whet... | 0 | [
"CWE-362"
] | linux | 7b55851367136b1efd84d98fea81ba57a98304cf | 220,180,940,349,909,450,000,000,000,000,000,000,000 | 70 | fork: record start_time late
This changes the fork(2) syscall to record the process start_time after
initializing the basic task structure but still before making the new
process visible to user-space.
Technically, we could record the start_time anytime during fork(2). But
this might lead to scenarios where a start_... |
htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
int ret = 0;
htmlParserInputPtr in;
int avail = 0;
xmlChar cur, next;
htmlParserNodeInfo node_info;
#ifdef DEBUG_PUSH
switch (ctxt->instate) {
case XML_PARSER_EOF:
xmlGenericError(xmlGenericErrorContext,
"HPP: try EOF\n"... | 0 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 312,097,810,003,189,000,000,000,000,000,000,000,000 | 767 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
static int iwlagn_send_sta_key(struct iwl_priv *priv,
struct ieee80211_key_conf *keyconf,
u8 sta_id, u32 tkip_iv32, u16 *tkip_p1k,
u32 cmd_flags)
{
unsigned long flags;
__le16 key_flags;
struct iwl_addsta_cmd sta_cmd;
int i;
spin_lock_irqsave(&priv->shrd->sta_lock, flags);
memcpy(&s... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2da424b0773cea3db47e1e81db71eeebde8269d4 | 222,750,094,339,870,160,000,000,000,000,000,000,000 | 53 | iwlwifi: Sanity check for sta_id
On my testing, I saw some strange behavior
[ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00
[ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode
not sure how it happen, but ... |
static int orinoco_ioctl_getwap(struct net_device *dev,
struct iw_request_info *info,
struct sockaddr *ap_addr,
char *extra)
{
struct orinoco_private *priv = ndev_priv(dev);
int err = 0;
unsigned long flags;
if (orinoco_lock(priv, &flags) != 0)
return -EBUSY;
ap_addr->sa_family = ARPHRD_ETHER;
er... | 0 | [] | linux | 0a54917c3fc295cb61f3fb52373c173fd3b69f48 | 294,844,394,667,800,000,000,000,000,000,000,000,000 | 20 | orinoco: fix TKIP countermeasure behaviour
Enable the port when disabling countermeasures, and disable it on
enabling countermeasures.
This bug causes the response of the system to certain attacks to be
ineffective.
It also prevents wpa_supplicant from getting scan results, as
wpa_supplicant disables countermeasures... |
static void automount_init(Unit *u) {
Automount *a = AUTOMOUNT(u);
assert(u);
assert(u->load_state == UNIT_STUB);
a->pipe_fd = -1;
a->directory_mode = 0755;
UNIT(a)->ignore_on_isolate = true;
} | 0 | [
"CWE-362"
] | systemd | e7d54bf58789545a9eb0b3964233defa0b007318 | 173,616,423,874,135,800,000,000,000,000,000,000,000 | 10 | automount: ack automount requests even when already mounted (#5916)
If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started... |
static SECURITY_STATUS SEC_ENTRY negotiate_CompleteAuthToken(PCtxtHandle phContext,
PSecBufferDesc pToken)
{
NEGOTIATE_CONTEXT* context;
SECURITY_STATUS status = SEC_E_OK;
context = (NEGOTIATE_CONTEXT*)sspi_SecureHandleGetLowerPointer(phContext);
if (!co... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 171,115,200,797,691,080,000,000,000,000,000,000,000 | 18 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
static int nfsd_startup_generic(int nrservs)
{
int ret;
if (nfsd_users++)
return 0;
/*
* Readahead param cache - will no-op if it already exists.
* (Note therefore results will be suboptimal if number of
* threads is modified after nfsd start.)
*/
ret = nfsd_racache_init(2*nrservs);
if (ret)
goto dec... | 0 | [
"CWE-20"
] | linux | e6838a29ecb484c97e4efef9429643b9851fba6e | 29,357,072,245,073,620,000,000,000,000,000,000,000 | 27 | nfsd: check for oversized NFSv2/v3 arguments
A client can append random data to the end of an NFSv2 or NFSv3 RPC call
without our complaining; we'll just stop parsing at the end of the
expected data and ignore the rest.
Encoded arguments and replies are stored together in an array of pages,
and if a call is too large... |
void dtio_mainfdcallback(int ATTR_UNUSED(fd), short ATTR_UNUSED(ev),
void* ATTR_UNUSED(arg))
{
log_assert(0);
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 289,696,986,128,786,700,000,000,000,000,000,000,000 | 5 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
static s32 gf_media_vvc_read_vps_bs_internal(GF_BitStream *bs, VVCState *vvc, Bool stop_at_vps_ext)
{
u32 i, j;
s32 vps_id;
VVC_VPS *vps;
Bool vps_default_ptl_dpb_hrd_max_tid_flag=0;
//nalu header already parsed
vps_id = gf_bs_read_int_log(bs, 4, "vps_id");
if (vps_id >= 16) return -1;
if (!vps_id) {
GF_LOG(... | 1 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 101,922,926,797,445,110,000,000,000,000,000,000,000 | 88 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
/* {{{ date_period_it_current_data */
static void date_period_it_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC)
{
date_period_it *iterator = (date_period_it *)iter;
php_period_obj *object = iterator->object;
timelib_time *it_time = object->current;
php_date_obj *newdateobj;
/* Create new ... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 63,656,835,652,910,190,000,000,000,000,000,000,000 | 22 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
ConstIterator(const SliceDeque& deque, size_t index) : deque_(deque), index_(index) {} | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 38,523,912,562,660,840,000,000,000,000,000,000,000 | 1 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
static int init(struct MACH0_(obj_t)* bin) {
union {
ut16 word;
ut8 byte[2];
} endian = { 1 };
little_ = endian.byte[0];
if (!init_hdr (bin)) {
bprintf ("Warning: File is not MACH0\n");
return false;
}
if (!init_items (bin)) {
bprintf ("Warning: Cannot initialize items\n");
}
bin->baddr = MACH0_(get_b... | 0 | [
"CWE-415",
"CWE-125"
] | radare2 | 60208765887f5f008b3b9a883f3addc8bdb9c134 | 188,198,340,494,448,500,000,000,000,000,000,000,000 | 16 | Fix #9970 - heap oobread in mach0 parser (#10026) |
TEST_F(HttpHealthCheckerImplTest, ServiceCheckRuntimeOffWithStringPattern) {
setupServicePrefixPatternValidationHC();
EXPECT_CALL(runtime_.snapshot_, featureEnabled("health_check.verify_cluster", 100))
.WillOnce(Return(false));
EXPECT_CALL(*this, onHostStatus(_, HealthTransition::Unchanged));
cluster_->... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 170,101,618,493,694,400,000,000,000,000,000,000,000 | 25 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
GF_ISOTrackID gf_isom_get_last_created_track_id(GF_ISOFile *movie)
{
return movie ? movie->last_created_track_id : 0;
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 109,214,785,866,188,600,000,000,000,000,000,000,000 | 4 | fixed #1706 |
**/
CImg<T>& transpose() {
if (_width==1) { _width = _height; _height = 1; return *this; }
if (_height==1) { _height = _width; _width = 1; return *this; }
if (_width==_height) {
cimg_forYZC(*this,y,z,c) for (int x = y; x<width(); ++x) cimg::swap((*this)(x,y,z,c),(*this)(y,x,z,c));
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 119,603,100,672,979,020,000,000,000,000,000,000,000 | 9 | Fix other issues in 'CImg<T>::load_bmp()'. |
size_t _copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i)
{
if (unlikely(iov_iter_is_pipe(i))) {
WARN_ON(1);
return 0;
}
iterate_and_advance(i, bytes, base, len, off,
__copy_from_user_inatomic_nocache(addr + off, base, len),
memcpy(addr + off, base, len)
)
return bytes;
} | 0 | [
"CWE-665",
"CWE-284"
] | linux | 9d2231c5d74e13b2a0546fee6737ee4446017903 | 28,521,484,204,796,077,000,000,000,000,000,000,000 | 13 | lib/iov_iter: initialize "flags" in new pipe_buffer
The functions copy_page_to_iter_pipe() and push_pipe() can both
allocate a new pipe_buffer, but the "flags" member initializer is
missing.
Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed")
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.k... |
void _af_adpcm_coder (int16_t *indata, uint8_t *outdata, int len,
struct adpcm_state *state)
{
int16_t *inp; /* Input buffer pointer */
uint8_t *outp; /* Output buffer pointer */
int val; /* Current input sample value */
int sign; /* Current adpcm sign bit */
int delta; /* Current adpcm out... | 1 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 151,725,545,189,119,400,000,000,000,000,000,000,000 | 98 | Fix decoding of multi-channel ADPCM audio files. |
int cap_capset(struct cred *new,
const struct cred *old,
const kernel_cap_t *effective,
const kernel_cap_t *inheritable,
const kernel_cap_t *permitted)
{
if (cap_inh_is_capped() &&
!cap_issubset(*inheritable,
cap_combine(old->cap_inheritable,
old->cap_permitted)))
... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 95,706,241,358,619,070,000,000,000,000,000,000,000 | 32 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static int whiteheat_attach(struct usb_serial *serial)
{
struct usb_serial_port *command_port;
struct whiteheat_command_private *command_info;
struct whiteheat_hw_info *hw_info;
int pipe;
int ret;
int alen;
__u8 *command;
__u8 *result;
command_port = serial->port[COMMAND_PORT];
pipe = usb_sndbulkpipe(serial... | 0 | [
"CWE-399"
] | linux | cbb4be652d374f64661137756b8f357a1827d6a4 | 71,999,564,115,917,870,000,000,000,000,000,000,000 | 106 | USB: whiteheat: fix potential null-deref at probe
Fix potential null-pointer dereference at probe by making sure that the
required endpoints are present.
The whiteheat driver assumes there are at least five pairs of bulk
endpoints, of which the final pair is used for the "command port". An
attempt to bind to an inter... |
void consume_skb(struct sk_buff *skb)
{
if (unlikely(!skb))
return;
if (likely(atomic_read(&skb->users) == 1))
smp_rmb();
else if (likely(!atomic_dec_and_test(&skb->users)))
return;
trace_consume_skb(skb);
__kfree_skb(skb);
} | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 44,190,611,224,207,680,000,000,000,000,000,000,000 | 11 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
static int vcpu_stat_get(void *_offset, u64 *val)
{
unsigned offset = (long)_offset;
struct kvm *kvm;
struct kvm_vcpu *vcpu;
int i;
*val = 0;
raw_spin_lock(&kvm_lock);
list_for_each_entry(kvm, &vm_list, vm_list)
kvm_for_each_vcpu(i, vcpu, kvm)
*val += *(u32 *)((void *)vcpu + offset);
raw_spin_unlock(&kvm... | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 283,021,081,714,031,260,000,000,000,000,000,000,000 | 16 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
TEST_P(HeaderIntegrationTest, TestRouteConfigVirtualHostAndRouteAppendHeaderManipulation) {
initializeFilter(HeaderMode::Append, true);
performRequest(
Http::TestRequestHeaderMapImpl{
{":method", "GET"},
{":path", "/vhost-and-route"},
{":scheme", "http"},
{":authority",... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 446,983,226,100,902,100,000,000,000,000,000,000 | 48 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int pppol2tp_session_setsockopt(struct sock *sk,
struct l2tp_session *session,
int optname, int val)
{
int err = 0;
struct pppol2tp_session *ps = l2tp_session_priv(session);
switch (optname) {
case PPPOL2TP_SO_RECVSEQ:
if ((val != 0) && (val != 1)) {
err = -EINVAL;
break;
}
... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 65,911,997,205,632,360,000,000,000,000,000,000,000 | 67 | 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... |
void Compute(OpKernelContext* context) override {
const Tensor& prefix = context->input(0);
const Tensor& tensor_names = context->input(1);
const Tensor& shape_and_slices = context->input(2);
OP_REQUIRES(context, tensor_names.NumElements() == dtypes_.size(),
errors::InvalidArgument("Go... | 1 | [
"CWE-476",
"CWE-369"
] | tensorflow | 9728c60e136912a12d99ca56e106b7cce7af5986 | 2,700,501,257,079,771,000,000,000,000,000,000,000 | 37 | Ensure validation sticks in `save_restore_v2_ops.cc`
PiperOrigin-RevId: 387924206
Change-Id: I6156842eb3230076b5812c0815f3e66bd5241454 |
custom_time_skip (va_list *va)
{
(void) va_arg (*va, int);
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 166,862,675,884,514,550,000,000,000,000,000,000,000 | 4 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static void rgb_background(struct vc_data *vc, const struct rgb *c)
{
/* For backgrounds, err on the dark side. */
vc->vc_color = (vc->vc_color & 0x0f)
| (c->r&0x80) >> 1 | (c->g&0x80) >> 2 | (c->b&0x80) >> 3;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 122,854,915,097,747,760,000,000,000,000,000,000,000 | 6 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image *image, *image2=NULL,
*rotated_image;
register Quantum *q;
unsigned int status;
MATHeader MATLAB_HDR;
size_t size;
size_t CellType;
QuantumInfo *quantum_info;
ImageInfo *clone_info;
int i;
ssize_t ldblk;
u... | 1 | [
"CWE-772"
] | ImageMagick | cdafbc753cf794160eb53b320d4bc0b36ba6ed1d | 54,868,815,438,236,440,000,000,000,000,000,000,000 | 502 | Fix moment when quantum info is acquired to fix issue reported in #469. |
TEST_F(RouterTest, RetryRequestBeforeBody) {
auto retry_options_predicate = std::make_shared<MockRetryOptionsPredicate>();
callbacks_.route_->route_entry_.retry_policy_.retry_options_predicates_.emplace_back(
retry_options_predicate);
NiceMock<Http::MockRequestEncoder> encoder1;
Http::ResponseDecoder* re... | 0 | [
"CWE-703"
] | envoy | f0bb2219112d8cdb4c4e8b346834f962925362ca | 38,987,290,067,185,910,000,000,000,000,000,000,000 | 60 | [1.20] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
int Chapters::Atom::GetDisplayCount() const { return m_displays_count; } | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 110,944,686,414,671,720,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
yang_free_nodes(struct ly_ctx *ctx, struct lys_node *node)
{
struct lys_node *tmp, *child, *sibling;
if (!node) {
return;
}
tmp = node;
while (tmp) {
child = tmp->child;
sibling = tmp->next;
/* common part */
lydict_remove(ctx, tmp->name);
if (!(tmp-... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 57,079,208,671,983,170,000,000,000,000,000,000,000 | 67 | yang parser BUGFIX double free
Fixes #742 |
static void nfs41_sequence_call_done(struct rpc_task *task, void *data)
{
struct nfs4_sequence_data *calldata = data;
struct nfs_client *clp = calldata->clp;
if (!nfs41_sequence_done(task, task->tk_msg.rpc_resp))
return;
trace_nfs4_sequence(clp, task->tk_status);
if (task->tk_status < 0) {
dprintk("%s ERROR ... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 181,391,965,436,363,400,000,000,000,000,000,000,000 | 23 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
int CClient::LoadData()
{
m_DebugFont = Graphics()->LoadTexture("debug_font.png", IStorage::TYPE_ALL, CImageInfo::FORMAT_AUTO, IGraphics::TEXLOAD_NORESAMPLE);
return 1;
} | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 196,195,157,620,839,970,000,000,000,000,000,000,000 | 5 | added some checks to snap handling |
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags)
{
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(regs, orig_i0);
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}
} | 1 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 215,169,828,080,118,670,000,000,000,000,000,000,000 | 9 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
void FontData::Bound(int32_t offset, int32_t length) {
// Inputs should not be negative.
CHECK(offset >= 0);
CHECK(length >= 0);
// Check to make sure |bound_offset_| will not overflow.
CHECK(bound_offset_ <= std::numeric_limits<int32_t>::max() - offset);
const int32_t new_offset = bound_offset_ + offset;
... | 0 | [
"CWE-703",
"CWE-189"
] | sfntly | de776d4ef06ca29c240de3444348894f032b03ff | 103,224,749,462,855,780,000,000,000,000,000,000,000 | 24 | Check for integer overflow in sfntly::FontData::Bound().
Also delete dead code and cleanup some nits.
This is cl/96914065. |
void AuthorizationSessionImpl::_refreshUserInfoAsNeeded(OperationContext* opCtx) {
AuthorizationManager& authMan = getAuthorizationManager();
UserSet::iterator it = _authenticatedUsers.begin();
while (it != _authenticatedUsers.end()) {
User* user = *it;
if (!user->isValid()) {
//... | 1 | [
"CWE-613"
] | mongo | 6dfb92b1299de04677d0bd2230e89a52eb01003c | 136,245,227,878,515,790,000,000,000,000,000,000,000 | 80 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static int __net_init addrconf_init_net(struct net *net)
{
int err = -ENOMEM;
struct ipv6_devconf *all, *dflt;
all = kmemdup(&ipv6_devconf, sizeof(ipv6_devconf), GFP_KERNEL);
if (all == NULL)
goto err_alloc_all;
dflt = kmemdup(&ipv6_devconf_dflt, sizeof(ipv6_devconf_dflt), GFP_KERNEL);
if (dflt == NULL)
got... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 303,656,428,190,428,670,000,000,000,000,000,000,000 | 42 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
char16_t operator*() const {
return charPtr_ ? *charPtr_ : *char16Ptr_;
} | 0 | [
"CWE-416",
"CWE-703"
] | hermes | d86e185e485b6330216dee8e854455c694e3a36e | 165,677,167,569,379,200,000,000,000,000,000,000,000 | 3 | Fix a bug in transient object property assignment and getUTF16Ref
Summary:
The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by
appending more contents to the same allocator.
This case was encountered in `transientObjectPutErrorMessage`, resulting in
using free'd memory.
Reviewed By: tmikov
D... |
read_ordlist(
struct recvbuf * rbufp,
int restrict_mask
)
{
const char ifstats_s[] = "ifstats";
const size_t ifstats_chars = COUNTOF(ifstats_s) - 1;
const char addr_rst_s[] = "addr_restrictions";
const size_t a_r_chars = COUNTOF(addr_rst_s) - 1;
struct ntp_control * cpkt;
u_short qdata_octets;
/*
* CTL... | 0 | [
"CWE-22"
] | ntp | 184516e143ce4448ddb5b9876dd372008cc779f6 | 307,768,943,834,606,250,000,000,000,000,000,000,000 | 37 | [TALOS-CAN-0062] prevent directory traversal for VMS, too, when using 'saveconfig' command. |
void Magick::Image::shadow(const double percent_opacity_,const double sigma_,
const ssize_t x_,const ssize_t y_)
{
MagickCore::Image
*newImage;
GetPPException;
newImage=ShadowImage(constImage(),percent_opacity_, sigma_,x_, y_,
exceptionInfo);
replaceImage(newImage);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 85,901,368,781,859,980,000,000,000,000,000,000,000 | 12 | Added missing return to avoid use after free. |
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
{
int r;
vcpu->arch.mtrr_state.have_fixed = 1;
vcpu_load(vcpu);
r = kvm_arch_vcpu_reset(vcpu);
if (r == 0)
r = kvm_mmu_setup(vcpu);
vcpu_put(vcpu);
if (r < 0)
goto free_vcpu;
return 0;
free_vcpu:
kvm_x86_ops->vcpu_free(vcpu);
return r;
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 98,434,413,679,062,880,000,000,000,000,000,000,000 | 18 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
{
char *filename;
int filename_len;
zval *group;
gid_t gid;
int ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz/", &filename, &filename_len, &group) == FAILURE) {
RETURN_FALSE;
}
if (Z_TYPE_P(group) == IS_LONG) {
... | 1 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 267,307,596,723,203,450,000,000,000,000,000,000,000 | 69 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void CL_UpdateMumble(void)
{
vec3_t pos, forward, up;
float scale = cl_mumbleScale->value;
float tmp;
if(!cl_useMumble->integer)
return;
// !!! FIXME: not sure if this is even close to correct.
AngleVectors( cl.snap.ps.viewangles, forward, NULL, up);
pos[0] = cl.snap.ps.origin[0] * scale;
pos[1] = cl.snap... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 166,292,116,604,089,810,000,000,000,000,000,000,000 | 33 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
int prepareRequestWhenNotInHighPerformanceMode(request_rec *r) {
DirConfig *config = getDirConfig(r);
if (config->isEnabled()) {
if (config->highPerformanceMode()) {
/* Preparations have already been done in the map_to_storage hook.
* Prevent other modules' fixups hooks from being run.
*/
retu... | 0 | [
"CWE-59"
] | passenger | 9dda49f4a3ebe9bafc48da1bd45799f30ce19566 | 325,172,003,491,877,900,000,000,000,000,000,000,000 | 29 | Fixed a problem with graceful web server restarts.
This problem was introduced in 4.0.6 during the attempt to fix issue #910. |
struct fib6_node * fib6_lookup(struct fib6_node *root, const struct in6_addr *daddr,
const struct in6_addr *saddr)
{
struct fib6_node *fn;
struct lookup_args args[] = {
{
.offset = offsetof(struct rt6_info, rt6i_dst),
.addr = daddr,
},
#ifdef CONFIG_IPV6_SUBTREES
{
.offset = offsetof(struct r... | 0 | [
"CWE-399"
] | linux | 307f2fb95e9b96b3577916e73d92e104f8f26494 | 169,294,411,131,348,930,000,000,000,000,000,000,000 | 26 | ipv6: only static routes qualify for equal cost multipathing
Static routes in this case are non-expiring routes which did not get
configured by autoconf or by icmpv6 redirects.
To make sure we actually get an ecmp route while searching for the first
one in this fib6_node's leafs, also make sure it matches the ecmp ro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.