func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int lua_ap_mpm_query(lua_State *L)
{
int x,
y;
x = lua_tointeger(L, 1);
ap_mpm_query(x, &y);
lua_pushinteger(L, y);
return 1;
} | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 67,051,938,177,951,890,000,000,000,000,000,000,000 | 10 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
AES128GCM_OnWireTxHandler(CephContext* const cct,
const key_t& key,
const nonce_t& nonce)
: cct(cct),
ectx(EVP_CIPHER_CTX_new(), EVP_CIPHER_CTX_free),
nonce(nonce) {
ceph_assert_always(ectx);
ceph_assert_always(key.size() * CHAR_BIT == 128);
if (1 != EVP_EncryptInit_ex(ectx.... | 1 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 224,186,333,339,752,600,000,000,000,000,000,000,000 | 19 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
static unsigned long unmap_page_range(struct mmu_gather *tlb,
struct vm_area_struct *vma,
unsigned long addr, unsigned long end,
long *zap_work, struct zap_details *details)
{
pgd_t *pgd;
unsigned long next;
if (details && !details->check_mapping && !details->nonlinear_vma)
details = NULL;
BUG_ON(ad... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 267,789,968,637,527,570,000,000,000,000,000,000,000 | 27 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
PackLinuxElf32::check_pt_dynamic(Elf32_Phdr const *const phdr)
{
unsigned t = get_te32(&phdr->p_offset), s = sizeof(Elf32_Dyn) + t;
unsigned vaddr = get_te32(&phdr->p_vaddr);
unsigned filesz = get_te32(&phdr->p_filesz), memsz = get_te32(&phdr->p_memsz);
unsigned align = get_te32(&phdr->p_align);
if ... | 0 | [
"CWE-476",
"CWE-415"
] | upx | 90279abdfcd235172eab99651043051188938dcc | 24,259,707,353,518,167,000,000,000,000,000,000,000 | 21 | PackLinuxElf::canUnpack must checkEhdr() for ELF input
https://github.com/upx/upx/issues/485
modified: p_lx_elf.cpp |
void migrate_page_copy(struct page *newpage, struct page *page)
{
int cpupid;
if (PageHuge(page) || PageTransHuge(page))
copy_huge_page(newpage, page);
else
copy_highpage(newpage, page);
if (PageError(page))
SetPageError(newpage);
if (PageReferenced(page))
SetPageReferenced(newpage);
if (PageUptodate(pa... | 1 | [
"CWE-476"
] | linux | 42cb14b110a5698ccf26ce59c4441722605a3743 | 135,390,361,447,010,310,000,000,000,000,000,000,000 | 69 | mm: migrate dirty page without clear_page_dirty_for_io etc
clear_page_dirty_for_io() has accumulated writeback and memcg subtleties
since v2.6.16 first introduced page migration; and the set_page_dirty()
which completed its migration of PageDirty, later had to be moderated to
__set_page_dirty_nobuffers(); then PageSwa... |
void auths_init(void)
{
struct auth *auth;
/* sanity checks */
i_assert(auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_USER_IDX].key == 'u');
i_assert(auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_USERNAME_IDX].key == 'n');
i_assert(auth_request_var_expand_static_tab[AUTH_REQUEST_VAR_TAB_DOMAIN... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 79,332,569,686,009,720,000,000,000,000,000,000,000 | 16 | auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter fro... |
xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf,
size_t len, size_t size) {
int q, ql;
int r, rl;
int cur, l;
size_t count = 0;
int inputid;
inputid = ctxt->input->id;
if (buf == NULL) {
len = 0;
size = XML_PARSER_BUFFER_SIZE;
buf = (xmlChar *) x... | 0 | [
"CWE-703",
"CWE-835"
] | libxml2 | 899a5d9f0ed13b8e32449a08a361e0de127dd961 | 306,737,429,378,506,450,000,000,000,000,000,000,000 | 122 | Detect infinite recursion in parameter entities
When expanding a parameter entity in a DTD, infinite recursion could
lead to an infinite loop or memory exhaustion.
Thanks to Wei Lei for the first of many reports.
Fixes bug 759579. |
//! Save image as a PFM file \overloading.
const CImg<T>& save_pfm(std::FILE *const file) const {
get_mirror('y')._save_pfm(file,0);
return *this; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 106,925,806,758,087,840,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void gotoxy(struct vc_data *vc, int new_x, int new_y)
{
int min_y, max_y;
if (new_x < 0)
vc->state.x = 0;
else {
if (new_x >= vc->vc_cols)
vc->state.x = vc->vc_cols - 1;
else
vc->state.x = new_x;
}
if (vc->vc_decom) {
min_y = vc->vc_top;
max_y = vc->vc_bottom;
} else {
min_y = 0;
max... | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 318,145,167,343,194,960,000,000,000,000,000,000,000 | 30 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
stop_printer(cupsd_client_t *con, /* I - Client connection */
ipp_attribute_t *uri) /* I - Printer URI */
{
http_status_t status; /* Policy status */
cups_ptype_t dtype; /* Destination type (printer/class) */
cupsd_printer_t *printer; /* Printer data */
ipp_attribute_t *attr; /* printer-state... | 0 | [
"CWE-20"
] | cups | 49fa4983f25b64ec29d548ffa3b9782426007df3 | 328,357,921,380,608,250,000,000,000,000,000,000,000 | 65 | DBUS notifications could crash the scheduler (Issue #5143)
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8. |
uint32_t read_next_header (WavpackStreamReader64 *reader, void *id, WavpackHeader *wphdr)
{
unsigned char buffer [sizeof (*wphdr)], *sp = buffer + sizeof (*wphdr), *ep = sp;
uint32_t bytes_skipped = 0;
int bleft;
while (1) {
if (sp < ep) {
bleft = (int)(ep - sp);
memmove... | 0 | [
"CWE-125"
] | WavPack | 4bc05fc490b66ef2d45b1de26abf1455b486b0dc | 186,298,350,053,244,830,000,000,000,000,000,000,000 | 34 | fixes for 4 fuzz failures posted to SourceForge mailing list |
static void __net_exit addrconf_exit_net(struct net *net)
{
#ifdef CONFIG_SYSCTL
__addrconf_sysctl_unregister(net->ipv6.devconf_dflt);
__addrconf_sysctl_unregister(net->ipv6.devconf_all);
#endif
kfree(net->ipv6.devconf_dflt);
kfree(net->ipv6.devconf_all);
} | 0 | [
"CWE-20"
] | linux | 77751427a1ff25b27d47a4c36b12c3c8667855ac | 151,823,170,446,846,180,000,000,000,000,000,000,000 | 9 | ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running... |
store_word(
spellinfo_T *spin,
char_u *word,
int flags, // extra flags, WF_BANNED
int region, // supported region(s)
char_u *pfxlist, // list of prefix IDs or NULL
int need_affix) // only store word with affix ID
{
int len = (int)STRLEN(word);
int ct = captype(word, word + len);
... | 1 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 58,294,047,257,238,400,000,000,000,000,000,000,000 | 39 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
exif_entry_realloc (ExifEntry *e, void *d_orig, unsigned int i)
{
void *d;
ExifLog *l = NULL;
if (!e || !e->priv) return NULL;
if (!i) { exif_mem_free (e->priv->mem, d_orig); return NULL; }
d = exif_mem_realloc (e->priv->mem, d_orig, i);
if (d) return d;
if (e->parent && e->parent->parent)
l = exif_data_ge... | 0 | [
"CWE-125"
] | libexif | f9bb9f263fb00f0603ecbefa8957cad24168cbff | 193,569,257,884,742,540,000,000,000,000,000,000,000 | 17 | Fix a buffer read overflow in exif_entry_get_value
While parsing EXIF_TAG_FOCAL_LENGTH it was possible to read 8 bytes past
the end of a heap buffer. This was detected by the OSS Fuzz project.
Patch from Google.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7344 and
https://bugs.chromium.org/p/oss-fuzz/... |
static int aa_probe(const AVProbeData *p)
{
uint8_t *buf = p->buf;
// first 4 bytes are file size, next 4 bytes are the magic
if (AV_RB32(buf+4) != AA_MAGIC)
return 0;
return AVPROBE_SCORE_MAX / 2;
} | 0 | [
"CWE-665",
"CWE-908"
] | FFmpeg | ed188f6dcdf0935c939ed813cf8745d50742014b | 278,046,265,367,891,600,000,000,000,000,000,000,000 | 10 | avformat/aadec: Check for scanf() failure
Fixes: use of uninitialized variables
Fixes: blank.aa
Found-by: Chamal De Silva <chamal.desilva@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int configure_endpoint(struct snd_usb_substream *subs)
{
int ret;
/* format changed */
stop_endpoints(subs, true);
ret = snd_usb_endpoint_set_params(subs->data_endpoint,
subs->pcm_format,
subs->channels,
subs->period_bytes,
subs->period_frames,
subs->buffer_periods,
... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 186,352,921,320,967,200,000,000,000,000,000,000,000 | 23 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
void lodepng_info_swap(LodePNGInfo* a, LodePNGInfo* b)
{
LodePNGInfo temp = *a;
*a = *b;
*b = temp;
} | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 187,026,542,601,765,240,000,000,000,000,000,000,000 | 6 | Fixed #5645: realloc return handling |
static sctp_disposition_t sctp_sf_do_unexpected_init(
struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg, sctp_cmd_seq_t *commands)
{
sctp_disposition_t retval;
struct sctp_chunk *chunk = arg;
struct sctp_chunk *repl;
struct sctp_associati... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 9de7922bc709eee2f609cd01d98aaedc4cf5ea74 | 97,129,343,091,843,180,000,000,000,000,000,000,000 | 175 | net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks
Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for
ASCONF chunk") added basic verification of ASCONF chunks, however,
it is still possible to remotely crash a server by sending a
special crafted ASCONF chunk, even up to pre 2.6.12 kernels:
... |
void PSOutputDev::psXObject(Stream *psStream, Stream *level1Stream) {
Stream *str;
int c;
if ((level == psLevel1 || level == psLevel1Sep) && level1Stream) {
str = level1Stream;
} else {
str = psStream;
}
str->reset();
while ((c = str->getChar()) != EOF) {
writePSChar(c);
}
str->close();
} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 7,880,199,282,473,056,000,000,000,000,000,000,000 | 15 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
CURLFORMcode curl_formadd(struct curl_httppost **httppost,
struct curl_httppost **last_post,
...)
{
(void)httppost;
(void)last_post;
return CURL_FORMADD_DISABLED;
} | 0 | [
"CWE-200"
] | curl | b3875606925536f82fc61f3114ac42f29eaf6945 | 11,596,456,997,223,407,000,000,000,000,000,000,000 | 8 | curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds
When duplicating a handle, the data to post was duplicated using
strdup() when it could be binary and contain zeroes and it was not even
zero terminated! This caused read out of bounds crashes/segfaults.
Since the lib/strdup.c file no longer is easily sha... |
sbc_type_find (GstTypeFind * tf, gpointer unused)
{
const guint8 *data;
gsize frame_len;
guint i, rate, channels, offset = 0;
for (i = 0; i < 10; ++i) {
data = gst_type_find_peek (tf, offset, 8);
if (data == NULL)
return;
frame_len = sbc_check_header (data, 8, &rate, &channels);
if (fram... | 0 | [
"CWE-125"
] | gst-plugins-base | 2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095 | 148,363,734,076,256,540,000,000,000,000,000,000,000 | 21 | typefind: bounds check windows ico detection
Fixes out of bounds read
https://bugzilla.gnome.org/show_bug.cgi?id=774902 |
njs_generate_if_statement_then(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_int_t ret;
njs_jump_off_t *jump_offset, label_offset;
njs_vmcode_jump_t *jump;
ret = njs_generate_node_index_release(vm, generator, node->left);
if (njs_slow_path(ret != NJS_OK)... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 189,833,007,845,257,500,000,000,000,000,000,000,000 | 27 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
void enable_iommu(void)
{
do_action_for_iommus(enable_dmar);
} | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 59,986,092,183,172,500,000,000,000,000,000,000,000 | 4 | 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: ... |
int rtl8xxxu_init_phy_regs(struct rtl8xxxu_priv *priv,
struct rtl8xxxu_reg32val *array)
{
int i, ret;
u16 reg;
u32 val;
for (i = 0; ; i++) {
reg = array[i].reg;
val = array[i].val;
if (reg == 0xffff && val == 0xffffffff)
break;
ret = rtl8xxxu_write32(priv, reg, val);
if (ret != sizeof(val)) {
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 198,085,117,526,971,260,000,000,000,000,000,000,000 | 25 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo)
{
int err = 0;
if (WARN_ON(afinfo->family >= NPROTO))
return -EAFNOSUPPORT;
spin_lock_bh(&xfrm_state_afinfo_lock);
if (unlikely(xfrm_state_afinfo[afinfo->family] != NULL))
err = -EEXIST;
else
rcu_assign_pointer(xfrm_state_afinfo[afinfo->famil... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 106,990,676,299,527,940,000,000,000,000,000,000,000 | 15 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static double mp_set_Ioff_v(_cimg_math_parser& mp) {
CImg<T> &img = mp.imgout;
const longT
off = (longT)_mp_arg(2),
whd = (longT)img.width()*img.height()*img.depth();
const double *ptrs = &_mp_arg(1) + 1;
if (off>=0 && off<whd) {
const unsigned int vs... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 42,855,750,051,724,710,000,000,000,000,000,000,000 | 13 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void intel_unmap_sg(struct device *dev, struct scatterlist *sglist,
int nelems, enum dma_data_direction dir,
unsigned long attrs)
{
dma_addr_t startaddr = sg_dma_address(sglist) & PAGE_MASK;
unsigned long nrpages = 0;
struct scatterlist *sg;
int i;
for_each_sg(sglist, sg, nelems, i) {
nrpages... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 184,608,217,081,999,100,000,000,000,000,000,000,000 | 15 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
SPL_METHOD(SplPriorityQueue, compare)
{
zval *a, *b;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &a, &b) == FAILURE) {
return;
}
RETURN_LONG(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
} | 0 | [] | php-src | 1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1 | 131,345,991,507,699,230,000,000,000,000,000,000,000 | 10 | Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error |
color2index(VTermColor *color, int fg, int *boldp)
{
int red = color->red;
int blue = color->blue;
int green = color->green;
if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
{
/* First 16 colors and default: use the ANSI index, because these
* colors can be redefined. */
if (t_colors >= 16)
... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 74,284,871,165,044,380,000,000,000,000,000,000,000 | 73 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
__acquires(&keyring_serialise_link_sem)
{
struct assoc_array_edit *edit;
int ret;
kenter("%d,%s,%s,",
keyring->serial, index_key->type->name, index_key->description);
BUG_ON(index_key->desc_len == 0);
if (keyring->type != &key_type_keyring)
return -ENOTDIR;
down_write(&keyring->sem);
ret = -EKEYR... | 0 | [
"CWE-476"
] | linux | c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81 | 213,534,426,185,609,100,000,000,000,000,000,000,000 | 60 | KEYS: Remove key_type::match in favour of overriding default by match_preparse
A previous patch added a ->match_preparse() method to the key type. This is
allowed to override the function called by the iteration algorithm.
Therefore, we can just set a default that simply checks for an exact match of
the key descripti... |
static inline void txd_chain(struct dma_async_tx_descriptor *txd, struct dma_async_tx_descriptor *next)
{
BUG();
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 56,170,423,235,373,740,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static struct rbd_client *rbd_get_client(struct ceph_options *ceph_opts)
{
struct rbd_client *rbdc;
int ret;
mutex_lock(&client_mutex);
rbdc = rbd_client_find(ceph_opts);
if (rbdc) {
ceph_destroy_options(ceph_opts);
/*
* Using an existing client. Make sure ->pg_pools is up to
* date before we look up ... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 5,408,835,552,869,931,000,000,000,000,000,000,000 | 28 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
Nef_polyhedron_2<T,Items,Mark> boundary() const
/*{\Mop returns the boundary of |\Mvar|.}*/
{ Nef_polyhedron_2<T,Items,Mark> res = *this;
res.extract_boundary();
return res;
} | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 132,512,984,213,267,180,000,000,000,000,000,000,000 | 6 | Fix Nef_2 and Nef_S2 IO |
static inline struct sock *pop_stack(void)
{
struct sock *p = gc_current;
gc_current = unix_sk(p)->gc_tree;
return p;
} | 1 | [] | linux-2.6 | 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9 | 253,841,771,000,451,100,000,000,000,000,000,000,000 | 6 | [AF_UNIX]: Rewrite garbage collector, fixes race.
Throw out the old mark & sweep garbage collector and put in a
refcounting cycle detecting one.
The old one had a race with recvmsg, that resulted in false positives
and hence data loss. The old algorithm operated on all unix sockets
in the system, so any additional l... |
static u64 precise_store_data(u64 status)
{
union intel_x86_pebs_dse dse;
u64 val = P(OP, STORE) | P(SNOOP, NA) | P(LVL, L1) | P(TLB, L2);
dse.val = status;
/*
* bit 4: TLB access
* 1 = stored missed 2nd level TLB
*
* so it either hit the walker or the OS
* otherwise hit 2nd level TLB
*/
if (dse.st_s... | 0 | [
"CWE-755"
] | linux | d88d05a9e0b6d9356e97129d4ff9942d765f46ea | 56,451,398,482,378,660,000,000,000,000,000,000,000 | 37 | perf/x86/intel: Fix a crash caused by zero PEBS status
A repeatable crash can be triggered by the perf_fuzzer on some Haswell
system.
https://lore.kernel.org/lkml/7170d3b-c17f-1ded-52aa-cc6d9ae999f4@maine.edu/
For some old CPUs (HSW and earlier), the PEBS status in a PEBS record
may be mistakenly set to 0. To minimiz... |
int mgr_rmpp_debug_toggle(p_fm_config_conx_hdlt hdl, fm_mgr_type_t mgr, int argc, char *argv[]) {
fm_mgr_config_errno_t res;
fm_msg_ret_code_t ret_code;
if((res = fm_mgr_simple_query(hdl, FM_ACT_GET, FM_DT_RMPP_DEBUG_TOGGLE, mgr, 0, NULL, &ret_code)) != FM_CONF_OK)
{
fprintf(stderr, "sa_rmpp_debug_toggle: Faile... | 0 | [
"CWE-362"
] | opa-fm | c5759e7b76f5bf844be6c6641cc1b356bbc83869 | 104,912,470,454,969,150,000,000,000,000,000,000,000 | 15 | Fix scripts and code that use well-known tmp files. |
static json_bool json_str_to_uint64(json_object *jobj, uint64_t *value)
{
char *endptr;
unsigned long long tmp;
errno = 0;
tmp = strtoull(json_object_get_string(jobj), &endptr, 10);
if (*endptr || errno) {
*value = 0;
return 0;
}
*value = tmp;
return 1;
} | 0 | [
"CWE-787"
] | cryptsetup | 52f5cb8cedf22fb3e14c744814ec8af7614146c7 | 67,260,470,862,235,090,000,000,000,000,000,000,000 | 15 | Check segment gaps regardless of heap space.
Segments are validated in hdr_validate_segments. Gaps in segment keys
are detected when collecting offsets. But if an invalid segment is very
large, larger than count, it could happen that cryptsetup is unable to
allocate enough memory, not giving a clue about what actually... |
QPDFAnnotationObjectHelper::Members::Members()
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 140,275,326,802,929,320,000,000,000,000,000,000,000 | 3 | 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 ... |
Proto_SecurityCheckRequest(ServiceConnection *conn,
ProtoRequest *req)
{
VGAuthError err;
gboolean isSecure = ServiceNetworkIsConnectionPrivateSuperUser(conn);
switch (req->reqType) {
/*
* This comes over the public connection; alwsys let it through.
*/
case P... | 1 | [] | open-vm-tools | 70a74758bfe0042c27f15ce590fb21a2bc54d745 | 197,467,841,338,532,200,000,000,000,000,000,000,000 | 94 | Properly check authorization on incoming guestOps requests.
Fix public pipe request checks. Only a SessionRequest type should
be accepted on the public pipe. |
static void autocomplete_ms_file(RCore* core, RLineCompletion *completion, const char *str) {
r_return_if_fail (str);
char *pipe = strchr (str, '>');
char *path = (core->rfs && *(core->rfs->cwd)) ? *(core->rfs->cwd): "/";
if (pipe) {
str = r_str_trim_head_ro (pipe + 1);
}
if (str && !*str) {
autocomplete_ms_p... | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 29,120,204,039,032,935,000,000,000,000,000,000,000 | 13 | Fix #16303 - c->table_query double free (#16318) |
unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned char *limit)
{
int extdatalen=0;
unsigned char *ret = p;
#ifndef OPENSSL_NO_NPN
char next_proto_neg_seen;
#endif
/* don't add extensions for SSLv3, unless doing secure renegotiation */
if (s->version == SSL3_VERSION && !s->s3->send_conn... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 63,095,558,760,259,290,000,000,000,000,000,000,000 | 148 | Add Next Protocol Negotiation. |
get_files_from_fallbacks (GList *fallbacks)
{
MoveFileCopyFallback *fallback;
GList *res, *l;
res = NULL;
for (l = fallbacks; l != NULL; l = l->next) {
fallback = l->data;
res = g_list_prepend (res, fallback->file);
}
return g_list_reverse (res);
} | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 6,013,961,398,581,146,000,000,000,000,000,000,000 | 12 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
static int push_insn(int t, int w, int e, struct bpf_verifier_env *env)
{
if (e == FALLTHROUGH && insn_state[t] >= (DISCOVERED | FALLTHROUGH))
return 0;
if (e == BRANCH && insn_state[t] >= (DISCOVERED | BRANCH))
return 0;
if (w < 0 || w >= env->prog->len) {
verbose("jump out of range from insn %d to %d\n", t... | 0 | [
"CWE-200"
] | linux | 0d0e57697f162da4aa218b5feafe614fb666db07 | 43,429,558,936,976,940,000,000,000,000,000,000,000 | 37 | bpf: don't let ldimm64 leak map addresses on unprivileged
The patch fixes two things at once:
1) It checks the env->allow_ptr_leaks and only prints the map address to
the log if we have the privileges to do so, otherwise it just dumps 0
as we would when kptr_restrict is enabled on %pK. Given the latter is
of... |
static void TraceArcPath(PrimitiveInfo *primitive_info,const PointInfo start,
const PointInfo end,const PointInfo arc,const double angle,
const MagickBooleanType large_arc,const MagickBooleanType sweep)
{
double
alpha,
beta,
delta,
factor,
gamma,
theta;
PointInfo
center,
points[... | 0 | [
"CWE-399",
"CWE-119"
] | ImageMagick | 726812fa2fa7ce16bcf58f6e115f65427a1c0950 | 289,942,031,474,413,430,000,000,000,000,000,000,000 | 131 | Prevent buffer overflow in magick/draw.c |
OPJ_BOOL opj_j2k_write_tile (opj_j2k_t * p_j2k,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size,
opj_stre... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 8,585,910,272,585,941,000,000,000,000,000,000,000 | 36 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
bool ntlmssp_check_response(const struct ntlmssp_response *response,
size_t data_size, const char **error)
{
if (data_size < sizeof(struct ntlmssp_response)) {
*error = "response too short";
return FALSE;
}
if (read_le64(&response->magic) != NTLMSSP_MAGIC) {
*error = "signature mismatch";
return FALS... | 0 | [
"CWE-125"
] | core | fb246611e62ad8c5a95b0ca180a63f17aa34b0d8 | 308,575,781,816,202,850,000,000,000,000,000,000,000 | 27 | lib-ntlm: Check buffer length on responses
Add missing check for buffer length.
If this is not checked, it is possible to send message which
causes read past buffer bug.
Broken in c7480644202e5451fbed448508ea29a25cffc99c |
static void lo_flock(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi,
int op)
{
int res;
(void)ino;
res = flock(lo_fi_fd(req, fi), op);
fuse_reply_err(req, res == -1 ? errno : 0);
} | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 335,887,906,352,891,720,000,000,000,000,000,000,000 | 10 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
Item_field::Item_field(THD *thd, Name_resolution_context *context_arg,
const char *db_arg,const char *table_name_arg,
const char *field_name_arg)
:Item_ident(thd, context_arg, db_arg, table_name_arg, field_name_arg),
field(0), item_equal(0),
have_privileges(0), any_... | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 90,113,378,434,140,680,000,000,000,000,000,000,000 | 13 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
int mnt_fs_set_attributes(struct libmnt_fs *fs, const char *optstr)
{
return strdup_to_struct_member(fs, attrs, optstr);
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 299,220,437,914,421,000,000,000,000,000,000,000,000 | 4 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
static int compute_calls(RCore *core) {
RListIter *iter;
RAnalFunction *fcn;
RList *xrefs;
int cov = 0;
r_list_foreach (core->anal->fcns, iter, fcn) {
xrefs = r_anal_fcn_get_xrefs (core->anal, fcn);
if (xrefs) {
cov += r_list_length (xrefs);
r_list_free (xrefs);
xrefs = NULL;
}
}
return cov;
} | 0 | [
"CWE-703",
"CWE-908"
] | radare2 | 4d3811681a80f92a53e795f6a64c4b0fc2c8dd22 | 167,636,482,685,636,890,000,000,000,000,000,000,000 | 15 | Fix segfault in adf (#16230) |
static int __ext4_journalled_invalidatepage(struct page *page,
unsigned int offset,
unsigned int length)
{
journal_t *journal = EXT4_JOURNAL(page->mapping->host);
trace_ext4_journalled_invalidatepage(page, offset, length);
/*
* If it's a full truncate we just forget about the pending dirtying
... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 238,917,209,588,839,640,000,000,000,000,000,000,000 | 16 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static void sighandler(int sig __UNUSED__)
{
signal(sig, SIG_IGN);
signal(SIGTERM, SIG_IGN);
signal(SIGTTIN, SIG_IGN);
signal(SIGTTOU, SIG_IGN);
print_err("Interrupted\n");
fatal_exit(&local_control);
} | 0 | [
"CWE-703",
"CWE-787"
] | lrzip | 5faf80cd53ecfd16b636d653483144cd12004f46 | 183,462,109,779,270,500,000,000,000,000,000,000,000 | 9 | Fix control->suffix being deallocated as heap memory as reported by Pietro Borrello. |
TEST(RegexMatchExpression, MatchesElementDotAllOn) {
BSONObj match = BSON("x"
<< "a b");
BSONObj matchDotAll = BSON("x"
<< "a\nb");
BSONObj notMatch = BSON("x"
<< "ab");
RegexMatchExpression regex;
ASSERT(regex.init(... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 170,818,965,905,428,100,000,000,000,000,000,000,000 | 13 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
TEST(Context, EmptyHeadersAttributes) {
HeadersWrapper<Http::RequestHeaderMap> headers(nullptr);
auto header = headers[CelValue::CreateStringView(Referer)];
EXPECT_FALSE(header.has_value());
EXPECT_EQ(0, headers.size());
EXPECT_TRUE(headers.empty());
} | 1 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 155,470,871,879,723,200,000,000,000,000,000,000,000 | 7 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
int uECC_make_key(uint8_t *public_key,
uint8_t *private_key,
uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
uECC_word_t *_private = (uECC_word_t *)private_key;
uECC_word_t *_public = (uECC_word_t *)public_key;
#else
uECC_word_t _private[uECC_MAX_WORDS];
uECC_wo... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 89,509,185,417,413,110,000,000,000,000,000,000,000 | 29 | Fix for #168 |
//! Convert C-string to upper case.
inline void uppercase(char *const str) {
if (str) for (char *ptr = str; *ptr; ++ptr) *ptr = uppercase(*ptr); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 247,341,083,502,252,560,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
void odtt_box_del(GF_Box *s)
{
GF_OMADRMTransactionTrackingBox *ptr = (GF_OMADRMTransactionTrackingBox*)s;
gf_free(ptr);
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 331,963,611,624,799,460,000,000,000,000,000,000,000 | 5 | fixed #1879 |
bool __fastcall TNullConsole::WantsProgress()
{
return false;
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 27,820,431,545,479,917,000,000,000,000,000,000,000 | 4 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
static void test_append_char(void) {
char c = 'c';
char buf[1];
char *out = buf;
size_t n_out = sizeof(buf);
int r;
r = c_shquote_append_char(&out, &n_out, c);
c_assert(!r);
c_assert(buf[0] == c);
c_assert(out == buf + 1);
c_assert(n_out =... | 0 | [
"CWE-787"
] | c-shquote | 7fd15f8e272136955f7ffc37df29fbca9ddceca1 | 95,784,634,383,699,100,000,000,000,000,000,000,000 | 16 | strnspn: fix buffer overflow
Fix the strnspn and strncspn functions to use a properly sized buffer.
It used to be 1 byte too short. Checking for `0xff` in a string will
thus write `0xff` once byte beyond the stack space of the local buffer.
Note that the public API does not allow to pass `0xff` to those
functions. Th... |
QPDFXRefEntry::getObjStreamNumber() const
{
if (this->type != 2)
{
throw std::logic_error(
"getObjStreamNumber called for xref entry of type != 2");
}
return this->field1;
} | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 104,569,967,592,697,870,000,000,000,000,000,000,000 | 9 | 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 ... |
Controller::sendHeaderToAppWithHttpProtocolWithBuffering(Request *req,
unsigned int offset, HttpHeaderConstructionCache &cache)
{
struct iovec *buffers;
unsigned int nbuffers, dataSize;
bool ok;
ok = constructHeaderBuffersForHttpProtocol(req, NULL, 0, nbuffers,
dataSize, cache);
assert(ok);
buffers = (struct... | 0 | [
"CWE-20",
"CWE-476"
] | passenger | ddb8ecc4ebf260e4967f57f271d4f5761abeac3e | 339,094,135,530,137,900,000,000,000,000,000,000,000 | 32 | Fix CVE-2015-7519 header collision vulnerability |
// Count parentheses/brackets level of each character of the expression.
CImg<uintT> get_level(CImg<charT>& expr) const {
bool is_escaped = false, next_is_escaped = false;
unsigned int mode = 0, next_mode = 0; // { 0=normal | 1=char-string | 2=vector-string
CImg<uintT> res(expr._widt... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 70,455,976,965,076,695,000,000,000,000,000,000,000 | 37 | Fix other issues in 'CImg<T>::load_bmp()'. |
INST_HANDLER (andi) { // ANDI Rd, K
// CBR Rd, K (= ANDI Rd, 1-K)
if (len < 2) {
return;
}
int d = ((buf[0] >> 4) & 0xf) + 16;
int k = ((buf[1] & 0x0f) << 4) | (buf[0] & 0x0f);
op->val = k;
ESIL_A ("%d,r%d,&,", k, d); // 0: Rd & Rr
__generic_bitop_flags (op); // up flags
ESIL_A ("r%d,=,", d); // ... | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 17,494,550,180,523,035,000,000,000,000,000,000,000 | 12 | Fix crash in anal.avr |
unlinkSess(ptcpsess_t *pSess) {
ptcpsrv_t *pSrv = pSess->pLstn->pSrv;
pthread_mutex_lock(&pSrv->mutSessLst);
pSrv->iTCPSessCnt--;
/* finally unlink session from structures */
if(pSess->next != NULL)
pSess->next->prev = pSess->prev;
if(pSess->prev == NULL) {
/* need to update root! */
pSrv->pSess = pSess->ne... | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 33,447,604,933,683,817,000,000,000,000,000,000,000 | 15 | net bugfix: potential buffer overrun |
void Magick::Image::map(const Image &mapImage_,const bool dither_)
{
modifyImage();
GetPPException;
options()->quantizeDither(dither_);
RemapImage(options()->quantizeInfo(),image(),mapImage_.constImage(),
exceptionInfo);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 310,405,364,996,000,670,000,000,000,000,000,000,000 | 9 | Added missing return to avoid use after free. |
virtual uint32_t op_mask() { return RGW_OP_TYPE_DELETE; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 303,437,387,854,377,300,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
ATPrepAlterColumnType(List **wqueue,
AlteredTableInfo *tab, Relation rel,
bool recurse, bool recursing,
AlterTableCmd *cmd, LOCKMODE lockmode)
{
char *colName = cmd->name;
ColumnDef *def = (ColumnDef *) cmd->def;
TypeName *typeName = def->typeName;
Node *transform = def->raw_default;
... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 255,640,794,495,604,030,000,000,000,000,000,000,000 | 168 | 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 void skcipher_pull_sgl(struct sock *sk, int used)
{
struct alg_sock *ask = alg_sk(sk);
struct skcipher_ctx *ctx = ask->private;
struct skcipher_sg_list *sgl;
struct scatterlist *sg;
int i;
while (!list_empty(&ctx->tsgl)) {
sgl = list_first_entry(&ctx->tsgl, struct skcipher_sg_list,
list);
s... | 0 | [] | linux-stable | 36c84b22ac8aa041cbdfbe48a55ebb32e3521704 | 60,468,143,047,741,550,000,000,000,000,000,000,000 | 41 | crypto: algif_skcipher - Load TX SG list after waiting
commit 4f0414e54e4d1893c6f08260693f8ef84c929293 upstream.
We need to load the TX SG list in sendmsg(2) after waiting for
incoming data, not before.
[connoro@google.com: backport to 3.18, where the relevant logic is
located in skcipher_recvmsg() rather than skcip... |
static inline int can_merge(struct ext4_system_zone *entry1,
struct ext4_system_zone *entry2)
{
if ((entry1->start_blk + entry1->count) == entry2->start_blk)
return 1;
return 0;
} | 1 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 10,171,964,032,547,888,000,000,000,000,000,000,000 | 7 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
static int io_poll_update(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *preq;
int ret2, ret = 0;
bool locked;
spin_lock(&ctx->completion_lock);
preq = io_poll_find(ctx, req->poll_update.old_user_data, true);
if (!preq || !io_poll_disarm(preq)) {
spin_u... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 2,447,753,456,707,780,200,000,000,000,000,000,000 | 43 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
int ZEXPORT deflatePrime (strm, bits, value)
z_streamp strm;
int bits;
int value;
{
deflate_state *s;
int put;
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
return Z_BUF_ERROR;
do {
put =... | 0 | [
"CWE-284",
"CWE-787"
] | zlib | 5c44459c3b28a9bd3283aaceab7c615f8020c531 | 244,156,110,563,332,430,000,000,000,000,000,000 | 24 | Fix a bug that can crash deflate on some input when using Z_FIXED.
This bug was reported by Danilo Ramos of Eideticom, Inc. It has
lain in wait 13 years before being found! The bug was introduced
in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
option forces the use of fixed Huffman codes. For rare input... |
void PackLinuxElf64::unpack(OutputFile *fo)
{
if (e_phoff != sizeof(Elf64_Ehdr)) {// Phdrs not contiguous with Ehdr
throwCantUnpack("bad e_phoff");
}
unsigned const c_phnum = get_te16(&ehdri.e_phnum);
upx_uint64_t old_data_off = 0;
upx_uint64_t old_data_len = 0;
upx_uint64_t old_dtinit =... | 0 | [
"CWE-415"
] | upx | d9288213ec156dffc435566b9d393d23e87c6914 | 275,762,369,138,094,200,000,000,000,000,000,000,000 | 318 | More checking of PT_DYNAMIC and its contents.
https://github.com/upx/upx/issues/206
modified: p_lx_elf.cpp |
static void stellaris_enet_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = stellaris_enet_init;
dc->unrealize = stellaris_enet_unrealize;
dc->props = stellaris_enet_properties;
} | 1 | [
"CWE-119",
"CWE-787"
] | qemu | 2e1198672759eda6e122ff38fcf6df06f27e0fe2 | 210,127,509,055,810,260,000,000,000,000,000,000,000 | 9 | hw/net/stellaris_enet: Convert to vmstate
Convert this device to use vmstate for its save/load, including
providing a post_load function that sanitizes inbound data to
avoid possible buffer overflows if it is malicious.
The sanitizing fixes CVE-2013-4532 (though nobody should be
relying on the security properties of ... |
void waitForJwksResponse(const std::string& status, const std::string& jwks_body) {
AssertionResult result =
fake_upstreams_[1]->waitForHttpConnection(*dispatcher_, fake_jwks_connection_);
RELEASE_ASSERT(result, result.message());
result = fake_jwks_connection_->waitForNewStream(*dispatcher_, jwks... | 0 | [
"CWE-476",
"CWE-703"
] | envoy | 9371333230b1a6e1be2eccf4868771e11af6253a | 184,203,407,688,702,400,000,000,000,000,000,000,000 | 14 | CVE-2021-43824
jwt_atuhn: fixed the crash when a CONNECT request is sent to JWT filter
configured with regex match.
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
rend_service_check_private_dir_impl(const or_options_t *options,
const rend_service_t *s,
int create)
{
cpd_check_t check_opts = CPD_NONE;
if (create) {
check_opts |= CPD_CREATE;
} else {
check_opts |= CPD_CHECK_MODE_ONLY;
check_... | 0 | [
"CWE-532"
] | tor | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 | 220,793,803,561,538,460,000,000,000,000,000,000,000 | 22 | Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380 |
static int int_ssl_check(REQUEST *request, SSL *s, int ret, char const *text)
{
int e;
unsigned long l;
if ((l = ERR_get_error()) != 0) {
char const *p = ERR_error_string(l, NULL);
if (p) ROPTIONAL(REDEBUG, ERROR, "SSL says: %s", p);
}
e = SSL_get_error(s, ret);
switch (e) {
/*
* These seem to be harmle... | 0 | [
"CWE-295"
] | freeradius-server | 874b39451702338389260edbfc52b381b20352ec | 101,672,347,839,566,110,000,000,000,000,000,000,000 | 58 | Set X509_V_FLAG_CRL_CHECK_ALL |
xmlSchemaParseIDC(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaPtr schema,
xmlNodePtr node,
xmlSchemaTypeType idcCategory,
const xmlChar *targetNamespace)
{
xmlSchemaIDCPtr item = NULL;
xmlNodePtr child = NULL;
xmlAttrPtr attr;
const xmlChar *name = NULL;
xmlSchemaIDCSelectPtr field = NULL,... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 303,770,761,466,651,570,000,000,000,000,000,000,000 | 135 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
GF_Err tx3g_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_Tx3gSampleEntryBox *ptr = (GF_Tx3gSampleEntryBox*)s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_data(bs, ptr->reserved, 6);
gf_bs_write_u16(bs, ptr->dataReferenceIndex);
gf_bs_write_u32(bs, ptr->displayFlags);
gf_bs_write_... | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 199,448,103,430,655,480,000,000,000,000,000,000,000 | 17 | fixed #1768 |
static int update_qd(struct gfs2_sbd *sdp, struct gfs2_quota_data *qd)
{
struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
struct gfs2_quota q;
struct gfs2_quota_lvb *qlvb;
loff_t pos;
int error;
memset(&q, 0, sizeof(struct gfs2_quota));
pos = qd2offset(qd);
error = gfs2_internal_read(ip, NULL, (char *)&q, ... | 0 | [
"CWE-399"
] | linux-2.6 | 7e619bc3e6252dc746f64ac3b486e784822e9533 | 275,844,781,533,221,600,000,000,000,000,000,000,000 | 24 | GFS2: Fix writing to non-page aligned gfs2_quota structures
This is the upstream fix for this bug. This patch differs
from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
value field of the quota. In upstream quota code, we're
required to write the entire quota (88 bytes) which can be split
across... |
static const char *cgm_canonical_path(void *hdata)
{
struct cgm_data *d = hdata;
if (!d || !d->cgroup_path)
return NULL;
return d->cgroup_path;
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 105,633,674,834,242,130,000,000,000,000,000,000,000 | 8 | 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... |
nfs4_check_server_scope(struct nfs41_server_scope *s1,
struct nfs41_server_scope *s2)
{
if (s1->server_scope_sz != s2->server_scope_sz)
return false;
return memcmp(s1->server_scope, s2->server_scope,
s1->server_scope_sz) == 0;
} | 0 | [
"CWE-703"
] | linux | dd99e9f98fbf423ff6d365b37a98e8879170f17c | 74,023,041,366,523,030,000,000,000,000,000,000,000 | 8 | NFSv4: Initialise connection to the server in nfs4_alloc_client()
Set up the connection to the NFSv4 server in nfs4_alloc_client(), before
we've added the struct nfs_client to the net-namespace's nfs_client_list
so that a downed server won't cause other mounts to hang in the trunking
detection code.
Reported-by: Mich... |
static unsigned int __bpf_prog_ret1(const void *ctx,
const struct bpf_insn *insn)
{
return 1;
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 325,618,182,595,919,540,000,000,000,000,000,000,000 | 5 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static void check_shell(const char *shell)
{
if (*shell != '/')
errx(EXIT_FAILURE, _("shell must be a full path name"));
if (access(shell, F_OK) < 0)
errx(EXIT_FAILURE, _("\"%s\" does not exist"), shell);
if (access(shell, X_OK) < 0)
errx(EXIT_FAILURE, _("\"%s\" is not executable"), shell);
if (illegal_passwd... | 0 | [
"CWE-209"
] | util-linux | faa5a3a83ad0cb5e2c303edbfd8cd823c9d94c17 | 121,692,433,871,610,550,000,000,000,000,000,000,000 | 27 | chsh, chfn: remove readline support [CVE-2022-0563]
The readline library uses INPUTRC= environment variable to get a path
to the library config file. When the library cannot parse the
specified file, it prints an error message containing data from the
file.
Unfortunately, the library does not use secure_getenv() (or ... |
uchar *in_datetime::get_value(Item *item)
{
tmp.val= item->val_datetime_packed(current_thd);
if (item->null_value)
return 0;
tmp.unsigned_flag= 1L;
return (uchar*) &tmp;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 305,422,793,868,640,700,000,000,000,000,000,000,000 | 8 | 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 ... |
static void iscsi_close(BlockDriverState *bs)
{
IscsiLun *iscsilun = bs->opaque;
struct iscsi_context *iscsi = iscsilun->iscsi;
iscsi_detach_aio_context(bs);
if (iscsi_is_logged_in(iscsi)) {
iscsi_logout_sync(iscsi);
}
iscsi_destroy_context(iscsi);
if (iscsilun->dd) {
g_free... | 0 | [
"CWE-125"
] | qemu | ff0507c239a246fd7215b31c5658fc6a3ee1e4c5 | 258,341,585,435,162,250,000,000,000,000,000,000,000 | 19 | block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb
There is an overflow, the source 'datain.data[2]' is 100 bytes,
but the 'ss' is 252 bytes.This may cause a security issue because
we can access a lot of unrelated memory data.
The len for sbp copy data should take the minimum of mx_sb_len and
sb_len_wr, no... |
register_pk_elg_progress ( void (*cb)( void *, int), void *cb_data )
{
progress_cb = cb;
progress_cb_data = cb_data;
} | 0 | [
"CWE-200"
] | gnupg | ff53cf06e966dce0daba5f2c84e03ab9db2c3c8b | 261,151,993,340,706,430,000,000,000,000,000,000,000 | 5 | 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 to what ... |
term_close_buffer(buf_T *buf, buf_T *old_curbuf)
{
free_terminal(buf);
if (old_curbuf != NULL)
{
--curbuf->b_nwindows;
curbuf = old_curbuf;
curwin->w_buffer = curbuf;
++curbuf->b_nwindows;
}
/* Wiping out the buffer will also close the window and call
* free_terminal(). */
do_buffer(DO... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 42,684,581,132,993,910,000,000,000,000,000,000,000 | 15 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
ossl_asn1_is_explicit(VALUE obj)
{
VALUE s;
s = ossl_asn1_get_tagging(obj);
if (NIL_P(s) || s == sym_IMPLICIT)
return 0;
else if (s == sym_EXPLICIT)
return 1;
else
ossl_raise(eASN1Error, "invalid tag default");
} | 0 | [
"CWE-119"
] | openssl | 1648afef33c1d97fb203c82291b8a61269e85d3b | 327,960,549,565,139,540,000,000,000,000,000,000,000 | 12 | asn1: fix out-of-bounds read in decoding constructed objects
OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds
read. int_ossl_asn1_decode0_cons() does not give the correct available
length to ossl_asn1_decode() when decoding the inner components of a
constructed object. This can cause out-of-bound... |
bool ZRtp::isPeerEnrolled() {
return peerIsEnrolled;
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 159,136,273,635,093,200,000,000,000,000,000,000,000 | 3 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
output_buffer& operator<<(output_buffer& output, const Finished& fin)
{
if (fin.get_length() == FINISHED_SZ) {
output.write(fin.hashes_.md5_, MD5_LEN);
output.write(fin.hashes_.sha_, SHA_LEN);
}
else // TLS_FINISHED_SZ
output.write(fin.hashes_.md5_, TLS_FINISHED_SZ);
return o... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 180,428,721,231,608,750,000,000,000,000,000,000,000 | 11 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
DEFUN (no_bgp_enforce_first_as,
no_bgp_enforce_first_as_cmd,
"no bgp enforce-first-as",
NO_STR
BGP_STR
"Enforce the first AS for EBGP routes\n")
{
struct bgp *bgp;
bgp = vty->index;
bgp_flag_unset (bgp, BGP_FLAG_ENFORCE_FIRST_AS);
return CMD_SUCCESS;
} | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 202,879,886,147,497,920,000,000,000,000,000,000,000 | 13 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static int settermprop_bool(VTermState *state, VTermProp prop, int v)
{
VTermValue val;
val.boolean = v;
return vterm_state_set_termprop(state, prop, &val);
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 181,765,111,191,832,700,000,000,000,000,000,000,000 | 6 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
static double mp_vminabs(_cimg_math_parser& mp) {
_cimg_mp_vfunc(res = vec.minabs());
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 8,780,919,860,389,561,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
DeepTiledInputFile::Data::getTileBuffer (int number)
{
return tileBuffers[number % tileBuffers.size()];
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 291,773,762,908,703,870,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
wl_list_insert(struct wl_list *list, struct wl_list *elm)
{
elm->prev = list;
elm->next = list->next;
list->next = elm;
elm->next->prev = elm;
} | 0 | [] | wayland | b19488c7154b902354cb26a27f11415d7799b0b2 | 312,939,061,337,112,240,000,000,000,000,000,000,000 | 7 | util: Limit size of wl_map
Since server IDs are basically indistinguishable from really big client
IDs at many points in the source, it's theoretically possible to overflow
a map and either overflow server IDs into the client ID space, or grow
client IDs into the server ID space. This would currently take a massive
am... |
static inline int htx_nbblks(const struct htx *htx)
{
return ((htx->head != -1) ? (htx->tail + 1 - htx->head) : 0);
} | 0 | [
"CWE-190"
] | haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | 1,809,568,171,314,772,600,000,000,000,000,000,000 | 4 | BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer
Ori Hollander of JFrog Security reported that htx_add_header() and
htx_add_trailer() were missing a length check on the header name. While
this does not allow to overwrite any memory area, it results in bits of
the header name length to sli... |
static void bond_vlan_rx_kill_vid(struct net_device *bond_dev, uint16_t vid)
{
struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave;
int i, res;
bond_for_each_slave(bond, slave, i) {
struct net_device *slave_dev = slave->dev;
const struct net_device_ops *slave_ops = slave_dev->netdev_ops;
if ((... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 18,819,677,092,074,939,000,000,000,000,000,000,000 | 22 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
void MemoryInfo(MemoryTracker* tracker) const override {
tracker->TrackField("continuation_data", continuation_data);
} | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 296,351,081,525,676,250,000,000,000,000,000,000,000 | 3 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
void set_pixel_height(uint64_t height) { pixel_height_ = height; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 150,356,303,784,882,880,000,000,000,000,000,000,000 | 1 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
TEST(FormatterTest, MinusSign) {
EXPECT_EQ("42", format("{0:-}", 42));
EXPECT_EQ("-42", format("{0:-}", -42));
EXPECT_EQ("42", format("{0:-}", 42));
EXPECT_THROW_MSG(format("{0:-}", 42u),
FormatError, "format specifier '-' requires signed argument");
EXPECT_EQ("42", format("{0:-}", 42l));
EXPECT_THROW... | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 305,119,710,117,699,400,000,000,000,000,000,000,000 | 23 | Fix segfault on complex pointer formatting (#642) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.