func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void handshakeSuc(AsyncSSLSocket* sock) noexcept override {
handshakeSuccess_ = true;
sock->getSSLSharedCiphers(sharedCiphers_);
sock->getSSLServerCiphers(serverCiphers_);
sock->getSSLClientCiphers(clientCiphers_);
chosenCipher_ = sock->getNegotiatedCipherName();
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 305,383,925,475,205,820,000,000,000,000,000,000,000 | 7 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
AVPacket *avpkt,
const AVFrame *frame,
int *got_packet_ptr)
{
AVFrame tmp;
AVFrame *padded_frame = NULL;
... | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 35,701,260,000,782,857,000,000,000,000,000,000,000 | 122 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
normal_cmd_get_more_chars(
int idx_arg,
cmdarg_T *cap,
int *need_flushbuf UNUSED)
{
int idx = idx_arg;
int c;
int *cp;
int repl = FALSE; // get character for replace mode
int lit = FALSE; // get extra character literally
int langmap_active = FALSE; // using :lmap mappings
... | 0 | [
"CWE-416"
] | vim | e2fa213cf571041dbd04ab0329303ffdc980678a | 67,947,590,732,788,390,000,000,000,000,000,000,000 | 220 | patch 8.2.5024: using freed memory with "]d"
Problem: Using freed memory with "]d".
Solution: Copy the pattern before searching. |
apr_status_t h2_stream_send_frame(h2_stream *stream, int ftype, int flags, size_t frame_len)
{
apr_status_t status = APR_SUCCESS;
int new_state, eos = 0;
new_state = on_frame_send(stream->state, ftype);
if (new_state < 0) {
ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
... | 1 | [
"CWE-770"
] | mod_h2 | dd05d49abe0f67512ce9ed5ba422d7711effecfb | 129,526,852,892,697,080,000,000,000,000,000,000,000 | 48 | * 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... |
CImg<Tfloat> get_haar(const char axis, const bool invert=false, const unsigned int nb_scales=1) const {
if (is_empty() || !nb_scales) return +*this;
CImg<Tfloat> res;
const Tfloat sqrt2 = std::sqrt(2.f);
if (nb_scales==1) {
switch (cimg::lowercase(axis)) { // Single scale transform
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 133,966,331,768,394,020,000,000,000,000,000,000,000 | 141 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static MemoryRegionSection *address_space_lookup_region(AddressSpaceDispatch *d,
hwaddr addr,
bool resolve_subpage)
{
MemoryRegionSection *section = atomic_read(&d->mru_section);
subpage_t *subpage;
... | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 302,512,821,476,447,300,000,000,000,000,000,000,000 | 24 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
void JBIG2HuffmanDecoder::reset()
{
buf = 0;
bufLen = 0;
} | 0 | [
"CWE-476",
"CWE-190"
] | poppler | 27354e9d9696ee2bc063910a6c9a6b27c5184a52 | 240,841,210,478,109,270,000,000,000,000,000,000,000 | 5 | JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up |
zzip_disk_entry_to_data(ZZIP_DISK * disk, struct zzip_disk_entry * entry)
{
struct zzip_file_header *file = zzip_disk_entry_to_file_header(disk, entry);
if (! file)
return 0; /* EBADMSG */
return zzip_file_header_to_data(file);
} | 0 | [] | zziplib | 72ec933663f738d8e166979aa7fd5590b2104a07 | 232,724,312,013,429,400,000,000,000,000,000,000,000 | 7 | need to check on endbuf for stored files #15 |
void fuse_force_forget(struct file *file, u64 nodeid)
{
struct inode *inode = file_inode(file);
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_req *req;
struct fuse_forget_in inarg;
memset(&inarg, 0, sizeof(inarg));
inarg.nlookup = 1;
req = fuse_get_req_nofail_nopages(fc, file);
req->in.h.opcode = FU... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 80,066,593,461,880,890,000,000,000,000,000,000,000 | 20 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
const BSONElement& chk(int t) const {
if (t != type()) {
StringBuilder ss;
if (eoo())
ss << "field not found, expected type " << t;
else
ss << "wrong type for field (" << fieldName() << ") " << type() << " != " << t;
msgasserted... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 9,722,673,422,506,979,000,000,000,000,000,000,000 | 11 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
int imap_create_mailbox(struct ImapAccountData *adata, char *mailbox)
{
char buf[2048], mbox[1024];
imap_munge_mbox_name(adata->unicode, mbox, sizeof(mbox), mailbox);
snprintf(buf, sizeof(buf), "CREATE %s", mbox);
if (imap_exec(adata, buf, IMAP_CMD_NO_FLAGS) != IMAP_EXEC_SUCCESS)
{
mutt_error(_("CREATE ... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 37,004,114,894,340,160,000,000,000,000,000,000,000 | 15 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
}
}
}
return GF_OK;
}
static void dasher_udpate_periods_and_manifest(GF_Filter *filter, GF_DasherCtx *ctx)
{
if (!ctx->subdur_done) {
ctx->last_dyn_period_id++;
ctx->next_pid_id_in_period = 0;
}
//update duration
dasher_update_period_duration(ctx, GF_TRUE);
| 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 228,683,548,272,808,520,000,000,000,000,000,000,000 | 16 | fixed #2138 |
static void align_position(AVIOContext *pb, int64_t offset, uint64_t size)
{
if (size < INT64_MAX - offset && avio_tell(pb) != offset + size)
avio_seek(pb, offset + size, SEEK_SET);
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 2b46ebdbff1d8dec7a3d8ea280a612b91a582869 | 265,049,744,794,061,750,000,000,000,000,000,000,000 | 5 | avformat/asfdec_o: Check size_bmp more fully
Fixes: integer overflow and out of array access
Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
SRC_ReloadSources(void)
{
FILE *in;
int i;
for (i = 0; i < n_sources; i++) {
in = open_dumpfile(sources[i], "r");
if (!in)
continue;
if (!SST_LoadFromFile(sources[i]->stats, in))
LOG(LOGS_WARN, "Could not load dump file for %s",
source_to_string(sources[i]));
else
LOG(... | 1 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 209,603,183,704,678,270,000,000,000,000,000,000,000 | 18 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
nfp_flower_repr_netdev_open(struct nfp_app *app, struct nfp_repr *repr)
{
int err;
err = nfp_flower_cmsg_portmod(repr, true, repr->netdev->mtu, false);
if (err)
return err;
netif_tx_wake_all_queues(repr->netdev);
return 0;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 8572cea1461a006bce1d06c0c4b0575869125fa4 | 112,435,217,873,769,610,000,000,000,000,000,000,000 | 12 | nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
In nfp_flower_spawn_phy_reprs, in the for loop over eth_tbl if any of
intermediate allocations or initializations fail memory is leaked.
requiered releases are added.
Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload")
Signed-of... |
void hugetlb_free_pgd_range(struct mmu_gather *tlb,
unsigned long addr, unsigned long end,
unsigned long floor, unsigned long ceiling)
{
pgd_t *pgd;
unsigned long next;
addr &= PMD_MASK;
if (addr < floor) {
addr += PMD_SIZE;
if (!addr)
return;
}
if (ceiling) {
ceiling &= PMD_MASK;
if (!c... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 14,293,127,665,442,878,000,000,000,000,000,000,000 | 31 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static int do_arpt_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)
{
int ret;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
switch (cmd) {
case ARPT_SO_SET_REPLACE:
ret = do_replace(sock_net(sk), user, len);
break;
case ARPT_SO_SET_ADD_COUNTERS:
ret = do_add_counters(sock_net(sk), u... | 0 | [
"CWE-200"
] | linux-2.6 | 42eab94fff18cb1091d3501cd284d6bd6cc9c143 | 269,714,897,050,849,480,000,000,000,000,000,000,000 | 23 | netfilter: arp_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
i... |
AuthorizationManagerImpl::~AuthorizationManagerImpl() {} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 282,128,431,859,190,180,000,000,000,000,000,000,000 | 1 | SERVER-38984 Validate unique User ID on UserCache hit |
absl::optional<CelValue> operator[](CelValue key) const override {
if (value_ == nullptr || !key.IsString()) {
return {};
}
auto str = std::string(key.StringOrDie().value());
if (!Http::validHeaderString(str)) {
// Reject key if it is an invalid header string
return {};
}
ret... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 23,213,439,427,033,483,000,000,000,000,000,000,000 | 12 | 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... |
static size_t get_store_length(size_t length)
{
if (length < (size_t) L64(251))
return 1;
if (length < (size_t) L64(65536))
return 2;
if (length < (size_t) L64(16777216))
return 3;
return 9;
} | 0 | [] | mariadb-connector-c | 27b2f3d1f1550dfaee0f63a331a406ab31c1b37e | 279,135,937,855,415,060,000,000,000,000,000,000,000 | 10 | various checks for corrupted packets in the protocol
also: check the return value of unpack_fields() |
static inline void *align_ptr(void *p, unsigned int align)
{
return (void *)ALIGN((unsigned long)p, align);
} | 0 | [
"CWE-787"
] | linux | af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1 | 48,285,740,980,417,720,000,000,000,000,000,000,000 | 4 | crypto: hmac - require that the underlying hash algorithm is unkeyed
Because the HMAC template didn't check that its underlying hash
algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))"
through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC
being used without having been keyed, resulting ... |
krb5_ldap_get_principal(krb5_context context, krb5_const_principal searchfor,
unsigned int flags, krb5_db_entry **entry_ptr)
{
char *user=NULL, *filter=NULL, *filtuser=NULL;
unsigned int tree=0, ntrees=1, princlen=0;
krb5_error_code t... | 0 | [
"CWE-476",
"CWE-90"
] | krb5 | e1caf6fb74981da62039846931ebdffed71309d1 | 152,674,033,486,097,960,000,000,000,000,000,000,000 | 150 | Fix flaws in LDAP DN checking
KDB_TL_USER_INFO tl-data is intended to be internal to the LDAP KDB
module, and not used in disk or wire principal entries. Prevent
kadmin clients from sending KDB_TL_USER_INFO tl-data by giving it a
type number less than 256 and filtering out type numbers less than 256
in kadm5_create_p... |
PHP_FUNCTION(iconv_mime_encode)
{
zend_string *field_name = NULL;
zend_string *field_value = NULL;
zend_string *tmp_str = NULL;
zval *pref = NULL;
smart_str retval = {0};
php_iconv_err_t err;
const char *in_charset = get_internal_encoding();
const char *out_charset = in_charset;
zend_long line_len = 76;
cons... | 0 | [
"CWE-125"
] | php-src | 7cf7148a8f8f4f55fb04de2a517d740bb6253eac | 11,513,986,013,713,634,000,000,000,000,000,000,000 | 96 | Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow |
int mp_read_radix(mp_int *a, const char *str, int radix)
{
return fp_read_radix(a, str, radix);
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 213,369,445,537,703,400,000,000,000,000,000,000,000 | 4 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
static loff_t mdesc_llseek(struct file *file, loff_t offset, int whence)
{
struct mdesc_handle *hp = file->private_data;
return no_seek_end_llseek_size(file, offset, whence, hp->handle_size);
} | 0 | [
"CWE-476"
] | sparc | 80caf43549e7e41a695c6d1e11066286538b336f | 205,859,773,292,372,240,000,000,000,000,000,000,000 | 6 | mdesc: fix a missing-check bug in get_vdev_port_node_info()
In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated
by kstrdup_const(), and it returns NULL when fails. So
'node_info->vdev_port.name' should be checked.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signed-off-by: David S. Miller <d... |
static int jas_iccattrtab_resize(jas_iccattrtab_t *tab, int maxents)
{
jas_iccattr_t *newattrs;
assert(maxents >= tab->numattrs);
newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents *
sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t));
if (!newattrs)
return -1;
tab->attrs = newattrs;
ta... | 1 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 54,012,279,870,042,910,000,000,000,000,000,000,000 | 12 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
_rl_macro_dumper_internal (print_readably, map, prefix)
int print_readably;
Keymap map;
char *prefix;
{
register int key;
char *keyname, *out;
int prefix_len;
for (key = 0; key < KEYMAP_SIZE; key++)
{
switch (map[key].type)
{
case ISMACR:
keyname = _rl_get_keyname (key);
out = ... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 129,769,325,113,100,880,000,000,000,000,000,000,000 | 60 | bash-4.4-rc2 release |
DEFUN (clear_ip_bgp_peer_rsclient,
clear_ip_bgp_peer_rsclient_cmd,
"clear ip bgp (A.B.C.D|X:X::X:X) rsclient",
CLEAR_STR
IP_STR
BGP_STR
"BGP neighbor IP address to clear\n"
"BGP IPv6 neighbor to clear\n"
"Soft reconfig for rsclient RIB\n")
{
if (argc == 2)
r... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 147,766,057,883,674,540,000,000,000,000,000,000,000 | 17 | [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... |
void setUpstreamBytesMeter(const BytesMeterSharedPtr& upstream_bytes_meter) override {
// Accumulate the byte measurement from previous upstream request during a retry.
upstream_bytes_meter->addWireBytesSent(upstream_bytes_meter_->wireBytesSent());
upstream_bytes_meter->addWireBytesReceived(upstream_bytes... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 131,138,131,936,622,100,000,000,000,000,000,000,000 | 8 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
__releases(rose_list_lock)
{
spin_unlock_bh(&rose_list_lock);
} | 0 | [
"CWE-200"
] | linux-2.6 | 17ac2e9c58b69a1e25460a568eae1b0dc0188c25 | 109,768,626,389,143,630,000,000,000,000,000,000,000 | 4 | rose: Fix rose_getname() leak
rose_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
QPaintEngineEx::QPaintEngineEx(QPaintEngineExPrivate &data)
: QPaintEngine(data, AllFeatures)
{
extended = true;
} | 0 | [
"CWE-787"
] | qtbase | 6b400e3147dcfd8cc3a393ace1bd118c93762e0c | 167,768,342,535,880,270,000,000,000,000,000,000,000 | 5 | Improve fix for avoiding huge number of tiny dashes
Some pathological cases were not caught by the previous fix.
Fixes: QTBUG-95239
Pick-to: 6.2 6.1 5.15
Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
Reviewed-by: Robert Löhning <robert.loehning@qt.io> |
png_push_have_info(png_structrp png_ptr, png_inforp info_ptr)
{
if (png_ptr->info_fn != NULL)
(*(png_ptr->info_fn))(png_ptr, info_ptr);
} | 0 | [
"CWE-369"
] | libpng | 2dca15686fadb1b8951cb29b02bad4cae73448da | 49,530,562,365,675,190,000,000,000,000,000,000,000 | 5 | [libpng16] Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin). |
checkAttr_safe(const InString *input, int pos,
const TranslationTableCharacterAttributes a, int m,
const TranslationTableHeader *table) {
return ((pos < input->length) ? checkAttr(input->chars[pos], a, m, table) : 0);
} | 0 | [
"CWE-125"
] | liblouis | 5e4089659bb49b3095fa541fa6387b4c40d7396e | 247,198,787,861,120,600,000,000,000,000,000,000,000 | 5 | Fix a buffer overflow
Fixes #635
Thanks to HongxuChen for reporting it |
static int i40e_get_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
u8 *lut, u16 lut_size)
{
struct i40e_pf *pf = vsi->back;
struct i40e_hw *hw = &pf->hw;
int ret = 0;
if (seed) {
ret = i40e_aq_get_rss_key(hw, vsi->id,
(struct i40e_aqc_get_set_rss_key_data *)seed);
if (ret) {
dev_info(&pf->pdev->dev,
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 277,885,183,982,350,560,000,000,000,000,000,000,000 | 36 | 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> |
bson_iter_overwrite_timestamp (bson_iter_t *iter,
uint32_t timestamp,
uint32_t increment)
{
uint64_t value;
BSON_ASSERT (iter);
if (ITER_TYPE (iter) == BSON_TYPE_TIMESTAMP) {
value = ((((uint64_t) timestamp) << 32U) | ((uint64_t) increment));... | 0 | [
"CWE-125"
] | mongo-c-driver | 0d9a4d98bfdf4acd2c0138d4aaeb4e2e0934bd84 | 227,739,643,786,846,980,000,000,000,000,000,000,000 | 13 | Fix for CVE-2018-16790 -- Verify bounds before binary length read.
As reported here: https://jira.mongodb.org/browse/CDRIVER-2819,
a heap overread occurs due a failure to correctly verify data
bounds.
In the original check, len - o returns the data left including the
sizeof(l) we just read. Instead, the comparison sh... |
static void ext4_mb_cleanup_pa(struct ext4_group_info *grp)
{
struct ext4_prealloc_space *pa;
struct list_head *cur, *tmp;
int count = 0;
list_for_each_safe(cur, tmp, &grp->bb_prealloc_list) {
pa = list_entry(cur, struct ext4_prealloc_space, pa_group_list);
list_del(&pa->pa_group_list);
count++;
kmem_cache... | 0 | [
"CWE-416"
] | linux | 8844618d8aa7a9973e7b527d038a2a589665002c | 151,737,867,496,611,480,000,000,000,000,000,000,000 | 16 | ext4: only look at the bg_flags field if it is valid
The bg_flags field in the block group descripts is only valid if the
uninit_bg or metadata_csum feature is enabled. We were not
consistently looking at this field; fix this.
Also block group #0 must never have uninitialized allocation bitmaps,
or need to be zeroed... |
static void free_task_ctx_data(struct pmu *pmu, void *task_ctx_data)
{
if (pmu->task_ctx_cache && task_ctx_data)
kmem_cache_free(pmu->task_ctx_cache, task_ctx_data);
} | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 303,342,268,878,083,600,000,000,000,000,000,000,000 | 5 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
void suspend_stratum(struct pool *pool)
{
applog(LOG_INFO, "Closing socket for stratum %s", get_pool_name(pool));
mutex_lock(&pool->stratum_lock);
__suspend_stratum(pool);
mutex_unlock(&pool->stratum_lock);
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 251,103,647,838,872,200,000,000,000,000,000,000,000 | 8 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
GF_Err gf_isom_sdp_clean(GF_ISOFile *movie)
{
GF_UserDataMap *map;
GF_HintTrackInfoBox *hnti;
//check if we have a udta ...
if (!movie->moov || !movie->moov->udta) return GF_OK;
//find a hnti in the udta
map = udta_getEntry(movie->moov->udta, GF_ISOM_BOX_TYPE_HNTI, NULL);
if (!map) return GF_OK;
//there shou... | 0 | [
"CWE-787"
] | gpac | 86c1566f040b2b84c72afcb6cbd444c5aff56cfe | 18,663,410,246,315,132,000,000,000,000,000,000,000 | 21 | fixed #1894 |
GF_Box *rtp_hnti_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_RTPBox, GF_ISOM_BOX_TYPE_RTP);
tmp->subType = GF_ISOM_BOX_TYPE_SDP;
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 17,001,197,925,940,650,000,000,000,000,000,000,000 | 6 | fixed #1587 |
void HtmlPage::dumpAsXML(FILE* f,int page){
fprintf(f, "<page number=\"%d\" position=\"absolute\"", page);
fprintf(f," top=\"0\" left=\"0\" height=\"%d\" width=\"%d\">\n", pageHeight,pageWidth);
for(int i=fontsPageMarker;i < fonts->size();i++) {
GooString *fontCSStyle = fonts->CSStyle(i);
fprintf(f... | 0 | [
"CWE-824"
] | poppler | 30c731b487190c02afff3f036736a392eb60cd9a | 227,969,834,948,848,850,000,000,000,000,000,000,000 | 42 | Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit.
Closes #742 |
u32 isoffin_channel_switch_quality(ISOMChannel *ch, GF_ISOFile *the_file, Bool switch_up)
{
u32 i, count, next_track, trackID, cur_track;
s32 ref_count;
cur_track = ch->next_track ? ch->next_track : ch->track;
count = gf_isom_get_track_count(the_file);
trackID = gf_isom_get_track_id(the_file, cur_track);
next_tr... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 191,484,920,058,362,370,000,000,000,000,000,000,000 | 80 | fixed crashes for very long path - cf #1908 |
static void nft_chain_commit_drop_policy(struct nft_trans *trans)
{
struct nft_base_chain *basechain;
if (nft_trans_chain_policy(trans) != NF_DROP)
return;
if (!nft_is_base_chain(trans->ctx.chain))
return;
basechain = nft_base_chain(trans->ctx.chain);
basechain->policy = NF_DROP;
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 98,784,592,432,279,940,000,000,000,000,000,000,000 | 13 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
uint64_t width() const { return width_; } | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 20,094,400,916,962,035,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 |
bool LEX::table_or_sp_used()
{
DBUG_ENTER("table_or_sp_used");
if (sroutines.records || query_tables)
DBUG_RETURN(TRUE);
DBUG_RETURN(FALSE);
} | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 256,664,852,486,059,770,000,000,000,000,000,000,000 | 9 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
compute_keygrip (gcry_md_hd_t md, gcry_sexp_t keyparam)
{
gcry_sexp_t l1;
const char *data;
size_t datalen;
l1 = sexp_find_token (keyparam, "n", 1);
if (!l1)
return GPG_ERR_NO_OBJ;
data = sexp_nth_data (l1, 1, &datalen);
if (!data)
{
sexp_release (l1);
return GPG_ERR_NO_OBJ;
}
... | 0 | [
"CWE-310"
] | libgcrypt | 8725c99ffa41778f382ca97233183bcd687bb0ce | 286,345,343,858,759,770,000,000,000,000,000,000,000 | 22 | rsa: Add exponent blinding.
* cipher/rsa.c (secret_core_crt): Blind secret D with randomized
nonce R for mpi_powm computation.
--
Co-authored-by: Werner Koch <wk@gnupg.org>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
The paper describing attack: https://eprint.iacr.org/2017/627
Sliding right into disaster: Left-... |
*/
xmlXPathObjectPtr
xmlXPathEval(const xmlChar *str, xmlXPathContextPtr ctx) {
xmlXPathParserContextPtr ctxt;
xmlXPathObjectPtr res;
CHECK_CTXT(ctx)
xmlXPathInit();
ctxt = xmlXPathNewParserContext(str, ctx);
if (ctxt == NULL)
return NULL;
xmlXPathEvalExpr(ctxt);
if (ctxt->e... | 0 | [
"CWE-416"
] | libxml2 | 0f3b843b3534784ef57a4f9b874238aa1fda5a73 | 15,397,346,949,911,455,000,000,000,000,000,000,000 | 30 | Fix XPath stack frame logic
Move the calls to xmlXPathSetFrame and xmlXPathPopFrame around in
xmlXPathCompOpEvalPositionalPredicate to make sure that the context
object on the stack is actually protected. Otherwise, memory corruption
can occur when calling sloppily coded XPath extension functions.
Fixes bug 783160. |
INST_HANDLER (lds) { // LDS Rd, k
if (len < 4) {
return;
}
int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 0x1) << 4);
int k = (buf[3] << 8) | buf[2];
op->ptr = k;
// load value from RAMPD:k
__generic_ld_st (op, "ram", 0, 1, 0, k, 0);
ESIL_A ("r%d,=,", d);
} | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 10,467,965,887,657,527,000,000,000,000,000,000,000 | 12 | Fix crash in anal.avr |
int __legitimize_mnt(struct vfsmount *bastard, unsigned seq)
{
struct mount *mnt;
if (read_seqretry(&mount_lock, seq))
return 1;
if (bastard == NULL)
return 0;
mnt = real_mount(bastard);
mnt_add_count(mnt, 1);
smp_mb(); // see mntput_no_expire()
if (likely(!read_seqretry(&mount_lock, seq)))
return 0;
if... | 0 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 22,146,507,217,803,850,000,000,000,000,000,000,000 | 26 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... |
UserInfoChars()
{
/*
* RFC 3986 section 3.2.1
*
* userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* pct-encoded = "%" HEXDIG HEXDIG
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";"... | 0 | [
"CWE-20"
] | squid | dfd818595b54942cb1adc45f6aed95c9b706e3a8 | 734,851,722,747,462,500,000,000,000,000,000,000 | 15 | Merge pull request from GHSA-jvf6-h9gj-pmj6
* Add slash prefix to path-rootless or path-noscheme URLs
* Update src/anyp/Uri.cc
Co-authored-by: Alex Rousskov <rousskov@measurement-factory.com>
* restore file trailer GH auto-removes
* Remove redundant path-empty check
* Removed stale comment left behind by b2ab59a
... |
NAN_METHOD(DetectCharacterEncoding) {
Nan::HandleScope scope;
v8::Local<v8::Object> inputBuffer = info[0]->ToObject();
UCharsetDetector *charsetDetector;
const UCharsetMatch *charsetMatch;
UErrorCode errorCode = U_ZERO_ERROR;
charsetDetector = ucsdet_open(&errorCode);
if(U_FAILURE(errorCode)) {
Nan::ThrowE... | 0 | [
"CWE-755"
] | detect-character-encoding | 992a11007fff6cfd40b952150ab8d30410c4a20a | 242,752,523,769,850,760,000,000,000,000,000,000,000 | 66 | Return null if no charset matches
Fixes a segmentation fault if no charset matches. According to http://icu-project.org/apiref/icu4c/ucsdet_8h.html#aff2633b5055d472cff4108d94f97cf7d, ucsdet_detect() may return NULL if no charset matches.
Fixes: #15
Co-authored-by: chenzhip <letme2010@gmail.com> |
void Monitor::get_combined_feature_map(FeatureMap *fm)
{
*fm += session_map.feature_map;
for (auto id : quorum) {
if (id != rank) {
*fm += quorum_feature_map[id];
}
}
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 10,048,123,920,278,469,000,000,000,000,000,000,000 | 9 | 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 ... |
std::string index(SVertex_const_handle v) const
{ return VI(v,verbose); } | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 244,745,362,647,214,870,000,000,000,000,000,000,000 | 2 | Fix Nef_2 and Nef_S2 IO |
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data)
{
return CRYPTO_set_ex_data(&ctx->ex_data,idx,data);
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 47,003,137,275,703,580,000,000,000,000,000,000,000 | 4 | Backport OCSP fixes. |
*/
void netdev_rx_handler_unregister(struct net_device *dev)
{
ASSERT_RTNL();
RCU_INIT_POINTER(dev->rx_handler, NULL);
/* a reader seeing a non NULL rx_handler in a rcu_read_lock()
* section has a guarantee to see a non NULL rx_handler_data
* as well.
*/
synchronize_net();
RCU_INIT_POINTER(dev->rx_handler_... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 230,490,878,515,792,570,000,000,000,000,000,000,000 | 12 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
save_cmdline(cmdline_info_T *ccp)
{
if (!prev_ccline_used)
{
CLEAR_FIELD(prev_ccline);
prev_ccline_used = TRUE;
}
*ccp = prev_ccline;
prev_ccline = ccline;
ccline.cmdbuff = NULL; // signal that ccline is not in use
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 85b6747abc15a7a81086db31289cf1b8b17e6cb1 | 294,075,690,784,828,530,000,000,000,000,000,000,000 | 11 | patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode
Problem: Illegal memory access with large 'tabstop' in Ex mode.
Solution: Allocate enough memory. |
static void playMsg(RCore *core, const char *n, int len) {
if (r_config_get_i (core->config, "scr.tts")) {
if (len > 0) {
char *s = r_str_newf ("%d %s", len, n);
r_sys_tts (s, true);
free (s);
} else if (len == 0) {
char *s = r_str_newf ("there are no %s", n);
r_sys_tts (s, true);
free (s);
}
... | 0 | [
"CWE-119",
"CWE-787"
] | radare2 | 00e8f205475332d7842d0f0d1481eeab4e83017c | 258,641,111,917,011,040,000,000,000,000,000,000,000 | 13 | Fix #7727 - undefined pointers and out of band string access fixes |
MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql)
{
MYSQL_RES *result;
DBUG_ENTER("mysql_store_result");
if (!mysql->fields)
DBUG_RETURN(0);
if (mysql->status != MYSQL_STATUS_GET_RESULT)
{
set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate);
DBUG_RETURN(0);
}
mysql->status=M... | 0 | [
"CWE-416"
] | mysql-server | 4797ea0b772d5f4c5889bc552424132806f46e93 | 185,855,153,442,432,700,000,000,000,000,000,000,000 | 42 | BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST()
Analysis:
---------
Invalid memory access maybe observed when using prepared statements if:
a) The mysql client connection is lost after statement preparation
is complete and
b) There is at least one statement which is in initialized state but
not ... |
int virNodeDeviceGetSCSITargetCaps(const char *sysfsPath G_GNUC_UNUSED,
virNodeDevCapSCSITargetPtr scsi_target G_GNUC_UNUSED)
{
return -1;
} | 0 | [
"CWE-119"
] | libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 99,647,403,426,589,160,000,000,000,000,000,000,000 | 5 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... |
builtin_vars(PyObject *self, PyObject *args)
{
PyObject *v = NULL;
PyObject *d;
if (!PyArg_UnpackTuple(args, "vars", 0, 1, &v))
return NULL;
if (v == NULL) {
d = PyEval_GetLocals();
if (d == NULL)
return NULL;
Py_INCREF(d);
}
else {
d = _PyObj... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 44,417,101,251,782,140,000,000,000,000,000,000,000 | 23 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static void heightOfExpr(Expr *p, int *pnHeight){
if( p ){
if( p->nHeight>*pnHeight ){
*pnHeight = p->nHeight;
}
}
} | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 38,583,558,468,625,207,000,000,000,000,000,000,000 | 7 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
is_footnote(const uint8_t *data, size_t beg, size_t end, size_t *last, struct footnote_list *list)
{
size_t i = 0;
struct buf *contents = 0;
size_t ind = 0;
int in_empty = 0;
size_t start = 0;
size_t id_offset, id_end;
/* up to 3 optional leading spaces */
if (beg + 3 >= end) return 0;
if (data[beg] == ' ') ... | 0 | [] | redcarpet | e5a10516d07114d582d13b9125b733008c61c242 | 62,306,333,105,191,800,000,000,000,000,000,000,000 | 102 | Avoid rewinding previous inline when auto-linking
When a bit like "_foo_1@bar.com" is processed, first the emphasis is
rendered, then the 1 is output verbatim. When the `@` is encountered,
Redcarpet tries to find the "local part" of the address and stops when
it encounters an invalid char (i.e. here the `!`).
The pro... |
static void MeanStability(IntervalTree *node)
{
register IntervalTree
*child;
if (node == (IntervalTree *) NULL)
return;
node->mean_stability=0.0;
child=node->child;
if (child != (IntervalTree *) NULL)
{
register ssize_t
count;
register double
sum;
sum=0.0;
... | 0 | [
"CWE-369"
] | ImageMagick | a4c89f2a61069ad7637bc7749cc1a839de442526 | 267,423,297,682,370,300,000,000,000,000,000,000,000 | 29 | https://github.com/ImageMagick/ImageMagick/issues/1730 |
static int compat_count(compat_uptr_t __user *argv, int max)
{
int i = 0;
if (argv != NULL) {
for (;;) {
compat_uptr_t p;
if (get_user(p, argv))
return -EFAULT;
if (!p)
break;
argv++;
if(++i > max)
return -E2BIG;
}
}
return i;
} | 0 | [] | linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | 236,895,799,357,650,100,000,000,000,000,000,000,000 | 19 | [PATCH] skip data conversion in compat_sys_mount when data_page is NULL
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp... |
poppler_document_get_page_layout (PopplerDocument *document)
{
Catalog *catalog;
g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), POPPLER_PAGE_LAYOUT_UNSET);
catalog = document->doc->getCatalog ();
if (catalog && catalog->isOk ())
return convert_page_layout (catalog->getPageLayout ());
return POPP... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 108,058,088,822,752,130,000,000,000,000,000,000,000 | 12 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
onig_free_match_param(OnigMatchParam* p)
{
if (IS_NOT_NULL(p)) {
onig_free_match_param_content(p);
xfree(p);
}
} | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 253,924,179,127,296,650,000,000,000,000,000,000,000 | 7 | fix heap-buffer-overflow |
input_csi_dispatch_sgr_colon(struct input_ctx *ictx, u_int i)
{
struct grid_cell *gc = &ictx->cell.cell;
char *s = ictx->param_list[i].str, *copy, *ptr, *out;
int p[8];
u_int n;
const char *errstr;
for (n = 0; n < nitems(p); n++)
p[n] = -1;
n = 0;
ptr = copy = xstrdup(s);
while ((out = strsep(&ptr... | 1 | [
"CWE-787"
] | tmux | a868bacb46e3c900530bed47a1c6f85b0fbe701c | 176,622,972,410,054,520,000,000,000,000,000,000,000 | 80 | Do not write after the end of the array and overwrite the stack when
colon-separated SGR sequences contain empty arguments. Reported by Sergey
Nizovtsev. |
int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
{
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
struct socket *sock;
int err = 0;
if (!asoc)
return -EINVAL;
/* If there is a thread waiting on more sndbuf space for
* sending on this as... | 1 | [
"CWE-416",
"CWE-787"
] | linux | df80cd9b28b9ebaa284a41df611dbf3a2d05ca74 | 29,758,316,070,201,876,000,000,000,000,000,000,000 | 43 | sctp: do not peel off an assoc from one netns to another one
Now when peeling off an association to the sock in another netns, all
transports in this assoc are not to be rehashed and keep use the old
key in hashtable.
As a transport uses sk->net as the hash key to insert into hashtable,
it would miss removing these t... |
inline TfLiteStatus EvalLogical(TfLiteContext* context, TfLiteNode* node,
bool bool_func(bool)) {
return EvalImpl<bool>(context, node, bool_func, kTfLiteBool);
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 230,201,882,562,094,700,000,000,000,000,000,000,000 | 4 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
inline void WireFormatLite::WriteSFixed64NoTag(int64_t value,
io::CodedOutputStream* output) {
output->WriteLittleEndian64(static_cast<uint64_t>(value));
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 92,369,935,156,557,740,000,000,000,000,000,000,000 | 4 | Apply patch |
gs_currentsrcgtagicc(const gs_gstate * pgs, gs_param_string * pval)
{
if (pgs->icc_manager->srcgtag_profile == NULL) {
pval->data = NULL;
pval->size = 0;
pval->persistent = true;
} else {
pval->data = (byte *)pgs->icc_manager->srcgtag_profile->name;
pval->size = strlen((c... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 75,135,961,247,473,510,000,000,000,000,000,000,000 | 12 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
MagickExport ChannelMoments *GetImageMoments(const Image *image,
ExceptionInfo *exception)
{
#define MaxNumberImageMoments 8
CacheView
*image_view;
ChannelMoments
*channel_moments;
double
M00[MaxPixelChannels+1],
M01[MaxPixelChannels+1],
M02[MaxPixelChannels+1],
M03[MaxPixelChannels+... | 0 | [] | ImageMagick | 4717744e4bb27de8ea978e51c6d5bcddf62ffe49 | 128,188,193,665,172,860,000,000,000,000,000,000,000 | 278 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
static bool analysis_block_cb(RzAnalysisBlock *bb, BlockRecurseCtx *ctx) {
if (rz_cons_is_breaked()) {
return false;
}
if (bb->size < 1) {
return true;
}
if (bb->size > ctx->core->analysis->opt.bb_max_size) {
return true;
}
int *parent_reg_set = rz_pvector_at(&ctx->reg_set, rz_pvector_len(&ctx->reg_set) - ... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 107,992,414,837,796,220,000,000,000,000,000,000,000 | 53 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static int PNMComment(Image *image,CommentInfo *comment_info,
ExceptionInfo *exception)
{
int
c;
register char
*p;
/*
Read comment.
*/
p=comment_info->comment+strlen(comment_info->comment);
for (c='#'; (c != EOF) && (c != (int) '\n') && (c != (int) '\r'); p++)
{
if ((size_t) (p-comment... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | e92040ea6ee2a844ebfd2344174076795a4787bd | 3,104,105,713,676,901,000,000,000,000,000,000,000 | 34 | https://github.com/ImageMagick/ImageMagick/issues/1612 |
static int ndpi_search_tls_tcp(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
struct ndpi_packet_struct *packet = &flow->packet;
u_int8_t something_went_wrong = 0;
#ifdef DEBUG_TLS_MEMORY
printf("[TLS Mem] ndpi_search_tls_tcp() [payload_packet_len: %u]\n",
packet->... | 0 | [
"CWE-190",
"CWE-787"
] | nDPI | 23594f036536468072198a57c59b6e9d63caf6ce | 166,349,453,797,217,470,000,000,000,000,000,000,000 | 100 | Fixed stack overflow caused by missing length check
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
static int ims_pcu_write_ofn_config(struct ims_pcu *pcu, u8 addr, u8 data)
{
u8 buffer[] = { addr, data };
int error;
s16 result;
error = ims_pcu_execute_command(pcu, OFN_SET_CONFIG,
&buffer, sizeof(buffer));
if (error)
return error;
result = (s16)get_unaligned_le16(pcu->cmd_buf + OFN_REG_RESULT_OFFSET)... | 0 | [
"CWE-703"
] | linux | a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff | 94,703,146,208,707,990,000,000,000,000,000,000,000 | 17 | Input: ims-pcu - sanity check against missing interfaces
A malicious device missing interface can make the driver oops.
Add sanity checking.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> |
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_C... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 190,499,703,475,357,230,000,000,000,000,000,000,000 | 30 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
v8::Local<v8::Object> CreateEvent(v8::Isolate* isolate,
v8::Local<v8::Object> sender,
v8::Local<v8::Object> custom_event) {
if (event_template.IsEmpty()) {
event_template.Reset(
isolate,
ObjectTemplateBuilder(isolate, v8::ObjectTe... | 0 | [
"CWE-200",
"CWE-668"
] | electron | 07a1c2a3e5845901f7e2eda9506695be58edc73c | 76,422,588,994,693,560,000,000,000,000,000,000,000 | 23 | fix: restrict sendToFrame to same-process frames by default (#26875) |
char *path_expand(struct tree *tree, const char *ppath) {
struct tree *siblings = tree->parent->children;
char *path;
const char *label;
int cnt = 0, ind = 0, r;
list_for_each(t, siblings) {
if (streqv(t->label, tree->label)) {
cnt += 1;
if (t == tree)
... | 0 | [] | augeas | 1a66739c3fc14b3257af5d4a32d0a2a714a7b39d | 164,740,927,762,914,400,000,000,000,000,000,000,000 | 34 | * src/transform.c (xread_file): catch failed fopen, e.g. EACCES |
static void perf_mmap_close(struct vm_area_struct *vma)
{
struct perf_event *event = vma->vm_file->private_data;
struct ring_buffer *rb = ring_buffer_get(event);
struct user_struct *mmap_user = rb->mmap_user;
int mmap_locked = rb->mmap_locked;
unsigned long size = perf_data_size(rb);
atomic_dec(&rb->mmap_count)... | 0 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 140,387,170,500,698,070,000,000,000,000,000,000,000 | 79 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
int StreamTcpCheckMemcap(uint64_t size)
{
uint64_t memcapcopy = SC_ATOMIC_GET(stream_config.memcap);
if (memcapcopy == 0 || size + SC_ATOMIC_GET(st_memuse) <= memcapcopy)
return 1;
return 0;
} | 0 | [] | suricata | 50e2b973eeec7172991bf8f544ab06fb782b97df | 120,716,223,050,291,400,000,000,000,000,000,000,000 | 7 | stream/tcp: handle RST with MD5 or AO header
Special handling for RST packets if they have an TCP MD5 or AO header option.
The options hash can't be validated. The end host might be able to validate
it, as it can have a key/password that was communicated out of band.
The sender could use this to move the TCP state to... |
CHARSET_INFO *find_bin_collation(CHARSET_INFO *cs)
{
const char *csname= cs->csname;
cs= get_charset_by_csname(csname, MY_CS_BINSORT, MYF(0));
if (!cs)
{
char tmp[65];
strxnmov(tmp, sizeof(tmp)-1, csname, "_bin", NULL);
my_error(ER_UNKNOWN_COLLATION, MYF(0), tmp);
}
return cs;
} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 15,543,042,909,344,223,000,000,000,000,000,000,000 | 12 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
int Helper::restorePartition(const QString &from, const DPartInfo &to)
{
QString command;
if (isPartcloneFile(from)) {
command = QStringLiteral("/usr/sbin/partclone.restore -s %1 -o %2").arg(from).arg(to.filePath());
} else {
command = QStringLiteral("dd if=%1 of=%2 status=none conv=fsync")... | 0 | [
"CWE-59",
"CWE-61"
] | deepin-clone | e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab | 230,423,357,123,157,150,000,000,000,000,000,000,000 | 17 | fix: Do not use the "/tmp" directory
https://github.com/linuxdeepin/deepin-clone/issues/16
https://bugzilla.opensuse.org/show_bug.cgi?id=1130388 |
PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC)
{
return php_copy_file_ctx(src, dest, ENFORCE_SAFE_MODE, NULL TSRMLS_CC);
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 197,090,597,053,166,050,000,000,000,000,000,000,000 | 4 | - 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 |
static inline void page_cpupid_reset_last(struct page *page)
{
page->_last_cpupid = -1 & LAST_CPUPID_MASK;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 308,928,753,789,097,800,000,000,000,000,000,000,000 | 4 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
extract_dollar_brace_string (string, sindex, quoted, flags)
char *string;
int *sindex, quoted, flags;
{
register int i, c;
size_t slen;
int pass_character, nesting_level, si, dolbrace_state;
char *result, *t;
DECLARE_MBSTATE;
pass_character = 0;
nesting_level = 1;
slen = strlen (string + *sin... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 136,693,579,791,451,400,000,000,000,000,000,000,000 | 140 | bash-4.4-rc2 release |
static int vfswrap_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name)
{
return fremovexattr(fsp->fh->fd, name);
} | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 113,551,508,088,360,810,000,000,000,000,000,000,000 | 4 | FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
Otherwise num_volumes and the end marker can return uninitialized data
to the client.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org> |
query_string()
{
} | 0 | [
"CWE-703"
] | Crow | 79eec91f00b5fb7df890d4e84b2f048b0841e044 | 332,173,967,017,986,160,000,000,000,000,000,000,000 | 3 | Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value |
get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
const char *path, u32 *pacllen, u32 info)
{
struct cifs_ntsd *pntsd = NULL;
u8 oplock = SMB2_OPLOCK_LEVEL_NONE;
unsigned int xid;
int rc;
struct cifs_tcon *tcon;
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
struct cifs_fid fid;
struct cifs_open_parm... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 256,576,627,569,586,970,000,000,000,000,000,000,000 | 60 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
big5_is_code_ctype(OnigCodePoint code, unsigned int ctype)
{
return onigenc_mb2_is_code_ctype(ONIG_ENCODING_BIG5, code, ctype);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 113,429,886,165,565,030,000,000,000,000,000,000,000 | 4 | onig-5.9.2 |
static int __net_init unix_net_init(struct net *net)
{
int error = -ENOMEM;
net->unx.sysctl_max_dgram_qlen = 10;
if (unix_sysctl_register(net))
goto out;
#ifdef CONFIG_PROC_FS
if (!proc_net_fops_create(net, "unix", 0, &unix_seq_fops)) {
unix_sysctl_unregister(net);
goto out;
}
#endif
error = 0;
out:
retu... | 0 | [] | linux-2.6 | 16e5726269611b71c930054ffe9b858c1cea88eb | 63,104,264,070,209,100,000,000,000,000,000,000,000 | 18 | af_unix: dont send SCM_CREDENTIALS by default
Since commit 7361c36c5224 (af_unix: Allow credentials to work across
user and pid namespaces) af_unix performance dropped a lot.
This is because we now take a reference on pid and cred in each write(),
and release them in read(), usually done from another process,
eventua... |
static uint get_semi_join_select_list_index(Field *field)
{
uint res= UINT_MAX;
TABLE_LIST *emb_sj_nest;
if ((emb_sj_nest= field->table->pos_in_table_list->embedding) &&
emb_sj_nest->sj_on_expr)
{
Item_in_subselect *subq_pred= emb_sj_nest->sj_subq_pred;
st_select_lex *subq_lex= subq_pred->unit->fi... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 61,135,082,917,874,770,000,000,000,000,000,000,000 | 34 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
Gives the number of recent messages in current mailbox */
PHP_FUNCTION(imap_num_recent)
{
zval *streamind;
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
return;
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), "imap", le_imap)) == NULL... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 21,714,615,343,837,870,000,000,000,000,000,000,000 | 15 | Disable rsh/ssh functionality in imap by default (bug #77153) |
void SM_io_parser<Decorator_>::read()
{
if ( !check_sep("Nef_polyhedron_S2") )
{
std::cerr<<"Missing line in header"<<std::endl;
return;
}
if ( !check_sep("Sphere_map_2") )
{
std::cerr<<"SM_io_parser::read: no embedded_PM header."<<std::endl;
return;
}
if ( !(check_sep("vertices") && (in >> vn... | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 3,876,079,703,250,576,000,000,000,000,000,000,000 | 72 | Fix Nef_2 and Nef_S2 IO |
void log_flush(LOG_MODE new_mode) {
CRYPTO_THREAD_write_lock(stunnel_locks[LOCK_LOG_MODE]);
log_mode=new_mode;
/* emit the buffered logs (unless we just started buffering) */
if(new_mode!=LOG_MODE_BUFFER) {
/* log_raw() will use the new value of log_mode */
CRYPTO_THREAD_write_lock(stu... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 93,296,462,616,202,500,000,000,000,000,000,000,000 | 21 | stunnel-5.57 |
PHP_FUNCTION(openssl_get_cert_locations)
{
array_init(return_value);
add_assoc_string(return_value, "default_cert_file", (char *) X509_get_default_cert_file(), 1);
add_assoc_string(return_value, "default_cert_file_env", (char *) X509_get_default_cert_file_env(), 1);
add_assoc_string(return_value, "default_cert_dir... | 0 | [
"CWE-754"
] | php-src | 89637c6b41b510c20d262c17483f582f115c66d6 | 90,963,888,770,471,670,000,000,000,000,000,000,000 | 15 | Fix bug #74651 - check EVP_SealInit as it can return -1 |
static CImg<T> row_vector(const T& a0, const T& a1, const T& a2, const T& a3,
const T& a4, const T& a5, const T& a6, const T& a7,
const T& a8, const T& a9, const T& a10, const T& a11,
const T& a12, const T& a13, const T& a14) ... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 123,229,212,061,441,460,000,000,000,000,000,000,000 | 9 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int rbd_dev_v2_header_onetime(struct rbd_device *rbd_dev)
{
int ret;
ret = rbd_dev_v2_object_prefix(rbd_dev);
if (ret)
goto out_err;
/*
* Get the and check features for the image. Currently the
* features are assumed to never change.
*/
ret = rbd_dev_v2_features(rbd_dev);
if (ret)
goto out_err... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 35,888,686,152,551,286,000,000,000,000,000,000,000 | 39 | 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... |
static bool add_line(String &buffer, char *line, ulong line_length,
char *in_string, bool *ml_comment, bool truncated)
{
uchar inchar;
char buff[80], *pos, *out;
COMMANDS *com;
bool need_space= 0;
bool ss_comment= 0;
DBUG_ENTER("add_line");
if (!line[0] && buffer.is_empty())
DBUG... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 195,387,762,674,601,960,000,000,000,000,000,000,000 | 269 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
template<typename t, typename tc>
CImg<T>& draw_ellipse(const int x0, const int y0, const CImg<t> &tensor,
const tc *const color, const float opacity,
const unsigned int pattern) {
CImgList<t> eig = tensor.get_symmetric_eigen();
const CImg<t> &val ... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 291,433,803,123,662,200,000,000,000,000,000,000,000 | 9 | Fix other issues in 'CImg<T>::load_bmp()'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.