func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void Curl_polarssl_close(struct connectdata *conn, int sockindex)
{
rsa_free(&conn->ssl[sockindex].rsa);
x509_crt_free(&conn->ssl[sockindex].clicert);
x509_crt_free(&conn->ssl[sockindex].cacert);
x509_crl_free(&conn->ssl[sockindex].crl);
ssl_free(&conn->ssl[sockindex].ssl);
} | 0 | [
"CWE-20"
] | curl | 6efd2fa529a189bf41736a610f6184cd8ad94b4d | 168,056,430,537,786,680,000,000,000,000,000,000,000 | 8 | mbedtls/polarssl: set "hostname" unconditionally
...as otherwise the TLS libs will skip the CN/SAN check and just allow
connection to any server. curl previously skipped this function when SNI
wasn't used or when connecting to an IP address specified host.
CVE-2016-3739
Bug: https://curl.haxx.se/docs/adv_20160518A.h... |
static int get_file_caps(struct linux_binprm *bprm)
{
struct dentry *dentry;
int rc = 0;
struct vfs_cap_data vcaps;
struct inode *inode;
bprm_clear_caps(bprm);
if (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID)
return 0;
dentry = dget(bprm->file->f_dentry);
inode = dentry->d_inode;
if (!inode->i_op || !ino... | 0 | [] | linux-2.6 | 3318a386e4ca68c76e0294363d29bdc46fcad670 | 116,844,355,979,059,380,000,000,000,000,000,000,000 | 39 | file caps: always start with clear bprm->caps_*
While Linux doesn't honor setuid on scripts. However, it mistakenly
behaves differently for file capabilities.
This patch fixes that behavior by making sure that get_file_caps()
begins with empty bprm->caps_*. That way when a script is loaded,
its bprm->caps_* may be ... |
static int read_public_key(RSA *rsa)
{
int r;
sc_path_t path;
sc_file_t *file;
u8 buf[2048], *p = buf;
size_t bufsize, keysize;
r = select_app_df();
if (r)
return 1;
sc_format_path("I1012", &path);
r = sc_select_file(card, &path, &file);
if (r) {
fprintf(stderr, "Unable to select public key file: %s\n", ... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 82,863,218,708,243,510,000,000,000,000,000,000,000 | 44 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
PHP_METHOD(Phar, getPath)
{
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
} | 0 | [
"CWE-119"
] | php-src | 13ad4d3e971807f9a58ab5933182907dc2958539 | 257,585,697,598,728,500,000,000,000,000,000,000,000 | 10 | Fix bug #71354 - remove UMR when size is 0 |
int load_image_targphys(const char *filename,
hwaddr addr, uint64_t max_sz)
{
return load_image_targphys_as(filename, addr, max_sz, NULL);
} | 0 | [
"CWE-787"
] | qemu | e423455c4f23a1a828901c78fe6d03b7dde79319 | 41,736,523,211,782,050,000,000,000,000,000,000,000 | 5 | hw/core/loader: Fix possible crash in rom_copy()
Both, "rom->addr" and "addr" are derived from the binary image
that can be loaded with the "-kernel" paramer. The code in
rom_copy() then calculates:
d = dest + (rom->addr - addr);
and uses "d" as destination in a memcpy() some lines later. Now with
bad kernel ima... |
static struct mountpoint *new_mountpoint(struct dentry *dentry)
{
struct hlist_head *chain = mp_hash(dentry);
struct mountpoint *mp;
int ret;
mp = kmalloc(sizeof(struct mountpoint), GFP_KERNEL);
if (!mp)
return ERR_PTR(-ENOMEM);
ret = d_set_mounted(dentry);
if (ret) {
kfree(mp);
return ERR_PTR(ret);
}
... | 0 | [
"CWE-703"
] | linux | cd4a40174b71acd021877341684d8bb1dc8ea4ae | 29,546,093,008,939,765,000,000,000,000,000,000,000 | 22 | mnt: Fail collect_mounts when applied to unmounted mounts
The only users of collect_mounts are in audit_tree.c
In audit_trim_trees and audit_add_tree_rule the path passed into
collect_mounts is generated from kern_path passed an audit_tree
pathname which is guaranteed to be an absolute path. In those cases
collect_... |
ins_up(
int startcol) // when TRUE move to Insstart.col
{
pos_T tpos;
linenr_T old_topline = curwin->w_topline;
#ifdef FEAT_DIFF
int old_topfill = curwin->w_topfill;
#endif
undisplay_dollar();
tpos = curwin->w_cursor;
if (cursor_up(1L, TRUE) == OK)
{
if (startcol)
coladvance(get... | 0 | [] | vim | 98a336dd497d3422e7efeef9f24cc9e25aeb8a49 | 247,985,272,868,748,400,000,000,000,000,000,000,000 | 29 | patch 8.2.0133: invalid memory access with search command
Problem: Invalid memory access with search command.
Solution: When :normal runs out of characters in bracketed paste mode break
out of the loop.(closes #5511) |
dump_redirect(onoff_flag)
boolean onoff_flag;
{
if (dumplog_file) {
if (onoff_flag) {
windowprocs.win_create_nhwindow = dump_create_nhwindow;
windowprocs.win_clear_nhwindow = dump_clear_nhwindow;
windowprocs.win_display_nhwindow = dump_display_nhwindow;
window... | 0 | [
"CWE-120",
"CWE-269"
] | NetHack | f3def5c0b999478da2d0a8f0b6a7c370a2065f77 | 100,598,812,296,219,360,000,000,000,000,000,000,000 | 22 | command line triggered buffer overruns
Prevent extremely long command line arguments from overflowing local
buffers in raw_printf or config_error_add. The increased buffer
sizes they recently got to deal with long configuration file values
aren't sufficient to handle command line induced overflows.
choose_windows(co... |
GF_Err grpi_box_size(GF_Box *s)
{
GF_OMADRMGroupIDBox *ptr = (GF_OMADRMGroupIDBox *)s;
ptr->size += 2+2+1 + ptr->GKLength;
if (ptr->GroupID) ptr->size += strlen(ptr->GroupID);
return GF_OK;
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 121,280,246,499,463,610,000,000,000,000,000,000,000 | 7 | fixed #1879 |
void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key,
struct futex_hash_bucket *hb)
{
get_futex_key_refs(key);
q->key = *key;
__unqueue_futex(q);
WARN_ON(!q->rt_waiter);
q->rt_waiter = NULL;
q->lock_ptr = &hb->lock;
wake_up_state(q->task, TASK_NORMAL);
} | 0 | [
"CWE-264",
"CWE-269"
] | linux | e9c243a5a6de0be8e584c604d353412584b592f8 | 293,964,316,083,537,200,000,000,000,000,000,000,000 | 15 | futex-prevent-requeue-pi-on-same-futex.patch futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1)
If uaddr == uaddr2, then we have broken the rule of only requeueing from
a non-pi futex to a pi futex with this call. If we attempt this, then
dangling pointers may be left for rt_waiter resulting in an expl... |
static int smack_msg_queue_msgctl(struct msg_queue *msq, int cmd)
{
int may;
switch (cmd) {
case IPC_STAT:
case MSG_STAT:
may = MAY_READ;
break;
case IPC_SET:
case IPC_RMID:
may = MAY_READWRITE;
break;
case IPC_INFO:
case MSG_INFO:
/*
* System level information
*/
return 0;
default:
return... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 52,308,106,690,761,230,000,000,000,000,000,000,000 | 25 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static void assign_proto_idx(struct proto *prot)
{
prot->inuse_idx = find_first_zero_bit(proto_inuse_idx, PROTO_INUSE_NR);
if (unlikely(prot->inuse_idx == PROTO_INUSE_NR - 1)) {
printk(KERN_ERR "PROTO_INUSE_NR exhausted\n");
return;
}
set_bit(prot->inuse_idx, proto_inuse_idx);
} | 0 | [
"CWE-264"
] | linux-2.6 | df0bca049d01c0ee94afb7cd5dfd959541e6c8da | 185,533,494,788,196,530,000,000,000,000,000,000,000 | 11 | net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.
This dummy code should trigger the bug:
int main(void)
{
unsigned char buf... |
ldns_fget_keyword_data_l(FILE *f, const char *keyword, const char *k_del, char *data,
const char *d_del, size_t data_limit, int *line_nr)
{
/* we assume: keyword|sep|data */
char *fkeyword;
ssize_t i;
if(strlen(keyword) >= LDNS_MAX_KEYWORDLEN)
return -1;
... | 0 | [] | ldns | c8391790c96d4c8a2c10f9ab1460fda83b509fc2 | 173,902,158,609,722,760,000,000,000,000,000,000,000 | 32 | Check parse limit before t increment
Thanks Stephan Zeisberg |
void CLASS smal_v6_load_raw()
{
unsigned seg[2][2];
fseek (ifp, 16, SEEK_SET);
seg[0][0] = 0;
seg[0][1] = get2();
seg[1][0] = raw_width * raw_height;
seg[1][1] = INT_MAX;
smal_decode_segment (seg, 0);
} | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 250,704,294,798,904,650,000,000,000,000,000,000,000 | 11 | cumulated data checks patch |
static void RTL8139TallyCounters_dma_write(RTL8139State *s, dma_addr_t tc_addr)
{
PCIDevice *d = PCI_DEVICE(s);
RTL8139TallyCounters *tally_counters = &s->tally_counters;
uint16_t val16;
uint32_t val32;
uint64_t val64;
val64 = cpu_to_le64(tally_counters->TxOk);
pci_dma_write(d, tc_addr + 0,... | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 242,961,764,596,645,400,000,000,000,000,000,000,000 | 47 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
static int iwl_pcie_load_given_ucode(struct iwl_trans *trans,
const struct fw_img *image)
{
int ret = 0;
int first_ucode_section;
IWL_DEBUG_FW(trans, "working with %s CPU\n",
image->is_dual_cpus ? "Dual" : "Single");
/* load to FW the binary non secured sections of CPU1 */
ret = iwl_pcie_load_cpu_sect... | 0 | [
"CWE-476"
] | linux | 8188a18ee2e48c9a7461139838048363bfce3fef | 180,498,173,924,239,640,000,000,000,000,000,000,000 | 50 | iwlwifi: pcie: fix rb_allocator workqueue allocation
We don't handle failures in the rb_allocator workqueue allocation
correctly. To fix that, move the code earlier so the cleanup is
easier and we don't have to undo all the interrupt allocations in
this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sig... |
void CertDecoder::Decode(SignerList* signers, CertType ct)
{
if (source_.GetError().What()) return;
DecodeToKey();
if (source_.GetError().What()) return;
if (source_.get_index() != sigIndex_)
source_.set_index(sigIndex_);
word32 confirmOID = GetAlgoId();
GetSignature();
if (source_... | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 297,041,991,485,331,130,000,000,000,000,000,000,000 | 21 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
mark_source_chains(const struct xt_table_info *newinfo,
unsigned int valid_hooks, void *entry0)
{
unsigned int hook;
/* No recursion; use packet counter to save back ptrs (reset
to 0 as we leave), and comefrom to save source hook bitmask */
for (hook = 0; hook < NF_INET_NUMHOOKS; hook++) {
unsigned int p... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 54d83fc74aa9ec72794373cb47432c5f7fb1a309 | 230,695,446,461,793,400,000,000,000,000,000,000,000 | 108 | netfilter: x_tables: fix unconditional helper
Ben Hawkes says:
In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it
is possible for a user-supplied ipt_entry structure to have a large
next_offset field. This field is not bounds checked prior to writing a
counter value at the supplied offset.
Pr... |
gen_retval(codegen_scope *s, node *tree)
{
if (nint(tree->car) == NODE_SPLAT) {
codegen(s, tree, VAL);
pop();
genop_1(s, OP_ARYDUP, cursp());
}
else {
codegen(s, tree, VAL);
pop();
}
} | 0 | [
"CWE-415",
"CWE-122"
] | mruby | 38b164ace7d6ae1c367883a3d67d7f559783faad | 194,008,059,027,823,700,000,000,000,000,000,000,000 | 12 | codegen.c: fix a bug in `gen_values()`.
- Fix limit handling that fails 15 arguments method calls.
- Fix too early argument packing in arrays. |
void CConnectionTransportUDPBase::Received_NoConnection( const CMsgSteamSockets_UDP_NoConnection &msg, SteamNetworkingMicroseconds usecNow )
{
// Make sure it's an ack of something we would have sent
if ( msg.to_connection_id() != ConnectionIDLocal() || msg.from_connection_id() != m_connection.m_unConnectionIDRemote ... | 0 | [
"CWE-703"
] | GameNetworkingSockets | d944a10808891d202bb1d5e1998de6e0423af678 | 302,403,322,742,631,900,000,000,000,000,000,000,000 | 15 | Tweak pointer math to avoid possible integer overflow |
ImagingCopyInfo(Imaging destination, Imaging source)
{
if (source->palette) {
if (destination->palette)
ImagingPaletteDelete(destination->palette);
destination->palette = ImagingPaletteDuplicate(source->palette);
}
} | 0 | [
"CWE-284"
] | Pillow | 5d8a0be45aad78c5a22c8d099118ee26ef8144af | 195,388,880,681,829,830,000,000,000,000,000,000,000 | 8 | Memory error in Storage.c when accepting negative image size arguments |
py::handle get_scope_name() const {
return GetPyObject(&GetData()->scope_name);
} | 0 | [
"CWE-20",
"CWE-476",
"CWE-908"
] | tensorflow | 22e07fb204386768e5bcbea563641ea11f96ceb8 | 5,169,855,922,899,637,700,000,000,000,000,000,000 | 3 | Fix multiple vulnerabilities in `tf.experimental.dlpack.to_dlpack`.
We have a use after free caused by memory coruption, a segmentation fault caused by memory corruption, several memory leaks and an undefined behavior when taking the reference of a nullptr.
PiperOrigin-RevId: 332568894
Change-Id: Ife0fc05e103b3532509... |
static int __init fscrypt_init(void)
{
fscrypt_read_workqueue = alloc_workqueue("fscrypt_read_queue",
WQ_HIGHPRI, 0);
if (!fscrypt_read_workqueue)
goto fail;
fscrypt_ctx_cachep = KMEM_CACHE(fscrypt_ctx, SLAB_RECLAIM_ACCOUNT);
if (!fscrypt_ctx_cachep)
goto fail_free_queue;
fscrypt_info_cachep = KMEM_CA... | 0 | [
"CWE-416",
"CWE-476"
] | linux | 1b53cf9815bb4744958d41f3795d5d5a1d365e2d | 154,213,292,984,809,000,000,000,000,000,000,000,000 | 24 | fscrypt: remove broken support for detecting keyring key revocation
Filesystem encryption ostensibly supported revoking a keyring key that
had been used to "unlock" encrypted files, causing those files to become
"locked" again. This was, however, buggy for several reasons, the most
severe of which was that when key r... |
void free_huge_page(struct page *page)
{
/*
* Can't pass hstate in here because it is called from the
* compound page destructor.
*/
struct hstate *h = page_hstate(page);
int nid = page_to_nid(page);
struct hugepage_subpool *spool =
(struct hugepage_subpool *)page_private(page);
bool restore_reserve;
set... | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 177,982,467,214,924,640,000,000,000,000,000,000,000 | 46 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
static void transit(h2_session *session, const char *action, h2_session_state nstate)
{
apr_time_t timeout;
int ostate, loglvl;
const char *s;
if (session->state != nstate) {
ostate = session->state;
session->state = nstate;
loglvl = APLOG_DEBUG;
if ((ostate... | 1 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 317,305,624,027,091,200,000,000,000,000,000,000,000 | 63 | * fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now,
mpm event backport to 2.4.x up for vote).
* Fixes stream cleanup when connection throttling is in place.
* Counts stream resets by client on streams initiated by client as cause
for connection throttling.
* Header length checks are no... |
static MagickBooleanType WriteMSLImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
Image
*msl_image;
MagickBooleanType
status;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
assert(i... | 0 | [
"CWE-772",
"CWE-787"
] | ImageMagick | e793eb203e5e0f91f5037aed6585e81b1e27395b | 215,614,694,056,817,500,000,000,000,000,000,000,000 | 21 | https://github.com/ImageMagick/ImageMagick/issues/636 |
inline void comps_rtree_pair_destroy(COMPS_RTreePair * pair) {
free(pair->key);
free(pair);
} | 0 | [
"CWE-416",
"CWE-862"
] | libcomps | e3a5d056633677959ad924a51758876d415e7046 | 209,470,236,051,182,400,000,000,000,000,000,000,000 | 4 | Fix UAF in comps_objmrtree_unite function
The added field is not used at all in many places and it is probably the
left-over of some copy-paste. |
uint32_t clampSize(uint32_t size, uint32_t max_alloc) {
return std::min(size, std::min(MaxAllocation, max_alloc));
} | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 239,576,632,574,102,000,000,000,000,000,000,000,000 | 3 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
void SFAutoSave(SplineFont *sf,EncMap *map) {
int i, k, max;
FILE *asfd;
SplineFont *ssf;
if ( no_windowing_ui ) /* No autosaves when just scripting */
return;
if ( sf->cidmaster!=NULL ) sf=sf->cidmaster;
asfd = fopen(sf->autosavename,"w");
if ( asfd==NULL )
return;
max = sf->glyphcn... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 59,857,474,219,401,905,000,000,000,000,000,000,000 | 51 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
QPDFAnnotationObjectHelper::QPDFAnnotationObjectHelper(QPDFObjectHandle oh) :
QPDFObjectHelper(oh)
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 305,235,889,096,275,350,000,000,000,000,000,000,000 | 4 | 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 ... |
* for each stream. */
static int avi_read_idx1(AVFormatContext *s, int size)
{
AVIContext *avi = s->priv_data;
AVIOContext *pb = s->pb;
int nb_index_entries, i;
AVStream *st;
AVIStream *ast;
int64_t pos;
unsigned int index, tag, flags, len, first_packet = 1;
int64_t last_pos = -1;
u... | 0 | [
"CWE-200"
] | FFmpeg | a5d849b149ca67ced2d271dc84db0bc95a548abb | 303,367,615,650,009,830,000,000,000,000,000,000,000 | 85 | avformat/avidec: Limit formats in gab2 to srt and ass/ssa
This prevents part of one exploit leading to an information leak
Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static void tg3_setup_rxbd_thresholds(struct tg3 *tp)
{
u32 val, bdcache_maxcnt, host_rep_thresh, nic_rep_thresh;
if (!tg3_flag(tp, 5750_PLUS) ||
tg3_flag(tp, 5780_CLASS) ||
tg3_asic_rev(tp) == ASIC_REV_5750 ||
tg3_asic_rev(tp) == ASIC_REV_5752 ||
tg3_flag(tp, 57765_PLUS))
bdcache_maxcnt = TG3_... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 290,391,034,919,515,370,000,000,000,000,000,000,000 | 38 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
static int handler_DxText(deark *c, lctx *d, i64 opcode, i64 data_pos, i64 *bytes_used)
{
i64 tlen;
i64 dx;
de_ucstring *s = NULL;
dx = (i64)de_getbyte(data_pos);
de_dbg(c, "%s: %d", opcode==0x2a?"dv":"dh", (int)dx);
tlen = (i64)de_getbyte(data_pos+1);
*bytes_used = 2+tlen;
s = ucstring_create(c);
dbuf_read... | 0 | [
"CWE-476"
] | deark | 287f5ac31dfdc074669182f51ece637706070eeb | 201,708,944,502,276,000,000,000,000,000,000,000,000 | 19 | pict: Fixed a bug with ICC profile extraction
Could cause a NULL pointer dereference.
Found by F. Çelik. |
TEST(HeaderMapImplTest, RemoveRegex) {
// These will match.
LowerCaseString key1 = LowerCaseString("X-prefix-foo");
LowerCaseString key3 = LowerCaseString("X-Prefix-");
LowerCaseString key5 = LowerCaseString("x-prefix-eep");
// These will not.
LowerCaseString key2 = LowerCaseString(" x-prefix-foo");
Lower... | 1 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 95,777,221,819,758,310,000,000,000,000,000,000,000 | 37 | 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... |
int ext4_can_truncate(struct inode *inode)
{
if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
return 0;
if (S_ISREG(inode->i_mode))
return 1;
if (S_ISDIR(inode->i_mode))
return 1;
if (S_ISLNK(inode->i_mode))
return !ext4_inode_is_fast_symlink(inode);
return 0;
} | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 15,214,371,496,751,861,000,000,000,000,000,000,000 | 12 | 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 bool skb_is_nonlinear(const struct sk_buff *skb)
{
return skb->data_len; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 220,922,647,917,112,400,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static pid_t spawn_event_handler_child(const char *dump_dir_name, const char *event_name, int *fdp)
{
char *args[7];
args[0] = (char *) LIBEXEC_DIR"/abrt-handle-event";
/* Do not forward ASK_* messages to parent*/
args[1] = (char *) "-i";
args[2] = (char *) "-e";
args[3] = (char *) event_name;
... | 0 | [
"CWE-59"
] | abrt | 3287aa12eb205cff95cdd00d6d6c5c9a4f8f0eca | 265,844,392,718,574,700,000,000,000,000,000,000,000 | 28 | daemon: allow only root user to trigger the post-create
There is no reason to allow non-root users to trigger this
functionality. Regular users can create abrt problems only through
abrtd or abrt-dbus and both triggers the post-create.
Other hooks run under root user (CCpp, Koops, VMCore, Xorg).
Related: #1212861
S... |
bool SafeX509ExtPrint(const BIOPointer& out, X509_EXTENSION* ext) {
const X509V3_EXT_METHOD* method = X509V3_EXT_get(ext);
if (method != X509V3_EXT_get_nid(NID_subject_alt_name))
return false;
GENERAL_NAMES* names = static_cast<GENERAL_NAMES*>(X509V3_EXT_d2i(ext));
if (names == nullptr)
return false;
... | 1 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 282,262,785,637,853,100,000,000,000,000,000,000,000 | 34 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
void __init udp_init(void)
{
unsigned long limit;
udp_table_init(&udp_table, "UDP");
limit = nr_free_buffer_pages() / 8;
limit = max(limit, 128UL);
sysctl_udp_mem[0] = limit / 4 * 3;
sysctl_udp_mem[1] = limit;
sysctl_udp_mem[2] = sysctl_udp_mem[0] * 2;
sysctl_udp_rmem_min = SK_MEM_QUANTUM;
sysctl_udp_wmem_mi... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 26,675,244,519,197,386,000,000,000,000,000,000,000 | 14 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
static int io_iter_do_read(struct io_kiocb *req, struct iov_iter *iter)
{
if (req->file->f_op->read_iter)
return call_read_iter(req->file, &req->rw.kiocb, iter);
else if (req->file->f_op->read)
return loop_rw_iter(READ, req->file, &req->rw.kiocb, iter);
else
return -EINVAL;
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 149,717,496,788,585,500,000,000,000,000,000,000,000 | 9 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
ClientHttpRequest::storeEntry(StoreEntry *newEntry)
{
entry_ = newEntry;
} | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 68,940,655,821,964,700,000,000,000,000,000,000,000 | 4 | Handle more Range requests (#790)
Also removed some effectively unused code. |
static inline int dpm_sysfs_wakeup_change_owner(struct device *dev, kuid_t kuid,
kgid_t kgid)
{
if (dev->power.wakeup && dev->power.wakeup->dev)
return device_change_owner(dev->power.wakeup->dev, kuid, kgid);
return 0;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 98,631,068,237,204,040,000,000,000,000,000,000,000 | 7 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
tcp_sequence_number_analysis_print_keepalive(packet_info * pinfo,
proto_item * flags_item,
struct tcp_acked *ta
)
{
/*TCP Keep Alive */
if (ta->flags & TCP_A_KEEP_ALIVE) {
expert_add_info(pinfo, flags_item, &ei_tcp_analysis_keep_alive);
... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 112,139,814,143,415,080,000,000,000,000,000,000,000 | 16 | 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 dgram_connect(struct sock *sk, struct sockaddr *uaddr,
int len)
{
struct sockaddr_ieee802154 *addr = (struct sockaddr_ieee802154 *)uaddr;
struct dgram_sock *ro = dgram_sk(sk);
int err = 0;
if (len < sizeof(*addr))
return -EINVAL;
if (addr->family != AF_IEEE802154)
return -EINVAL;
lock_sock(s... | 0 | [
"CWE-276"
] | linux | e69dbd4619e7674c1679cba49afd9dd9ac347eef | 224,357,186,732,109,400,000,000,000,000,000,000,000 | 27 | ieee802154: enforce CAP_NET_RAW for raw sockets
When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be
checked first.
Signed-off-by: Ori Nimron <orinimron123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: David S... |
bool fix_fields_if_needed_for_order_by(THD *thd, Item **ref)
{
return fix_fields_if_needed_for_scalar(thd, ref);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 226,226,141,756,470,960,000,000,000,000,000,000,000 | 4 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
void CompactProtocolReader::readListEnd() {} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 45,985,362,503,594,420,000,000,000,000,000,000,000 | 1 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args)
{
zend_string *replace_buffer = NULL, *replace_origin = NULL;
char *buffer = NULL, *docref_buf = NULL, *target = NULL;
char *docref_target = "", *docref_root = "";
char *p;
int buffer_len = 0;
cons... | 0 | [] | php-src | 9a07245b728714de09361ea16b9c6fcf70cb5685 | 111,362,168,291,275,220,000,000,000,000,000,000,000 | 194 | Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash |
static void nfs4_xdr_enc_layoutreturn(struct rpc_rqst *req,
struct xdr_stream *xdr,
const void *data)
{
const struct nfs4_layoutreturn_args *args = data;
struct compound_hdr hdr = {
.minorversion = nfs4_xdr_minorversion(&args->seq_args),
};
encode_compound_hdr(xdr, req, &hdr);
encode_sequenc... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 232,166,172,313,305,570,000,000,000,000,000,000,000 | 15 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static void __vxlan_fdb_free(struct vxlan_fdb *f)
{
struct vxlan_rdst *rd, *nd;
list_for_each_entry_safe(rd, nd, &f->remotes, list) {
dst_cache_destroy(&rd->dst_cache);
kfree(rd);
}
kfree(f);
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 335,974,259,520,250,750,000,000,000,000,000,000,000 | 10 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
njs_function_constructor(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t async)
{
njs_chb_t chain;
njs_int_t ret;
njs_str_t str, file;
njs_uint_t i;
njs_parser_t parser;
njs_vm_code_t *code;
njs_fu... | 0 | [
"CWE-416"
] | njs | ad48705bf1f04b4221a5f5b07715ac48b3160d53 | 84,922,279,576,337,740,000,000,000,000,000,000,000 | 151 | Fixed frame allocation from an awaited frame.
njs_function_frame_save() is used to save the awaited frame when "await"
instruction is encountered. The saving was done as a memcpy() of
existing runtime frame.
njs_function_frame_alloc() is used to alloc a new function frame, this
function tries to use a spare prealloca... |
apr_status_t h2_stream_add_header(h2_stream *stream,
const char *name, size_t nlen,
const char *value, size_t vlen)
{
h2_session *session = stream->session;
int error = 0;
apr_status_t status;
if (stream->has_response) {
re... | 0 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 331,404,603,475,033,800,000,000,000,000,000,000,000 | 71 | * fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now,
mpm event backport to 2.4.x up for vote).
* Fixes stream cleanup when connection throttling is in place.
* Counts stream resets by client on streams initiated by client as cause
for connection throttling.
* Header length checks are no... |
**/
bool is_sameXZC(const unsigned int size_x, const unsigned int size_z, const unsigned int size_c) const {
return is_sameXZ(size_x,size_z) && _spectrum==size_c; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 15,002,801,092,157,173,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
int htp_msg_begin(llhttp_t *htp) {
auto upstream = static_cast<HttpsUpstream *>(htp->data);
upstream->on_start_request();
return 0;
} | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 223,755,089,470,993,100,000,000,000,000,000,000,000 | 5 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
struct dst_entry *inet6_csk_route_req(const struct sock *sk,
struct flowi6 *fl6,
const struct request_sock *req,
u8 proto)
{
struct inet_request_sock *ireq = inet_rsk(req);
const struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_addr *final_p, final;
struct dst_entry *dst;
memset(fl6,... | 1 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 196,702,673,738,783,600,000,000,000,000,000,000,000 | 27 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
TEST(ExpressionReverseArrayTest, ReversesEmptyArray) {
assertExpectedResults("$reverseArray",
{{{Value(std::vector<Value>())}, Value(std::vector<Value>())}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 10,339,851,634,620,013,000,000,000,000,000,000,000 | 4 | SERVER-38070 fix infinite loop in agg expression |
rb_str_offset(VALUE str, long pos)
{
return str_offset(RSTRING_PTR(str), RSTRING_END(str), pos,
STR_ENC_GET(str), single_byte_optimizable(str));
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 139,178,502,107,311,960,000,000,000,000,000,000,000 | 5 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
explicit SaveV2(OpKernelConstruction* context) : OpKernel(context) {} | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 9728c60e136912a12d99ca56e106b7cce7af5986 | 34,323,534,223,813,523,000,000,000,000,000,000,000 | 1 | Ensure validation sticks in `save_restore_v2_ops.cc`
PiperOrigin-RevId: 387924206
Change-Id: I6156842eb3230076b5812c0815f3e66bd5241454 |
void DL_Dxf::writeHatch1(DL_WriterA& dw,
const DL_HatchData& data,
const DL_Attributes& attrib) {
dw.entity("HATCH");
if (version==DL_VERSION_2000) {
dw.dxfString(100, "AcDbEntity");
}
dw.entityAttributes(attrib);
if (version==DL_VERSION_200... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 141,359,344,097,304,700,000,000,000,000,000,000,000 | 27 | check vertexIndex which might be -1 for broken DXF |
static inline void memalloc_use_memcg(struct mem_cgroup *memcg)
{
WARN_ON_ONCE(current->active_memcg);
current->active_memcg = memcg;
} | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 277,691,381,620,046,500,000,000,000,000,000,000,000 | 5 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
_dbus_getuid (void)
{
return getuid ();
} | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 137,386,985,563,695,400,000,000,000,000,000,000,000 | 4 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
uint256 SproutNote::cm() const {
unsigned char discriminant = 0xb0;
CSHA256 hasher;
hasher.Write(&discriminant, 1);
hasher.Write(a_pk.begin(), 32);
auto value_vec = convertIntToVectorLE(value_);
hasher.Write(&value_vec[0], value_vec.size());
hasher.Write(rho.begin(), 32);
hasher.Write... | 0 | [
"CWE-755",
"CWE-787"
] | zcash | c1fbf8ab5d73cff5e1f45236995857c75ba4128d | 250,101,272,460,224,600,000,000,000,000,000,000,000 | 18 | Ignore exceptions when deserializing note plaintexts |
int crypt_keyslot_get_pbkdf(struct crypt_device *cd, int keyslot, struct crypt_pbkdf_type *pbkdf)
{
if (!cd || !pbkdf || keyslot == CRYPT_ANY_SLOT)
return -EINVAL;
if (isLUKS1(cd->type))
return LUKS_keyslot_pbkdf(&cd->u.luks1.hdr, keyslot, pbkdf);
else if (isLUKS2(cd->type))
return LUKS2_keyslot_pbkdf(&cd->u.... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 56,652,199,684,118,270,000,000,000,000,000,000,000 | 12 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
Supports_Condition_Obj Parser::parse_supports_declaration()
{
Supports_Condition_Ptr cond;
// parse something declaration like
Expression_Obj feature = parse_expression();
Expression_Obj expression = 0;
if (lex_css< exactly<':'> >()) {
expression = parse_list(DELAYED);
}
if (!featu... | 0 | [
"CWE-125"
] | libsass | b3374e3fd1a0c3658644d2bad24e4a0ff2e0dcea | 224,025,558,990,926,550,000,000,000,000,000,000,000 | 17 | Fix handling of unclosed interpolant in url
Fixes #2661 |
static void vop_dev_remove(struct vop_info *pvi, struct mic_device_ctrl *devp,
struct vop_device *vpdev)
{
struct mic_bootparam *bootparam = vpdev->hw_ops->get_dp(vpdev);
s8 db;
int ret, retry;
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wake);
devp->config_change = MIC_VIRTIO_PARAM_DEV_REMOVE;
db = bootparam->h2c_con... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9bf292bfca94694a721449e3fd752493856710f6 | 116,294,479,097,097,580,000,000,000,000,000,000,000 | 24 | misc: mic: Fix for double fetch security bug in VOP driver
The MIC VOP driver does two successive reads from user space to read a
variable length data structure. Kernel memory corruption can result if
the data structure changes between the two reads. This patch disallows
the chance of this happening.
Bugzilla: https:... |
bool ActiveStreamFilterBase::commonHandleAfter1xxHeadersCallback(FilterHeadersStatus status) {
ASSERT(parent_.state_.has_1xx_headers_);
ASSERT(!continued_1xx_headers_);
ASSERT(canIterate());
if (status == FilterHeadersStatus::StopIteration) {
iteration_state_ = IterationState::StopSingleIteration;
retu... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 189,134,609,688,313,360,000,000,000,000,000,000,000 | 14 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static int fts3SegReaderCursorAppend(
Fts3MultiSegReader *pCsr,
Fts3SegReader *pNew
){
if( (pCsr->nSegment%16)==0 ){
Fts3SegReader **apNew;
sqlite3_int64 nByte = (pCsr->nSegment + 16)*sizeof(Fts3SegReader*);
apNew = (Fts3SegReader **)sqlite3_realloc64(pCsr->apSegment, nByte);
if( !apNew ){
... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 22,671,978,080,583,074,000,000,000,000,000,000,000 | 17 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
static inline void ModulateHSI(const double percent_hue,
const double percent_saturation,const double percent_intensity,double *red,
double *green,double *blue)
{
double
intensity,
hue,
saturation;
/*
Increase or decrease color intensity, saturation, or hue.
*/
ConvertRGBToHSI(*red,*green,*... | 0 | [
"CWE-835"
] | ImageMagick | a80ee0ee1a083b4991d12ed4c07b7c7c5890f329 | 169,699,207,403,995,360,000,000,000,000,000,000,000 | 18 | https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31506 |
const GF_FilterRegister *writegen_register(GF_FilterSession *session)
{
//assign runtime caps on first load
if (!strcmp(GenDumpCaps[3].val.value.string, "gpac")) {
GenDumpCaps[3].val.value.string = (char *) gf_pixel_fmt_all_shortnames();
GenDumpCaps[8].val.value.string = (char *) gf_audio_fmt_all_shortnames();
... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 8,211,852,224,152,204,000,000,000,000,000,000,000 | 13 | fixed #2138 |
_copyCoerceToDomainValue(const CoerceToDomainValue *from)
{
CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
COPY_SCALAR_FIELD(typeId);
COPY_SCALAR_FIELD(typeMod);
COPY_SCALAR_FIELD(collation);
COPY_LOCATION_FIELD(location);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 195,665,618,467,474,200,000,000,000,000,000,000,000 | 11 | 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... |
lt_dlgetinfo (lt_dlhandle handle)
{
if (!handle)
{
LT__SETERROR (INVALID_HANDLE);
return 0;
}
return &(handle->info);
} | 0 | [] | libtool | e91f7b960032074a55fc91273c1917e3082b5338 | 235,254,650,816,605,000,000,000,000,000,000,000,000 | 10 | Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current d... |
void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart,
int ystart, int xend, int yend)
{
jas_matrix_bindsub(s, s1, ystart - s1->ystart_, xstart - s1->xstart_,
yend - s1->ystart_ - 1, xend - s1->xstart_ - 1);
} | 1 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 143,598,632,316,131,130,000,000,000,000,000,000,000 | 6 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
void finish(int r) override {
if (r >= 0)
osd->_got_mon_epochs(oldest, newest);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 298,732,879,246,439,040,000,000,000,000,000,000,000 | 4 | 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 ... |
uint32_t lduw_le_phys(AddressSpace *as, hwaddr addr)
{
return address_space_lduw_le(as, addr, MEMTXATTRS_UNSPECIFIED, NULL);
} | 0 | [] | qemu | e4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83 | 41,520,161,280,158,070,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... |
GF_Err void_box_write(GF_Box *s, GF_BitStream *bs)
{
gf_bs_write_u32(bs, 0);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 80,588,661,148,747,325,000,000,000,000,000,000,000 | 5 | fixed #2255 |
TEST_F(AllowFailedInAndOfOrListTest, BadAndGoodJwt) {
EXPECT_CALL(mock_cb_, onComplete(Status::Ok));
auto headers = Http::TestRequestHeaderMapImpl{{kExampleHeader, ExpiredToken},
{kOtherHeader, OtherGoodToken}};
context_ = Verifier::createContext(headers, parent_spa... | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 158,385,516,250,368,380,000,000,000,000,000,000,000 | 9 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
uint Field_varstring::get_key_image(uchar *buff, uint length,
imagetype type_arg)
{
String val;
uint local_char_length;
MY_BITMAP *old_map= dbug_tmp_use_all_columns(table, &table->read_set);
val_str(&val, &val);
dbug_tmp_restore_column_map(&table->read_set, old_map);
lo... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 75,567,145,919,195,500,000,000,000,000,000,000,000 | 26 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
TEST_F(QueryPlannerTest, ContainedOrPredicateIsLeadingFieldAndTrailingField) {
addIndex(BSON("a" << 1 << "b" << 1));
addIndex(BSON("c" << 1 << "a" << 1));
runQuery(fromjson("{$and: [{a: 5}, {$or: [{b: 6}, {c: 7}]}]}"));
assertNumSolutions(3);
assertSolutionExists(
"{fetch: {filter: null, no... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 166,977,247,108,111,650,000,000,000,000,000,000,000 | 20 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int mbochs_get_region_info(struct mdev_state *mdev_state,
struct vfio_region_info_ext *ext)
{
struct vfio_region_info *region_info = &ext->base;
if (region_info->index >= MBOCHS_NUM_REGIONS)
return -EINVAL;
switch (region_info->index) {
case VFIO_PCI_CONFIG_REGION_INDEX:
region_info->offset = 0;
... | 0 | [
"CWE-200",
"CWE-401"
] | linux | de5494af4815a4c9328536c72741229b7de88e7f | 39,690,609,767,318,390,000,000,000,000,000,000,000 | 50 | vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes
Convert mbochs to use an atomic scheme for this like mtty was changed
into. The atomic fixes various race conditions with probing. Add the
missing error unwind. Also add the missing kfree of mdev_state->pages.
Fixes: 681c1615f891 ("vfio/mbochs: Convert to us... |
pgp_put_data(sc_card_t *card, unsigned int tag, const u8 *buf, size_t buf_len)
{
struct pgp_priv_data *priv = DRVDATA(card);
pgp_blob_t *affected_blob = NULL;
struct do_info *dinfo = NULL;
int r;
LOG_FUNC_CALLED(card->ctx);
/* check if the tag is writable */
if (priv->current->id != tag)
affected_blob = pgp_... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 99,681,916,837,910,320,000,000,000,000,000,000,000 | 65 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
load_request_root(void)
{
cups_dir_t *dir; /* Directory */
cups_dentry_t *dent; /* Directory entry */
cupsd_job_t *job; /* New job */
/*
* Open the requests directory...
*/
cupsdLogMessage(CUPSD_LOG_DEBUG, "Scanning %s for jobs...", RequestRoot);
if ((dir = cupsDirOpen(RequestRoot)) == NULL)
... | 0 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 100,416,320,885,240,600,000,000,000,000,000,000,000 | 79 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
routersets_get_disjunction(smartlist_t *target,
const smartlist_t *source,
const routerset_t *include,
const routerset_t *exclude, int running_only)
{
SMARTLIST_FOREACH(source, routerinfo_t *, router, {
int include_result;
if (ru... | 0 | [
"CWE-399"
] | tor | 308f6dad20675c42b29862f4269ad1fbfb00dc9a | 250,961,230,821,472,900,000,000,000,000,000,000,000 | 21 | Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix. |
void LIRGenerator::do_ArithmeticOp_FPU(ArithmeticOp* x) {
LIRItem left(x->x(), this);
LIRItem right(x->y(), this);
LIRItem* left_arg = &left;
LIRItem* right_arg = &right;
assert(!left.is_stack() || !right.is_stack(), "can't both be memory operands");
bool must_load_both = (x->op() == Bytecodes::_frem || x... | 0 | [] | jdk11u-dev | 9a62b8af48af6c506d2fc4a3482116de26357f16 | 88,238,283,115,151,140,000,000,000,000,000,000,000 | 65 | 8272014: Better array indexing
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
static void fill_route_from_fnhe(struct rtable *rt, struct fib_nh_exception *fnhe)
{
rt->rt_pmtu = fnhe->fnhe_pmtu;
rt->dst.expires = fnhe->fnhe_expires;
if (fnhe->fnhe_gw) {
rt->rt_flags |= RTCF_REDIRECTED;
rt->rt_gateway = fnhe->fnhe_gw;
rt->rt_uses_gateway = 1;
}
} | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 289,646,229,312,169,920,000,000,000,000,000,000,000 | 11 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 66,551,990,336,555,560,000,000,000,000,000,000,000 | 45 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
inline int _snprintf(char *const s, const size_t size, const char *const format, ...) {
va_list ap;
va_start(ap,format);
const int result = _vsnprintf(s,size,format,ap);
va_end(ap);
return result;
} | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 86,513,954,286,016,860,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
virtual sql_mode_t value_depends_on_sql_mode() const
{
return 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 129,835,652,035,273,720,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
std::string QueryParams::getUrl() const
{
std::string url;
for (size_type nn = 0; nn < _values.size(); ++nn)
{
if (nn > 0)
url += '&';
if (!_values[nn].name.empty())
{
appendUrl(url, _values[nn].name);
url += '=';
}
appendUrl(url, _values[nn].value);
}
return url;
} | 0 | [
"CWE-399"
] | cxxtools | 142bb2589dc184709857c08c1e10570947c444e3 | 180,075,934,164,847,970,000,000,000,000,000,000,000 | 19 | fix parsing double % in query parameters |
BOOLEAN _Function_class_(MINIPORT_SYNCHRONIZE_INTERRUPT) CParaNdisTX::RestartQueueSynchronously(tSynchronizedContext *ctx)
{
auto TXPath = static_cast<CParaNdisTX *>(ctx->Parameter);
return !TXPath->m_VirtQueue.Restart();
} | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 311,318,900,521,757,400,000,000,000,000,000,000,000 | 5 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
void CWebServer::RegisterRType(const char* idname, webserver_response_function ResponseFunction)
{
m_webrtypes.insert(std::pair<std::string, webserver_response_function >(std::string(idname), ResponseFunction));
} | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 277,822,654,719,526,930,000,000,000,000,000,000,000 | 4 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
static double mp_min(_cimg_math_parser& mp) {
const unsigned int i_end = (unsigned int)mp.opcode[2];
double val = _mp_arg(3);
for (unsigned int i = 4; i<i_end; ++i) val = std::min(val,_mp_arg(i));
return val; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 200,966,612,547,169,440,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
static i40e_status i40e_pf_loop_reset(struct i40e_pf *pf)
{
const unsigned short MAX_CNT = 1000;
const unsigned short MSECS = 10;
struct i40e_hw *hw = &pf->hw;
i40e_status ret;
int cnt;
for (cnt = 0; cnt < MAX_CNT; ++cnt) {
ret = i40e_pf_reset(hw);
if (!ret)
break;
msleep(MSECS);
}
if (cnt == MAX_CNT... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 286,598,145,121,617,360,000,000,000,000,000,000,000 | 23 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
static inline Quantum GetPixela(const Image *restrict image,
const Quantum *restrict pixel)
{
return(pixel[image->channel_map[aPixelChannel].offset]);
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4 | 57,988,169,818,201,710,000,000,000,000,000,000,000 | 5 | |
elg_encrypt (int algo, gcry_mpi_t *resarr,
gcry_mpi_t data, gcry_mpi_t *pkey, int flags)
{
gcry_err_code_t err = GPG_ERR_NO_ERROR;
ELG_public_key pk;
(void)algo;
(void)flags;
if ((! data) || (! pkey[0]) || (! pkey[1]) || (! pkey[2]))
err = GPG_ERR_BAD_MPI;
else
{
pk.p = pkey[0];... | 0 | [
"CWE-200"
] | libgcrypt | 35cd81f134c0da4e7e6fcfe40d270ee1251f52c2 | 300,265,713,285,135,570,000,000,000,000,000,000,000 | 22 | cipher: Use ciphertext blinding for Elgamal decryption.
* cipher/elgamal.c (USE_BLINDING): New.
(decrypt): Rewrite to use ciphertext blinding.
--
CVE-id: CVE-2014-3591
As a countermeasure to a new side-channel attacks on sliding windows
exponentiation we blind the ciphertext for Elgamal decryption. This
is similar ... |
static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata)
{
int ret, retries = 0;
struct page *page;
pgoff_t index;
struct inode *inode = mapping->host;
handle_t *handle;
if (unlikely(ext4_for... | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 119,815,565,803,801,200,000,000,000,000,000,000,000 | 100 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
bool CModules::OnRaw(CString& sLine) { MODHALTCHK(OnRaw(sLine)); } | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 170,667,418,565,840,150,000,000,000,000,000,000,000 | 1 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
TEST_F(Http1ClientConnectionImplTest, EmptyBodyResponse503) {
initialize();
NiceMock<MockResponseDecoder> response_decoder;
Http::RequestEncoder& request_encoder = codec_->newStream(response_decoder);
TestRequestHeaderMapImpl headers{{":method", "GET"}, {":path", "/"}, {":authority", "host"}};
request_encode... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 247,917,465,745,445,850,000,000,000,000,000,000,000 | 13 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
uint_t aubio_tempo_get_last (aubio_tempo_t *o)
{
return o->last_beat + o->delay;
} | 0 | [] | aubio | b1559f4c9ce2b304d8d27ffdc7128b6795ca82e5 | 171,285,004,692,398,300,000,000,000,000,000,000,000 | 4 | [tempo] fix buffer overflow in method parser |
xmlCtxtReadIO(xmlParserCtxtPtr ctxt, xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose, void *ioctx,
const char *URL,
const char *encoding, int options)
{
xmlParserInputBufferPtr input;
xmlParserInputPtr stream;
if (ioread == NULL)
return (NULL);
if (... | 0 | [
"CWE-125"
] | libxml2 | 77404b8b69bc122d12231807abf1a837d121b551 | 235,273,042,332,132,660,000,000,000,000,000,000,000 | 27 | Make sure the parser returns when getting a Stop order
patch backported from chromiun bug fixes, assuming author is Chris |
static Image *ReadCALSImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
filename[MagickPathExtent],
header[MagickPathExtent],
message[MagickPathExtent];
FILE
*file;
Image
*image;
ImageInfo
*read_info;
int
c,
unique_file;
MagickBooleanType
status;
... | 1 | [
"CWE-20",
"CWE-252"
] | ImageMagick | 6b6bff054d569a77973f2140c0e86366e6168a6c | 266,876,629,072,190,340,000,000,000,000,000,000,000 | 143 | https://github.com/ImageMagick/ImageMagick/issues/1199 |
ShmRegisterFbFuncs(pScreen)
ScreenPtr pScreen;
{
shmFuncs[pScreen->myNum] = &fbFuncs;
} | 0 | [
"CWE-189"
] | xserver | be6c17fcf9efebc0bbcc3d9a25f8c5a2450c2161 | 179,178,977,257,715,730,000,000,000,000,000,000,000 | 5 | CVE-2007-6429: Always test for size+offset wrapping. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.