func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
ffs_epfile_release(struct inode *inode, struct file *file)
{
struct ffs_epfile *epfile = inode->i_private;
ENTER();
ffs_data_closed(epfile->ffs);
return 0;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 38740a5b87d53ceb89eb2c970150f6e94e00373a | 165,006,075,934,987,480,000,000,000,000,000,000,000 | 10 | 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... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
ruy::profiler::ScopeLabel label("MirrorPad");
const TfLiteTensor* input_tensor;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input_tensor));
const TfLiteTensor* padding_matrix;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 1,... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 163,556,633,607,964,300,000,000,000,000,000,000,000 | 93 | [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... |
static int ip_mkroute_input(struct sk_buff *skb,
struct fib_result *res,
struct in_device *in_dev,
__be32 daddr, __be32 saddr, u32 tos)
{
#ifdef CONFIG_IP_ROUTE_MULTIPATH
if (res->fi && res->fi->fib_nhs > 1) {
int h = fib_multipath_hash(res->fi, NULL, skb);
fib_select_multipath(res, h);
}
#e... | 0 | [
"CWE-476"
] | linux | bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205 | 229,814,841,090,663,840,000,000,000,000,000,000,000 | 16 | net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set
Syzkaller hit 'general protection fault in fib_dump_info' bug on
commit 4.13-rc5..
Guilty file: net/ipv4/fib_semantics.c
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked... |
int ssh_scp_deny_request(ssh_scp scp, const char *reason){
char buffer[MAX_BUF_SIZE];
int err;
if(scp==NULL)
return SSH_ERROR;
if(scp->state != SSH_SCP_READ_REQUESTED){
ssh_set_error(scp->session,SSH_FATAL,"ssh_scp_deny_request called under invalid state");
return SSH_ERROR;
}
snprintf(buffer,... | 1 | [] | libssh | 4aea835974996b2deb011024c53f4ff4329a95b5 | 336,093,365,056,752,100,000,000,000,000,000,000,000 | 19 | 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) |
R_API void U(add_field_infos_to_sdb)(RBinJavaObj * bin) {
/*
*** Experimental and May Change ***
Add field information to an Array
the key for this info variable depenedent on addr, method ordinal, etc.
Key 1, mapping to method key:
java.<file_offset> = <field_key>
Key 3, method description
<field_key>.info = [... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 197,203,544,534,151,770,000,000,000,000,000,000,000 | 75 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
MonoArray*
mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *propValues, MonoArray *fields, MonoArray* fieldValues)
{
g_assert_not_reached ();
return NULL; | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 257,637,983,506,687,000,000,000,000,000,000,000,000 | 5 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static int h2_frt_transfer_data(struct h2s *h2s, struct buffer *buf, int count)
{
struct h2c *h2c = h2s->h2c;
int block1, block2;
unsigned int flen = h2c->dfl;
h2s->cs->flags &= ~CS_FL_RCV_MORE;
h2c->flags &= ~H2_CF_DEM_SFULL;
/* The padlen is the first byte before data, and the padding appears
* after data. ... | 0 | [
"CWE-119"
] | haproxy | 3f0e1ec70173593f4c2b3681b26c04a4ed5fc588 | 276,455,513,577,804,430,000,000,000,000,000,000,000 | 99 | BUG/CRITICAL: h2: fix incorrect frame length check
The incoming H2 frame length was checked against the max_frame_size
setting instead of being checked against the bufsize. The max_frame_size
only applies to outgoing traffic and not to incoming one, so if a large
enough frame size is advertised in the SETTINGS frame, ... |
void fxUint8Setter(txMachine* the, txSlot* data, txInteger offset, txSlot* slot, int endian)
{
txUnsigned tmp = (slot->kind == XS_INTEGER_KIND) ? (txUnsigned)slot->value.integer : (txUnsigned)slot->value.number;
*((txU1*)(data->value.arrayBuffer.address + offset)) = (txU1)tmp;
mxMeterOne();
} | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 52,528,735,779,395,680,000,000,000,000,000,000,000 | 6 | XS: #896 |
*/
static int io_poll_check_events(struct io_kiocb *req, bool *locked)
{
struct io_ring_ctx *ctx = req->ctx;
int v, ret;
/* req->task == current here, checking PF_EXITING is safe */
if (unlikely(req->task->flags & PF_EXITING))
return -ECANCELED;
do {
v = atomic_read(&req->poll_refs);
/* tw handler should... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 37,879,144,835,210,470,000,000,000,000,000,000,000 | 62 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
void ReferenceHandle::CheckDisposed() const {
if (!reference) {
throw RuntimeGenericError("Reference has been released");
}
} | 0 | [
"CWE-913"
] | isolated-vm | 2646e6c1558bac66285daeab54c7d490ed332b15 | 236,912,766,218,350,500,000,000,000,000,000,000,000 | 5 | Don't invoke accessors or proxies via Reference functions |
BOOL ber_read_bit_string(wStream* s, int* length, BYTE* padding)
{
if(!ber_read_universal_tag(s, BER_TAG_BIT_STRING, FALSE) ||
!ber_read_length(s, length))
return FALSE;
if(Stream_GetRemainingLength(s) < 1)
return FALSE;
Stream_Read_UINT8(s, *padding);
return TRUE;
} | 1 | [
"CWE-476"
] | FreeRDP | 0dc22d5a30a1c7d146b2a835b2032668127c33e9 | 38,225,909,079,954,603,000,000,000,000,000,000,000 | 11 | 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. |
hfs_cat_read_thread_record(HFS_INFO * hfs, TSK_OFF_T off,
hfs_thread * thread)
{
TSK_FS_INFO *fs = (TSK_FS_INFO *) & (hfs->fs_info);
uint16_t uni_len;
ssize_t cnt;
memset(thread, 0, sizeof(hfs_thread));
cnt = tsk_fs_attr_read(hfs->catalog_attr, off, (char *) thread, 10, 0);
if (cnt != 10) {... | 0 | [
"CWE-190",
"CWE-284"
] | sleuthkit | 114cd3d0aac8bd1aeaf4b33840feb0163d342d5b | 329,829,046,004,413,900,000,000,000,000,000,000,000 | 55 | hfs: fix keylen check in hfs_cat_traverse()
If key->key_len is 65535, calculating "uint16_t keylen' would
cause an overflow:
uint16_t keylen;
...
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len)
so the code bypasses the sanity check "if (keylen > nodesize)"
which results in crash later:
./too... |
static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *address)
{
GSList *tmp;
GString *cmd;
char *params, *evt, *list, *star, **caps;
int i, caps_length, disable, avail_caps, multiline;
params = event_get_params(args, 4, NULL, &evt, &star, &list);
if (params == NULL)
return;
/* Multili... | 1 | [
"CWE-416"
] | irssi | 5a4e7ab659aba2855895c9f43e9a7a131f4e89b3 | 45,851,746,863,039,310,000,000,000,000,000,000,000 | 183 | fix use after free receiving caps
fixes GL#34 |
static int dccp_nlattr_size(void)
{
return nla_total_size(0) /* CTA_PROTOINFO_DCCP */
+ nla_policy_len(dccp_nla_policy, CTA_PROTOINFO_DCCP_MAX + 1);
} | 0 | [
"CWE-20"
] | linux | b22f5126a24b3b2f15448c3f2a254fc10cbc2b92 | 219,413,074,693,066,430,000,000,000,000,000,000,000 | 5 | netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages
Some occurences in the netfilter tree use skb_header_pointer() in
the following way ...
struct dccp_hdr _dh, *dh;
...
skb_header_pointer(skb, dataoff, sizeof(_dh), &dh);
... where dh itself is a pointer that is being passed as the copy
buffer. Ins... |
Tfloat _cubic_atXYZ_p(const float fx, const float fy, const float fz, const int c=0) const {
const float
nfx = cimg::type<float>::is_nan(fx)?0:cimg::mod(fx,_width - 0.5f),
nfy = cimg::type<float>::is_nan(fy)?0:cimg::mod(fy,_height - 0.5f),
nfz = cimg::type<float>::is_nan(fz)?0:cimg::mo... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 143,573,325,936,212,820,000,000,000,000,000,000,000 | 86 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, struct kvec *iov, int n_vec,
const int long_op)
{
int rc = -EACCES;
WRITE_REQ *pSMB = NULL;
int wct;
int smb_hdr_len;
int resp_buf_type = 0;
__u32 pid = io_parms->pid;
__u16 netfid = io_parms->netfid;
__u64 offset =... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 326,725,494,001,779,200,000,000,000,000,000,000,000 | 107 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
Double CTXLoad_GetVRMLTime(void *cbk)
{
u32 secs, msecs;
Double res;
gf_utc_time_since_1970(&secs, &msecs);
res = msecs;
res /= 1000;
res += secs;
return res;
} | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 145,060,081,576,447,320,000,000,000,000,000,000,000 | 10 | fixed #2061 |
GF_Err unkn_box_size(GF_Box *s)
{
GF_UnknownBox *ptr = (GF_UnknownBox *)s;
if (ptr->dataSize && ptr->data) {
ptr->size += ptr->dataSize;
}
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 4,072,676,387,898,972,000,000,000,000,000,000,000 | 9 | fixed #1587 |
static inline int __skb_grow(struct sk_buff *skb, unsigned int len)
{
unsigned int diff = len - skb->len;
if (skb_tailroom(skb) < diff) {
int ret = pskb_expand_head(skb, 0, diff - skb_tailroom(skb),
GFP_ATOMIC);
if (ret)
return ret;
}
__skb_set_length(skb, len);
return 0; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 238,400,847,134,230,700,000,000,000,000,000,000,000 | 13 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
bool CModule::DelNV(const CString& sName, bool bWriteToDisk) {
MCString::iterator it = m_mssRegistry.find(sName);
if (it != m_mssRegistry.end()) {
m_mssRegistry.erase(it);
} else {
return false;
}
if (bWriteToDisk) {
return SaveRegistry();
}
return true;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 192,777,678,288,708,660,000,000,000,000,000,000,000 | 15 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
*/
PHP_METHOD(DateTimeZone, __construct)
{
char *tz;
int tz_len;
php_timezone_obj *tzobj;
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) {
tzobj = zend_object_store_... | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 324,581,266,818,561,800,000,000,000,000,000,000,000 | 16 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
TEST(ExpressionTypeTest, WithStringValue) {
assertExpectedResults("$type", {{{Value("stringValue"_sd)}, Value("string"_sd)}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 157,574,158,822,164,810,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
MutateRequestRet callMutateRequestHeaders(RequestHeaderMap& headers, Protocol) {
MutateRequestRet ret;
ret.downstream_address_ = ConnectionManagerUtility::mutateRequestHeaders(
headers, connection_, config_, route_config_, local_info_)
->asSt... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 209,042,106,247,798,400,000,000,000,000,000,000,000 | 10 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static cmark_node *try_opening_table_block(cmark_syntax_extension *self,
int indented, cmark_parser *parser,
cmark_node *parent_container,
unsigned char *input, int len) {
cmark_node_type p... | 0 | [
"CWE-190"
] | cmark-gfm | b1687e6af1367c596ab75428b03af55666a66530 | 321,690,898,608,915,700,000,000,000,000,000,000,000 | 14 | prevent integer overflow in row_from_string
* added explicit check for UINT16_MAX boundary on row->n_columns
* added additional checks for row_from_string NULL returns to prevent NULL
dereferences on error cases
* added additional check to ensure n_columns between marker and header rows
always match prior to any ali... |
int postponeClientRead(client *c) {
if (server.io_threads_active &&
server.io_threads_do_reads &&
!clientsArePaused() &&
!ProcessingEventsWhileBlocked &&
!(c->flags & (CLIENT_MASTER|CLIENT_SLAVE|CLIENT_PENDING_READ)))
{
c->flags |= CLIENT_PENDING_READ;
listAddNode... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 280,156,915,094,726,920,000,000,000,000,000,000,000 | 14 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
lyp_munmap(void *addr, size_t length)
{
return munmap(addr, length);
} | 0 | [
"CWE-787"
] | libyang | f6d684ade99dd37b21babaa8a856f64faa1e2e0d | 171,996,811,004,339,460,000,000,000,000,000,000,000 | 4 | parser BUGFIX long identity name buffer overflow
STRING_OVERFLOW (CWE-120) |
nautilus_file_get_where_string (NautilusFile *file)
{
if (file == NULL) {
return NULL;
}
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
return EEL_CALL_METHOD_WITH_RETURN_VALUE
(NAUTILUS_FILE_CLASS, file,
get_where_string, (file));
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 189,056,459,645,644,760,000,000,000,000,000,000,000 | 12 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static gdImagePtr gdImageScaleBilinearPalette(gdImagePtr im, const unsigned int new_width, const unsigned int new_height)
{
long _width = MAX(1, new_width);
long _height = MAX(1, new_height);
float dx = (float)gdImageSX(im) / (float)_width;
float dy = (float)gdImageSY(im) / (float)_height;
gdFixed f_dx = gd_ftofx(... | 0 | [
"CWE-125",
"CWE-191"
] | libgd | 60bfb401ad5a4a8ae995dcd36372fe15c71e1a35 | 299,928,777,985,767,500,000,000,000,000,000,000,000 | 97 | Fix potential unsigned underflow
No need to decrease `u`, so we don't do it. While we're at it, we also factor
out the overflow check of the loop, what improves performance and readability.
This issue has been reported by Stefan Esser to security@libgd.org. |
TfLiteRegistration* Register_HASHTABLE_LOOKUP() {
static TfLiteRegistration r = {nullptr, nullptr, Prepare, Eval};
return &r;
} | 0 | [
"CWE-703",
"CWE-369"
] | tensorflow | 5117e0851348065ed59c991562c0ec80d9193db2 | 49,817,783,715,745,680,000,000,000,000,000,000,000 | 4 | Prevent a division by 0
PiperOrigin-RevId: 371007407
Change-Id: Iecf2718de48d6bf5a69b02a9df9deda8ec1b19d3 |
void zslFreeLexRange(zlexrangespec *spec) {
if (spec->min != shared.minstring &&
spec->min != shared.maxstring) sdsfree(spec->min);
if (spec->max != shared.minstring &&
spec->max != shared.maxstring) sdsfree(spec->max);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 13,684,920,860,056,224,000,000,000,000,000,000,000 | 6 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
void IDLParserErrorContext::throwBadArrayFieldNumberValue(StringData value) const {
std::string path = getElementPath(StringData());
uasserted(40422,
str::stream() << "BSON array field '" << path << "' has an invalid value '" << value
<< "' for an array field name.");
} | 0 | [
"CWE-20"
] | mongo | 722f06f3217c029ef9c50062c8cc775966fd7ead | 322,421,882,405,876,470,000,000,000,000,000,000,000 | 6 | SERVER-38275 ban find explain with UUID |
static int platform_drv_probe_fail(struct device *_dev)
{
return -ENXIO;
} | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 58,515,456,171,180,520,000,000,000,000,000,000,000 | 4 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
TEE_Result tee_mmu_check_access_rights(const struct user_ta_ctx *utc,
uint32_t flags, uaddr_t uaddr,
size_t len)
{
uaddr_t a;
size_t addr_incr = MIN(CORE_MMU_USER_CODE_SIZE,
CORE_MMU_USER_PARAM_SIZE);
if (ADD_OVERFLOW(uaddr, len, &a))
return TEE_ERROR_ACCESS_DENIED;
if ((flags & ... | 1 | [
"CWE-20",
"CWE-787"
] | optee_os | 95f36d661f2b75887772ea28baaad904bde96970 | 26,979,789,348,588,636,000,000,000,000,000,000,000 | 47 | core: tee_mmu_check_access_rights() check all pages
Prior to this patch tee_mmu_check_access_rights() checks an address in
each page of a supplied range. If both the start and length of that
range is unaligned the last page in the range is sometimes not checked.
With this patch the first address of each page in the ra... |
static struct sk_buff *__pfkey_xfrm_state2msg(const struct xfrm_state *x,
int add_keys, int hsc)
{
struct sk_buff *skb;
struct sadb_msg *hdr;
struct sadb_sa *sa;
struct sadb_lifetime *lifetime;
struct sadb_address *addr;
struct sadb_key *key;
struct sadb_x_sa2 *sa2;
struct sadb_x_sec_ctx *sec_ctx;
s... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 43,236,769,133,542,210,000,000,000,000,000,000,000 | 284 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
snprint_integer(char *buf, size_t buf_len,
const netsnmp_variable_list * var, const struct enum_list *enums,
const char *hint, const char *units)
{
size_t out_len = 0;
if (sprint_realloc_integer((u_char **) & buf, &buf_len, &out_len, 0,
var... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 89,730,227,691,956,510,000,000,000,000,000,000,000 | 11 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
long long Chapters::Atom::GetStopTime(const Chapters* pChapters) const {
return GetTime(pChapters, m_stop_timecode);
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 103,986,775,954,564,570,000,000,000,000,000,000,000 | 3 | 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 rtw_wx_set_rts(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct adapter *padapter = rtw_netdev_priv(dev);
if (wrqu->rts.disabled) {
padapter->registrypriv.rts_thresh = 2347;
} else {
if (wrqu->rts.value < 0 ||
wrqu->rts.value > 2347)
... | 0 | [
"CWE-787"
] | linux | 74b6b20df8cfe90ada777d621b54c32e69e27cd7 | 286,483,714,091,461,870,000,000,000,000,000,000,000 | 20 | staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.
Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@o... |
static int r_cmd_java_set_acc_flags (RCore *core, ut64 addr, ut16 num_acc_flag) {
char cmd_buf [50];
//const char * fmt = "wx %04x @ 0x%"PFMT64x;
int res = false;
//ut64 cur_offset = core->offset;
num_acc_flag = R_BIN_JAVA_USHORT (((ut8*) &num_acc_flag), 0);
res = r_core_write_at(core, addr, (const ut8 *)&num_ac... | 0 | [
"CWE-703",
"CWE-193"
] | radare2 | ced0223c7a1b3b5344af315715cd28fe7c0d9ebc | 311,687,041,407,508,230,000,000,000,000,000,000,000 | 22 | Fix unmatched array length in core_java.c (issue #16304) (#16313) |
void accountFlightTime(qids_t::const_iterator iter)
{
if(flightTimes.empty())
flightTimes.resize(2050);
struct timeval now;
gettimeofday(&now, 0);
unsigned int mdiff = 1000*DiffTime(iter->d_resentTime, now);
if(mdiff > flightTimes.size()-2)
mdiff= flightTimes.size()-1;
flightTimes[mdiff]++;
} | 0 | [
"CWE-787"
] | pdns | f9c57c98da1b1007a51680629b667d57d9b702b8 | 139,905,433,093,884,360,000,000,000,000,000,000,000 | 13 | dnsreplay: Bail out on a too small outgoing buffer |
kvaser_usb_leaf_rx_error_update_can_state(struct kvaser_usb_net_priv *priv,
const struct kvaser_usb_err_summary *es,
struct can_frame *cf)
{
struct kvaser_usb *dev = priv->dev;
struct net_device_stats *stats = &priv->netdev->stats;
enum can_state cur_state, new_state, tx_state, rx_state;
netdev_dbg(priv-... | 0 | [
"CWE-200",
"CWE-908"
] | linux | da2311a6385c3b499da2ed5d9be59ce331fa93e9 | 327,936,655,064,684,700,000,000,000,000,000,000,000 | 64 | can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
Uninitialized Kernel memory can leak to USB devices.
Fix this by using kzalloc() instead of kmalloc().
Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com>
Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_... |
static int show_modified(struct oneway_unpack_data *cbdata,
struct cache_entry *old,
struct cache_entry *new,
int report_missing,
int cached, int match_missing)
{
unsigned int mode, oldmode;
const unsigned char *sha1;
struct rev_info *revs = cbdata->revs;
if (get_stat_data(new, &sha1, &mode, cached... | 1 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 226,800,970,801,831,640,000,000,000,000,000,000,000 | 51 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static void arcmsr_pci_unmap_dma(struct CommandControlBlock *ccb)
{
struct scsi_cmnd *pcmd = ccb->pcmd;
scsi_dma_unmap(pcmd);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 29,941,559,992,481,320,000,000,000,000,000,000,000 | 6 | 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... |
static void x3(char* pattern, char* str, int from, int to, int mem)
{
xx(pattern, str, from, to, mem, 0);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 284,033,369,869,761,100,000,000,000,000,000,000,000 | 4 | onig-5.9.2 |
static inline int decode_mpm_idx(thread_context* tctx)
{
logtrace(LogSlice,"# mpm_idx (TU:2)\n");
int mpm = decode_CABAC_TU_bypass(&tctx->cabac_decoder, 2);
logtrace(LogSlice,"> mpm_idx = %d\n",mpm);
logtrace(LogSymbols,"$1 mpm_idx=%d\n",mpm);
return mpm;
} | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 298,384,226,759,907,100,000,000,000,000,000,000,000 | 8 | fix check for valid PPS idx (#298) |
void ax25_calculate_t1(ax25_cb *ax25)
{
int n, t = 2;
switch (ax25->backoff) {
case 0:
break;
case 1:
t += 2 * ax25->n2count;
break;
case 2:
for (n = 0; n < ax25->n2count; n++)
t *= 2;
if (t > 8) t = 8;
break;
}
ax25->t1 = t * ax25->rtt;
} | 0 | [
"CWE-476"
] | linux | fc6d01ff9ef03b66d4a3a23b46fc3c3d8cf92009 | 203,163,732,893,008,350,000,000,000,000,000,000,000 | 21 | ax25: Fix NULL pointer dereferences in ax25 timers
The previous commit 7ec02f5ac8a5 ("ax25: fix NPD bug in ax25_disconnect")
move ax25_disconnect into lock_sock() in order to prevent NPD bugs. But
there are race conditions that may lead to null pointer dereferences in
ax25_heartbeat_expiry(), ax25_t1timer_expiry(), ax... |
static void entropy_decode_stereo_3990(APEContext *ctx, int blockstodecode)
{
int32_t *decoded0 = ctx->decoded[0];
int32_t *decoded1 = ctx->decoded[1];
while (blockstodecode--) {
*decoded0++ = ape_decode_value_3990(ctx, &ctx->riceY);
*decoded1++ = ape_decode_value_3990(ctx, &ctx->riceX);
... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 287,469,805,945,568,760,000,000,000,000,000,000,000 | 10 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void sdma_rht_free(void *ptr, void *arg)
{
struct sdma_rht_node *rht_node = ptr;
int i;
for (i = 0; i < HFI1_MAX_VLS_SUPPORTED; i++)
kfree(rht_node->map[i]);
kfree(rht_node);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 34b3be18a04ecdc610aae4c48e5d1b799d8689f6 | 154,829,143,106,900,980,000,000,000,000,000,000,000 | 10 | RDMA/hfi1: Prevent memory leak in sdma_init
In sdma_init if rhashtable_init fails the allocated memory for
tmp_sdma_rht should be released.
Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable")
Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com
Signed-off-by: ... |
fs_reply_print(netdissect_options *ndo,
const u_char *bp, u_int length, uint32_t opcode)
{
uint32_t i;
const struct rx_header *rxh;
uint8_t type;
if (length <= sizeof(struct rx_header))
return;
rxh = (const struct rx_header *) bp;
/*
* Print out the afs call we're invoking. The table used h... | 0 | [] | tcpdump | 4154778a262b4a7449141535a99da4d13b4c8b2e | 199,970,884,500,630,760,000,000,000,000,000,000,000 | 76 | RX: Fix a data fetch
The serviceId field is 2 bytes long, therefore use EXTRACT_BE_U_2 to
fetch it. |
TEST_F(SQLiteUtilTests, test_enable) {
// Shadow is not in enable_tables.
ASSERT_TRUE(SQLiteDBManager::isDisabled("shadow"));
// Users is explicitely in enable_tables.
ASSERT_FALSE(SQLiteDBManager::isDisabled("users"));
// Fake_table is explicitely in enabled_tables and
// disable_tables, it should be disab... | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 157,845,023,557,116,400,000,000,000,000,000,000,000 | 9 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
static void call_read_memory(qpdf_data qpdf)
{
qpdf->qpdf->processMemoryFile(qpdf->filename, qpdf->buffer,
QIntC::to_size(qpdf->size), qpdf->password);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 12,710,608,605,525,230,000,000,000,000,000,000,000 | 5 | 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 ... |
static int proc_key_users_open(struct inode *inode, struct file *file)
{
return seq_open(file, &proc_key_users_ops);
} | 0 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 222,396,883,804,121,620,000,000,000,000,000,000,000 | 4 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
nautilus_file_set_display_name (NautilusFile *file,
const char *display_name,
const char *edit_name,
gboolean custom)
{
gboolean changed;
if (custom && display_name == NULL) {
/* We're re-setting a custom display name, invalidate it if
we already set it so that the old one is re-read */
if (file... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 145,106,814,111,508,350,000,000,000,000,000,000,000 | 61 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static int airo_set_retry(struct net_device *dev,
struct iw_request_info *info,
struct iw_param *vwrq,
char *extra)
{
struct airo_info *local = dev->ml_priv;
int rc = -EINVAL;
if(vwrq->disabled) {
return -EINVAL;
}
readConfigRid(local, 1);
if(vwrq->flags & IW_RETRY_LIMIT) {
__le16 v = cpu_to_l... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 329,089,154,681,871,640,000,000,000,000,000,000,000 | 33 | 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... |
i2l(UINT8 *out, const UINT8 *in_, int xsize) {
int x;
for (x = 0; x < xsize; x++, out++, in_ += 4) {
INT32 v;
memcpy(&v, in_, sizeof(v));
if (v <= 0) {
*out = 0;
} else if (v >= 255) {
*out = 255;
} else {
*out = (UINT8)v;
}
... | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 330,587,631,004,293,270,000,000,000,000,000,000,000 | 14 | Use snprintf instead of sprintf |
int nedpmalloc_trim(nedpool *p, size_t pad) THROWSPEC
{
int n, ret=0;
if(!p) { p=&syspool; if(!syspool.threads) InitPool(&syspool, 0, -1); }
for(n=0; p->m[n]; n++)
{
ret+=mspace_trim(p->m[n], pad);
}
return ret;
} | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 112,837,706,020,796,670,000,000,000,000,000,000,000 | 10 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *property = &opline->op2.u.constant;
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property)... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 229,252,969,900,345,260,000,000,000,000,000,000,000 | 30 | - 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 |
struct PopAccountData *pop_adata_get(struct Mailbox *m)
{
if (!m || (m->type != MUTT_POP))
return NULL;
struct Account *a = m->account;
if (!a)
return NULL;
return a->adata;
} | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 326,885,352,422,348,880,000,000,000,000,000,000,000 | 9 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
apr_hash_t* oidc_util_merge_key_sets_hash(apr_pool_t *pool, apr_hash_t *k1,
apr_hash_t *k2) {
if (k1 == NULL) {
if (k2 == NULL)
return apr_hash_make(pool);
return k2;
}
if (k2 == NULL)
return k1;
return apr_hash_overlay(pool, k1, k2);
} | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 338,872,324,883,808,530,000,000,000,000,000,000,000 | 11 | Add a function to escape Javascript characters |
close_conversation (GdmSessionConversation *conversation)
{
GdmSession *self = conversation->session;
if (conversation->worker_manager_interface != NULL) {
unexport_worker_manager_interface (self, conversation->worker_manager_interface);
g_clear_object (&conversation->wo... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 35,182,999,790,563,116,000,000,000,000,000,000,000 | 14 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
mono_double_ParseImpl (char *ptr, double *result)
{
gchar *endptr = NULL;
*result = 0.0;
MONO_ARCH_SAVE_REGS;
#ifdef __arm__
if (*ptr)
*result = strtod (ptr, &endptr);
#else
if (*ptr){
#ifdef _EGLIB_MAJOR
/* Need to lock here because EGLIB (#464316) has locking defined as no-ops, and that breaks mono_strtod ... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 339,861,691,924,929,000,000,000,000,000,000,000,000 | 28 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
static inline void evmcs_write32(unsigned long field, u32 value)
{
u16 clean_field;
int offset = get_evmcs_offset(field, &clean_field);
if (offset < 0)
return;
*(u32 *)((char *)current_evmcs + offset) = value;
current_evmcs->hv_clean_fields &= ~clean_field;
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 29,651,983,815,421,124,000,000,000,000,000,000,000 | 11 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
iperf_get_test_role(struct iperf_test *ipt)
{
return ipt->role;
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 256,215,083,532,427,600,000,000,000,000,000,000,000 | 4 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
TEST(CudnnRNNOpsTest, ForwardLstm_ShapeFn) {
int seq_length = 2;
int batch_size = 3;
int num_units = 4;
int num_layers = 5;
int dir_count = 1;
std::vector<int> input_shape = {seq_length, batch_size, num_units};
std::vector<int> input_h_shape = {num_layers * dir_count, batch_size,
... | 0 | [
"CWE-416",
"CWE-787"
] | tensorflow | af5fcebb37c8b5d71c237f4e59c6477015c78ce6 | 228,260,815,485,320,650,000,000,000,000,000,000,000 | 36 | Fix access to undefined memory during shape inference of Cudnn*.
PiperOrigin-RevId: 400324259
Change-Id: Ie3b7859d19ae24ee9ac2adf413bdc1e851bbc604 |
static TEE_Result get_prop_tee_dev_id(struct tee_ta_session *sess __unused,
void *buf, size_t *blen)
{
TEE_Result res;
TEE_UUID uuid;
const size_t nslen = 5;
uint8_t data[5 + FVR_DIE_ID_NUM_REGS * sizeof(uint32_t)] = {
'O', 'P', 'T', 'E', 'E' };
if (*blen < sizeof(uuid)) {
*blen = sizeof(uuid);
... | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | d5c5b0b77b2b589666024d219a8007b3f5b6faeb | 112,066,625,330,226,240,000,000,000,000,000,000,000 | 41 | core: svc: always check ta parameters
Always check TA parameters from a user TA. This prevents a user TA from
passing invalid pointers to a pseudo TA.
Fixes: OP-TEE-2018-0007: "Buffer checks missing when calling pseudo
TAs".
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Joakim Bech <joakim.bec... |
void BytecodeModuleGenerator::initializeStringTable(
StringLiteralTable stringTable) {
assert(stringTable_.empty() && "String table must be empty");
stringTable_ = std::move(stringTable);
} | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 132,368,163,345,019,600,000,000,000,000,000,000,000 | 5 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
QPDF::writeHGeneric(BitWriter& w, HGeneric& t)
{
w.writeBitsInt(t.first_object, 32); // 1
w.writeBitsInt(toI(t.first_object_offset), 32); // 2
w.writeBitsInt(t.nobjects, 32); // 3
w.writeBitsInt(t.group_length, 32); // 4
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 71,667,204,390,281,430,000,000,000,000,000,000,000 | 7 | 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 ... |
FilterChainFactory& filterFactory() override { return filter_factory_; } | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 95,630,006,397,418,400,000,000,000,000,000,000,000 | 1 | 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... |
PS_READ_FUNC(files)
{
long n;
struct stat sbuf;
PS_FILES_DATA;
ps_files_open(data, key TSRMLS_CC);
if (data->fd < 0) {
return FAILURE;
}
if (fstat(data->fd, &sbuf)) {
return FAILURE;
}
data->st_size = *vallen = sbuf.st_size;
if (sbuf.st_size == 0) {
*val = STR_EMPTY_ALLOC();
return SUCCESS;
}
*... | 1 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 308,094,729,246,823,630,000,000,000,000,000,000,000 | 43 | Strict session |
TEST(ArrayOpsTest, UnPack_ShapeFn) {
ShapeInferenceTestOp op("Unpack");
auto set_axis_and_num = [&op](int axis, int num) {
TF_ASSERT_OK(NodeDefBuilder("test", "Unpack")
.Input("a", 0, DT_FLOAT)
.Attr("axis", axis)
.Attr("num", num)
... | 0 | [
"CWE-125"
] | tensorflow | 7cf73a2274732c9d82af51c2bc2cf90d13cd7e6d | 109,251,117,364,235,100,000,000,000,000,000,000,000 | 38 | Address QuantizeAndDequantizeV* heap oob. Added additional checks for the 'axis' attribute.
PiperOrigin-RevId: 402446942
Change-Id: Id2f6b82e4e740d0550329be02621c46466b5a5b9 |
static void ovs_dp_reset_user_features(struct sk_buff *skb, struct genl_info *info)
{
struct datapath *dp;
dp = lookup_datapath(sock_net(skb->sk), info->userhdr, info->attrs);
if (IS_ERR(dp))
return;
WARN(dp->user_features, "Dropping previously announced user features\n");
dp->user_features = 0;
} | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 98,952,842,514,708,940,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... |
int reload_from_lease_file()
{
FILE * fd;
char * p;
unsigned short eport, iport;
char * proto;
char * iaddr;
char * desc;
char * rhost;
unsigned int leaseduration;
unsigned int timestamp;
time_t current_time;
#ifndef LEASEFILE_USE_REMAINING_TIME
time_t current_unix_time;
#endif
char line[128];
int r;
if(... | 0 | [
"CWE-476"
] | miniupnp | f321c2066b96d18afa5158dfa2d2873a2957ef38 | 112,083,044,286,193,880,000,000,000,000,000,000,000 | 109 | upnp_redirect(): accept NULL desc argument |
static int bond_upper_dev_walk(struct net_device *upper,
struct netdev_nested_priv *priv)
{
__be32 ip = *(__be32 *)priv->data;
return ip == bond_confirm_addr(upper, 0, ip);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 105cd17a866017b45f3c45901b394c711c97bf40 | 134,031,987,520,078,860,000,000,000,000,000,000,000 | 7 | bonding: fix null dereference in bond_ipsec_add_sa()
If bond doesn't have real device, bond->curr_active_slave is null.
But bond_ipsec_add_sa() dereferences bond->curr_active_slave without
null checking.
So, null-ptr-deref would occur.
Test commands:
ip link add bond0 type bond
ip link set bond0 up
ip x s... |
static void refresh_dns_entry(struct cache_entry *entry, char *name)
{
int age = 1;
if (!ipv4_resolve) {
ipv4_resolve = g_resolv_new(0);
g_resolv_set_address_family(ipv4_resolve, AF_INET);
g_resolv_add_nameserver(ipv4_resolve, "127.0.0.1", 53, 0);
}
if (!ipv6_resolve) {
ipv6_resolve = g_resolv_new(0);
g... | 0 | [
"CWE-119"
] | connman | 5c281d182ecdd0a424b64f7698f32467f8f67b71 | 27,323,060,305,814,154,000,000,000,000,000,000,000 | 34 | dnsproxy: Fix crash on malformed DNS response
If the response query string is malformed, we might access memory
pass the end of "name" variable in parse_response(). |
static int mpage_da_map_blocks(struct mpage_da_data *mpd)
{
int err = 0;
struct buffer_head new;
struct buffer_head *lbh = &mpd->lbh;
sector_t next;
/*
* We consider only non-mapped and non-allocated blocks
*/
if (buffer_mapped(lbh) && !buffer_delay(lbh))
return 0;
new.b_state = lbh->b_state;
new.b_bloc... | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 171,007,103,853,912,300,000,000,000,000,000,000,000 | 77 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
dp_packet_set_rss_hash(struct dp_packet *p, uint32_t hash)
{
#ifdef DPDK_NETDEV
p->mbuf.hash.rss = hash;
p->mbuf.ol_flags |= PKT_RX_RSS_HASH;
#else
p->rss_hash = hash;
p->rss_hash_valid = true;
#endif
} | 0 | [
"CWE-400"
] | ovs | 79cec1a736b91548ec882d840986a11affda1068 | 186,440,231,126,185,600,000,000,000,000,000,000,000 | 10 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
int LZ4IO_decompressFilename(char* input_filename, char* output_filename)
{
unsigned long long filesize = 0, decodedSize=0;
FILE* finput;
FILE* foutput;
clock_t start, end;
// Init
start = clock();
get_fileHandle(input_filename, output_filename, &finput, &foutput);
// Loop over multip... | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 47,005,163,014,248,020,000,000,000,000,000,000,000 | 35 | Fixed : issue 52 (reported by Ludwig Strigeus) |
omit_atype(const struct atype_info *a, void *val)
{
switch (a->type)
{
case atype_fn:
case atype_sequence:
case atype_nullterm_sequence_of:
case atype_nonempty_nullterm_sequence_of:
case atype_counted:
case atype_bool:
case atype_int:
case atype_uint:
case atype_int_immediate... | 0 | [
"CWE-674",
"CWE-787"
] | krb5 | 57415dda6cf04e73ffc3723be518eddfae599bfd | 89,662,677,760,048,890,000,000,000,000,000,000,000 | 36 | Add recursion limit for ASN.1 indefinite lengths
The libkrb5 ASN.1 decoder supports BER indefinite lengths. It
computes the tag length using recursion; the lack of a recursion limit
allows an attacker to overrun the stack and cause the process to
crash. Reported by Demi Obenour.
CVE-2020-28196:
In MIT krb5 release... |
StreamWriteResult StreamBase::Write(
uv_buf_t* bufs,
size_t count,
uv_stream_t* send_handle,
v8::Local<v8::Object> req_wrap_obj) {
Environment* env = stream_env();
int err;
size_t total_bytes = 0;
for (size_t i = 0; i < count; ++i)
total_bytes += bufs[i].len;
bytes_written_ += total_bytes... | 0 | [
"CWE-416"
] | node | 4f8772f9b731118628256189b73cd202149bbd97 | 26,935,502,127,912,800,000,000,000,000,000,000,000 | 54 | src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously
destroyed.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103
PR-URL: https://github.com/nodejs-private/... |
void Http2Session::HandleSettingsFrame(const nghttp2_frame* frame) {
bool ack = frame->hd.flags & NGHTTP2_FLAG_ACK;
if (!ack) {
js_fields_[kBitfield] &= ~(1 << kSessionRemoteSettingsIsUpToDate);
if (!(js_fields_[kBitfield] & (1 << kSessionHasRemoteSettingsListeners)))
return;
// This is not a SETT... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 148,013,472,153,049,500,000,000,000,000,000,000,000 | 34 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
void WebContents::RemoveWorkSpace(gin_helper::Arguments* args,
const base::FilePath& path) {
if (path.empty()) {
args->ThrowError("path cannot be empty");
return;
}
DevToolsRemoveFileSystem(path);
} | 0 | [
"CWE-284",
"CWE-693"
] | electron | 18613925610ba319da7f497b6deed85ad712c59b | 184,337,305,097,787,540,000,000,000,000,000,000,000 | 8 | refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL
* spec: add test for x-site _top navigation
* chore: old cod... |
NOEXPORT TICKET_KEY *key_read(char *arg, char *option) {
char *key_str;
unsigned char *key_buf;
long key_len;
TICKET_KEY *head=NULL;
key_str=str_dup_detached(arg);
key_buf=OPENSSL_hexstr2buf(key_str, &key_len);
if(key_buf)
if((key_len == 16) || (key_len == 32)) /* a valid 16 or 32 b... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 144,716,340,754,736,620,000,000,000,000,000,000,000 | 30 | stunnel-5.57 |
static const char *debug_varname(const GCproto *pt, BCPos pc, BCReg slot)
{
const uint8_t *p = proto_varinfo(pt);
if (p) {
BCPos lastpc = 0;
for (;;) {
const char *name = (const char *)p;
uint32_t vn = *p++;
BCPos startpc, endpc;
if (vn < VARNAME__MAX) {
if (vn == VARNAME_END) break... | 0 | [
"CWE-125"
] | LuaJIT | e296f56b825c688c3530a981dc6b495d972f3d01 | 252,934,676,878,006,400,000,000,000,000,000,000,000 | 30 | Call error function on rethrow after trace exit. |
xmlXPathIsNaN(double val) {
return(trio_isnan(val));
} | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 32,089,830,082,339,705,000,000,000,000,000,000,000 | 3 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
void starting_segment(Vertex_handle v, IT)
{ v->mark() = true; } | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 216,250,466,600,548,260,000,000,000,000,000,000,000 | 2 | Fix Nef_2 and Nef_S2 IO |
bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags,
uint dt_phases)
{
DML_prelocking_strategy prelocking_strategy;
uint counter;
MDL_savepoint mdl_savepoint= thd->mdl_context.mdl_savepoint();
DBUG_ENTER("open_normal_and_derived_tables");
if (open_t... | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 53,831,748,834,781,060,000,000,000,000,000,000,000 | 27 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
static void av1_load_previous(AV1State *state, u8 primary_ref_frame, s8 *ref_frame_idx)
{
s8 prevFrame = ref_frame_idx[primary_ref_frame];
if (prevFrame < 0) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CODING, ("[AV1] load_previous: prevFrame reference index %d is invalid\n", prevFrame));
}
else {
state->PrevGmParams = state... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 102,162,329,191,990,280,000,000,000,000,000,000,000 | 12 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
void expectOnDestroy() {
for (auto filter : decoder_filters_) {
EXPECT_CALL(*filter, onDestroy());
}
auto setup_filter_expect = [](MockStreamEncoderFilter* filter) {
EXPECT_CALL(*filter, onDestroy());
};
std::for_each(encoder_filters_.rbegin(), encoder_filters_.rend(), setup_filter_ex... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 111,005,540,781,613,300,000,000,000,000,000,000,000 | 12 | 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... |
void Parser::css_error(const std::string& msg, const std::string& prefix, const std::string& middle, const bool trim)
{
int max_len = 18;
const char* end = this->end;
while (*end != 0) ++ end;
const char* pos = peek < optional_spaces >();
if (!pos) pos = position;
const char* last_pos(pos);... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 247,961,805,533,365,540,000,000,000,000,000,000,000 | 69 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
__xfrm4_state_addr_check(const struct xfrm_state *x,
const xfrm_address_t *daddr, const xfrm_address_t *saddr)
{
if (daddr->a4 == x->id.daddr.a4 &&
(saddr->a4 == x->props.saddr.a4 || !saddr->a4 || !x->props.saddr.a4))
return 1;
return 0;
} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 235,867,819,881,631,020,000,000,000,000,000,000,000 | 8 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
void freeListData(char *** data, unsigned int length) {
int i;
for(i=0; i<length; i++) {
free((*data)[i]);
}
} | 0 | [
"CWE-415"
] | docker-credential-helpers | 87c80bfba583eadc087810d17aa631ef4e405efc | 219,568,865,775,212,100,000,000,000,000,000,000,000 | 6 | Fix a double free in the List functions
The code was set up so that it would free the individual items and the data
in `freeListData`, but there was already a Go `defer` to free the data item,
resulting in a double free.
Remove the `free` in `freeListData` and leave the original one.
In addition, move the `defer` fo... |
void address_space_dispatch_compact(AddressSpaceDispatch *d)
{
if (d->phys_map.skip) {
phys_page_compact(&d->phys_map, d->map.nodes);
}
} | 0 | [
"CWE-787"
] | qemu | 4bfb024bc76973d40a359476dc0291f46e435442 | 282,018,293,334,642,960,000,000,000,000,000,000,000 | 6 | memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:
/* MMIO registers can be expected to perform full-width accesses based onl... |
set_obsolete_termcaps(TERMTYPE2 *tp)
{
#include "capdefaults.c"
} | 0 | [
"CWE-125"
] | ncurses | b025434573f466efe27862656a6a9d41dd2bd609 | 242,033,756,665,427,330,000,000,000,000,000,000,000 | 4 | ncurses 6.1 - patch 20191012
+ amend recent changes to ncurses*-config and pc-files to filter out
Debian linker-flags (report by Sven Joachim, cf: 20150516).
+ clarify relationship between tic, infocmp and captoinfo in manpage.
+ check for invalid hashcode in _nc_find_type_entry and
_nc_find_name_entry.
> fix seve... |
static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
unsigned long size, pgprot_t vma_prot)
{
#ifdef pgprot_noncached
phys_addr_t offset = pfn << PAGE_SHIFT;
if (uncached_access(file, offset))
return pgprot_noncached(vma_prot);
#endif
return vma_prot;
} | 0 | [
"CWE-200",
"CWE-732"
] | linux | a4866aa812518ed1a37d8ea0c881dc946409de94 | 283,101,719,118,282,700,000,000,000,000,000,000,000 | 11 | mm: Tighten x86 /dev/mem with zeroing reads
Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is
disallowed. However, on x86, the first 1MB was always allowed for BIOS
and similar things, regardless of it actually being System RAM. It was
possible for heap to end up getting allocated in low 1MB RAM, and ... |
ModuleExport size_t RegisterWEBPImage(void)
{
char
version[MagickPathExtent];
MagickInfo
*entry;
*version='\0';
entry=AcquireMagickInfo("WEBP","WEBP","WebP Image Format");
#if defined(MAGICKCORE_WEBP_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadWEBPImage;
entry->encoder=(EncodeImageHandler ... | 1 | [
"CWE-400"
] | ImageMagick | cb63560ba25e4a6c51ab282538c24877fff7d471 | 189,040,680,274,081,000,000,000,000,000,000,000,000 | 26 | https://github.com/ImageMagick/ImageMagick/issues/641 |
bool ConnectionManagerImpl::ActiveStreamDecoderFilter::recreateStream() {
// Because the filter's and the HCM view of if the stream has a body and if
// the stream is complete may differ, re-check bytesReceived() to make sure
// there was no body from the HCM's point of view.
if (!complete() || parent_.stream_i... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 227,268,375,824,727,360,000,000,000,000,000,000,000 | 33 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int rtecp_select_file(sc_card_t *card,
const sc_path_t *in_path, sc_file_t **file_out)
{
sc_file_t **file_out_copy, *file;
int r;
assert(card && card->ctx && in_path);
switch (in_path->type)
{
case SC_PATH_TYPE_DF_NAME:
case SC_PATH_TYPE_FROM_CURRENT:
case SC_PATH_TYPE_PARENT:
SC_FUNC_RETURN(card->c... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 299,633,588,188,865,240,000,000,000,000,000,000,000 | 35 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static ASN1_INTEGER *next_serial(const char *serialfile)
{
int ret = 0;
BIO *in = NULL;
ASN1_INTEGER *serial = NULL;
BIGNUM *bn = NULL;
if (!(serial = ASN1_INTEGER_new())) goto err;
if (!(in = BIO_new_file(serialfile, "r")))
{
ERR_clear_error();
BIO_printf(bio_err, "Warning: could not open file %s for "... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 155,854,920,587,716,250,000,000,000,000,000,000,000 | 42 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
msPostGISRetrievePK(layerObj *layer)
{
PGresult *pgresult = NULL;
char *sql = 0;
size_t size;
msPostGISLayerInfo *layerinfo = 0;
int length;
int pgVersion;
char *pos_sep;
char *schema = NULL;
char *table = NULL;
if (layer->debug) {
msDebug("msPostGISRetrievePK called.\n");
}
layerinfo = (m... | 0 | [
"CWE-89"
] | mapserver | 3a10f6b829297dae63492a8c63385044bc6953ed | 138,184,724,727,792,820,000,000,000,000,000,000,000 | 142 | Fix potential SQL Injection with postgis TIME filters (#4834) |
help_command()
{
while (!(END_OF_COMMAND))
c_token++;
fputs("This gnuplot was not built with inline help\n", stderr);
} | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 256,456,929,749,057,520,000,000,000,000,000,000,000 | 6 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
CNF_GetMaxDistance(void)
{
return max_distance;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 335,346,234,759,873,970,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.