func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
size_t size;
xmlChar *newbuf;
if ((buf == NULL) || (buf->error != 0)) return(0);
CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len < buf->size - buf->use)
return(buf->size - buf->use);
if (len > SIZE_M... | 0 | [
"CWE-190"
] | libxml2 | 6c283d83eccd940bcde15634ac8c7f100e3caefd | 194,913,821,892,089,180,000,000,000,000,000,000,000 | 54 | [CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer
In several places, the code handling string buffers didn't check for
integer overflow or used wrong types for buffer sizes. This could
result in out-of-bounds writes or other memory errors when working on
large, multi-gigabyte buffers.
Thanks to Felix Wil... |
void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){
va_list ap;
if( p ){
va_start(ap, zFormat);
vdbeVComment(p, zFormat, ap);
va_end(ap);
}
} | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 3,973,401,077,059,429,000,000,000,000,000,000,000 | 8 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
xfs_bmap_longest_free_extent(
struct xfs_trans *tp,
xfs_agnumber_t ag,
xfs_extlen_t *blen,
int *notinit)
{
struct xfs_mount *mp = tp->t_mountp;
struct xfs_perag *pag;
xfs_extlen_t longest;
int error = 0;
pag = xfs_perag_get(mp, ag);
if (!pag->pagf_init) {
error = xfs_alloc_pagf_init(mp, tp, ag, XFS_... | 0 | [] | linux | 2c4306f719b083d17df2963bc761777576b8ad1b | 6,289,631,077,855,708,000,000,000,000,000,000,000 | 33 | xfs: set format back to extents if xfs_bmap_extents_to_btree
If xfs_bmap_extents_to_btree fails in a mode where we call
xfs_iroot_realloc(-1) to de-allocate the root, set the
format back to extents.
Otherwise we can assume we can dereference ifp->if_broot
based on the XFS_DINODE_FMT_BTREE format, and crash.
Bugzilla... |
void InstanceKlass::set_initialization_state_and_notify(ClassState state, TRAPS) {
Handle h_init_lock(THREAD, init_lock());
if (h_init_lock() != NULL) {
ObjectLocker ol(h_init_lock, THREAD);
set_init_thread(NULL); // reset _init_thread before changing _init_state
set_init_state(state);
fence_and_cle... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 49,080,377,855,898,960,000,000,000,000,000,000,000 | 14 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
int cil_resolve_pcidevicecon(struct cil_tree_node *current, void *extra_args)
{
struct cil_pcidevicecon *pcidevicecon = current->data;
struct cil_symtab_datum *context_datum = NULL;
int rc = SEPOL_ERR;
if (pcidevicecon->context_str != NULL) {
rc = cil_resolve_name(current, pcidevicecon->context_str, CIL_SYM_CONT... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 113,169,112,784,291,540,000,000,000,000,000,000,000 | 24 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static void m_stop(struct seq_file *seq, void *v)
{
return;
} | 0 | [
"CWE-20",
"CWE-862",
"CWE-863"
] | linux | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | 265,120,130,011,543,820,000,000,000,000,000,000,000 | 4 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extent... |
static u8 ath6kl_wmi_get_upper_threshold(s16 rssi,
struct sq_threshold_params *sq_thresh,
u32 size)
{
u32 index;
u8 threshold = (u8) sq_thresh->upper_threshold[size - 1];
/* The list is already in sorted order. Get the next lower value */
for (index = 0; index < size; index++) {
if (rssi < sq_thresh-... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 219,547,949,651,241,650,000,000,000,000,000,000,000 | 17 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table)
{
size_t length;
unsigned int tag, format, components;
char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
size_t by... | 0 | [
"CWE-125"
] | php-src | 330f1716df49c0d3474c18b6dcd370a9dcf57422 | 117,492,252,060,322,500,000,000,000,000,000,000,000 | 322 | Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF |
int bootstrap(MYSQL_FILE *file)
{
int bootstrap_error= 0;
DBUG_ENTER("handle_bootstrap");
THD *thd= new THD(next_thread_id());
#ifdef WITH_WSREP
thd->variables.wsrep_on= 0;
#endif
thd->bootstrap=1;
my_net_init(&thd->net,(st_vio*) 0, thd, MYF(0));
thd->max_client_packet_length= thd->net.max_packet;
thd-... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 23,734,335,520,917,360,000,000,000,000,000,000,000 | 128 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static Plane_3 convert(const CGAL::Plane_3<R>& p){return Converter()(p);} | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 164,565,006,578,858,500,000,000,000,000,000,000,000 | 1 | Fix Nef_3 |
static int selinux_socket_accept(struct socket *sock, struct socket *newsock)
{
int err;
struct inode_security_struct *isec;
struct inode_security_struct *newisec;
u16 sclass;
u32 sid;
err = sock_has_perm(current, sock->sk, SOCKET__ACCEPT);
if (err)
return err;
isec = inode_security_novalidate(SOCK_INODE(so... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 98,426,592,234,707,380,000,000,000,000,000,000,000 | 25 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
static void kvm_ioapic_eoi_inject_work(struct work_struct *work)
{
int i;
struct kvm_ioapic *ioapic = container_of(work, struct kvm_ioapic,
eoi_inject.work);
spin_lock(&ioapic->lock);
for (i = 0; i < IOAPIC_NUM_PINS; i++) {
union kvm_ioapic_redirect_entry *ent = &ioapic->redirtbl[i];
if (ent->fields.tri... | 0 | [
"CWE-703",
"CWE-125"
] | linux | 81cdb259fb6d8c1c4ecfeea389ff5a73c07f5755 | 147,528,190,565,725,040,000,000,000,000,000,000,000 | 17 | KVM: x86: fix out-of-bounds accesses of rtc_eoi map
KVM was using arrays of size KVM_MAX_VCPUS with vcpu_id, but ID can be
bigger that the maximal number of VCPUs, resulting in out-of-bounds
access.
Found by syzkaller:
BUG: KASAN: slab-out-of-bounds in __apic_accept_irq+0xb33/0xb50 at addr [...]
Write of size 1 ... |
inline Item **arguments() const { return args; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 137,773,736,701,059,360,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
CImg<T> get_channels(const int c0, const int c1) const {
return get_crop(0,0,0,c0,width() - 1,height() - 1,depth() - 1,c1);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 304,598,145,218,943,940,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
oparray_pop(i_ctx_t *i_ctx_p)
{
esp -= 4;
return o_pop_estack;
} | 0 | [] | ghostpdl | b575e1ec42cc86f6a58c603f2a88fcc2af699cc8 | 199,118,667,870,134,500,000,000,000,000,000,000,000 | 5 | Bug 699668: handle stack overflow during error handling
When handling a Postscript error, we push the object throwing the error onto
the operand stack for the error handling procedure to access - we were not
checking the available stack before doing so, thus causing a crash.
Basically, if we get a stack overflow when... |
rdp_send_synchronise(void)
{
STREAM s;
s = rdp_init_data(4);
out_uint16_le(s, 1); /* type */
out_uint16_le(s, 1002);
s_mark_end(s);
rdp_send_data(s, RDP_DATA_PDU_SYNCHRONISE);
} | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 66,279,773,056,111,430,000,000,000,000,000,000,000 | 12 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
dp_packet_set_rss_hash(struct dp_packet *p, uint32_t hash)
{
p->mbuf.hash.rss = hash;
p->mbuf.ol_flags |= PKT_RX_RSS_HASH;
} | 0 | [
"CWE-400"
] | ovs | 3512fb512c76a1f08eba4005aa2eb69160d0840e | 190,031,665,277,276,350,000,000,000,000,000,000,000 | 5 | 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... |
inline std::pair<size_t, size_t> line_info(const char *start, const char *cur) {
auto p = start;
auto col_ptr = p;
auto no = 1;
while (p < cur) {
if (*p == '\n') {
no++;
col_ptr = p + 1;
}
p++;
}
auto col = p - col_ptr + 1;
return std::make_pair(no, col);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 54,490,519,894,652,840,000,000,000,000,000,000,000 | 17 | Fix #122 |
static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
void *data, size_t size, u16 *result)
{
struct l2cap_conf_req *req = data;
void *ptr = req->data;
void *endptr = data + size;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
struct l2cap_... | 1 | [] | linux | 06e7e776ca4d36547e503279aeff996cbb292c16 | 127,157,406,205,946,140,000,000,000,000,000,000,000 | 109 | Bluetooth: Prevent stack info leak from the EFS element.
In the function l2cap_parse_conf_rsp and in the function
l2cap_parse_conf_req the following variable is declared without
initialization:
struct l2cap_conf_efs efs;
In addition, when parsing input configuration parameters in both of
these functions, the switch ... |
static double mp_fsize(_cimg_math_parser& mp) {
const double *ptrs = &_mp_arg(2) + 1;
const ulongT siz = (ulongT)mp.opcode[3];
CImg<charT> ss(siz + 1);
cimg_forX(ss,i) ss[i] = (char)ptrs[i];
ss.back() = 0;
return (double)cimg::fsize(ss); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 59,404,154,037,606,880,000,000,000,000,000,000,000 | 8 | . |
uint64_t ldq_le_phys(AddressSpace *as, hwaddr addr)
{
return address_space_ldq_le(as, addr, MEMTXATTRS_UNSPECIFIED, NULL);
} | 0 | [] | qemu | e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83 | 180,807,284,304,602,250,000,000,000,000,000,000,000 | 4 | exec: clamp accesses against the MemoryRegionSection
Because the clamping was done against the MemoryRegion,
address_space_rw was effectively broken if a write spanned
multiple sections that are not linear in underlying memory
(with the memory not being under an IOMMU).
This is visible with the MIPS rc4030 IOMMU, whi... |
void freeze_workqueues_begin(void)
{
struct workqueue_struct *wq;
struct pool_workqueue *pwq;
mutex_lock(&wq_pool_mutex);
WARN_ON_ONCE(workqueue_freezing);
workqueue_freezing = true;
list_for_each_entry(wq, &workqueues, list) {
mutex_lock(&wq->mutex);
for_each_pwq(pwq, wq)
pwq_adjust_max_active(pwq);
... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 5,655,077,368,069,755,000,000,000,000,000,000,000 | 19 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
void HttpIntegrationTest::verifyResponse(IntegrationStreamDecoderPtr response,
const std::string& response_code,
const Http::TestResponseHeaderMapImpl& expected_headers,
const std::string& expected... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 32,157,667,369,563,030,000,000,000,000,000,000,000 | 19 | 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... |
int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
char *data, EVP_PKEY *pkey)
{
EVP_MD_CTX ctx;
const EVP_MD *type;
unsigned char *p,*buf_in=NULL;
int ret= -1,i,inl;
EVP_MD_CTX_init(&ctx);
i=OBJ_obj2nid(a->algorithm);
type=EVP_get_digestbyname(OBJ_nid2sn(i));
if (type == NULL)
{... | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 152,001,516,222,071,800,000,000,000,000,000,000,000 | 63 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
void CLASS lossless_jpeg_load_raw()
{
int jwide, jrow, jcol, val, c, i, row=0, col=0;
#ifndef LIBRAW_LIBRARY_BUILD
int jidx,j;
#endif
struct jhead jh;
int min=INT_MAX;
ushort *rp;
#ifdef LIBRAW_LIBRARY_BUILD
int save_min = 0;
unsigned slicesW[16],slicesWcnt=0,slices;
unsigned *offset;
unsigned t_y=0,t... | 0 | [] | LibRaw | c4e374ea6c979a7d1d968f5082b7d0ea8cd27202 | 19,831,348,774,429,875,000,000,000,000,000,000,000 | 199 | additional data checks backported from 0.15.4 |
TfLiteStatus Subgraph::SetExecutionPlan(const std::vector<int>& new_plan) {
for (int node_index : new_plan) {
TF_LITE_ENSURE(&context_, node_index >= 0 &&
node_index < nodes_and_registration_.size());
}
execution_plan_ = new_plan;
return kTfLiteOk;
} | 0 | [
"CWE-20",
"CWE-787"
] | tensorflow | d58c96946b2880991d63d1dacacb32f0a4dfa453 | 312,468,320,314,619,400,000,000,000,000,000,000,000 | 8 | [tflite] Ensure inputs and outputs don't overlap.
If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen.
PiperOrigin-RevId: 332522916
Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a |
numa_realloc(struct virtio_net *dev, int index)
{
int oldnode, newnode;
struct virtio_net *old_dev;
struct vhost_virtqueue *old_vq, *vq;
struct zcopy_mbuf *new_zmbuf;
struct vring_used_elem *new_shadow_used_split;
struct vring_used_elem_packed *new_shadow_used_packed;
struct batch_copy_elem *new_batch_copy_elems... | 0 | [
"CWE-190"
] | dpdk | 3ae4beb079ce242240c34376a066bbccd0c0b23e | 256,742,812,887,144,770,000,000,000,000,000,000,000 | 112 | vhost: check log mmap offset and size overflow
vhost_user_set_log_base() is a message handler that is
called to handle the VHOST_USER_SET_LOG_BASE message.
Its payload contains a 64 bit size and offset. Both are
added up and used as a size when calling mmap().
There is no integer overflow check. If an integer overflo... |
GF_Err gf_isom_read_null_terminated_string(GF_Box *s, GF_BitStream *bs, u64 size, char **out_str)
{
u32 len=10;
u32 i=0;
*out_str = gf_malloc(sizeof(char)*len);
if (! *out_str) return GF_OUT_OF_MEM;
while (1) {
ISOM_DECREASE_SIZE(s, 1 );
(*out_str)[i] = gf_bs_read_u8(bs);
if (!(*out_str)[i]) break;
i++;... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 208,486,111,158,529,670,000,000,000,000,000,000,000 | 30 | fixed #1587 |
empty_folder_response_cb (ESoapResponse *response,
GSimpleAsyncResult *simple)
{
ESoapParameter *param;
ESoapParameter *subparam;
GError *error = NULL;
param = e_soap_response_get_first_parameter_by_name (
response, "ResponseMessages", &error);
/* Sanity check */
g_return_if_fail (
(param != NULL && er... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 297,441,242,225,121,750,000,000,000,000,000,000,000 | 31 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
psf_get_filelen_fd (int fd)
{
#if (SIZEOF_OFF_T == 4 && SIZEOF_SF_COUNT_T == 8 && HAVE_FSTAT64)
struct stat64 statbuf ;
if (fstat64 (fd, &statbuf) == -1)
return (sf_count_t) -1 ;
return statbuf.st_size ;
#else
struct stat statbuf ;
if (fstat (fd, &statbuf) == -1)
return (sf_count_t) -1 ;
return statbuf.st... | 0 | [
"CWE-369",
"CWE-189"
] | libsndfile | 725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6 | 235,352,449,839,899,760,000,000,000,000,000,000,000 | 18 | src/file_io.c : Prevent potential divide-by-zero.
Closes: https://github.com/erikd/libsndfile/issues/92 |
int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key)
{
*key = OPENSSL_CRYPTO_THREAD_LOCAL_KEY_MAX + 1;
return 1;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 206,614,228,150,538,030,000,000,000,000,000,000,000 | 5 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
parser_check_invalid_assign (parser_context_t *context_p) /**< context */
{
JERRY_ASSERT (context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL);
if (JERRY_UNLIKELY (context_p->status_flags & PARSER_IS_STRICT))
{
if (context_p->last_cbc.literal_keyword_type == LEXER_KEYW_EVAL)
{
parser_raise_erro... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 1,228,645,986,775,468,300,000,000,000,000,000,000 | 16 | 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 |
Item_func_sp::fix_fields(THD *thd, Item **ref)
{
bool res;
DBUG_ENTER("Item_func_sp::fix_fields");
DBUG_ASSERT(fixed == 0);
/*
Checking privileges to execute the function while creating view and
executing the function of select.
*/
if (!(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIE... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 229,534,366,283,017,240,000,000,000,000,000,000,000 | 76 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static Bool vp9_frame_sync_code(GF_BitStream *bs)
{
u8 val = gf_bs_read_int_log(bs, 8, "syncbyte1");
if (val != 0x49)
return GF_FALSE;
val = gf_bs_read_int_log(bs, 8, "syncbyte2");
if (val != 0x83)
return GF_FALSE;
val = gf_bs_read_int_log(bs, 8, "syncbyte3");
if (val != 0x42)
return GF_FALSE;
return GF... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 218,970,208,382,632,760,000,000,000,000,000,000,000 | 16 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
TfLiteStatus ExpandTensorDim(TfLiteContext* context, const TfLiteTensor& input,
int axis, TfLiteTensor* output) {
const TfLiteIntArray& input_dims = *input.dims;
if (axis < 0) {
axis = input_dims.size + 1 + axis;
}
TF_LITE_ENSURE(context, axis <= input_dims.size);
TF_LITE_ENSU... | 0 | [
"CWE-125"
] | tensorflow | d94ffe08a65400f898241c0374e9edc6fa8ed257 | 40,909,705,808,161,755,000,000,000,000,000,000,000 | 22 | Prevent an OOB read in `expand_dims.cc`
The for loop that follows this check assumes that `axis` is between `0` and `input_dims.size`. If user supplied `axis` is negative, the if code before this check is supposed to bring it back to positive (similar to how in Python one can do `l[-3]` to mean `l[-3 + len(l)]`).
Pip... |
void ndpi_search_netbios(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
struct ndpi_packet_struct *packet = &flow->packet;
u_int16_t dport;
NDPI_LOG_DBG(ndpi_struct, "search netbios\n");
if(packet->udp != NULL) {
dport = ntohs(packet->udp->dest);
/*check standa... | 0 | [
"CWE-787"
] | nDPI | 1ec621c85b9411cc611652fd57a892cfef478af3 | 189,954,256,099,061,150,000,000,000,000,000,000,000 | 295 | Added further checks |
static int fsmMkfile(rpmfi fi, struct filedata_s *fp, rpmfiles files,
rpmpsm psm, int nodigest,
struct filedata_s ** firstlink, FD_t *firstlinkfile)
{
int rc = 0;
FD_t fd = NULL;
if (*firstlink == NULL) {
/* First encounter, open file for writing */
rc = fsmOpen(&fd, fp->fpath);
/* If it's... | 0 | [] | rpm | 96ec957e281220f8e137a2d5eb23b83a6377d556 | 110,186,315,518,483,220,000,000,000,000,000,000,000 | 41 | Validate intermediate symlinks during installation, CVE-2021-35939
Whenever directory changes during unpacking, walk the entire tree from
starting from / and validate any symlinks crossed, fail the install
on invalid links.
This is the first of step of many towards securing our file operations
against local tamperers... |
int RGWHandler_REST_S3Website::retarget(RGWOp* op, RGWOp** new_op) {
*new_op = op;
ldpp_dout(s, 10) << __func__ << " Starting retarget" << dendl;
if (!(s->prot_flags & RGW_REST_WEBSITE))
return 0;
int ret = store->getRados()->get_bucket_info(store->svc(), s->bucket_tenant,
s->bucket_name, s->bucket_... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 283,320,800,122,162,200,000,000,000,000,000,000,000 | 59 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static void PUTVAL64H(pj_uint8_t *buf, unsigned pos, const pj_timestamp *ts)
{
PUTVAL32H(buf, pos, ts->u32.hi);
PUTVAL32H(buf, pos+4, ts->u32.lo);
} | 0 | [
"CWE-191"
] | pjproject | 15663e3f37091069b8c98a7fce680dc04bc8e865 | 106,278,033,744,337,350,000,000,000,000,000,000,000 | 5 | Merge pull request from GHSA-2qpg-f6wf-w984 |
char *ip4_addr_string_sa(char *buf, char *end, const struct sockaddr_in *sa,
struct printf_spec spec, const char *fmt)
{
bool have_p = false;
char *p, ip4_addr[sizeof("255.255.255.255") + sizeof(":12345")];
char *pend = ip4_addr + sizeof(ip4_addr);
const u8 *addr = (const u8 *) &sa->sin_addr.s_addr;
char fmt4[... | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 105,582,300,228,200,050,000,000,000,000,000,000,000 | 33 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
static inline void dmaengine_unmap_put(struct dmaengine_unmap_data *unmap)
{
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 138,906,533,081,123,860,000,000,000,000,000,000,000 | 3 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static inline const char *plural(int n)
{
return (n == 1 ? "" : "s");
} | 0 | [
"CWE-125"
] | linux | 1c0edc3633b56000e18d82fc241e3995ca18a69e | 168,688,291,945,842,540,000,000,000,000,000,000,000 | 4 | USB: core: fix out-of-bounds access bug in usb_get_bos_descriptor()
Andrey used the syzkaller fuzzer to find an out-of-bounds memory
access in usb_get_bos_descriptor(). The code wasn't checking that the
next usb_dev_cap_header structure could fit into the remaining buffer
space.
This patch fixes the error and also r... |
static noinline void wait_for_commit(struct btrfs_transaction *commit,
const enum btrfs_trans_state min_state)
{
wait_event(commit->commit_wait, commit->state >= min_state);
} | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 16,620,397,012,391,337,000,000,000,000,000,000,000 | 5 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
static int __init snd_mem_init(void)
{
#ifdef CONFIG_PROC_FS
snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);
if (snd_mem_proc) {
snd_mem_proc->read_proc = snd_mem_proc_read;
#ifdef CONFIG_PCI
snd_mem_proc->write_proc = snd_mem_proc_write;
#endif
}
#endif
return 0;
} | 1 | [] | linux-2.6 | ccec6e2c4a74adf76ed4e2478091a311b1806212 | 6,222,875,397,067,194,000,000,000,000,000,000,000 | 13 | Convert snd-page-alloc proc file to use seq_file
Use seq_file for the proc file read/write of snd-page-alloc module.
This automatically fixes bugs in the old proc code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
bool __skb_flow_dissect(const struct sk_buff *skb,
struct flow_dissector *flow_dissector,
void *target_container,
void *data, __be16 proto, int nhoff, int hlen,
unsigned int flags)
{
struct flow_dissector_key_control *key_control;
struct flow_dissector_key_basic *key_basic;
struct flow_dissector_key_addr... | 0 | [
"CWE-665"
] | linux | 34fad54c2537f7c99d07375e50cb30aa3c23bd83 | 214,887,560,767,741,500,000,000,000,000,000,000,000 | 454 | net: __skb_flow_dissect() must cap its return value
After Tom patch, thoff field could point past the end of the buffer,
this could fool some callers.
If an skb was provided, skb->len should be the upper limit.
If not, hlen is supposed to be the upper limit.
Fixes: a6e544b0a88b ("flow_dissector: Jump to exit code in... |
unexpectedEndOfTable ()
{
throw InputExc ("Error in Huffman-encoded data "
"(unexpected end of code table data).");
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 141,904,945,756,519,070,000,000,000,000,000,000,000 | 5 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
virtual inline void print(String *str, enum_query_type query_type)
{
str->append(full_name());
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 124,958,997,053,970,300,000,000,000,000,000,000,000 | 4 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
ptvcursor_set_subtree(ptvcursor_t *ptvc, proto_item *it, gint ett_subtree)
{
ptvc->tree = proto_item_add_subtree(it, ett_subtree);
return ptvc->tree;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 113,106,213,655,027,020,000,000,000,000,000,000,000 | 5 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static int should_defrag_range(struct inode *inode, u64 start, int thresh,
u64 *last_len, u64 *skip, u64 *defrag_end,
int compress)
{
struct extent_map *em;
int ret = 1;
bool next_mergeable = true;
/*
* make sure that once we start defragging an extent, we keep on
* defragging it
*/
if (... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 317,166,877,282,610,130,000,000,000,000,000,000,000 | 56 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
Ogg::XiphComment::XiphComment() : TagLib::Tag()
{
d = new XiphCommentPrivate;
} | 0 | [
"CWE-20"
] | taglib | ab8a0ee8937256311e649a88e8ddd7c7f870ad59 | 163,993,744,762,878,100,000,000,000,000,000,000,000 | 4 | Don't store the output of ByteVector::toUInt() in int, use uint instead |
const char *gf_filter_get_src_args(GF_Filter *filter)
{
return filter->orig_args ? filter->orig_args : filter->src_args;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 242,177,095,650,105,870,000,000,000,000,000,000,000 | 4 | fixed crashes for very long path - cf #1908 |
QUtil::getWhoami(char* argv0)
{
char* whoami = 0;
if (((whoami = strrchr(argv0, '/')) == NULL) &&
((whoami = strrchr(argv0, '\\')) == NULL))
{
whoami = argv0;
}
else
{
++whoami;
}
if ((strlen(whoami) > 4) &&
(strcmp(whoami + strlen(whoami) - 4, ".exe") == 0))
{
whoami[st... | 0 | [
"CWE-125"
] | qpdf | 6d46346eb93d5032c08cf1e39023b5d57260a766 | 87,709,910,219,709,510,000,000,000,000,000,000,000 | 21 | Detect integer overflow/underflow |
static void scsi_free_request(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
qemu_vfree(r->iov.iov_base);
} | 1 | [
"CWE-119",
"CWE-787"
] | qemu | 7285477ab11831b1cf56e45878a89170dd06d9b9 | 12,610,433,801,134,355,000,000,000,000,000,000,000 | 6 | scsi-disk: lazily allocate bounce buffer
It will not be needed for reads and writes if the HBA provides a sglist.
In addition, this lets scsi-disk refuse commands with an excessive
allocation length, as well as limit memory on usual well-behaved guests.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by... |
cssp_gss_get_service_name(char *server, gss_name_t * name)
{
gss_buffer_desc output;
OM_uint32 major_status, minor_status;
const char service_name[] = "TERMSRV";
gss_OID type = (gss_OID) GSS_C_NT_HOSTBASED_SERVICE;
int size = (strlen(service_name) + 1 + strlen(server) + 1);
output.value = malloc(size);
snprin... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 186,654,804,533,882,500,000,000,000,000,000,000,000 | 28 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
bool append_file_to_dir(THD *thd, const char **filename_ptr,
const char *table_name)
{
char buff[FN_REFLEN],*ptr, *end;
if (!*filename_ptr)
return 0; // nothing to do
/* Check that the filename is not too long and it's a hard path */
if (strlen(*filename_ptr)+strlen(table_name) ... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 296,959,026,406,838,000,000,000,000,000,000,000,000 | 23 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static inline struct keydata *get_keyptr(void)
{
struct keydata *keyptr = &ip_keydata[ip_cnt & 1];
smp_rmb();
return keyptr;
} | 1 | [
"CWE-703"
] | linux | 6e5714eaf77d79ae1c8b47e3e040ff5411b717ec | 50,124,374,963,374,100,000,000,000,000,000,000,000 | 8 | net: Compute protocol sequence numbers and fragment IDs using MD5.
Computers have become a lot faster since we compromised on the
partial MD4 hash which we use currently for performance reasons.
MD5 is a much safer choice, and is inline with both RFC1948 and
other ISS generators (OpenBSD, Solaris, etc.)
Furthermore,... |
markEmphases(const TranslationTableHeader *table, const InString *input,
formtype *typebuf, unsigned int *wordBuffer, EmphasisInfo *emphasisBuffer,
int haveEmphasis) {
/* Relies on the order of typeforms emph_1..emph_10. */
int caps_start = -1, last_caps = -1, caps_cnt = 0;
int emph_start[10] = { -1, -1, -1, -1,... | 0 | [
"CWE-125"
] | liblouis | 5e4089659bb49b3095fa541fa6387b4c40d7396e | 45,647,223,112,257,210,000,000,000,000,000,000,000 | 108 | Fix a buffer overflow
Fixes #635
Thanks to HongxuChen for reporting it |
path_access(const char *file,int mode)
{
char *envpath;
int ret=-1;
envpath=getenv("PATH");
if(!envpath
#ifdef HAVE_DRIVE_LETTERS
|| (((file[0]>='A' && file[0]<='Z')
|| (file[0]>='a' && file[0]<='z'))
&& file[1]==':')
#else
|| file[0]=='/'
#endif
)
return access(file,mode);
else
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 253,153,970,516,484,100,000,000,000,000,000,000,000 | 41 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
cl_error_t cli_codepage_to_utf8(char* in, size_t in_size, uint16_t codepage, char** out, size_t* out_size)
{
cl_error_t status = CL_BREAK;
char* out_utf8 = NULL;
size_t out_utf8_size = 0;
#if defined(HAVE_ICONV)
iconv_t conv = NULL;
#elif defined(WIN32)
LPWSTR lpWideCharStr = NULL;
int c... | 0 | [
"CWE-476"
] | clamav-devel | 8bb3716be9c7ab7c6a3a1889267b1072f48af87b | 250,546,996,161,660,950,000,000,000,000,000,000,000 | 265 | fuzz-22348 null deref in egg utf8 conversion
Corrected memory leaks and a null dereference in the egg utf8 conversion. |
side_get_n_unix_fds (ProxySide *side, int n_fds)
{
GList *res = NULL;
while (side->control_messages != NULL)
{
GSocketControlMessage *control_message = side->control_messages->data;
if (G_IS_UNIX_FD_MESSAGE (control_message))
{
GUnixFDMessage *fd_message = G_UNIX_FD_MESSAGE (cont... | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 63,020,083,898,474,470,000,000,000,000,000,000,000 | 35 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
blob_get_blob_flags (KEYBOXBLOB blob)
{
const unsigned char *buffer;
size_t length;
buffer = _keybox_get_blob_image (blob, &length);
if (length < 8)
return 0; /* oops */
return get16 (buffer + 6);
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 58,456,718,895,509,850,000,000,000,000,000,000,000 | 11 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
int search_list_item(struct sa_item *list, char *item_name)
{
while (list != NULL) {
if (!strcmp(list->item_name, item_name))
return 1; /* Item found in list */
list = list->next;
}
/* Item not found */
return 0;
} | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 73,518,740,363,170,240,000,000,000,000,000,000,000 | 11 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
int qemu_chr_fe_read_all(CharBackend *be, uint8_t *buf, int len)
{
CharDriverState *s = be->chr;
int offset = 0, counter = 10;
int res;
if (!s || !s->chr_sync_read) {
return 0;
}
if (s->replay && replay_mode == REPLAY_MODE_PLAY) {
return replay_char_read_all_load(buf);
}
... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 211,312,507,656,868,300,000,000,000,000,000,000,000 | 45 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
void __init efi_map_region_fixed(efi_memory_desc_t *md)
{
__map_region(md, md->phys_addr);
__map_region(md, md->virt_addr);
} | 0 | [
"CWE-388"
] | tip | 4e78921ba4dd0aca1cc89168f45039add4183f8e | 14,172,919,197,029,052,000,000,000,000,000,000,000 | 5 | efi/x86/Add missing error handling to old_memmap 1:1 mapping code
The old_memmap flow in efi_call_phys_prolog() performs numerous memory
allocations, and either does not check for failure at all, or it does
but fails to propagate it back to the caller, which may end up calling
into the firmware with an incomplete 1:1 ... |
int __weak alloc_bootmem_huge_page(struct hstate *h)
{
struct huge_bootmem_page *m;
int nr_nodes = nodes_weight(node_states[N_HIGH_MEMORY]);
while (nr_nodes) {
void *addr;
addr = __alloc_bootmem_node_nopanic(
NODE_DATA(hstate_next_node_to_alloc(h,
&node_states[N_HIGH_MEMORY])),
huge_page_size(h),... | 0 | [
"CWE-399"
] | linux | 90481622d75715bfcb68501280a917dbfe516029 | 143,800,129,688,165,710,000,000,000,000,000,000,000 | 33 | hugepages: fix use after free bug in "quota" handling
hugetlbfs_{get,put}_quota() are badly named. They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintai... |
static int ieee80211_get_tx_power(struct wiphy *wiphy,
struct wireless_dev *wdev,
int *dbm)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
if (local->ops->get_txpower)
return drv_get_txpower(local, sdata, dbm);
if (!local->u... | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 113,489,491,302,162,720,000,000,000,000,000,000,000 | 17 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
static size_t consume_u32 (ut8 *buf, ut8 *max, ut32 *out, ut32 *offset) {
size_t n;
if (!buf || !max || !out) {
return 0;
}
if (!(n = read_u32_leb128 (buf, max, out)) || n > 5) {
return 0;
}
if (offset) {
*offset += n;
}
return n;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | d2632f6483a3ceb5d8e0a5fb11142c51c43978b4 | 319,666,203,360,958,930,000,000,000,000,000,000,000 | 13 | Fix crash in fuzzed wasm r2_hoobr_consume_init_expr |
CompileKeycodes(XkbFile *file, struct xkb_keymap *keymap,
enum merge_mode merge)
{
KeyNamesInfo info;
InitKeyNamesInfo(&info, keymap->ctx);
HandleKeycodesFile(&info, file, merge);
if (info.errorCount != 0)
goto err_info;
if (!CopyKeyNamesInfoToKeymap(keymap, &info))
... | 0 | [
"CWE-476"
] | libxkbcommon | badb428e63387140720f22486b3acbd3d738859f | 129,754,113,872,415,570,000,000,000,000,000,000,000 | 21 | keycodes: don't try to copy zero key aliases
Move the aliases copy to within the (num_key_aliases > 0) block.
Passing info->aliases into this fuction with invalid aliases will
cause log messages but num_key_aliases stays on 0. The key_aliases array
is never allocated and remains NULL. We then loop through the aliases... |
void lftp_ssl_base::set_error(const char *s1,const char *s2)
{
if(s2)
error.vset(s1,": ",s2,NULL);
else
error.set(s1);
} | 0 | [
"CWE-310"
] | lftp | 6357bed2583171b7515af6bb6585cf56d2117e3f | 139,220,801,314,013,120,000,000,000,000,000,000,000 | 7 | use hostmatch function from latest curl (addresses CVE-2014-0139) |
QPDF::EncryptionData::getR() const
{
return this->R;
} | 0 | [
"CWE-125"
] | qpdf | dea704f0ab7f625e1e7b3f9a1110b45b63157317 | 10,155,850,136,243,642,000,000,000,000,000,000,000 | 4 | Pad keys to avoid memory errors (fixes #147) |
explicit FusedBatchNormOpBase(OpKernelConstruction* context,
bool is_batch_norm_ex = false)
: OpKernel(context) {
float epsilon;
OP_REQUIRES_OK(context, context->GetAttr("epsilon", &epsilon));
epsilon_ = U(epsilon);
float exponential_avg_factor;
OP_REQUIRES_OK... | 0 | [
"CWE-476",
"CWE-703"
] | tensorflow | 6972f9dfe325636b3db4e0bc517ee22a159365c0 | 22,898,161,155,585,280,000,000,000,000,000,000,000 | 54 | Add missing valuidation to FusedBatchNorm.
PiperOrigin-RevId: 372460336
Change-Id: Ic8c4e4de67c58a741bd87f2e182bed07247d1126 |
void Smb4KGlobal::setDefaultSettings()
{
p->setDefaultSettings();
} | 0 | [
"CWE-20"
] | smb4k | 71554140bdaede27b95dbe4c9b5a028a83c83cce | 187,175,284,945,693,430,000,000,000,000,000,000,000 | 4 | Find the mount/umount commands in the helper
Instead of trusting what we get passed in
CVE-2017-8849 |
GF_Err traf_box_write(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_write_header(s, bs);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 239,425,605,116,820,930,000,000,000,000,000,000,000 | 4 | fixed #1587 |
GF_Box *adkm_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_AdobeDRMKeyManagementSystemBox, GF_ISOM_BOX_TYPE_ADKM);
tmp->version = 1;
tmp->flags = 0;
return (GF_Box *)tmp;
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 60,455,026,535,104,045,000,000,000,000,000,000,000 | 7 | fixed #1879 |
static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */
{
zval *id;
xmlDoc *docp;
dom_object *intern;
char *source = NULL, *valid_file = NULL;
int source_len = 0, valid_opts = 0;
long flags = 0;
xmlSchemaParserCtxtPtr parser;
xmlSchemaPtr sptr;
xmlSchemaValidCtxt... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 194,979,921,128,899,860,000,000,000,000,000,000,000 | 81 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
sign_apex(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
isc_stdtime_t now, dns_diff_t *diff, dns__zonediff_t *zonediff)
{
isc_result_t result;
isc_stdtime_t inception, soaexpire, keyexpire;
bool check_ksk, keyset_kskonly;
dst_key_t *zone_keys[DNS_MAXZONEKEYS];
unsigned int nkeys = 0, i;
dns_difftuple_t... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 156,708,289,099,602,140,000,000,000,000,000,000,000 | 86 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static void xhci_runtime_write(void *ptr, hwaddr reg,
uint64_t val, unsigned size)
{
XHCIState *xhci = ptr;
int v = (reg - 0x20) / 0x20;
XHCIInterrupter *intr = &xhci->intr[v];
trace_usb_xhci_runtime_write(reg, val);
if (reg < 0x20) {
trace_usb_xhci_unimplemen... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 107,999,401,933,769,800,000,000,000,000,000,000,000 | 54 | 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... |
void add_to_common_flags2(uint32 v)
{
common_flags2 |= v;
} | 0 | [] | samba | 25452a2268ac7013da28125f3df22085139af12d | 165,489,003,866,034,520,000,000,000,000,000,000,000 | 4 | s3: Fix a NULL pointer dereference
Found by Laurent Gaffie <laurent.gaffie@gmail.com>.
Thanks!
Volker |
ipmi_channel_main(struct ipmi_intf *intf, int argc, char **argv)
{
int retval = 0;
uint8_t channel;
uint8_t priv = 0;
if (argc < 1) {
lprintf(LOG_ERR, "Not enough parameters given.");
printf_channel_usage();
return (-1);
} else if (strncmp(argv[0], "help", 4) == 0) {
printf_channel_usage();
return 0;
} ... | 0 | [
"CWE-120"
] | ipmitool | 9452be87181a6e83cfcc768b3ed8321763db50e4 | 135,011,557,718,641,180,000,000,000,000,000,000,000 | 75 | channel: Fix buffer overflow
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `ipmi_get_channel_cipher_suites` function does not properly check
the final response’s `data_len`, which can lead to stack buffer overflow
on the final copy. |
jbig2_image_release(Jbig2Ctx *ctx, Jbig2Image *image)
{
if (image == NULL)
return;
image->refcount--;
if (image->refcount == 0)
jbig2_image_free(ctx, image);
} | 0 | [
"CWE-787"
] | jbig2dec | 0726320a4b55078e9d8deb590e477d598b3da66e | 222,525,071,744,969,300,000,000,000,000,000,000,000 | 8 | Fix OSS-Fuzz issue 20332: buffer overflow in jbig2_image_compose.
With extreme values of x/y/w/h we can get overflow. Test for this
and exit safely.
Thanks for OSS-Fuzz for reporting. |
void NumberFormatTest::TestAdoptDecimalFormatSymbols(void) {
UErrorCode ec = U_ZERO_ERROR;
DecimalFormatSymbols *sym = new DecimalFormatSymbols(Locale::getUS(), ec);
if (U_FAILURE(ec)) {
errcheckln(ec, "Fail: DecimalFormatSymbols constructor - %s", u_errorName(ec));
delete sym;
retur... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 325,473,679,054,596,300,000,000,000,000,000,000,000 | 69 | ICU-20246 Fixing another integer overflow in number parsing. |
int ssl3_connect(SSL *s)
{
BUF_MEM *buf = NULL;
unsigned long Time = (unsigned long)time(NULL);
void (*cb) (const SSL *ssl, int type, int val) = NULL;
int ret = -1;
int new_state, state, skip = 0;
RAND_add(&Time, sizeof(Time), 0);
ERR_clear_error();
clear_sys_error();
if (s->info_c... | 0 | [] | openssl | 1392c238657ec745af6a40def03d67d4ce02a082 | 163,785,904,647,746,450,000,000,000,000,000,000,000 | 425 | Fix PSK handling.
The PSK identity hint should be stored in the SSL_SESSION structure
and not in the parent context (which will overwrite values used
by other SSL structures with the same SSL_CTX).
Use BUF_strndup when copying identity as it may not be null terminated.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cher... |
PNET_BUFFER_LIST CNBL::DetachInternalObject()
{
// do it for both LsoV1 and LsoV2
if (IsLSO())
{
m_LsoInfo.LsoV1TransmitComplete.TcpPayload = m_TransferSize;
}
//Flush changes made in LSO structures
NET_BUFFER_LIST_INFO(m_NBL, TcpLargeSendNetBufferListInfo) = m_LsoInfo.Value;
auto... | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 207,366,932,577,361,620,000,000,000,000,000,000,000 | 16 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
static int dw3101_frontend_attach(struct dvb_usb_adapter *d)
{
d->fe_adap[0].fe = dvb_attach(tda10023_attach, &dw3101_tda10023_config,
&d->dev->i2c_adap, 0x48);
if (d->fe_adap[0].fe != NULL) {
info("Attached tda10023!");
return 0;
}
return -EIO;
} | 0 | [
"CWE-476",
"CWE-119"
] | linux | 606142af57dad981b78707234cfbd15f9f7b7125 | 168,181,805,525,667,210,000,000,000,000,000,000,000 | 10 | [media] dw2102: don't do DMA on stack
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at
the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach().
Both were due to the use of buffers on the stack as parameters to
dvb_usb_generic_rw() and the resulting attempt to do DMA with... |
static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
{
nlmsg_trim(skb, start);
} | 0 | [] | linux-2.6 | 1045b03e07d85f3545118510a587035536030c1c | 138,081,499,893,419,760,000,000,000,000,000,000,000 | 4 | netlink: fix overrun in attribute iteration
kmemcheck reported this:
kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
0500110001508abf050010000500000002017300140000006f72672e66726565
i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
^
Pid: 3... |
static void l2cap_do_start(struct l2cap_chan *chan)
{
struct l2cap_conn *conn = chan->conn;
if (conn->hcon->type == LE_LINK) {
l2cap_le_start(chan);
return;
}
if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)) {
l2cap_request_info(conn);
return;
}
if (!(conn->info_state & L2CAP_INFO_FEAT_MASK_REQ... | 0 | [
"CWE-327"
] | linux | 693cd8ce3f882524a5d06f7800dd8492411877b3 | 213,293,985,920,983,430,000,000,000,000,000,000,000 | 26 | Bluetooth: Fix regression with minimum encryption key size alignment
When trying to align the minimum encryption key size requirement for
Bluetooth connections, it turns out doing this in a central location in
the HCI connection handling code is not possible.
Original Bluetooth version up to 2.0 used a security model... |
dissect_tcpopt_default_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int proto, int ett)
{
proto_item *item;
proto_tree *exp_tree;
proto_item *length_item;
int offset = 0;
item = proto_tree_add_item(tree, proto, tvb, offset, -1, ENC_NA);
exp_tree = proto_item_add_subtree(item, ett... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 238,363,883,239,916,050,000,000,000,000,000,000,000 | 18 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
static int selinux_msg_msg_alloc_security(struct msg_msg *msg)
{
struct msg_security_struct *msec;
msec = selinux_msg_msg(msg);
msec->sid = SECINITSID_UNLABELED;
return 0;
} | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 90,408,378,805,497,110,000,000,000,000,000,000,000 | 9 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
size_t flash_strlen(const char *str) {
size_t len = 0;
uint32_t *s = (uint32_t *)str;
while (1) {
uint32_t w = *s++;
if ((w & 0xff) == 0) break;
len++; w >>= 8;
if ((w & 0xff) == 0) break;
len++; w >>= 8;
if ((w & 0xff) == 0) break;
len++; w >>= 8;
if ((w & 0xff) == 0) break;
... | 0 | [
"CWE-119",
"CWE-787"
] | Espruino | 0a7619875bf79877907205f6bee08465b89ff10b | 27,594,149,062,004,510,000,000,000,000,000,000,000 | 17 | Fix strncat/cpy bounding issues (fix #1425) |
//! Access pixel value with Dirichlet boundary conditions for the 3 coordinates (\c pos, \c x,\c y,\c z) \const.
T atNXYZ(const int pos, const int x, const int y, const int z, const int c, const T& out_value) const {
return (pos<0 || pos>=width())?out_value:_data[pos].atXYZ(x,y,z,c,out_value); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 97,508,502,787,419,160,000,000,000,000,000,000,000 | 3 | . |
missing_segments(packet_info *pinfo, struct tcp_multisegment_pdu *msp, guint32 seq)
{
fragment_head *fd_head;
guint32 frag_offset = seq - msp->seq;
if ((gint32)frag_offset <= 0) {
return FALSE;
}
fd_head = fragment_get(&tcp_reassembly_table, pinfo, msp->first_frame, NULL);
/* msp impli... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 22,555,575,018,441,180,000,000,000,000,000,000,000 | 23 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
void sctp_assoc_update(struct sctp_association *asoc,
struct sctp_association *new)
{
struct sctp_transport *trans;
struct list_head *pos, *temp;
/* Copy in new parameters of peer. */
asoc->c = new->c;
asoc->peer.rwnd = new->peer.rwnd;
asoc->peer.sack_needed = new->peer.sack_needed;
asoc->peer.i = new-... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 117,487,111,801,746,400,000,000,000,000,000,000,000 | 95 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev)
{
struct cfg80211_cached_keys *ck = NULL;
const u8 *prev_bssid = NULL;
int err, i;
ASSERT_RTNL();
ASSERT_WDEV_LOCK(wdev);
if (!netif_running(wdev->netdev))
return 0;
wdev->wext.connect.ie = wdev->wext.... | 0 | [
"CWE-120"
] | linux | 4ac2813cc867ae563a1ba5a9414bfb554e5796fa | 163,950,179,685,628,900,000,000,000,000,000,000,000 | 46 | cfg80211: wext: avoid copying malformed SSIDs
Ensure the SSID element is bounds-checked prior to invoking memcpy()
with its length field, when copying to userspace.
Cc: <stable@vger.kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Reported-by: Nicolas Waisman <nico@semmle.com>
Signed-off-by: Will Deacon <will@kernel... |
TEST_P(Http2CodecImplTest, ResponseDataFloodMitigationDisabled) {
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.http2_protocol_options.max_outbound_frames", "2147483647"}});
initialize();
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_he... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 39,568,114,071,169,526,000,000,000,000,000,000,000 | 28 | 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... |
napi_value GetNewTarget() override {
if (_cbinfo.IsConstructCall()) {
return v8impl::JsValueFromV8LocalValue(_cbinfo.NewTarget());
} else {
return nullptr;
}
} | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 183,178,591,297,287,370,000,000,000,000,000,000,000 | 7 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
TIFFWriteDirectory(TIFF* tif)
{
return TIFFWriteDirectorySec(tif,TRUE,TRUE,NULL);
} | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 151,425,655,473,843,220,000,000,000,000,000,000,000 | 4 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
Word recordMetricHandler(void* raw_context, Word metric_id, uint64_t value) {
auto context = WASM_CONTEXT(raw_context);
return wasmResultToWord(context->recordMetric(metric_id.u64_, value));
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 327,553,741,596,782,500,000,000,000,000,000,000,000 | 4 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
EXPORTED void mailbox_index_dirty(struct mailbox *mailbox)
{
assert(mailbox_index_islocked(mailbox, 1));
mailbox->i.dirty = 1;
} | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 41,112,107,448,703,713,000,000,000,000,000,000,000 | 5 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
TEST_F(QueryPlannerTest, NoSplitLimitedSortAsCommand) {
params.options = QueryPlannerParams::NO_TABLE_SCAN;
params.options |= QueryPlannerParams::SPLIT_LIMITED_SORT;
addIndex(BSON("a" << 1));
addIndex(BSON("b" << 1));
runQueryAsCommand(fromjson("{find: 'testns', filter: {a: 1}, sort: {b: 1}, limit:... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 208,303,354,247,039,400,000,000,000,000,000,000,000 | 16 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static void vmx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
int r;
r = vmx_deliver_nested_posted_interrupt(vcpu, vector);
if (!r)
return;
if (pi_test_and_set_pir(vector, &vmx->pi_desc))
return;
/* If a previous notification has sent the IPI, nothing to... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 230,111,148,224,570,770,000,000,000,000,000,000,000 | 19 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.