func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
bytes_endswith(PyBytesObject *self, PyObject *args)
{
Py_ssize_t start = 0;
Py_ssize_t end = PY_SSIZE_T_MAX;
PyObject *subobj;
int result;
if (!stringlib_parse_args_finds("endswith", args, &subobj, &start, &end))
return NULL;
if (PyTuple_Check(subobj)) {
Py_ssize_t i;
fo... | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 208,420,141,286,427,560,000,000,000,000,000,000,000 | 33 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
onigenc_property_list_init(int (*f)(void))
{
int r;
THREAD_ATOMIC_START;
r = f();
THREAD_ATOMIC_END;
return r;
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 75,743,235,336,749,840,000,000,000,000,000,000,000 | 11 | onig-5.9.2 |
struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
{
int err;
struct qstr this;
WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex));
err = __lookup_one_len(name, &this, base, len);
if (err)
return ERR_PTR(err);
err = exec_permission(base->d_inode);
if (err)
return ERR_PTR(er... | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 295,679,184,804,565,600,000,000,000,000,000,000,000 | 16 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
encode_saved_post_attr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp)
{
/* Attributes to follow */
*p++ = xdr_one;
return encode_fattr3(rqstp, p, fhp, &fhp->fh_post_attr);
} | 0 | [
"CWE-119",
"CWE-703"
] | linux | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | 231,241,847,946,335,870,000,000,000,000,000,000,000 | 6 | nfsd: stricter decoding of write-like NFSv2/v3 ops
The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer. This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could b... |
static int _CheckProbablePrime(mp_int* p, mp_int* q, mp_int* e, int nlen,
int* isPrime, WC_RNG* rng)
{
int ret;
mp_int tmp1, tmp2;
mp_int* prime;
if (p == NULL || e == NULL || isPrime == NULL)
return BAD_FUNC_ARG;
if (!RsaSizeCheck(nlen))
return ... | 0 | [
"CWE-310",
"CWE-787"
] | wolfssl | fb2288c46dd4c864b78f00a47a364b96a09a5c0f | 108,067,576,018,157,480,000,000,000,000,000,000,000 | 62 | RSA-PSS: Handle edge case with encoding message to hash
When the key is small relative to the digest (1024-bit key, 64-byte
hash, 61-byte salt length), the internal message to hash is larger than
the output size.
Allocate a buffer for the message when this happens. |
static inline char *airo_translate_scan(struct net_device *dev,
struct iw_request_info *info,
char *current_ev,
char *end_buf,
BSSListRid *bss)
{
struct airo_info *ai = dev->ml_priv;
struct iw_event iwe; /* Temporary buffer */
__le16 capabilities;
char * current_val; /* For rates */
int ... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 38,763,920,059,871,040,000,000,000,000,000,000,000 | 172 | 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 G_NORETURN do_raise_exception(CPULoongArchState *env,
uint32_t exception,
uintptr_t pc)
{
CPUState *cs = env_cpu(env);
qemu_log_mask(CPU_LOG_INT, "%s: %d (%s)\n",
__func__,
exception,
... | 0 | [] | qemu | 3517fb726741c109cae7995f9ea46f0cab6187d6 | 285,871,588,490,941,750,000,000,000,000,000,000,000 | 14 | target/loongarch: Clean up tlb when cpu reset
We should make sure that tlb is clean when cpu reset.
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220705070950.2364243-1-gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson... |
BGD_DECLARE(void) gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
int color, int style)
{
gdPoint pts[3];
int i;
int lx = 0, ly = 0;
int fx = 0, fy = 0;
while (e < s)
{
e += 360;
}
for (i = s; (i <= e); i++)
{
int x, y;
x = ((long) gdCosT[i % 36... | 0 | [
"CWE-190"
] | libgd | cfee163a5e848fc3e3fb1d05a30d7557cdd36457 | 96,534,295,436,773,140,000,000,000,000,000,000,000 | 79 | - #18, Removed invalid gdFree call when overflow2 fails
- #17, Free im->pixels as well on error |
wait_queue_func_t wake_func)
__acquires(&ctx->completion_lock)
{
struct io_ring_ctx *ctx = req->ctx;
bool cancel = false;
INIT_HLIST_NODE(&req->hash_node);
io_init_poll_iocb(poll, mask, wake_func);
poll->file = req->file;
poll->wait.private = req;
ipt->pt._key = mask;
ipt->req = req;
ipt->error = ... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 294,033,056,259,307,220,000,000,000,000,000,000,000 | 36 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static inline void inode_inc_dirty_pages(struct inode *inode)
{
atomic_inc(&F2FS_I(inode)->dirty_pages);
inc_page_count(F2FS_I_SB(inode), S_ISDIR(inode->i_mode) ?
F2FS_DIRTY_DENTS : F2FS_DIRTY_DATA);
if (IS_NOQUOTA(inode))
inc_page_count(F2FS_I_SB(inode), F2FS_DIRTY_QDATA);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 18,403,420,714,968,396,000,000,000,000,000,000,000 | 8 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
static void xen_irq_lateeoi_worker(struct work_struct *work)
{
struct lateeoi_work *eoi;
struct irq_info *info;
u64 now = get_jiffies_64();
unsigned long flags;
eoi = container_of(to_delayed_work(work), struct lateeoi_work, delayed);
read_lock_irqsave(&evtchn_rwlock, flags);
while (true) {
spin_lock(&eoi->e... | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 153,065,748,111,080,280,000,000,000,000,000,000,000 | 37 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
ServerConnectionImpl::ServerConnectionImpl(
Network::Connection& connection, CodecStats& stats, ServerConnectionCallbacks& callbacks,
const Http1Settings& settings, uint32_t max_request_headers_kb,
const uint32_t max_request_headers_count,
envoy::config::core::v3::HttpProtocolOptions::HeadersWithUndersc... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 140,570,120,716,679,240,000,000,000,000,000,000,000 | 15 | 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> |
const HeaderEntryImpl* const* constInlineHeaders() const override { return inline_headers_; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 46,873,336,958,220,160,000,000,000,000,000,000,000 | 1 | 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... |
test_commercial(int from, int to, double sg)
{
int j;
fprintf(stderr, "test_commercial: %d...%d (%d) - %.0f\n",
from, to, to - from, sg);
for (j = from; j <= to; j++) {
int y, w, d, rj, ns;
c_jd_to_commercial(j, sg, &y, &w, &d);
c_commercial_to_jd(y, w, d, sg, &rj, &ns);
if (j != rj) {
fprin... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 108,973,136,644,299,640,000,000,000,000,000,000,000 | 18 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
const char *inherit_from_dir,
const char *fname,
SMB_STRUCT_STAT *psbuf)
{
struct smb_filename *smb_fname_parent;
struct smb_filename *smb_fname_cwd = NULL;
char *saved_dir = NULL;
TALLOC_CTX *ctx = talloc_tos();
NTSTATUS... | 0 | [] | samba | 60f922bf1bd8816eacbb32c24793ad1f97a1d9f2 | 272,803,414,130,482,330,000,000,000,000,000,000,000 | 114 | Fix bug #10229 - No access check verification on stream files.
https://bugzilla.samba.org/show_bug.cgi?id=10229
We need to check if the requested access mask
could be used to open the underlying file (if
it existed), as we're passing in zero for the
access mask to the base filename.
Signed-off-by: Jeremy Allison <jr... |
s_realloc(STREAM s, unsigned int size)
{
unsigned char *data;
if (s->size >= size)
return;
data = s->data;
s->size = size;
s->data = xrealloc(data, size);
s->p = s->data + (s->p - data);
s->end = s->data + (s->end - data);
s->iso_hdr = s->data + (s->iso_hdr - data);
s->mcs_hdr = s->data + (s->mcs_hdr - dat... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 41,690,056,435,900,485,000,000,000,000,000,000,000 | 18 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
mail_config_ews_autodiscover_finish (EMailConfigEwsAutodiscover *autodiscover,
GAsyncResult *result,
GError **error)
{
g_return_val_if_fail (E_IS_MAIL_CONFIG_EWS_AUTODISCOVER (autodiscover), FALSE);
g_return_val_if_fail (g_task_is_valid (result, autodiscover), FALSE);
g_return_val_if_fail (
g_as... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 294,497,030,143,028,800,000,000,000,000,000,000,000 | 13 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
GnashImage::update(const GnashImage& from)
{
assert(size() <= from.size());
assert(width() == from.width());
assert(_type == from._type);
assert(_location == from._location);
std::copy(from.begin(), from.begin() + size(), begin());
} | 0 | [
"CWE-189"
] | gnash | bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 | 112,068,796,737,103,110,000,000,000,000,000,000,000 | 8 | Fix crash in GnashImage.cpp |
void _cgsem_post(cgsem_t *cgsem, const char *file, const char *func, const int line)
{
if (unlikely(sem_post(cgsem)))
quitfrom(1, file, func, line, "Failed to sem_post errno=%d cgsem=0x%p", errno, cgsem);
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 150,911,101,616,240,290,000,000,000,000,000,000,000 | 5 | 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. |
static int __init algif_skcipher_init(void)
{
return af_alg_register_type(&algif_type_skcipher);
} | 0 | [] | linux-stable | 36c84b22ac8aa041cbdfbe48a55ebb32e3521704 | 181,383,551,447,311,860,000,000,000,000,000,000,000 | 4 | 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 void ar6000_dump_skb(struct sk_buff *skb)
{
u_char *ch;
for (ch = A_NETBUF_DATA(skb);
(unsigned long)ch < ((unsigned long)A_NETBUF_DATA(skb) +
A_NETBUF_LEN(skb)); ch++)
{
AR_DEBUG_PRINTF(ATH_DEBUG_WARN,("%2.2x ", *ch));
}
AR_DEBUG_PRINTF(ATH_DEBUG_WARN,("\n"));
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 8,053,777,602,464,703,000,000,000,000,000,000,000 | 11 | 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... |
vrrp_garp_lower_prio_delay_handler(vector_t *strvec)
{
unsigned delay;
if (!read_unsigned_strvec(strvec, 1, &delay, 0, UINT_MAX / TIMER_HZ, true)) {
report_config_error(CONFIG_GENERAL_ERROR, "vrrp_garp_lower_prio_delay '%s' invalid - ignoring", FMT_STR_VSLOT(strvec, 1));
... | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 325,105,297,574,892,180,000,000,000,000,000,000,000 | 11 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
gtl::InlinedVector<int64_t, 4> Tensor::ComputeFlatInnerDims(
gtl::ArraySlice<int64_t> orig, int64_t num_out_dims) {
gtl::InlinedVector<int64_t, 4> out_dims(num_out_dims, 0);
int64_t offset = orig.size() - num_out_dims;
for (int64_t out_dim = num_out_dims - 1; out_dim >= 0; --out_dim) {
const int64_t in_di... | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 316,821,629,390,329,260,000,000,000,000,000,000,000 | 13 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
server_begin_update(struct xrdp_mod* mod)
{
struct xrdp_wm* wm;
struct xrdp_painter* p;
wm = (struct xrdp_wm*)(mod->wm);
p = xrdp_painter_create(wm, wm->session);
xrdp_painter_begin_update(p);
mod->painter = (long)p;
return 0;
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 213,587,300,879,848,420,000,000,000,000,000,000,000 | 11 | move temp files from /tmp to /tmp/.xrdp |
onigenc_always_true_is_allowed_reverse_match(const UChar* s ARG_UNUSED,
const UChar* end ARG_UNUSED,
OnigEncoding enc ARG_UNUSED)
{
return TRUE;
} | 0 | [
"CWE-125"
] | Onigmo | d4cf99d30bd5f6a8a4ababd0b9d7b06f3a479a24 | 92,224,516,615,198,360,000,000,000,000,000,000,000 | 6 | Fix out-of-bounds read in parse_char_class() (Close #139)
/[\x{111111}]/ causes out-of-bounds read when encoding is a single byte
encoding. \x{111111} is an invalid codepoint for a single byte encoding.
Check if it is a valid codepoint. |
_TIFFrealloc(tdata_t p, tsize_t s)
{
return (realloc(p, (size_t) s));
} | 0 | [
"CWE-369"
] | libtiff | 3c5eb8b1be544e41d2c336191bc4936300ad7543 | 36,989,333,131,225,386,000,000,000,000,000,000,000 | 4 | * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not
require malloc() to return NULL pointer if requested allocation
size is zero. Assure that _TIFFmalloc does. |
cbq_reclassify(struct sk_buff *skb, struct cbq_class *this)
{
struct cbq_class *cl, *new;
for (cl = this->tparent; cl; cl = cl->tparent)
if ((new = cl->defaults[TC_PRIO_BESTEFFORT]) != NULL && new != this)
return new;
return NULL;
} | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 175,723,691,329,629,100,000,000,000,000,000,000,000 | 10 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
gnutls_x509_crl_check_issuer (gnutls_x509_crl_t cert,
gnutls_x509_crt_t issuer)
{
return is_crl_issuer (cert, issuer);
} | 0 | [
"CWE-264"
] | gnutls | c8dcbedd1fdc312f5b1a70fcfbc1afe235d800cd | 149,708,628,585,380,230,000,000,000,000,000,000,000 | 5 | Corrected bit disable (was flipping instead).
Initialy reported by Daniel Kahn Gillmor on 9/1/2008. Many thanks to
moog@sysdev.oucs.ox.ac.uk for bringing this into my attention. |
int cipso_v4_doi_remove(u32 doi, struct netlbl_audit *audit_info)
{
int ret_val;
struct cipso_v4_doi *doi_def;
struct audit_buffer *audit_buf;
spin_lock(&cipso_v4_doi_list_lock);
doi_def = cipso_v4_doi_search(doi);
if (!doi_def) {
spin_unlock(&cipso_v4_doi_list_lock);
ret_val = -ENOENT;
goto doi_remove_ret... | 0 | [
"CWE-416"
] | linux | ad5d07f4a9cd671233ae20983848874731102c08 | 199,657,537,084,405,800,000,000,000,000,000,000,000 | 30 | cipso,calipso: resolve a number of problems with the DOI refcounts
The current CIPSO and CALIPSO refcounting scheme for the DOI
definitions is a bit flawed in that we:
1. Don't correctly match gets/puts in netlbl_cipsov4_list().
2. Decrement the refcount on each attempt to remove the DOI from the
DOI list, only re... |
PssEncode(
TPM2B *out, // OUT: the encoded buffer
TPM_ALG_ID hashAlg, // IN: hash algorithm for the encoding
TPM2B *digest, // IN: the digest
RAND_STATE *rand // IN: random number source
)
{
UINT32 hLen = CryptHashGetDigestSize(hashAlg);
... | 0 | [
"CWE-787"
] | libtpms | 505ef841c00b4c096b1977c667cb957bec3a1d8b | 139,051,390,016,035,180,000,000,000,000,000,000,000 | 52 | tpm2: Fix output buffer parameter and size for RSA decyrption
For the RSA decryption we have to use an output buffer of the size of the
(largest possible) RSA key for the decryption to always work.
This fixes a stack corruption bug that caused a SIGBUS and termination of
'swtpm'.
Signed-off-by: Stefan Berger <stefan... |
static int rpmsg_recv_single(struct virtproc_info *vrp, struct device *dev,
struct rpmsg_hdr *msg, unsigned int len)
{
struct rpmsg_endpoint *ept;
struct scatterlist sg;
bool little_endian = virtio_is_little_endian(vrp->vdev);
unsigned int msg_len = __rpmsg16_to_cpu(little_endian, msg->len);
int err;
dev... | 0 | [
"CWE-415"
] | linux | 1680939e9ecf7764fba8689cfb3429c2fe2bb23c | 176,328,137,934,751,950,000,000,000,000,000,000,000 | 67 | rpmsg: virtio: Fix possible double free in rpmsg_virtio_add_ctrl_dev()
vch will be free in virtio_rpmsg_release_device() when
rpmsg_ctrldev_register_device() fails. There is no need to call
kfree() again.
Fixes: c486682ae1e2 ("rpmsg: virtio: Register the rpmsg_char device")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com... |
static bool multi_ischanged(struct Curl_multi *multi, bool clear)
{
bool retval = multi->recheckstate;
if(clear)
multi->recheckstate = FALSE;
return retval;
} | 0 | [
"CWE-416"
] | curl | 75dc096e01ef1e21b6c57690d99371dedb2c0b80 | 75,052,737,216,752,620,000,000,000,000,000,000,000 | 7 | curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz |
static UINT printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
{
UINT32 Length;
UINT64 Offset;
rdpPrintJob* printjob = NULL;
UINT error = CHANNEL_RC_OK;
void* ptr;
if (Stream_GetRemainingLength(irp->input) < 32)
return ERROR_INVALID_DATA;
Stream_Read_UINT32(irp->input, Length);
Stream_Read_UINT... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 247,348,489,745,188,500,000,000,000,000,000,000,000 | 39 | Fixed oob read in irp_write and similar |
PHPAPI int php_getimagetype(php_stream * stream, char *filetype TSRMLS_DC)
{
char tmp[12];
int twelve_bytes_read;
if ( !filetype) filetype = tmp;
if((php_stream_read(stream, filetype, 3)) != 3) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Read error!");
return IMAGE_FILETYPE_UNKNOWN;
}
/* BYTES READ: 3 *... | 0 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 201,781,293,944,505,950,000,000,000,000,000,000,000 | 75 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
shell_gtk_embed_on_window_destroy (GtkWidget *object,
ShellGtkEmbed *embed)
{
shell_gtk_embed_set_window (embed, NULL);
} | 0 | [] | gnome-shell | 90c55e1977fde252b79bcfd9d0ef41144fb21fe2 | 275,276,315,536,020,500,000,000,000,000,000,000,000 | 5 | gtk-embed: ensure we only listen for window-created events once
If a tray icon gets a mapped and unmapped and the mapped again
in quick succession, we can end up with multiple handlers
listening for window creation events.
This commit tries to guard against that by only listening for
window-created events when we don... |
keyblock_equal(const krb5_keyblock *k1, const krb5_keyblock *k2)
{
if (k1->enctype != k2->enctype)
return FALSE;
if (k1->length != k2->length)
return FALSE;
return memcmp(k1->contents, k2->contents, k1->length) == 0;
} | 0 | [
"CWE-617"
] | krb5 | 94e5eda5bb94d1d44733a49c3d9b6d1e42c74def | 163,538,416,352,058,950,000,000,000,000,000,000,000 | 8 | Remove incorrect KDC assertion
The assertion in return_enc_padata() is reachable because
kdc_make_s4u2self_rep() may have previously added encrypted padata.
It is no longer necessary because the code uses add_pa_data_element()
instead of allocating a new list.
CVE-2018-20217:
In MIT krb5 1.8 or later, an authenticat... |
pfm_fasync(int fd, struct file *filp, int on)
{
pfm_context_t *ctx;
int ret;
if (PFM_IS_FILE(filp) == 0) {
printk(KERN_ERR "perfmon: pfm_fasync bad magic [%d]\n", current->pid);
return -EBADF;
}
ctx = (pfm_context_t *)filp->private_data;
if (ctx == NULL) {
printk(KERN_ERR "perfmon: pfm_fasync NULL ctx [%d... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 299,277,485,883,408,300,000,000,000,000,000,000,000 | 32 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
obj_to_asn1bool(VALUE obj)
{
if (NIL_P(obj))
ossl_raise(rb_eTypeError, "Can't convert nil into Boolean");
return RTEST(obj) ? 0xff : 0x0;
} | 0 | [
"CWE-119"
] | openssl | 1648afef33c1d97fb203c82291b8a61269e85d3b | 5,277,670,544,190,516,700,000,000,000,000,000,000 | 7 | 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... |
void trex_del(GF_Box *s)
{
GF_TrackExtendsBox *ptr = (GF_TrackExtendsBox *)s;
if (ptr == NULL) return;
gf_free(ptr); | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 288,667,917,552,931,930,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
CloudInitSetup(const char *tmpDirPath)
{
int deployStatus = DEPLOY_ERROR;
const char *cloudInitTmpDirPath = "/var/run/vmware-imc";
int forkExecResult;
char command[1024];
Bool cloudInitTmpDirCreated = FALSE;
snprintf(command, sizeof(command),
"/bin/mkdir -p %s", cloudInitTmpDirPath);
c... | 1 | [
"CWE-362"
] | open-vm-tools | 22e58289f71232310d30cf162b83b5151a937bac | 249,089,174,268,305,300,000,000,000,000,000,000,000 | 89 | randomly generate tmp directory name |
struct mount *copy_tree(struct mount *mnt, struct dentry *dentry,
int flag)
{
struct mount *res, *p, *q, *r, *parent;
if (!(flag & CL_COPY_UNBINDABLE) && IS_MNT_UNBINDABLE(mnt))
return ERR_PTR(-EINVAL);
if (!(flag & CL_COPY_MNT_NS_FILE) && is_mnt_ns_file(dentry))
return ERR_PTR(-EINVAL);
res = q = clone... | 0 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 299,700,048,793,841,700,000,000,000,000,000,000,000 | 64 | 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: ... |
static void uv__chld(uv_signal_t* handle, int signum) {
uv_process_t* process;
uv_loop_t* loop;
int exit_status;
int term_signal;
unsigned int i;
int status;
pid_t pid;
QUEUE pending;
QUEUE* h;
QUEUE* q;
assert(signum == SIGCHLD);
QUEUE_INIT(&pending);
loop = handle->loop;
for (i = 0; i <... | 0 | [
"CWE-273",
"CWE-284",
"CWE-264"
] | libuv | 66ab38918c911bcff025562cf06237d7fedaba0c | 100,743,524,918,250,310,000,000,000,000,000,000,000 | 66 | unix: call setgoups before calling setuid/setgid
Partial fix for #1093 |
static int complete_fast_pio_out(struct kvm_vcpu *vcpu)
{
vcpu->arch.pio.count = 0;
if (unlikely(!kvm_is_linear_rip(vcpu, vcpu->arch.pio.linear_rip)))
return 1;
return kvm_skip_emulated_instruction(vcpu);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 226,063,351,332,488,480,000,000,000,000,000,000,000 | 9 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static void analPathFollow(RCoreAnalPaths *p, ut64 addr, PJ *pj) {
if (addr == UT64_MAX) {
return;
}
if (!dict_get (&p->visited, addr)) {
p->cur = r_anal_bb_from_offset (p->core->anal, addr);
analPaths (p, pj);
}
} | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 37,062,080,465,891,375,000,000,000,000,000,000,000 | 9 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
uint32_t LEtoUint32(const uint8_t*buffer) {
uint32_t retval = buffer[3];
retval <<=8;
retval |= buffer[2];
retval <<= 8;
retval |= buffer[1];
retval <<= 8;
retval |= buffer[0];
return retval;
} | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 86,469,256,638,559,890,000,000,000,000,000,000,000 | 10 | fix #111 |
static js_Ast *parameters(js_State *J)
{
js_Ast *head, *tail;
if (J->lookahead == ')')
return NULL;
head = tail = LIST(identifier(J));
while (jsP_accept(J, ',')) {
tail = tail->b = LIST(identifier(J));
}
return jsP_list(head);
} | 0 | [
"CWE-674"
] | mujs | 4d45a96e57fbabf00a7378b337d0ddcace6f38c1 | 79,330,972,439,661,950,000,000,000,000,000,000,000 | 11 | Guard binary expressions from too much recursion. |
static void hclge_tm_pg_info_init(struct hclge_dev *hdev)
{
#define BW_PERCENT 100
u8 i;
for (i = 0; i < hdev->tm_info.num_pg; i++) {
int k;
hdev->tm_info.pg_dwrr[i] = i ? 0 : BW_PERCENT;
hdev->tm_info.pg_info[i].pg_id = i;
hdev->tm_info.pg_info[i].pg_sch_mode = HCLGE_SCH_MODE_DWRR;
hdev->tm_info.pg_in... | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 61,601,100,390,222,150,000,000,000,000,000,000,000 | 24 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
void propagate(struct redisCommand *cmd, int dbid, robj **argv, int argc,
int flags)
{
if (server.aof_state != AOF_OFF && flags & PROPAGATE_AOF)
feedAppendOnlyFile(cmd,dbid,argv,argc);
if (flags & PROPAGATE_REPL)
replicationFeedSlaves(server.slaves,dbid,argv,argc);
} | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 200,813,840,515,400,000,000,000,000,000,000,000,000 | 8 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
static void cmd_agraph_edge(RCore *core, const char *input) {
switch (*input) {
case ' ': // "age"
case '-': { // "age-"
RANode *u, *v;
char **args;
int n_args;
args = r_str_argv (input + 1, &n_args);
if (n_args != 2) {
r_cons_printf ("Wrong arguments\n");
r_str_argv_free (args);
break;
}
u ... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | a1bc65c3db593530775823d6d7506a457ed95267 | 33,352,379,821,137,850,000,000,000,000,000,000,000 | 40 | Fix #12375 - Crash in bd+ao (#12382) |
SProcXkbGetNames(ClientPtr client)
{
REQUEST(xkbGetNamesReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xkbGetNamesReq);
swaps(&stuff->deviceSpec);
swapl(&stuff->which);
return ProcXkbGetNames(client);
} | 0 | [
"CWE-191"
] | xserver | 144849ea27230962227e62a943b399e2ab304787 | 287,384,786,179,690,400,000,000,000,000,000,000,000 | 10 | Fix XkbSelectEvents() integer underflow
CVE-2020-14361 ZDI-CAN 11573
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
ecma_find_or_create_literal_number (ecma_number_t number_arg) /**< number to be searched */
{
ecma_value_t num = ecma_make_number_value (number_arg);
if (ecma_is_value_integer_number (num))
{
return num;
}
JERRY_ASSERT (ecma_is_value_float_number (num));
jmem_cpointer_t number_list_cp = JERRY_CONTEXT... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 337,511,275,870,107,430,000,000,000,000,000,000,000 | 67 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static int spawn_https_helper_openssl(const char *host, unsigned port)
{
char *allocated = NULL;
char *servername;
int sp[2];
int pid;
IF_FEATURE_WGET_HTTPS(volatile int child_failed = 0;)
if (socketpair(AF_UNIX, SOCK_STREAM, 0, sp) != 0)
/* Kernel can have AF_UNIX support disabled */
bb_perror_msg_and_die("... | 0 | [
"CWE-120"
] | busybox | 8e2174e9bd836e53c8b9c6e00d1bc6e2a718686e | 290,502,329,656,520,970,000,000,000,000,000,000,000 | 72 | wget: check chunk length for overflowing off_t
function old new delta
retrieve_file_data 428 465 +37
wget_main 2386 2389 +3
-----------------------------------------------------... |
bool FileBody::Move(const fs::path& new_path) {
if (path_ == new_path) {
return false;
}
if (ifstream_.is_open()) {
ifstream_.close();
}
fs::error_code ec;
fs::rename(path_, new_path, ec);
if (ec) {
LOG_ERRO("Failed to rename file (%s).", ec.message().c_str());
return false;
}
// R... | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 153,405,497,403,215,850,000,000,000,000,000,000,000 | 22 | fix static file serving security issue; fix url path encoding issue |
static int __init init_ext4_fs(void)
{
int err;
ext4_proc_root = proc_mkdir("fs/ext4", NULL);
err = init_ext4_mballoc();
if (err)
return err;
err = init_ext4_xattr();
if (err)
goto out2;
err = init_inodecache();
if (err)
goto out1;
err = register_filesystem(&ext4_fs_type);
if (err)
goto out;
#ifdef ... | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 296,504,652,177,134,960,000,000,000,000,000,000,000 | 34 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
lha_read_file_header_3(struct archive_read *a, struct lha *lha)
{
const unsigned char *p;
size_t extdsize;
int err;
uint16_t header_crc;
if ((p = __archive_read_ahead(a, H3_FIXED_SIZE, NULL)) == NULL)
return (truncated_error(a));
if (archive_le16dec(p + H3_FIELD_LEN_OFFSET) != 4)
goto invalid;
lha->header_... | 0 | [
"CWE-125"
] | libarchive | 98dcbbf0bf4854bf987557e55e55fff7abbf3ea9 | 288,687,748,270,560,700,000,000,000,000,000,000,000 | 41 | Fail with negative lha->compsize in lha_read_file_header_1()
Fixes a heap buffer overflow reported in Secunia SA74169 |
void gf_filterpacket_del(void *p)
{
GF_FilterPacket *pck=(GF_FilterPacket *)p;
if (pck->data) gf_free(pck->data);
gf_free(p);
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 252,652,012,381,131,100,000,000,000,000,000,000,000 | 6 | fixed crashes for very long path - cf #1908 |
void set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key)
{
join->positions[idx].table= table;
join->positions[idx].key=key;
join->positions[idx].records_read=1.0; /* This is a const table */
join->positions[idx].cond_selectivity= 1.0;
join->positions[idx].ref_depend_map= 0;
// join->positions[idx]... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 282,421,400,678,332,360,000,000,000,000,000,000,000 | 23 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
int32_t PersianCalendar::defaultCenturyStartYear() const {
// lazy-evaluate systemDefaultCenturyStartYear
umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
return gSystemDefaultCenturyStartYear;
} | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 160,449,426,700,570,830,000,000,000,000,000,000,000 | 5 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
GF_Box *mdia_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_MediaBox, GF_ISOM_BOX_TYPE_MDIA);
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 186,722,971,332,346,600,000,000,000,000,000,000,000 | 5 | fixed #1587 |
noCompbrlAhead(const TranslationTableHeader *table, int pos, int mode,
const InString *input, int transOpcode, int transCharslen, int cursorPosition) {
int start = pos + transCharslen;
int end;
int p;
if (start >= input->length) return 1;
while (start < input->length && checkAttr(input->chars[start], CTC_Space, ... | 0 | [
"CWE-125"
] | liblouis | 5e4089659bb49b3095fa541fa6387b4c40d7396e | 164,636,700,340,952,210,000,000,000,000,000,000,000 | 65 | Fix a buffer overflow
Fixes #635
Thanks to HongxuChen for reporting it |
static void pass_destroy(jpc_enc_pass_t *pass)
{
/* XXX - need to free resources here */
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 325,223,179,965,415,670,000,000,000,000,000,000,000 | 4 | 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... |
bool get_time(MYSQL_TIME *ltime)
{
DBUG_ASSERT(fixed);
return (*ref)->get_time(ltime);
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 238,069,136,746,649,200,000,000,000,000,000,000,000 | 5 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
get_correct_host_mode(
int token
)
{
switch (token) {
case T_Server:
case T_Pool:
case T_Manycastclient:
return MODE_CLIENT;
case T_Peer:
return MODE_ACTIVE;
case T_Broadcast:
return MODE_BROADCAST;
default:
return 0;
}
} | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 157,731,515,231,232,340,000,000,000,000,000,000 | 21 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
virDomainEmulatorSchedParse(xmlNodePtr node,
virDomainDefPtr def)
{
g_autofree virDomainThreadSchedParamPtr sched = NULL;
if (VIR_ALLOC(sched) < 0)
return -1;
if (virDomainSchedulerParseCommonAttrs(node,
&sched->policy,
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 111,615,762,681,996,730,000,000,000,000,000,000,000 | 16 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static void __init vfio_pci_fill_ids(void)
{
char *p, *id;
int rc;
/* no ids passed actually */
if (ids[0] == '\0')
return;
/* add ids specified in the module parameter */
p = ids;
while ((id = strsep(&p, ","))) {
unsigned int vendor, device, subvendor = PCI_ANY_ID,
subdevice = PCI_ANY_ID, class = 0, cl... | 0 | [
"CWE-399",
"CWE-190"
] | linux | 05692d7005a364add85c6e25a6c4447ce08f913a | 122,887,901,022,971,520,000,000,000,000,000,000,000 | 40 | vfio/pci: Fix integer overflows, bitmask check
The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize
user-supplied integers, potentially allowing memory corruption. This
patch adds appropriate integer overflow checks, checks the range bounds
for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element... |
static int brcmf_cfg80211_set_pmk(struct wiphy *wiphy, struct net_device *dev,
const struct cfg80211_pmk_conf *conf)
{
struct brcmf_if *ifp;
brcmf_dbg(TRACE, "enter\n");
/* expect using firmware supplicant for 1X */
ifp = netdev_priv(dev);
if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X))... | 0 | [
"CWE-787"
] | linux | 1b5e2423164b3670e8bc9174e4762d297990deff | 188,193,653,584,164,800,000,000,000,000,000,000,000 | 17 | brcmfmac: assure SSID length from firmware is limited
The SSID length as received from firmware should not exceed
IEEE80211_MAX_SSID_LEN as that would result in heap overflow.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by:... |
static void nfs4_layoutcommit_prepare(struct rpc_task *task, void *calldata)
{
struct nfs4_layoutcommit_data *data = calldata;
struct nfs_server *server = NFS_SERVER(data->args.inode);
nfs4_setup_sequence(server->nfs_client,
&data->args.seq_args,
&data->res.seq_res,
task);
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 124,556,053,101,058,490,000,000,000,000,000,000,000 | 10 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static void frob_rodata(const struct module_layout *layout,
int (*set_memory)(unsigned long start, int num_pages))
{
BUG_ON((unsigned long)layout->base & (PAGE_SIZE-1));
BUG_ON((unsigned long)layout->text_size & (PAGE_SIZE-1));
BUG_ON((unsigned long)layout->ro_size & (PAGE_SIZE-1));
set_memory((unsigned long)lay... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 334,238,057,230,340,000,000,000,000,000,000,000,000 | 9 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
f_lispindent(typval_T *argvars UNUSED, typval_T *rettv)
{
#ifdef FEAT_LISP
pos_T pos;
linenr_T lnum;
if (in_vim9script() && check_for_lnum_arg(argvars, 0) == FAIL)
return;
pos = curwin->w_cursor;
lnum = tv_get_lnum(argvars);
if (lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count)
{
curwin->... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 652dee448618589de5528a9e9a36995803f5557a | 78,605,128,669,354,070,000,000,000,000,000,000,000 | 23 | patch 8.2.4245: ":retab 0" may cause illegal memory access
Problem: ":retab 0" may cause illegal memory access.
Solution: Limit the value of 'tabstop' to 10000. |
static void openssl_print_object_sn(const char *s)
{
} | 0 | [
"CWE-119",
"CWE-787"
] | OpenSC | 412a6142c27a5973c61ba540e33cdc22d5608e68 | 178,607,814,542,123,400,000,000,000,000,000,000,000 | 3 | fixed out of bounds access of ASN.1 Bitstring
Credit to OSS-Fuzz |
static int test_remove(struct libmnt_test *ts, int argc, char *argv[])
{
const char *name;
char *optstr;
int rc;
if (argc < 3)
return -EINVAL;
optstr = xstrdup(argv[1]);
name = argv[2];
rc = mnt_optstr_remove_option(&optstr, name);
if (!rc)
printf("result: >%s<\n", optstr);
free(optstr);
return rc;
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 57202f5713afa2af20ffbb6ab5331481d0396f8d | 190,944,558,537,508,670,000,000,000,000,000,000,000 | 17 | libmount: fix UID check for FUSE umount [CVE-2021-3995]
Improper UID check allows an unprivileged user to unmount FUSE
filesystems of users with similar UID.
Signed-off-by: Karel Zak <kzak@redhat.com> |
static CURLcode imap_state_auth_resp(struct connectdata *conn,
int imapcode,
imapstate instate)
{
CURLcode result = CURLE_OK;
struct Curl_easy *data = conn->data;
struct imap_conn *imapc = &conn->proto.imapc;
saslprogress progress;
(vo... | 0 | [
"CWE-119"
] | curl | 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 | 11,994,514,130,222,459,000,000,000,000,000,000,000 | 32 | imap: if a FETCH response has no size, don't call write callback
CVE-2017-1000257
Reported-by: Brian Carpenter and 0xd34db347
Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586 |
Database::~Database() {
QSqlQuery query;
query.exec(QLatin1String("PRAGMA journal_mode = DELETE"));
query.exec(QLatin1String("VACUUM"));
} | 0 | [
"CWE-310"
] | mumble | 5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e | 102,258,204,269,252,380,000,000,000,000,000,000,000 | 5 | Explicitly remove file permissions for settings and DB |
__do_page_fault(struct pt_regs *regs, unsigned long error_code,
unsigned long address)
{
struct vm_area_struct *vma;
struct task_struct *tsk;
struct mm_struct *mm;
int fault, major = 0;
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
tsk = current;
mm = tsk->mm;
/*
* Detect and handle i... | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 288,113,204,490,346,560,000,000,000,000,000,000,000 | 226 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
void handle_reset(Connection *con) {
Mutex::Locker l(lock);
available_connections.erase(con);
dispatcher.clear_pending(con);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 125,363,988,044,768,480,000,000,000,000,000,000,000 | 5 | 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 ... |
blob_cmp_sn (KEYBOXBLOB blob, const unsigned char *sn, int snlen)
{
const unsigned char *buffer;
size_t length;
size_t pos, off;
size_t nkeys, keyinfolen;
size_t nserial;
buffer = _keybox_get_blob_image (blob, &length);
if (length < 40)
return 0; /* blob too short */
/*keys*/
nkeys = get16 (buff... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 183,340,030,413,504,400,000,000,000,000,000,000,000 | 29 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static void lo_rmdir(fuse_req_t req, fuse_ino_t parent, const char *name)
{
int res;
struct lo_inode *inode;
struct lo_data *lo = lo_data(req);
if (is_empty(name)) {
fuse_reply_err(req, ENOENT);
return;
}
if (!is_safe_path_component(name)) {
fuse_reply_err(req, EINVAL);... | 0 | [
"CWE-273"
] | qemu | 449e8171f96a6a944d1f3b7d3627ae059eae21ca | 315,337,974,485,191,900,000,000,000,000,000,000,000 | 28 | virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)
At the start, drop membership of all supplementary groups. This is
not required.
If we have membership of "root" supplementary group and when we switch
uid/gid using setresuid/setsgid, we still retain membership of existing
supplemntary groups. An... |
static UINT rdpei_send_cs_ready_pdu(RDPEI_CHANNEL_CALLBACK* callback)
{
UINT status;
wStream* s;
UINT32 flags;
UINT32 pduLength;
RDPEI_PLUGIN* rdpei = (RDPEI_PLUGIN*)callback->plugin;
flags = 0;
flags |= READY_FLAGS_SHOW_TOUCH_VISUALS;
// flags |= READY_FLAGS_DISABLE_TIMESTAMP_INJECTION;
pduLength = RDPINPUT_H... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 140,099,231,237,714,070,000,000,000,000,000,000,000 | 28 | Fixed oob read in irp_write and similar |
Return a list of subscribed mailboxes */
PHP_FUNCTION(imap_lsub)
{
zval *streamind;
zend_string *ref, *pat;
pils *imap_le_struct;
STRINGLIST *cur=NIL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSS", &streamind, &ref, &pat) == FAILURE) {
return;
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 320,650,559,105,290,800,000,000,000,000,000,000,000 | 33 | Disable rsh/ssh functionality in imap by default (bug #77153) |
getPhysicalQueueSize(qqueue_t *pThis)
{
return pThis->iQueueSize;
} | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 312,692,232,215,479,460,000,000,000,000,000,000,000 | 4 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
hb_ot_layout_language_get_feature_index (hb_ot_layout_t *layout,
hb_ot_layout_table_type_t table_type,
unsigned int script_index,
unsigned int language_index,
unsigned int num_feature)
{
const GSUBGPOS &g = get_gsubgpos_table (layout, table... | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 297,540,501,302,237,900,000,000,000,000,000,000,000 | 11 | [HB] Remove all references to the old code! |
EC_Group_Data_Map& EC_Group::ec_group_data()
{
/*
* This exists purely to ensure the allocator is constructed before g_ec_data,
* which ensures that its destructor runs after ~g_ec_data is complete.
*/
static Allocator_Initializer g_init_allocator;
static EC_Group_Data_Map g_ec_data;
return g_e... | 0 | [
"CWE-200"
] | botan | 48fc8df51d99f9d8ba251219367b3d629cc848e3 | 243,375,948,503,624,070,000,000,000,000,000,000,000 | 11 | Address DSA/ECDSA side channel |
BSONObj spec() {
return BSON("$gte" << BSON_ARRAY(2 << "$b"));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 82,260,524,965,546,120,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
bool lock_sock_fast(struct sock *sk)
{
might_sleep();
spin_lock_bh(&sk->sk_lock.slock);
if (!sk->sk_lock.owned)
/*
* Note : We must disable BH
*/
return false;
__lock_sock(sk);
sk->sk_lock.owned = 1;
spin_unlock(&sk->sk_lock.slock);
/*
* The sk_lock has mutex_lock() semantics here:
*/
mutex_acqu... | 0 | [
"CWE-119",
"CWE-787"
] | linux | b98b0bc8c431e3ceb4b26b0dfc8db509518fb290 | 102,572,310,521,602,170,000,000,000,000,000,000,000 | 21 | net: avoid signed overflows for SO_{SND|RCV}BUFFORCE
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...
Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since ... |
static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
struct xfrm_state **xfrm, int nx,
const struct flowi *fl,
struct dst_entry *dst)
{
struct net *net = xp_net(policy);
unsigned long now = jiffies;
struct net_device *dev;
struct xfrm_mode *inner_mode;
struct dst_entry... | 0 | [
"CWE-125"
] | ipsec | 7bab09631c2a303f87a7eb7e3d69e888673b9b7e | 160,831,195,333,555,150,000,000,000,000,000,000,000 | 123 | xfrm: policy: check policy direction value
The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used
as an array index. This can lead to an out-of-bound access, kernel lockup and
DoS. Add a check for the 'dir' value.
This fixes CVE-2017-11600.
References: https://bugzilla.redhat.com/show_bug.cgi?... |
void JOIN_TAB::cleanup()
{
DBUG_ENTER("JOIN_TAB::cleanup");
DBUG_PRINT("enter", ("tab: %p table %s.%s",
this,
(table ? table->s->db.str : "?"),
(table ? table->s->table_name.str : "?")));
delete select;
select= 0;
delete quick;
quick= ... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 305,366,145,323,587,100,000,000,000,000,000,000,000 | 76 | 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... |
static inline void set_idle_cores(int cpu, int val)
{
struct sched_domain_shared *sds;
sds = rcu_dereference(per_cpu(sd_llc_shared, cpu));
if (sds)
WRITE_ONCE(sds->has_idle_cores, val);
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 195,699,566,691,630,940,000,000,000,000,000,000,000 | 8 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
int main(int argc, char **argv)
{
int n; /* general index */
int noop; /* true to suppress option decoding */
unsigned long done; /* number of named files processed */
char *opts, *p; /* environment default options, marker */
... | 0 | [
"CWE-703",
"CWE-22"
] | pigz | fdad1406b3ec809f4954ff7cdf9e99eb18c2458f | 94,166,835,948,571,100,000,000,000,000,000,000,000 | 109 | When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file. Any
path information in the header name is stripped. This avoids a
possible vulnerability where absolute or descending path... |
xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
xmlExpNodePtr tmp;
if ((exp == NULL) || (ctxt == NULL) || (sub == NULL))
return(-1);
/*
* TODO: speedup by checking the language of sub is a subset of the
* language of exp
*/
/*
* O(1) speedups... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 180,776,170,355,678,240,000,000,000,000,000,000,000 | 43 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
hrtick_start_fair(struct rq *rq, struct task_struct *p)
{
} | 0 | [] | linux-2.6 | 6a6029b8cefe0ca7e82f27f3904dbedba3de4e06 | 303,064,253,235,374,150,000,000,000,000,000,000,000 | 3 | sched: simplify sched_slice()
Use the existing calc_delta_mine() calculation for sched_slice(). This
saves a divide and simplifies the code because we share it with the
other /cfs_rq->load users.
It also improves code size:
text data bss dec hex filename
42659 2740 144 45543 b1e... |
static int slcan_change_mtu(struct net_device *dev, int new_mtu)
{
return -EINVAL;
} | 0 | [
"CWE-200",
"CWE-909",
"CWE-908"
] | linux | b9258a2cece4ec1f020715fe3554bc2e360f6264 | 1,606,410,614,164,221,800,000,000,000,000,000,000 | 4 | slcan: Don't transmit uninitialized stack data in padding
struct can_frame contains some padding which is not explicitly zeroed in
slc_bump. This uninitialized data will then be transmitted if the stack
initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).
This commit just zeroes the whole struct i... |
bool Item_default_value::get_date_result(MYSQL_TIME *ltime,ulonglong fuzzydate)
{
calculate();
return Item_field::get_date_result(ltime, fuzzydate);
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 66,208,980,427,666,270,000,000,000,000,000,000,000 | 5 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static int am_cache_entry_store_string(am_cache_entry_t *entry,
am_cache_storage_t *slot,
const char *string)
{
char *datastr = NULL;
apr_size_t datalen = 0;
apr_size_t str_len = 0;
if (string == NULL) return 0;
if (slot... | 0 | [
"CWE-79"
] | mod_auth_mellon | 7af21c53da7bb1de024274ee6da30bc22316a079 | 64,910,331,433,375,620,000,000,000,000,000,000,000 | 40 | Fix Cross-Site Session Transfer vulnerability
mod_auth_mellon did not verify that the site the session was created
for was the same site as the site the user accessed. This allows an
attacker with access to one web site on a server to use the same
session to get access to a different site running on the same server.
... |
static inline void sctp_set_owner_w(struct sctp_chunk *chunk)
{
struct sctp_association *asoc = chunk->asoc;
struct sock *sk = asoc->base.sk;
/* The sndbuf space is tracked per association. */
sctp_association_hold(asoc);
skb_set_owner_w(chunk->skb, sk);
chunk->skb->destructor = sctp_wfree;
/* Save the chunk... | 0 | [
"CWE-476"
] | linux | ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d | 324,285,318,960,119,000,000,000,000,000,000,000,000 | 20 | [SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message
In current implementation, LKSCTP does receive buffer accounting for
data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do
accounting for data in frag_list when data is fragmented. In addition,
LKSCTP doesn't do accounting for data in ... |
compress_write(ds_file_t *file, const uchar *buf, size_t len)
{
ds_compress_file_t *comp_file;
ds_compress_ctxt_t *comp_ctxt;
comp_thread_ctxt_t *threads;
comp_thread_ctxt_t *thd;
uint nthreads;
uint i;
const char *ptr;
ds_file_t *dest_file;
comp_file = (ds_compress_file_t *) file->ptr;
comp_ctxt = com... | 0 | [
"CWE-404",
"CWE-703"
] | server | e1eb39a446c30b8459c39fd7f2ee1c55a36e97d2 | 280,696,671,306,821,760,000,000,000,000,000,000,000 | 86 | MDEV-26561 Fix a bug due to unreleased lock
Fix a bug of unreleased lock ctrl_mutex in the method create_worker_threads |
TEST_P(SdsDynamicUpstreamIntegrationTest, BasicSuccess) {
on_server_init_function_ = [this]() {
createSdsStream(*(fake_upstreams_[1]));
sendSdsResponse(getClientSecret());
};
initialize();
fake_upstreams_[0]->set_allow_unexpected_disconnects(true);
// There is a race condition here; there are two st... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 57,662,273,488,443,470,000,000,000,000,000,000,000 | 21 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
void print_modules(void)
{
struct module *mod;
char buf[MODULE_FLAGS_BUF_SIZE];
printk(KERN_DEFAULT "Modules linked in:");
/* Most callers should already have preempt disabled, but make sure */
preempt_disable();
list_for_each_entry_rcu(mod, &modules, list) {
if (mod->state == MODULE_STATE_UNFORMED)
continu... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 94,366,123,663,598,450,000,000,000,000,000,000,000 | 18 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned n_iovec, const struct ucred *ucred, const struct timeval *tv) {
static const union sockaddr_union sa = {
.un.sun_family = AF_UNIX,
.un.sun_path = "/run/systemd/journal/syslog",
};
str... | 0 | [
"CWE-125"
] | systemd | a6aadf4ae0bae185dc4c414d492a4a781c80ffe5 | 223,982,951,081,230,900,000,000,000,000,000,000,000 | 72 | journal: fix syslog_parse_identifier()
Fixes #9829. |
filter2bv_undef_x( Operation *op, Filter *f, int noundef, struct berval *fstr )
{
int i;
Filter *p;
struct berval tmp, value;
static struct berval
ber_bvfalse = BER_BVC( "(?=false)" ),
ber_bvtrue = BER_BVC( "(?=true)" ),
ber_bvundefined = BER_BVC( "(?=undefined)" ),
ber_bverror = BER_BVC( "(?=error)" ... | 0 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 118,426,565,250,517,640,000,000,000,000,000,000,000 | 254 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
TEST(AsyncSSLSocketTest, ConnectWriteReadClose) {
// Start listening on a local port
WriteCallbackBase writeCallback;
ReadCallback readCallback(&writeCallback);
HandshakeCallback handshakeCallback(&readCallback);
SSLServerAcceptCallback acceptCallback(&handshakeCallback);
TestSSLServer server(&acceptCallbac... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 59,967,814,816,262,160,000,000,000,000,000,000,000 | 36 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.