func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static u32 gf_media_nalu_locate_start_code_bs(GF_BitStream *bs, Bool locate_trailing)
{
u32 v, bpos, nb_cons_zeros=0;
char avc_cache[AVC_CACHE_SIZE];
u64 end, cache_start, load_size;
u64 start = gf_bs_get_position(bs);
if (start<3) return 0;
load_size = 0;
bpos = 0;
cache_start = 0;
end = 0;
v = 0xffffffff;
... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 31,426,293,019,035,845,000,000,000,000,000,000,000 | 42 | fix some exploitable overflows (#994, #997) |
static krb5_error_code hdb_samba4_fetch_fast_cookie(krb5_context context,
struct samba_kdc_db_context *kdc_db_ctx,
hdb_entry *entry)
{
krb5_error_code ret = SDB_ERR_NOENTRY;
TALLOC_CTX *mem_ctx;
struct ldb_result *res;
int ldb_ret;
struct sdb_entry sentry = {};
const char *attrs[] = {
"secre... | 0 | [
"CWE-288"
] | samba | 484c6980befb86f7d81d708829ed4ceb819538eb | 47,872,100,511,322,250,000,000,000,000,000,000,000 | 84 | CVE-2022-32744 s4:kdc: Modify HDB plugin to only look up kpasswd principal
This plugin is now only used by the kpasswd service. Thus, ensuring we
only look up the kadmin/changepw principal means we can't be fooled into
accepting tickets for other service principals. We make sure not to
specify a specific kvno, to ensu... |
int ldb_build_extended_req(struct ldb_request **ret_req,
struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
const char *oid,
void *data,
struct ldb_control **controls,
void *context,
ldb_request_callback_t callback,
struct ldb_request *parent)
{
struct ldb_request *req;
*re... | 0 | [
"CWE-476"
] | samba | d8b9bb274b7e7a390cf3bda9cd732cb2227bdbde | 271,822,538,725,919,800,000,000,000,000,000,000,000 | 27 | CVE-2020-10730: lib ldb: Check if ldb_lock_backend_callback called twice
Prevent use after free issues if ldb_lock_backend_callback is called
twice, usually due to ldb_module_done being called twice. This can happen if a
module ignores the return value from function a function that calls
ldb_module_done as part of it'... |
sftp_packet sftp_packet_read(sftp_session sftp) {
unsigned char buffer[4096];
sftp_packet packet = NULL;
uint32_t size;
int r;
sftp_enter_function();
packet = malloc(sizeof(struct sftp_packet_struct));
if (packet == NULL) {
ssh_set_error_oom(sftp->session);
return NULL;
}
packet->sftp = sftp... | 0 | [] | libssh | 4d8420f3282ed07fc99fc5e930c17df27ef1e9b2 | 291,846,182,134,861,900,000,000,000,000,000,000,000 | 73 | sftp: Fix bug in sftp_mkdir not returning on error.
resolves: #84
(cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44) |
pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
{
PrintfTarget target;
if (str == NULL || count == 0)
return 0;
target.bufstart = target.bufptr = str;
target.bufend = str + count - 1;
target.stream = NULL;
/* target.nchars is unused in this case */
if (dopr(&target, fmt, args))
{
*(tar... | 0 | [
"CWE-787"
] | postgres | 29725b3db67ad3f09da1a7fb6690737d2f8d6c0a | 72,105,149,517,473,850,000,000,000,000,000,000,000 | 19 | port/snprintf(): fix overflow and do padding
Prevent port/snprintf() from overflowing its local fixed-size
buffer and pad to the desired number of digits with zeros, even
if the precision is beyond the ability of the native sprintf().
port/snprintf() is only used on systems that lack a native
snprintf().
Reported by... |
static int __init kvmgt_init(void)
{
return 0;
} | 0 | [
"CWE-20"
] | linux | 51b00d8509dc69c98740da2ad07308b630d3eb7d | 123,382,865,433,361,080,000,000,000,000,000,000,000 | 4 | drm/i915/gvt: Fix mmap range check
This is to fix missed mmap range check on vGPU bar2 region
and only allow to map vGPU allocated GMADDR range, which means
user space should support sparse mmap to get proper offset for
mmap vGPU aperture. And this takes care of actual pgoff in mmap
request as original code always doe... |
EC_GROUP *EC_GROUP_dup(const EC_GROUP *a)
{
EC_GROUP *t = NULL;
int ok = 0;
if (a == NULL)
return NULL;
if ((t = EC_GROUP_new(a->meth)) == NULL)
return NULL;
if (!EC_GROUP_copy(t, a))
goto err;
ok = 1;
err:
if (!ok) {
EC_GROUP_free(t);
return NULL... | 0 | [] | openssl | 30c22fa8b1d840036b8e203585738df62a03cec8 | 250,103,536,016,142,460,000,000,000,000,000,000,000 | 22 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
Bool sg_encryption_compare_entry(void *udta, void *_entry)
{
GF_CENCSampleEncryptionGroupEntry *entry = (GF_CENCSampleEncryptionGroupEntry *)_entry;
GF_CENCSampleEncryptionGroupEntry *with_entry = (GF_CENCSampleEncryptionGroupEntry *)udta;
if (entry->IsProtected != with_entry->IsProtected) return GF_FALSE;
if (ent... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 309,854,440,454,482,800,000,000,000,000,000,000,000 | 14 | fixed #1706 |
static void lo_do_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
off_t offset, struct fuse_file_info *fi, int plus)
{
struct lo_data *lo = lo_data(req);
struct lo_dirp *d = NULL;
struct lo_inode *dinode;
g_autofree char *buf = NULL;
char *p;
size_t rem = size;
... | 0 | [
"CWE-273"
] | qemu | 449e8171f96a6a944d1f3b7d3627ae059eae21ca | 242,089,828,874,474,360,000,000,000,000,000,000,000 | 109 | virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)
At the start, drop membership of all supplementary groups. This is
not required.
If we have membership of "root" supplementary group and when we switch
uid/gid using setresuid/setsgid, we still retain membership of existing
supplemntary groups. An... |
SpoolssSetForm_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep _U_)
{
char *name = NULL;
guint32 level;
proto_item *hidden_item;
hidden_item = proto_tree_add_uint(
tree, hf_form, tvb, offset, 0, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Parse packet */
... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 66,094,586,885,703,470,000,000,000,000,000,000,000 | 33 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
static ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
size_t size, int flags)
{
struct tcp_sock *tp = tcp_sk(sk);
int mss_now, size_goal;
int err;
ssize_t copied;
long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT);
/* Wait for a connection to finish. One exception is TCP Fast Open... | 0 | [
"CWE-369"
] | linux | 499350a5a6e7512d9ed369ed63a4244b6536f4f8 | 123,675,014,105,287,200,000,000,000,000,000,000,000 | 131 | tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0
When tcp_disconnect() is called, inet_csk_delack_init() sets
icsk->icsk_ack.rcv_mss to 0.
This could potentially cause tcp_recvmsg() => tcp_cleanup_rbuf() =>
__tcp_select_window() call path to have division by 0 issue.
So this patch initializes rcv_mss to TCP_MIN_MSS... |
static void fm10k_reuse_rx_page(struct fm10k_ring *rx_ring,
struct fm10k_rx_buffer *old_buff)
{
struct fm10k_rx_buffer *new_buff;
u16 nta = rx_ring->next_to_alloc;
new_buff = &rx_ring->rx_buffer[nta];
/* update, and store next to alloc */
nta++;
rx_ring->next_to_alloc = (nta < rx_ring->count) ? nta : 0;
/... | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 332,713,816,601,713,550,000,000,000,000,000,000,000 | 21 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
std::shared_ptr<CWebSession> CWebSock::GetSession() {
if (m_spSession) {
return m_spSession;
}
const CString sCookieSessionId = GetRequestCookie("SessionId");
std::shared_ptr<CWebSession>* pSession =
Sessions.m_mspSessions.GetItem(sCookieSessionId);
if (pSession != nullptr) {
... | 0 | [
"CWE-22"
] | znc | a4a5aeeb17d32937d8c7d743dae9a4cc755ce773 | 122,866,846,816,825,860,000,000,000,000,000,000,000 | 52 | Don't let web skin name ../../../../ access files outside of usual skins directories.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
MagickExport Image *SpliceImage(const Image *image,
const RectangleInfo *geometry,ExceptionInfo *exception)
{
#define SpliceImageTag "Splice/Image"
CacheView
*image_view,
*splice_view;
Image
*splice_image;
MagickBooleanType
status;
MagickOffsetType
progress;
RectangleInfo
splic... | 1 | [
"CWE-125"
] | ImageMagick | 7b1cf5784b5bcd85aa9293ecf56769f68c037231 | 335,144,095,819,393,330,000,000,000,000,000,000,000 | 324 | Fixed out of bounds error in SpliceImage. |
void CL_ClearState (void) {
// S_StopAllSounds();
Com_Memset( &cl, 0, sizeof( cl ) );
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 173,286,709,931,806,550,000,000,000,000,000,000,000 | 6 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
*/
void __weak kvm_arch_pre_destroy_vm(struct kvm *kvm)
{ | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 143,087,770,171,869,600,000,000,000,000,000,000,000 | 3 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
dump_prefixes(
slang_T *slang,
char_u *word, // case-folded word
char_u *pat,
int *dir,
int dumpflags,
int flags, // flags with prefix ID
linenr_T startlnum)
{
idx_T arridx[MAXWLEN];
int curi[MAXWLEN];
char_u prefix[MAXWLEN];
char_u word_up[MAXWLEN];
int has_... | 0 | [
"CWE-416"
] | vim | 2813f38e021c6e6581c0c88fcf107e41788bc835 | 82,945,850,731,322,070,000,000,000,000,000,000,000 | 110 | patch 8.2.5072: using uninitialized value and freed memory in spell command
Problem: Using uninitialized value and freed memory in spell command.
Solution: Initialize "attr". Check for empty line early. |
static void unexpected_machine_check(struct pt_regs *regs, long error_code)
{
pr_err("CPU#%d: Unexpected int18 (Machine Check)\n",
smp_processor_id());
} | 0 | [
"CWE-362"
] | linux | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf | 248,222,538,526,860,860,000,000,000,000,000,000,000 | 5 | x86/MCE: Serialize sysfs changes
The check_interval file in
/sys/devices/system/machinecheck/machinecheck<cpu number>
directory is a global timer value for MCE polling. If it is changed by one
CPU, mce_restart() broadcasts the event to other CPUs to delete and restart
the MCE polling timer and __mcheck_cpu_init_ti... |
void jpc_ns_fwdlift_row(jpc_fix_t *a, int numcols, int parity)
{
register jpc_fix_t *lptr;
register jpc_fix_t *hptr;
register int n;
int llen;
llen = (numcols + 1 - parity) >> 1;
if (numcols > 1) {
/* Apply the first lifting step. */
lptr = &a[0];
hptr = &a[llen];
if (parity) {
jpc_fix_pluseq(hptr[... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 64,163,687,094,206,200,000,000,000,000,000,000,000 | 120 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
threshold_from_order( gx_ht_order *d_order, int *Width, int *Height, gs_memory_t *memory)
{
int i, j, l, prev_l;
unsigned char *thresh;
int num_repeat, shift;
/* We can have simple or complete orders. Simple ones tile the threshold
with shifts. To handle those we simply loop over the number of
... | 0 | [
"CWE-476"
] | ghostpdl | aadb53eb834b3def3ef68d78865ff87a68901804 | 38,712,905,533,556,096,000,000,000,000,000,000,000 | 86 | Tiffsep and Tiffsep1 - abort on multi-page input wtithout %d OutputFile
Bug #701821 "Segmentation fault at tiff//libtiff/tif_dirinfo.c:513 in TIFFFindField"
The tiffsep and tiffsep1 only set 'code' to an error when an attempt is
made to write a second output file without using %d in the OutputFile
specification.
Thi... |
int rdbSaveType(rio *rdb, unsigned char type) {
return rdbWriteRaw(rdb,&type,1);
} | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 52,974,187,644,715,500,000,000,000,000,000,000,000 | 3 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
static int svc_listen(struct socket *sock,int backlog)
{
DEFINE_WAIT(wait);
struct sock *sk = sock->sk;
struct atm_vcc *vcc = ATM_SD(sock);
int error;
pr_debug("svc_listen %p\n",vcc);
lock_sock(sk);
/* let server handle listen on unbound sockets */
if (test_bit(ATM_VF_SESSION,&vcc->flags)) {
error = -EINVAL;... | 0 | [
"CWE-399"
] | linux-2.6 | 17b24b3c97498935a2ef9777370b1151dfed3f6f | 124,880,737,917,680,270,000,000,000,000,000,000,000 | 38 | ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
As reported by Hugo Dias that it is possible to cause a local denial
of service attack by calling the svc_listen function twice on the same
socket and reading /proc/net/atm/*vc
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: D... |
static int usb_enumerate_device_otg(struct usb_device *udev)
{
int err = 0;
#ifdef CONFIG_USB_OTG
/*
* OTG-aware devices on OTG-capable root hubs may be able to use SRP,
* to wake us after we've powered off VBUS; and HNP, switching roles
* "host" to "peripheral". The OTG descriptor helps figure this out.
*/... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 113,334,893,464,286,880,000,000,000,000,000,000,000 | 63 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
void qpdf_set_r5_encryption_parameters(
qpdf_data qpdf, char const* user_password, char const* owner_password,
QPDF_BOOL allow_accessibility, QPDF_BOOL allow_extract,
qpdf_r3_print_e print, qpdf_r3_modify_e modify,
QPDF_BOOL encrypt_metadata)
{
qpdf->qpdf_writer->setR5EncryptionParameters(
user_pas... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 141,275,671,392,455,640,000,000,000,000,000,000,000 | 11 | 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 ... |
int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr,
unsigned long data)
{
unsigned long tmp;
int copied;
copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0);
if (copied != sizeof(tmp))
return -EIO;
return put_user(tmp, (unsigned long __user *)data);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | d049f74f2dbe71354d43d393ac3a188947811348 | 119,632,851,917,346,880,000,000,000,000,000,000,000 | 11 | exec/ptrace: fix get_dumpable() incorrect tests
The get_dumpable() return value is not boolean. Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0). The SUID_DUMP_ROOT(2) is also considered a
protected state. Almost all places did this correctly, excepti... |
raw(
struct parse *pcmd,
FILE *fp
)
{
rawmode = 1;
(void) fprintf(fp, "Output set to raw\n");
} | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 107,582,093,617,487,450,000,000,000,000,000,000,000 | 8 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
agent_scd_readcert (const char *certidstr,
void **r_buf, size_t *r_buflen)
{
int rc;
char line[ASSUAN_LINELENGTH];
membuf_t data;
size_t len;
struct default_inq_parm_s dfltparm;
memset (&dfltparm, 0, sizeof dfltparm);
*r_buf = NULL;
rc = start_agent (NULL, 1);
if (rc)
return ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 230,047,886,685,925,200,000,000,000,000,000,000,000 | 37 | 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 ... |
static void nhmldump_send_frame(GF_NHMLDumpCtx *ctx, char *data, u32 data_size, GF_FilterPacket *pck)
{
GF_FilterPacket *dst_pck;
char nhml[1024];
const GF_PropertyValue *p;
u32 size;
u8 *output;
GF_FilterSAPType sap = gf_filter_pck_get_sap(pck);
u64 dts = gf_filter_pck_get_dts(pck);
u64 cts = gf_filter_pck_get... | 0 | [
"CWE-476"
] | gpac | 9eeac00b38348c664dfeae2525bba0cf1bc32349 | 336,286,441,310,705,300,000,000,000,000,000,000,000 | 177 | fixed #1565 |
update_utf8_symbol(void)
{
charset_symbol_set *p;
utf8_symbol_set.width = WcOption.east_asian_width ? 2 : 1;
for (p = charset_symbol_list; p->charset; p++) {
if (p->charset == WC_CES_UTF_8) {
encode_symbol(p->symbol);
break;
}
}
} | 0 | [
"CWE-119"
] | w3m | 0c3f5d0e0d9269ad47b8f4b061d7818993913189 | 87,221,834,264,186,380,000,000,000,000,000,000,000 | 11 | Prevent array index out of bounds for symbol
Bug-Debian: https://github.com/tats/w3m/issues/38 |
_copyMergeAppend(const MergeAppend *from)
{
MergeAppend *newnode = makeNode(MergeAppend);
/*
* copy node superclass fields
*/
CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
*/
COPY_NODE_FIELD(mergeplans);
COPY_SCALAR_FIELD(numCols);
COPY_POINTER_FIELD(sortColIdx, fro... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 249,721,851,892,655,800,000,000,000,000,000,000,000 | 21 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static curl_off_t vms_realfilesize(const char *name,
const struct_stat *stat_buf)
{
char buffer[8192];
curl_off_t count;
int ret_stat;
FILE * file;
/* !checksrc! disable FOPENMODE 1 */
file = fopen(name, "r"); /* VMS */
if(!file) {
return 0;
}
count = 0;
ret_s... | 0 | [] | curl | 8c7ee9083d0d719d0a77ab20d9cc2ae84eeea7f3 | 78,936,769,638,690,920,000,000,000,000,000,000,000 | 24 | post_per_transfer: remove the updated file name
When --remove-on-error is used with --no-clobber, it might have an
updated file name to remove.
Bug: https://curl.se/docs/CVE-2022-27778.html
CVE-2022-27778
Reported-by: Harry Sintonen
Closes #8824 |
MonoBoolean
mono_declsec_get_method_action (MonoMethod *method, guint32 action, MonoDeclSecurityEntry *entry)
{
if (method->flags & METHOD_ATTRIBUTE_HAS_SECURITY) {
guint32 idx = mono_method_get_index (method);
idx <<= MONO_HAS_DECL_SECURITY_BITS;
idx |= MONO_HAS_DECL_SECURITY_METHODDEF;
return get_declsec_act... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 261,063,059,615,024,750,000,000,000,000,000,000,000 | 10 | 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 |
cmsBool Write16bitTables(cmsContext ContextID, cmsIOHANDLER* io, _cmsStageToneCurvesData* Tables)
{
int j;
cmsUInt32Number i;
cmsUInt16Number val;
int nEntries;
_cmsAssert(Tables != NULL);
nEntries = Tables->TheCurves[0]->nEntries;
for (i=0; i < Tables ->nCurves; i++) {
for (j=0;... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 252,608,566,932,251,570,000,000,000,000,000,000,000 | 23 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
inline void AffineQuantize(const tflite::QuantizationParams& op_params,
const RuntimeShape& input_shape,
const float* input_data,
const RuntimeShape& output_shape,
uint8_t* output_data) {
ruy::profiler::ScopeLa... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 238,531,611,001,588,620,000,000,000,000,000,000,000 | 56 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
static int __init ipv4_proc_init(void)
{
int rc = 0;
if (raw_proc_init())
goto out_raw;
if (tcp4_proc_init())
goto out_tcp;
if (udp4_proc_init())
goto out_udp;
if (ip_misc_proc_init())
goto out_misc;
out:
return rc;
out_misc:
udp4_proc_exit();
out_udp:
tcp4_proc_exit();
out_tcp:
raw_proc_exit();
out_r... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 286,031,858,892,345,470,000,000,000,000,000,000,000 | 24 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
{
bool pr = false;
u32 msr = msr_info->index;
u64 data = msr_info->data;
switch (msr) {
case MSR_AMD64_NB_CFG:
case MSR_IA32_UCODE_WRITE:
case MSR_VM_HSAVE_PA:
case MSR_AMD64_PATCH_LOADER:
case MSR_AMD64_BU_CFG2:
case MSR_AMD64_DC_CFG:
... | 0 | [
"CWE-476"
] | linux | e97f852fd4561e77721bb9a4e0ea9d98305b1e93 | 231,341,568,236,984,800,000,000,000,000,000,000,000 | 238 | KVM: X86: Fix scan ioapic use-before-initialization
Reported by syzkaller:
BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8
PGD 80000003ec4da067 P4D 80000003ec4da067 PUD 3f7bfa067 PMD 0
Oops: 0000 [#1] PREEMPT SMP PTI
CPU: 7 PID: 5059 Comm: debug Tainted: G OE 4.19.0-rc5 #16... |
static void LoRaMacHandleRequestEvents( void )
{
// Handle events
LoRaMacFlags_t reqEvents = MacCtx.MacFlags;
if( MacCtx.MacState == LORAMAC_IDLE )
{
// Update event bits
if( MacCtx.MacFlags.Bits.McpsReq == 1 )
{
MacCtx.MacFlags.Bits.McpsReq = 0;
}... | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 322,312,955,059,025,200,000,000,000,000,000,000,000 | 43 | Added received buffer size checks. |
int lxc_requests_empty_network(struct lxc_handler *handler)
{
struct lxc_list *network = &handler->conf->network;
struct lxc_list *iterator;
struct lxc_netdev *netdev;
bool found_none = false, found_nic = false;
if (lxc_list_empty(network))
return 0;
lxc_list_for_each(iterator, network) {
netdev = iterator... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 18,543,998,581,313,162,000,000,000,000,000,000,000 | 23 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
static int hash_setkey(void *private, const u8 *key, unsigned int keylen)
{
return crypto_ahash_setkey(private, key, keylen);
} | 0 | [
"CWE-476"
] | linux | 4afa5f9617927453ac04b24b584f6c718dfb4f45 | 294,093,648,333,105,900,000,000,000,000,000,000,000 | 4 | crypto: algif_hash - Only export and import on sockets with data
The hash_accept call fails to work on sockets that have not received
any data. For some algorithm implementations it may cause crashes.
This patch fixes this by ensuring that we only export and import on
sockets that have received data.
Cc: stable@vge... |
print_actuals_and_locals(Dwarf_Debug dbg,
Dwarf_Line_Context line_context,
Dwarf_Unsigned bogus_bytes_count,
Dwarf_Small *bogus_bytes_ptr,
Dwarf_Small *orig_line_ptr,
Dwarf_Small *line_ptr,
Dwarf_Small *section_start,
Dwarf_Small *line_ptr_actuals,
Dwarf_Small *line_ptr_end,
Dwarf_Ha... | 0 | [] | libdwarf-code | faf99408e3f9f706fc3809dd400e831f989778d3 | 70,408,416,824,004,500,000,000,000,000,000,000,000 | 122 | modified: libdwarf/dwarf_print_lines.c
* dwarf_print_lines.c: In case of corrupted
DWARF5 line header the fi_file_name field
for a file entry can be null. Now
we print a <no file name> string in that case
to avoid passing a null to dwarfstring_append.
Dwarfbug DW202010-003.
Als... |
int SimpleMessenger::get_proto_version(int peer_type, bool connect)
{
int my_type = my_inst.name.type();
// set reply protocol version
if (peer_type == my_type) {
// internal
return cluster_protocol;
} else {
// public
if (connect) {
switch (peer_type) {
case CEPH_ENTITY_TYPE_OSD: r... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 274,665,526,259,476,700,000,000,000,000,000,000,000 | 26 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
int crypto_hash_walk_first(struct ahash_request *req,
struct crypto_hash_walk *walk)
{
walk->total = req->nbytes;
if (!walk->total)
return 0;
walk->alignmask = crypto_ahash_alignmask(crypto_ahash_reqtfm(req));
walk->sg = req->src;
walk->flags = req->base.flags;
return hash_walk_new_entry(walk);
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 102,806,057,102,774,740,000,000,000,000,000,000,000 | 14 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
static void qcow_image_close(struct bdev *bdev)
{
struct qcow_state *s = bdev->private;
if (s->backing_image) {
s->backing_image->ops->close(s->backing_image);
free(s->backing_image);
}
close(bdev->fd);
free(s->cluster_cache);
free(s->cluster_data);
free(s->l1_table);
free(s->l2_cache);
free(s->refcount_t... | 0 | [
"CWE-200"
] | tcmu-runner | 8cf8208775022301adaa59c240bb7f93742d1329 | 304,094,550,486,149,960,000,000,000,000,000,000,000 | 17 | removed all check_config callback implementations to avoid security issues
see github issue #194
qcow.c contained an information leak, could test for existance of any
file in the system
file_example.c and file_optical.c allow also to test for existance of
any file, plus to temporarily create empty new files anywhere... |
int ssl3_send_client_verify(SSL *s)
{
unsigned char *p,*d;
unsigned char data[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
EVP_PKEY *pkey;
EVP_PKEY_CTX *pctx=NULL;
EVP_MD_CTX mctx;
unsigned u=0;
unsigned long n;
int j;
EVP_MD_CTX_init(&mctx);
if (s->state == SSL3_ST_CW_CERT_VRFY_A)
{
d=(unsigned char *)s->ini... | 0 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 288,247,811,468,259,300,000,000,000,000,000,000,000 | 157 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
**/
CImg<T>& deriche(const float sigma, const unsigned int order=0, const char axis='x',
const bool boundary_conditions=true) {
#define _cimg_deriche_apply \
CImg<Tfloat> Y(N); \
Tfloat *ptrY = Y._data, yb = 0, yp = 0; \
T xp = (T)0; \
if (boundary_conditions) { xp = *ptrX; yb = yp ... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 193,107,250,236,341,070,000,000,000,000,000,000,000 | 97 | . |
inline bool SparseTensor::ValidateAndInitializeToDense(Tensor* out,
bool initialize) {
DCHECK_EQ(DataTypeToEnum<T>::v(), dtype())
<< "ToDense requested with the wrong datatype";
DCHECK_EQ(out->shape().dims(), dims_)
<< "Incompatible dimensions betw... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | 8ba6fa29cd8bf9cef9b718dc31c78c73081f5b31 | 81,283,102,741,742,740,000,000,000,000,000,000,000 | 27 | Fix heap-buffer-overflow issue with `tf.raw_ops.SparseSplit`.
PiperOrigin-RevId: 371242872
Change-Id: I482bb3d12602c7c3cc9446f97fb9f584bb98e9a4 |
static inline void
e1000e_autoneg_pause(E1000ECore *core)
{
timer_del(core->autoneg_timer); | 0 | [
"CWE-835"
] | qemu | 4154c7e03fa55b4cf52509a83d50d6c09d743b77 | 47,977,079,359,642,390,000,000,000,000,000,000,000 | 4 | net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.... |
pppoe_verify (GtkEditable *editable, gpointer user_data)
{
NMPppoeInfo *info = (NMPppoeInfo *) user_data;
const char *s;
gboolean valid = TRUE;
s = gtk_entry_get_text (info->username_entry);
if (!s || strlen (s) < 1)
valid = FALSE;
if (valid) {
s = gtk_entry_get_text (info->password_entry);
if (!s || strl... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 204,935,877,603,332,200,000,000,000,000,000,000,000 | 18 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
static int ehci_state_fetchsitd(EHCIState *ehci, int async)
{
uint32_t entry;
EHCIsitd sitd;
assert(!async);
entry = ehci_get_fetch_addr(ehci, async);
if (get_dwords(ehci, NLPTR_GET(entry), (uint32_t *)&sitd,
sizeof(EHCIsitd) >> 2) < 0) {
return 0;
}
ehci_trace_s... | 0 | [
"CWE-617"
] | qemu | 2fdb42d840400d58f2e706ecca82c142b97bcbd6 | 239,693,458,219,748,670,000,000,000,000,000,000,000 | 25 | hw: ehci: check return value of 'usb_packet_map'
If 'usb_packet_map' fails, we should stop to process the usb
request.
Signed-off-by: Li Qiang <liq3ea@163.com>
Message-Id: <20200812161727.29412-1-liq3ea@163.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
amgtar_selfcheck(
application_argument_t *argument)
{
char *option;
if (argument->dle.disk) {
char *qdisk = quote_string(argument->dle.disk);
fprintf(stdout, "OK disk %s\n", qdisk);
amfree(qdisk);
}
printf("OK amgtar version %s\n", VERSION);
amgtar_build_exinclude(&argument->dle, 1, NULL, N... | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 112,090,653,829,259,330,000,000,000,000,000,000,000 | 70 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
sql_connect(char *host,char *database,char *user,char *password,uint silent)
{
bool message=0;
uint count=0;
int error;
for (;;)
{
if ((error=sql_real_connect(host,database,user,password,wait_flag)) >= 0)
{
if (count)
{
tee_fputs("\n", stderr);
(void) fflush(stderr);
}
return... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 146,549,882,054,720,500,000,000,000,000,000,000,000 | 31 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static void dmar_invalid_context_cache(struct dmar_drhd_rt *dmar_unit,
uint16_t did, uint16_t sid, uint8_t fm, enum dmar_cirg_type cirg)
{
struct dmar_entry invalidate_desc;
invalidate_desc.hi_64 = 0UL;
invalidate_desc.lo_64 = DMAR_INV_CONTEXT_CACHE_DESC;
switch (cirg) {
case DMAR_CIRG_GLOBAL:
invalidate_desc.... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 39,337,534,930,288,090,000,000,000,000,000,000,000 | 27 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
void GC_register_data_segments(void)
{
PTIB ptib;
PPIB ppib;
HMODULE module_handle;
# define PBUFSIZ 512
UCHAR path[PBUFSIZ];
FILE * myexefile;
struct exe_hdr hdrdos; /* MSDOS header. */
struct e32_exe hdr386; /* Real header for my executable */
struct o32_obj seg; ... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 231,025,592,983,100,600,000,000,000,000,000,000,000 | 68 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp)
{
int ret = 0;
struct mwifiex_adapter *adapter = priv->adapter;
struct host_cmd_ds_802_11_scan_rsp *scan_rsp;
struct mwifiex_ie_types_data *tlv_data;
struct mwifiex_ie_types_tsf_timestamp *tsf_tlv;
u8 *bss_info;
u3... | 0 | [
"CWE-269",
"CWE-787"
] | linux | b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d | 60,082,245,803,557,670,000,000,000,000,000,000,000 | 140 | mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv()
mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking
the destination size may trigger a buffer overflower,
which a local user could use to cause denial of service
or the execution of arbitrary code.
Fix it by putting the length check befo... |
njs_vm_post_event(njs_vm_t *vm, njs_vm_event_t vm_event,
const njs_value_t *args, njs_uint_t nargs)
{
njs_event_t *event;
event = (njs_event_t *) vm_event;
if (nargs != 0 && !event->posted) {
event->nargs = nargs;
event->args = njs_mp_alloc(vm->mem_pool, sizeof(njs_value_t) * nargs);
... | 0 | [
"CWE-416"
] | njs | 6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6 | 240,657,175,703,204,100,000,000,000,000,000,000,000 | 24 | Fixed recursive async function calls.
Previously, PromiseCapability record was stored (function->context)
directly in function object during a function invocation. This is
not correct, because PromiseCapability record should be linked to
current execution context. As a result, function->context is
overwritten with c... |
divide_look_behind_alternatives(Node* node)
{
Node *head, *np, *insert_node;
AnchorNode* an = NANCHOR(node);
int anc_type = an->type;
head = an->target;
np = NCAR(head);
swap_node(node, head);
NCAR(node) = head;
NANCHOR(head)->target = np;
np = node;
while ((np = NCDR(np)) != NULL_NODE) {
inse... | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 157,798,477,938,322,370,000,000,000,000,000,000,000 | 28 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
void Smb4KUnmountJob::setupUnmount( const QList<Smb4KShare *> &shares, bool force, bool silent, bool synchron, QWidget* parent )
{
QListIterator<Smb4KShare *> it( shares );
while ( it.hasNext() )
{
Smb4KShare *share = it.next();
Q_ASSERT( share );
m_shares << new Smb4KShare( *share );
}
m_force ... | 0 | [
"CWE-20"
] | smb4k | 71554140bdaede27b95dbe4c9b5a028a83c83cce | 169,094,211,761,725,890,000,000,000,000,000,000,000 | 16 | Find the mount/umount commands in the helper
Instead of trusting what we get passed in
CVE-2017-8849 |
CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses)
{
NEGOTIATE_REQ *pSMB;
NEGOTIATE_RSP *pSMBr;
int rc = 0;
int bytes_returned;
int i;
struct TCP_Server_Info *server;
u16 count;
unsigned int secFlags;
if (ses->server)
server = ses->server;
else {
rc = -EIO;
return rc;
}
rc = smb_init(SMB_COM_NE... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 63,757,212,779,346,140,000,000,000,000,000,000,000 | 293 | 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... |
static void sqlite3ExprCodeIN(
Parse *pParse, /* Parsing and code generating context */
Expr *pExpr, /* The IN expression */
int destIfFalse, /* Jump here if LHS is not contained in the RHS */
int destIfNull /* Jump here if the results are unknown due to NULLs */
){
int rRhsHasNull... | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 259,634,997,236,839,670,000,000,000,000,000,000,000 | 238 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
static CURLcode ossl_seed(struct Curl_easy *data)
{
/* This might get called before it has been added to a multi handle */
if(data->multi && data->multi->ssl_seeded)
return CURLE_OK;
if(rand_enough()) {
/* OpenSSL 1.1.0+ should return here */
if(data->multi)
data->multi->ssl_seeded = TRUE;
... | 0 | [] | curl | 139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08 | 247,263,755,230,808,370,000,000,000,000,000,000,000 | 95 | openssl: don't leak the SRP credentials in redirects either
Follow-up to 620ea21410030
Reported-by: Harry Sintonen
Closes #8751 |
bqarr_out(PG_FUNCTION_ARGS)
{
QUERYTYPE *query = PG_GETARG_QUERYTYPE_P(0);
INFIX nrm;
if (query->size == 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("empty query")));
nrm.curpol = GETQUERY(query) + query->size - 1;
nrm.buflen = 32;
nrm.cur = nrm.buf = (char *) palloc(sizeof(... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 212,686,593,436,392,500,000,000,000,000,000,000,000 | 19 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
libraw_processed_image_t * LibRaw::dcraw_make_mem_thumb(int *errcode)
{
if(!T.thumb)
{
if ( !ID.toffset)
{
if(errcode) *errcode= LIBRAW_NO_THUMBNAIL;
}
else
{
if(errcode) *errcode= LIBRAW_OUT_OF_... | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 274,803,842,425,854,930,000,000,000,000,000,000,000 | 86 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef |
GF_Err mfra_dump(GF_Box *a, FILE * trace)
{
GF_MovieFragmentRandomAccessBox *p = (GF_MovieFragmentRandomAccessBox *)a;
u32 i, count;
GF_TrackFragmentRandomAccessBox *tfra;
gf_isom_box_dump_start(a, "MovieFragmentRandomAccessBox", trace);
fprintf(trace, ">\n");
count = gf_list_count(p->tfra_list);
for (i=0; i<co... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 144,016,250,138,505,870,000,000,000,000,000,000,000 | 16 | fixed 2 possible heap overflows (inc. #1088) |
dns_message_settimeadjust(dns_message_t *msg, int timeadjust) {
REQUIRE(DNS_MESSAGE_VALID(msg));
msg->timeadjust = timeadjust;
} | 0 | [
"CWE-617"
] | bind9 | 6ed167ad0a647dff20c8cb08c944a7967df2d415 | 192,758,063,049,215,360,000,000,000,000,000,000,000 | 4 | Always keep a copy of the message
this allows it to be available even when dns_message_parse()
returns a error. |
static int __init init_trusted(void)
{
int ret;
ret = trusted_shash_alloc();
if (ret < 0)
return ret;
ret = register_key_type(&key_type_trusted);
if (ret < 0)
trusted_shash_release();
return ret;
} | 0 | [
"CWE-284",
"CWE-264",
"CWE-269"
] | linux | 096fe9eaea40a17e125569f9e657e34cdb6d73bd | 272,257,629,250,208,980,000,000,000,000,000,000,000 | 12 | KEYS: Fix handling of stored error in a negatively instantiated user key
If a user key gets negatively instantiated, an error code is cached in the
payload area. A negatively instantiated key may be then be positively
instantiated by updating it with valid data. However, the ->update key
type method must be aware th... |
static void term_move_reset(int x, int y)
{
if (x >= term_width) x = term_width-1;
if (y >= term_height) y = term_height-1;
vcx = x; vcy = y;
cforcemove = TRUE;
term_move_real();
} | 0 | [
"CWE-476"
] | irssi | 6c6c42e3d1b49d90aacc0b67f8540471cae02a1d | 278,481,011,777,215,600,000,000,000,000,000,000,000 | 9 | Merge branch 'security' into 'master'
See merge request !7 |
static int check_module_license_and_versions(struct module *mod)
{
int prev_taint = test_taint(TAINT_PROPRIETARY_MODULE);
/*
* ndiswrapper is under GPL by itself, but loads proprietary modules.
* Don't use add_taint_module(), as it would prevent ndiswrapper from
* using GPL-only symbols it needs.
*/
if (str... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 296,534,490,349,116,540,000,000,000,000,000,000,000 | 34 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
void clear_extraction_flag()
{
marker &= ~EXTRACTION_MASK;
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 219,822,462,927,411,430,000,000,000,000,000,000,000 | 4 | 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.... |
const ResponseHeaderMap& ConnectionManagerImpl::continueHeader() {
static const auto headers = createHeaderMap<ResponseHeaderMapImpl>(
{{Http::Headers::get().Status, std::to_string(enumToInt(Code::Continue))}});
return *headers;
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 150,616,123,270,699,110,000,000,000,000,000,000,000 | 5 | 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 sctp_getsockopt_nodelay(struct sock *sk, int len,
char __user *optval, int __user *optlen)
{
int val;
if (len < sizeof(int))
return -EINVAL;
len = sizeof(int);
val = (sctp_sk(sk)->nodelay == 1);
if (put_user(len, optlen))
return -EFAULT;
if (copy_to_user(optval, &val, len))
return -EFAUL... | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 244,870,515,434,188,800,000,000,000,000,000,000,000 | 16 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
void __init setup_per_cpu_areas(void)
{
unsigned long delta;
unsigned int cpu;
int rc;
/*
* Always reserve area for module percpu variables. That's
* what the legacy allocator did.
*/
rc = pcpu_embed_first_chunk(PERCPU_MODULE_RESERVE,
PERCPU_DYNAMIC_RESERVE, PAGE_SIZE, NULL,
pcpu_dfl_fc_all... | 0 | [] | linux | 4f996e234dad488e5d9ba0858bc1bae12eff82c3 | 54,802,854,032,751,740,000,000,000,000,000,000,000 | 20 | percpu: fix synchronization between chunk->map_extend_work and chunk destruction
Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work. pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end u... |
bool address_get(JSContext *cx, unsigned argc, Value *vp) {
METHOD_HEADER(0)
RootedString address_str(cx, address(self));
if (!address_str) {
address_str = retrieve_address(cx, self);
if (!address_str)
return false;
}
args.rval().setString(address_str);
return true;
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 139,329,536,661,628,430,000,000,000,000,000,000,000 | 13 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
dle_add_diskest(
dle_t *dle)
{
disk_estimates_t *newp, *curp;
amandates_t *amdp;
int dumplev, estlev;
time_t dumpdate;
levellist_t levellist;
char *amandates_file;
gboolean need_amandates = FALSE;
estimatelist_t el;
if (dle->levellist == NULL) {
g_printf(_("ERROR Missing lev... | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 277,144,685,911,709,500,000,000,000,000,000,000,000 | 119 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
compat_get_entries(struct net *net, struct compat_ip6t_get_entries __user *uptr,
int *len)
{
int ret;
struct compat_ip6t_get_entries get;
struct xt_table *t;
if (*len < sizeof(get))
return -EINVAL;
if (copy_from_user(&get, uptr, sizeof(get)) != 0)
return -EFAULT;
if (*len != sizeof(struct compat_ip6t_... | 0 | [
"CWE-476"
] | linux | 57ebd808a97d7c5b1e1afb937c2db22beba3c1f8 | 95,716,251,177,272,440,000,000,000,000,000,000,000 | 39 | netfilter: add back stackpointer size checks
The rationale for removing the check is only correct for rulesets
generated by ip(6)tables.
In iptables, a jump can only occur to a user-defined chain, i.e.
because we size the stack based on number of user-defined chains we
cannot exceed stack size.
However, the underlyi... |
static void inet6_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
{
struct dst_entry *dst = skb_dst(skb);
if (dst && dst_hold_safe(dst)) {
const struct rt6_info *rt = (const struct rt6_info *)dst;
sk->sk_rx_dst = dst;
inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
inet6_sk(sk)->rx_dst_cookie = rt6_ge... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 260,918,317,140,885,960,000,000,000,000,000,000,000 | 12 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
_warc_rduri(const char *buf, size_t bsz)
{
static const char _key[] = "\r\nWARC-Target-URI:";
const char *val, *uri, *eol, *p;
warc_string_t res = {0U, NULL};
if ((val = xmemmem(buf, bsz, _key, sizeof(_key) - 1U)) == NULL) {
/* no bother */
return res;
}
/* overread whitespace */
val += sizeof(_key) - 1U;
... | 0 | [
"CWE-415",
"CWE-787"
] | libarchive | 9c84b7426660c09c18cc349f6d70b5f8168b5680 | 104,552,488,696,125,750,000,000,000,000,000,000,000 | 55 | warc: consume data once read
The warc decoder only used read ahead, it wouldn't actually consume
data that had previously been printed. This means that if you specify
an invalid content length, it will just reprint the same data over
and over and over again until it hits the desired length.
This means that a WARC res... |
MagickExport Image *NewMagickImage(const ImageInfo *image_info,
const size_t width,const size_t height,const PixelInfo *background,
ExceptionInfo *exception)
{
CacheView
*image_view;
Image
*image;
MagickBooleanType
status;
ssize_t
y;
assert(image_info != (const ImageInfo *) NULL);
if... | 0 | [
"CWE-665"
] | ImageMagick | ee3dae8624e69261760754442827aea4d0254a6f | 280,460,692,282,529,250,000,000,000,000,000,000,000 | 63 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
static uint8_t get_scan_type(struct btd_adapter *adapter)
{
uint8_t type;
if (adapter->current_settings & MGMT_SETTING_BREDR)
type = SCAN_TYPE_BREDR;
else
type = 0;
if (adapter->current_settings & MGMT_SETTING_LE)
type |= SCAN_TYPE_LE;
return type;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 83,582,649,355,036,850,000,000,000,000,000,000,000 | 14 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
static NTSTATUS smb2cli_conn_dispatch_incoming(struct smbXcli_conn *conn,
TALLOC_CTX *tmp_mem,
uint8_t *inbuf)
{
struct tevent_req *req;
struct smbXcli_req_state *state = NULL;
struct iovec *iov;
int i, num_iov;
NTSTATUS status;
bool defer = true;
struct smbXcli_session *last_session = NU... | 0 | [
"CWE-94"
] | samba | 46b5e4aca6adb12a27efaad3bfe66c2d8a82ec95 | 187,704,931,215,486,200,000,000,000,000,000,000,000 | 297 | CVE-2016-2019: libcli/smb: don't allow guest sessions if we require signing
Note real anonymous sessions (with "" as username) don't hit this
as we don't even call smb2cli_session_set_session_key() in that case.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
de265_error video_usability_information::hrd_parameters(error_queue* errqueue, bitreader* br, const seq_parameter_set* sps)
{
int vlc;
nal_hrd_parameters_present_flag = get_bits(br, 1);
vcl_hrd_parameters_present_flag = get_bits(br, 1);
if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag)
... | 0 | [
"CWE-787"
] | libde265 | 8e89fe0e175d2870c39486fdd09250b230ec10b8 | 165,992,176,067,265,260,000,000,000,000,000,000,000 | 84 | error on out-of-range cpb_cnt_minus1 (oss-fuzz issue 27590) |
static inline void f2fs_i_blocks_write(struct inode *inode,
block_t diff, bool add, bool claim)
{
bool clean = !is_inode_flag_set(inode, FI_DIRTY_INODE);
bool recover = is_inode_flag_set(inode, FI_AUTO_RECOVER);
/* add = 1, claim = 1 should be dquot_reserve_block in pair */
if (add) {
if (claim)
dquot_cl... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 278,381,246,263,887,440,000,000,000,000,000,000,000 | 20 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
bool CUser::IsValidUserName(const CString& sUserName) {
// /^[a-zA-Z][a-zA-Z@._\-]*$/
const char* p = sUserName.c_str();
if (sUserName.empty()) {
return false;
}
if ((*p < 'a' || *p > 'z') && (*p < 'A' || *p > 'Z')) {
return false;
}
while (*p) {
if (*p != '@' && *... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 6,529,827,182,248,711,000,000,000,000,000,000,000 | 22 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
static noinline_for_stack int rtnl_fill_vf(struct sk_buff *skb,
struct net_device *dev,
u32 ext_filter_mask)
{
struct nlattr *vfinfo;
int i, num_vfs;
if (!dev->dev.parent || ((ext_filter_mask & RTEXT_FILTER_VF) == 0))
return 0;
num_vfs = dev_num_vf(dev->dev.parent);
if (nla_put_u32(skb, IFLA_NU... | 0 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 23,380,848,041,324,580,000,000,000,000,000,000,000 | 29 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode,
struct ext4_inode_info *ei)
{
blkcnt_t i_blocks ;
struct inode *inode = &(ei->vfs_inode);
struct super_block *sb = inode->i_sb;
if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) {
/* we are using combined 48 bit field */... | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 129,182,700,326,839,470,000,000,000,000,000,000,000 | 22 | 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... |
static inline void __rtrs_put_permit(struct rtrs_clt_sess *clt,
struct rtrs_permit *permit)
{
clear_bit_unlock(permit->mem_id, clt->permits_map);
} | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 272,983,275,457,164,200,000,000,000,000,000,000,000 | 5 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
PERL_STATIC_INLINE IV*
S_get_invlist_previous_index_addr(SV* invlist)
{
/* Return the address of the IV that is reserved to hold the cached index
* */
PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR;
assert(is_invlist(invlist));
return &(((XINVLIST*) SvANY(invlist))->prev_index); | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 340,245,401,620,568,670,000,000,000,000,000,000,000 | 10 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
GetVolumeSize (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
IN EFI_DISK_IO_PROTOCOL *DiskIo,
IN UDF_VOLUME_INFO *Volume,
OUT UINT64 *VolumeSize,
OUT UINT64 *FreeSpaceSize
)
{
EFI_STATUS Status;
UDF_LOGICAL_VOLUME_DESCRIPTOR *LogicalV... | 1 | [] | edk2 | 3b30351b75d70ea65701ac999875fbb81a89a5ca | 116,134,382,796,722,180,000,000,000,000,000,000,000 | 106 | MdeModulePkg/UdfDxe: Add boundary check for getting volume (free) size
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828
Within GetVolumeSize():
The boundary check will validate the 'NumberOfPartitions' field of a
Logical Volume Integrity Descriptor matches the data within the relating
Logical Volume Descriptor... |
static CURLcode imap_state_fetch_resp(struct connectdata *conn, int imapcode,
imapstate instate)
{
CURLcode result = CURLE_OK;
struct Curl_easy *data = conn->data;
struct imap_conn *imapc = &conn->proto.imapc;
struct pingpong *pp = &imapc->pp;
const char *ptr = data->stat... | 0 | [
"CWE-119"
] | curl | 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 | 280,530,739,834,920,140,000,000,000,000,000,000,000 | 99 | imap: if a FETCH response has no size, don't call write callback
CVE-2017-1000257
Reported-by: Brian Carpenter and 0xd34db347
Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586 |
struct rtable *ip_route_output_flow(struct net *net, struct flowi4 *flp4,
const struct sock *sk)
{
struct rtable *rt = __ip_route_output_key(net, flp4);
if (IS_ERR(rt))
return rt;
if (flp4->flowi4_proto) {
flp4->flowi4_oif = rt->dst.dev->ifindex;
rt = (struct rtable *)xfrm_lookup_route(net, &rt->dst,... | 0 | [
"CWE-327"
] | linux | aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba | 139,275,944,935,882,600,000,000,000,000,000,000,000 | 17 | inet: use bigger hash table for IP ID generation
In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
I used a very small hash table that could be abused
by patient attackers to reveal sensitive information.
Switch to a dynamic sizing, depending on RAM size.
Typical big hosts will now use 128x more storage (2... |
static struct task *h2_timeout_task(struct task *t, void *context, unsigned short state)
{
struct h2c *h2c = context;
int expired = tick_is_expired(t->expire, now_ms);
if (!expired && h2c)
return t;
task_delete(t);
task_free(t);
if (!h2c) {
/* resources were already deleted */
return NULL;
}
h2c->task... | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 74,074,167,990,713,300,000,000,000,000,000,000,000 | 46 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
void snro_del(GF_Box *s)
{
GF_SeqOffHintEntryBox *snro = (GF_SeqOffHintEntryBox *)s;
gf_free(snro);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 260,273,253,482,535,400,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
static int _nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred,
struct nfs_fattr *fattr, struct iattr *sattr,
struct nfs4_state *state)
{
struct nfs_server *server = NFS_SERVER(inode);
struct nfs_setattrargs arg = {
.fh = NFS_FH(inode),
.iap ... | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 60,286,467,929,510,480,000,000,000,000,000,000,000 | 38 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *asoc,
sctp_scope_t scope, gfp_t gfp)
{
int flags;
/* Use scoping rules to determine the subset of addresses from
* the endpoint.
*/
flags = (PF_INET6 == asoc->base.sk->sk_family) ? SCTP_ADDR6_ALLOWED : 0;
if (asoc->peer.ipv4_address)
flag... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 540,247,469,535,597,600,000,000,000,000,000,000 | 19 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
void CLASS ahd_interpolate()
{
int i, j, k, top, left, row, col, tr, tc, c, d, val, hm[2];
ushort (*pix)[4], (*rix)[3];
static const int dir[4] = { -1, 1, -TS, TS };
unsigned ldiff[2][4], abdiff[2][4], leps, abeps;
float r, cbrt[0x10000], xyz[3], xyz_cam[3][4];
ushort (*rgb)[TS][TS][3];
short (*lab)[TS][... | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 48,831,780,532,567,570,000,000,000,000,000,000,000 | 123 | Avoid overflow in ljpeg_start(). |
OFBool DcmSCP::checkCallingAETitleAccepted(const OFString& callingAETitle)
{
return OFTrue;
} | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 113,744,749,617,173,250,000,000,000,000,000,000,000 | 4 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
Pl_DCT::decompress(void* cinfo_p, Buffer* b)
{
struct jpeg_decompress_struct* cinfo =
reinterpret_cast<jpeg_decompress_struct*>(cinfo_p);
#if ((defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) || \
defined(__clang__))
# pragma GCC diagnostic push
# pragma GCC diagnostic ign... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 10,144,575,971,558,458,000,000,000,000,000,000,000 | 34 | 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 ... |
g_markup_escape_text (const gchar *text,
gssize length)
{
GString *str;
g_return_val_if_fail (text != NULL, NULL);
if (length < 0)
length = strlen (text);
/* prealloc at least as long as original text */
str = g_string_sized_new (length);
append_escaped_text (str, text, le... | 0 | [
"CWE-476"
] | glib | fccef3cc822af74699cca84cd202719ae61ca3b9 | 82,783,064,002,578,880,000,000,000,000,000,000,000 | 16 | gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.
Inclu... |
static int ext4_ext_split(handle_t *handle, struct inode *inode,
unsigned int flags,
struct ext4_ext_path *path,
struct ext4_extent *newext, int at)
{
struct buffer_head *bh = NULL;
int depth = ext_depth(inode);
struct ext4_extent_header *neh;
struct ext4_extent_idx *fidx;
int i = at, k, m, a;
ext4... | 0 | [
"CWE-362"
] | linux-2.6 | dee1f973ca341c266229faa5a1a5bb268bed3531 | 124,159,009,454,828,000,000,000,000,000,000,000,000 | 232 | ext4: race-condition protection for ext4_convert_unwritten_extents_endio
We assumed that at the time we call ext4_convert_unwritten_extents_endio()
extent in question is fully inside [map.m_lblk, map->m_len] because
it was already split during submission. But this may not be true due to
a race between writeback vs fa... |
static int pcd_atapi(struct pcd_unit *cd, char *cmd, int dlen, char *buf, char *fun)
{
int r;
r = pcd_command(cd, cmd, dlen, fun);
mdelay(1);
if (!r)
r = pcd_completion(cd, buf, fun);
if (r)
pcd_req_sense(cd, fun);
return r;
} | 0 | [
"CWE-476"
] | linux | f0d1762554014ce0ae347b9f0d088f2c157c8c72 | 163,831,938,566,580,370,000,000,000,000,000,000,000 | 13 | paride/pcd: Fix potential NULL pointer dereference and mem leak
Syzkaller report this:
pcd: pcd version 1.07, major 46, nice 0
pcd0: Autoprobe failed
pcd: No CD-ROM drive found
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP... |
uchar* session_value_ptr(THD *thd, const LEX_STRING *base)
{ return do_value_ptr(thd, OPT_SESSION, base); } | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 163,766,051,996,771,550,000,000,000,000,000,000,000 | 2 | MDEV-26323 use-after-poison issue of MariaDB server |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.