func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
yajl_string_encode2(const yajl_print_t print,
void * ctx,
const unsigned char * str,
unsigned int len,
unsigned int htmlSafe)
{
unsigned int beg = 0;
unsigned int end = 0;
char hexBuf[7];
hexBuf[0] = '\\'; hexBuf[1] = 'u... | 0 | [
"CWE-134"
] | yajl-ruby | a8ca8f476655adaa187eedc60bdc770fff3c51ce | 283,395,204,963,558,770,000,000,000,000,000,000,000 | 45 | Don't advance our end pointer until we've checked we have enough
buffer left and have peeked ahead to see that a unicode escape
is approaching.
Thanks @kivikakk for helping me track down the actual bug here! |
Item_field::Item_field(THD *thd, Name_resolution_context *context_arg,
Field *f)
:Item_ident(thd, context_arg, f->table->s->db.str, *f->table_name,
&f->field_name),
item_equal(0),
have_privileges(0), any_privileges(0)
{
/*
We always need to provide Item_field with a fu... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 133,884,487,271,705,760,000,000,000,000,000,000,000 | 42 | 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 void __exit mctp_serial_exit(void)
{
tty_unregister_ldisc(&mctp_ldisc);
} | 0 | [] | linux | 6c342ce2239c182c2428ce5a44cb32330434ae6e | 118,820,007,339,792,110,000,000,000,000,000,000,000 | 4 | mctp: serial: Cancel pending work from ndo_uninit handler
We cannot do the cancel_work_sync from after the unregister_netdev, as
the dev pointer is no longer valid, causing a uaf on ldisc unregister
(or device close).
Instead, do the cancel_work_sync from the ndo_uninit op, where the dev
still exists, but the queue h... |
errcode_t quota_compute_usage(quota_ctx_t qctx)
{
ext2_filsys fs;
ext2_ino_t ino;
errcode_t ret;
struct ext2_inode_large *inode;
int inode_size;
qsize_t space;
ext2_inode_scan scan;
if (!qctx)
return 0;
fs = qctx->fs;
ret = ext2fs_open_inode_scan(fs, 0, &scan);
if (ret) {
log_err("while opening inode s... | 0 | [
"CWE-787"
] | e2fsprogs | 8dbe7b475ec5e91ed767239f0e85880f416fc384 | 76,061,733,882,647,550,000,000,000,000,000,000,000 | 50 | libsupport: add checks to prevent buffer overrun bugs in quota code
A maliciously corrupted file systems can trigger buffer overruns in
the quota code used by e2fsck. To fix this, add sanity checks to the
quota header fields as well as to block number references in the quota
tree.
Addresses: CVE-2019-5094
Addresses:... |
rend_service_use_direct_connection(const or_options_t* options,
const extend_info_t* ei)
{
/* We'll connect directly all reachable addresses, whether preferred or not.
* The prefer_ipv6 argument to fascist_firewall_allows_address_addr is
* ignored, because pref_only is 0. */
... | 0 | [
"CWE-532"
] | tor | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 | 328,867,353,831,033,800,000,000,000,000,000,000,000 | 10 | Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380 |
static void perf_event_switch(struct task_struct *task,
struct task_struct *next_prev, bool sched_in)
{
struct perf_switch_event switch_event;
/* N.B. caller checks nr_switch_events != 0 */
switch_event = (struct perf_switch_event){
.task = task,
.next_prev = next_prev,
.event_id = {
.header = {... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 50,677,634,814,822,320,000,000,000,000,000,000,000 | 25 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
static int propagate_liveness(struct bpf_verifier_env *env,
const struct bpf_verifier_state *vstate,
struct bpf_verifier_state *vparent)
{
struct bpf_reg_state *state_reg, *parent_reg;
struct bpf_func_state *state, *parent;
int i, frame, err = 0;
if (vparent->curframe != vstate->curframe) {
WAR... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 309,474,626,326,510,400,000,000,000,000,000,000,000 | 43 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
void bitmap_writer_set_checksum(unsigned char *sha1)
{
hashcpy(writer.pack_checksum, sha1);
} | 0 | [
"CWE-119",
"CWE-787"
] | git | de1e67d0703894cb6ea782e36abb63976ab07e60 | 151,834,259,053,776,640,000,000,000,000,000,000,000 | 4 | list-objects: pass full pathname to callbacks
When we find a blob at "a/b/c", we currently pass this to
our show_object_fn callbacks as two components: "a/b/" and
"c". Callbacks which want the full value then call
path_name(), which concatenates the two. But this is an
inefficient interface; the path is a strbuf, and ... |
v_exception(char_u *oldval)
{
if (oldval == NULL)
return vimvars[VV_EXCEPTION].vv_str;
vimvars[VV_EXCEPTION].vv_str = oldval;
return NULL;
} | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 249,368,860,744,666,300,000,000,000,000,000,000,000 | 8 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
static void update_pvclock_gtod(struct timekeeper *tk)
{
struct pvclock_gtod_data *vdata = &pvclock_gtod_data;
write_seqcount_begin(&vdata->seq);
/* copy pvclock gtod data */
vdata->clock.vclock_mode = tk->clock->archdata.vclock_mode;
vdata->clock.cycle_last = tk->clock->cycle_last;
vdata->clock.mask = tk->cl... | 0 | [
"CWE-119"
] | kvm | c300aa64ddf57d9c5d9c898a64b36877345dd4a9 | 305,160,760,214,843,160,000,000,000,000,000,000,000 | 27 | KVM: x86: fix for buffer overflow in handling of MSR_KVM_SYSTEM_TIME (CVE-2013-1796)
If the guest sets the GPA of the time_page so that the request to update the
time straddles a page then KVM will write onto an incorrect page. The
write is done byusing kmap atomic to get a pointer to the page for the time
structure ... |
UnicodeString::doCompareCodePointOrder(int32_t start,
int32_t length,
const UChar *srcChars,
int32_t srcStart,
int32_t srcLength) const
{
// compare illegal strin... | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 148,165,385,132,140,820,000,000,000,000,000,000,000 | 27 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
{
struct trace_buffer *buffer;
struct ring_buffer_per_cpu *cpu_buffer;
struct ring_buffer_event *event;
int nr_loops = 0;
if (ts)
*ts = 0;
cpu_buffer = iter->cpu_buffer;
buffer = cpu_buffer->buffer;
/*
* Check if someone performed a consuming read to
... | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 276,639,951,589,877,520,000,000,000,000,000,000,000 | 86 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
void
unlink_fifo_list ()
{
int saved, i, j;
if (nfifo == 0)
return;
for (i = saved = 0; i < nfifo; i++)
{
if ((fifo_list[i].proc == -1) || (kill(fifo_list[i].proc, 0) == -1))
{
unlink (fifo_list[i].file);
free (fifo_list[i].file);
fifo_list[i].file = (char *)NULL;
fifo_list[i].proc = ... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 334,450,624,727,072,470,000,000,000,000,000,000,000 | 35 | Bash-4.4 patch 7 |
QPDF::EncryptionData::getUE() const
{
return this->UE;
} | 0 | [
"CWE-125"
] | qpdf | dea704f0ab7f625e1e7b3f9a1110b45b63157317 | 203,488,034,449,285,500,000,000,000,000,000,000,000 | 4 | Pad keys to avoid memory errors (fixes #147) |
static int vmci_transport_send_conn_request2(struct sock *sk, size_t size,
u16 version)
{
return vmci_transport_send_control_pkt(
sk, VMCI_TRANSPORT_PACKET_TYPE_REQUEST2,
size, 0, NULL, version,
VMCI_INVALID_HANDLE);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 57,589,592,230,953,680,000,000,000,000,000,000,000 | 8 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
const char *chunk, int size, const char *filename) {
xmlParserCtxtPtr ctxt;
xmlParserInputPtr inputStream;
xmlParserInputBufferPtr buf;
xmlCharEncoding enc = XML_CHAR_ENCODING_NONE;
/*
* plug some encoding c... | 0 | [] | libxml2 | 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 | 37,678,294,495,443,574,000,000,000,000,000,000,000 | 96 | Fix infinite loop in xmlStringLenDecodeEntities
When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef
return NULL which cause a infinite loop in xmlStringLenDecodeEntities
Found with libFuzzer.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
static int svm_nmi_allowed(struct kvm_vcpu *vcpu, bool for_injection)
{
struct vcpu_svm *svm = to_svm(vcpu);
if (svm->nested.nested_run_pending)
return -EBUSY;
/* An NMI must not be injected into L2 if it's supposed to VM-Exit. */
if (for_injection && is_guest_mode(vcpu) && nested_exit_on_nmi(svm))
return -EB... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 290,886,142,144,558,370,000,000,000,000,000,000,000 | 12 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
Http::FilterTrailersStatus Filter::decodeTrailers(Http::RequestTrailerMap& trailers) {
ENVOY_STREAM_LOG(debug, "router decoding trailers:\n{}", *callbacks_, trailers);
// upstream_requests_.size() cannot be > 1 because that only happens when a per
// try timeout occurs with hedge_on_per_try_timeout enabled but t... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 263,834,579,056,782,430,000,000,000,000,000,000,000 | 16 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
compresscontig(unsigned char* out, unsigned char* rgb, uint32 n)
{
register int v, red = RED, green = GREEN, blue = BLUE;
while (n-- > 0) {
v = red*(*rgb++);
v += green*(*rgb++);
v += blue*(*rgb++);
*out++ = v>>8;
}
} | 0 | [
"CWE-476"
] | libtiff | 99b10edde9a0fc28cc0e7b7757aa18ac4c8c225f | 106,540,600,792,089,270,000,000,000,000,000,000,000 | 11 | tiff2bw: avoid null pointer dereference in case of out of memory situation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2819 / CVE-2018-18661 |
flatpak_run_gc_ids (void)
{
g_autofree char *base_dir = g_build_filename (g_get_user_runtime_dir (), ".flatpak", NULL);
g_auto(GLnxDirFdIterator) iter = { 0 };
struct dirent *dent;
/* Clean up unused instances */
if (!glnx_dirfd_iterator_init_at (AT_FDCWD, base_dir, FALSE, &iter, NULL))
return;
while ... | 0 | [
"CWE-20"
] | flatpak | a9107feeb4b8275b78965b36bf21b92d5724699e | 161,375,802,857,664,490,000,000,000,000,000,000,000 | 43 | run: Only compare the lowest 32 ioctl arg bits for TIOCSTI
Closes #2782.
Closes: #2783
Approved by: alexlarsson |
struct MACH0_(obj_t)* MACH0_(mach0_new)(const char* file, bool verbose) {
ut8 *buf;
struct MACH0_(obj_t) *bin;
if (!(bin = malloc (sizeof (struct MACH0_(obj_t))))) {
return NULL;
}
memset (bin, 0, sizeof (struct MACH0_(obj_t)));
bin->verbose = verbose;
bin->file = file;
if (!(buf = (ut8*)r_file_slurp (file, &... | 0 | [
"CWE-415",
"CWE-125"
] | radare2 | 60208765887f5f008b3b9a883f3addc8bdb9c134 | 334,015,435,503,264,860,000,000,000,000,000,000,000 | 26 | Fix #9970 - heap oobread in mach0 parser (#10026) |
int sock_diag_check_cookie(void *sk, __u32 *cookie)
{
if ((cookie[0] != INET_DIAG_NOCOOKIE ||
cookie[1] != INET_DIAG_NOCOOKIE) &&
((u32)(unsigned long)sk != cookie[0] ||
(u32)((((unsigned long)sk) >> 31) >> 1) != cookie[1]))
return -ESTALE;
else
return 0;
} | 0 | [
"CWE-20"
] | linux | 6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0 | 34,098,223,438,070,324,000,000,000,000,000,000,000 | 10 | sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
with a family greater or equal then AF_MAX -- the array size of
sock_diag_handlers[]. The current code does not test for this
condition therefore is vulnerable to an out-of-bound access openin... |
extra_open_record(unsigned char *bp, int dr_len, struct isoent *isoent,
struct ctl_extr_rec *ctl)
{
ctl->bp = bp;
if (bp != NULL)
bp += dr_len;
ctl->use_extr = 0;
ctl->isoent = isoent;
ctl->ce_ptr = NULL;
ctl->cur_len = ctl->dr_len = dr_len;
ctl->limit = DR_LIMIT;
return (bp);
} | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 185,603,683,799,917,770,000,000,000,000,000,000,000 | 14 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
static void addECSOption(char* packet, const size_t& packetSize, uint16_t* len, const ComboAddress& remote, int stamp)
{
string EDNSRR;
struct dnsheader* dh = (struct dnsheader*) packet;
EDNSSubnetOpts eso;
if(stamp < 0)
eso.source = Netmask(remote);
else {
ComboAddress stamped(remote);
*((char*)... | 0 | [
"CWE-787"
] | pdns | f9c57c98da1b1007a51680629b667d57d9b702b8 | 196,358,602,848,522,770,000,000,000,000,000,000,000 | 28 | dnsreplay: Bail out on a too small outgoing buffer |
flatpak_dir_config_append_pattern (FlatpakDir *self,
const char *key,
const char *pattern,
gboolean runtime_only,
gboolean *out_already_present,
... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 204,538,518,890,257,570,000,000,000,000,000,000,000 | 29 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
RGWOpType get_type() override { return RGW_OP_LIST_BUCKET_MULTIPARTS; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 58,972,131,526,065,030,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static bool Equals(const tinygltf::Value &one, const tinygltf::Value &other) {
if (one.Type() != other.Type()) return false;
switch (one.Type()) {
case NULL_TYPE:
return true;
case BOOL_TYPE:
return one.Get<bool>() == other.Get<bool>();
case REAL_TYPE:
return TINYGLTF_DOUBLE_EQUAL(one... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 176,961,611,621,519,750,000,000,000,000,000,000,000 | 41 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const int bgColor)
{
const float _angle = (float)((- degrees / 180.0f) * M_PI);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const unsigned int new_width = abs((int)(src_w*cos(_angle))) + abs((int)(src_h*sin(_angle) + 0... | 0 | [
"CWE-125"
] | libgd | 4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a | 329,545,224,279,700,930,000,000,000,000,000,000,000 | 274 | Fixed memory overrun bug in gdImageScaleTwoPass
_gdContributionsCalc would compute a window size and then adjust
the left and right positions of the window to make a window within
that size. However, it was storing the values in the struct *before*
it made the adjustment. This change fixes that. |
static av_cold int dnxhd_decode_init_thread_copy(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
// make sure VLC tables will be loaded when cid is parsed
ctx->cid = -1;
ctx->rows = av_mallocz_array(avctx->thread_count, sizeof(RowContext));
if (!ctx->rows)
return AVERROR(ENO... | 0 | [
"CWE-125"
] | FFmpeg | f31fc4755f69ab26bf6e8be47875b7dcede8e29e | 46,847,258,885,782,020,000,000,000,000,000,000,000 | 13 | avcodec/dnxhddec: Move mb height check out of non hr branch
Fixes: out of array access
Fixes: poc.dnxhd
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 296debd213bd6dce7647cedd34eb64e5b94cdc92)
Signed-off-by: Michael Niedermayer <michael@nie... |
static int trie_find(struct trie *root, const char *key, match_fn fn,
void *baton)
{
int i;
int result;
struct trie *child;
if (!*key) {
/* we have reached the end of the key */
if (root->value && !root->len)
return fn(key, root->value, baton);
else
return -1;
}
for (i = 0; i < root->len; i++... | 0 | [
"CWE-125"
] | git | 11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d | 261,870,402,673,982,370,000,000,000,000,000,000,000 | 48 | is_ntfs_dotgit: use a size_t for traversing string
We walk through the "name" string using an int, which can
wrap to a negative value and cause us to read random memory
before our array (e.g., by creating a tree with a name >2GB,
since "int" is still 32 bits even on most 64-bit platforms).
Worse, this is easy to trigg... |
static void SFDFixupBitmapRefs( BDFFont *bdf ) {
BDFChar *bc, *rbc;
BDFRefChar *head, *next, *prev;
int i;
for ( i=0; i<bdf->glyphcnt; i++ ) if (( bc = bdf->glyphs[i] ) != NULL ) {
prev = NULL;
for ( head = bc->refs; head != NULL; head = next ) {
next = head->next;
if (( rbc = bdf->glyphs[h... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 339,088,949,494,878,070,000,000,000,000,000,000,000 | 23 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
HGDI_RECT gdi_CreateRect(INT32 xLeft, INT32 yTop, INT32 xRight, INT32 yBottom)
{
HGDI_RECT hRect = (HGDI_RECT)calloc(1, sizeof(GDI_RECT));
if (!hRect)
return NULL;
hRect->objectType = GDIOBJECT_RECT;
hRect->left = xLeft;
hRect->top = yTop;
hRect->right = xRight;
hRect->bottom = yBottom;
return hRect;
} | 0 | [
"CWE-190"
] | FreeRDP | ce21b9d7ecd967e0bc98ed31a6b3757848aa6c9e | 8,542,621,094,549,400,000,000,000,000,000,000,000 | 14 | Fix CVE-2020-11523: clamp invalid rectangles to size 0
Thanks to Sunglin and HuanGMz from Knownsec 404 |
static int string_to_crypto_cipher_type(const char* crypto_cipher_type)
{
if (strcmp(crypto_cipher_type, "none") == 0) {
return CRYPTO_CIPHER_TYPE_NONE;
} else if (strcmp(crypto_cipher_type, "aes256") == 0) {
return CRYPTO_CIPHER_TYPE_AES256;
} else if (strcmp(crypto_cipher_type, "aes192") == 0) {
return CRYPT... | 0 | [
"CWE-703"
] | corosync | b3f456a8ceefac6e9f2e9acc2ea0c159d412b595 | 170,788,986,707,135,100,000,000,000,000,000,000,000 | 15 | totemcrypto: fix hmac key initialization
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com> |
static void mod_tree_insert(struct module *mod) { } | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 105,286,219,704,231,170,000,000,000,000,000,000,000 | 1 | 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... |
CIFSSMBMkDir(const int xid, struct cifs_tcon *tcon,
const char *name, const struct nls_table *nls_codepage, int remap)
{
int rc = 0;
CREATE_DIRECTORY_REQ *pSMB = NULL;
CREATE_DIRECTORY_RSP *pSMBr = NULL;
int bytes_returned;
int name_len;
cFYI(1, "In CIFSSMBMkDir");
MkDirRetry:
rc = smb_init(SMB_COM_CREATE... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 262,148,470,149,796,340,000,000,000,000,000,000,000 | 41 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
cachedb_find_backend(const char* str)
{
#ifdef USE_REDIS
if(strcmp(str, redis_backend.name) == 0)
return &redis_backend;
#endif
if(strcmp(str, testframe_backend.name) == 0)
return &testframe_backend;
/* TODO add more backends here */
return NULL;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 90,532,883,112,859,900,000,000,000,000,000,000,000 | 11 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
TEST_F(RenameCollectionTest, RenameCollectionForApplyOpsDropTargetByUUIDTargetDoesNotExist) {
const auto& collA = NamespaceString("test.A");
const auto& collB = NamespaceString("test.B");
const auto& collC = NamespaceString("test.C");
auto dbName = collA.db().toString();
auto collAUUID = _createColl... | 0 | [
"CWE-20"
] | mongo | 35c1b1f588f04926a958ad2fe4d9c59d79f81e8b | 274,748,607,699,799,170,000,000,000,000,000,000,000 | 22 | SERVER-35636 renameCollectionForApplyOps checks for complete namespace |
static void *tcp_v6_tw_get_peer(struct sock *sk)
{
struct inet6_timewait_sock *tw6 = inet6_twsk(sk);
struct inet_timewait_sock *tw = inet_twsk(sk);
if (tw->tw_family == AF_INET)
return tcp_v4_tw_get_peer(sk);
return inet_getpeer_v6(&tw6->tw_v6_daddr, 1);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 185,566,038,975,382,000,000,000,000,000,000,000,000 | 10 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
PHP_IMAP_EXPORT void mm_login(NETMBX *mb, char *user, char *pwd, long trial)
{
if (*mb->user) {
strlcpy (user, mb->user, MAILTMPLEN);
} else {
strlcpy (user, IMAPG(imap_user), MAILTMPLEN);
}
strlcpy (pwd, IMAPG(imap_password), MAILTMPLEN); | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 87,419,584,384,409,870,000,000,000,000,000,000,000 | 10 | Disable rsh/ssh functionality in imap by default (bug #77153) |
static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor)
{
struct inode *inode = filp->f_path.dentry->d_inode;
struct address_space *mapping = inode->i_mapping;
unsigned long index, offset;
index = *ppos >> PAGE_CACHE_SHIFT;
offset = *ppos & ~PAGE_CACHE_MASK;
... | 0 | [
"CWE-200"
] | linux-2.6 | e84e2e132c9c66d8498e7710d4ea532d1feaaac5 | 64,757,569,846,201,090,000,000,000,000,000,000,000 | 90 | tmpfs: restore missing clear_highpage
tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in
which shmem_getpage receives the page from its caller instead of allocating.
We must cover this case by clear_highpage before SetPageUptodate, as before.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Sig... |
static int keyring_search_iterator(const void *object, void *iterator_data)
{
struct keyring_search_context *ctx = iterator_data;
const struct key *key = keyring_ptr_to_key(object);
unsigned long kflags = key->flags;
kenter("{%d}", key->serial);
/* ignore keys not of this type */
if (key->type != ctx->index_key... | 0 | [
"CWE-310"
] | linux | 979e0d74651ba5aa533277f2a6423d0f982fb6f6 | 118,944,494,032,804,090,000,000,000,000,000,000,000 | 63 | KEYS: Make the keyring cycle detector ignore other keyrings of the same name
This fixes CVE-2014-0102.
The following command sequence produces an oops:
keyctl new_session
i=`keyctl newring _ses @s`
keyctl link @s $i
The problem is that search_nested_keyrings() sees two keyrings that have
matching type and descri... |
bool asn1_write_enumerated(struct asn1_data *data, uint8_t v)
{
if (!asn1_push_tag(data, ASN1_ENUMERATED)) return false;
asn1_write_uint8(data, v);
asn1_pop_tag(data);
return !data->has_error;
} | 1 | [
"CWE-399"
] | samba | 9d989c9dd7a5b92d0c5d65287935471b83b6e884 | 23,994,609,398,533,456,000,000,000,000,000,000,000 | 7 | CVE-2015-7540: lib: util: Check *every* asn1 return call and early return.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep... |
int ha_change_key_cache_param(KEY_CACHE *key_cache)
{
DBUG_ENTER("ha_change_key_cache_param");
if (key_cache->key_cache_inited)
{
mysql_mutex_lock(&LOCK_global_system_variables);
uint division_limit= (uint)key_cache->param_division_limit;
uint age_threshold= (uint)key_cache->param_age_threshold;
... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 5,087,173,111,648,950,600,000,000,000,000,000,000 | 14 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
void Item_func_md5::fix_length_and_dec()
{
CHARSET_INFO *cs= get_checksum_charset(args[0]->collation.collation->csname);
args[0]->collation.set(cs, DERIVATION_COERCIBLE);
fix_length_and_charset(32, default_charset());
} | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 64,471,547,600,710,720,000,000,000,000,000,000,000 | 6 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
NOEXPORT SOCK_OPT *socket_options_init(void) {
#ifdef USE_WIN32
DWORD version;
int major, minor;
#endif
SOCK_OPT *opt=str_alloc_detached(sizeof sock_opts_def);
memcpy(opt, sock_opts_def, sizeof sock_opts_def);
#ifdef USE_WIN32
version=GetVersion();
major=LOBYTE(LOWORD(version));
minor=HIBY... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 241,686,346,184,416,700,000,000,000,000,000,000,000 | 24 | stunnel-5.57 |
QPDFWriter::QPDFWriter(QPDF& pdf) :
m(new Members(pdf))
{
} | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 2,185,808,256,198,938,300,000,000,000,000,000,000 | 4 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
static inline double LevelPixel(const double black_point,
const double white_point,const double gamma,const double pixel)
{
double
level_pixel,
scale;
scale=PerceptibleReciprocal(white_point-black_point);
level_pixel=QuantumRange*gamma_pow(scale*((double) pixel-black_point),
PerceptibleReciprocal(g... | 0 | [
"CWE-369"
] | ImageMagick | c5fcdea6a6ae27cf3db20c28b176e87b1a584e06 | 196,091,457,745,255,280,000,000,000,000,000,000,000 | 12 | https://github.com/ImageMagick/ImageMagick/issues/1717 |
moffset(struct magic_set *ms, struct magic *m)
{
switch (m->type) {
case FILE_BYTE:
return CAST(int32_t, (ms->offset + sizeof(char)));
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
return CAST(int32_t, (ms->offset + sizeof(short)));
case FILE_LONG:
case FILE_BELONG:
case FILE_LELO... | 0 | [
"CWE-20"
] | php-src | 74555e7c26b2c61bb8e67b7d6a6f4d2b8eb3a5f3 | 10,644,920,795,917,913,000,000,000,000,000,000,000 | 95 | Fixed bug #64830 mimetype detection segfaults on mp3 file |
static inline void snd_rawmidi_buffer_unref(struct snd_rawmidi_runtime *runtime)
{
runtime->buffer_ref--;
} | 0 | [
"CWE-416"
] | linux | c1f6e3c818dd734c30f6a7eeebf232ba2cf3181d | 318,410,552,017,081,100,000,000,000,000,000,000,000 | 4 | ALSA: rawmidi: Fix racy buffer resize under concurrent accesses
The rawmidi core allows user to resize the runtime buffer via ioctl,
and this may lead to UAF when performed during concurrent reads or
writes: the read/write functions unlock the runtime lock temporarily
during copying form/to user-space, and that's the ... |
get_user_command_name(int idx, int cmdidx)
{
if (cmdidx == CMD_USER && idx < ucmds.ga_len)
return USER_CMD(idx)->uc_name;
if (cmdidx == CMD_USER_BUF)
{
// In cmdwin, the alternative buffer should be used.
buf_T *buf =
#ifdef FEAT_CMDWIN
is_in_cmdwin() ? prevwin->w_buffer :
#endif
curbuf;
if... | 1 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 285,428,214,708,886,350,000,000,000,000,000,000,000 | 18 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
static apr_status_t md_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_t *ptemp, server_rec *s)
{
void *data = NULL;
const char *mod_md_init_key = "mod_md_init_counter";
md_srv_conf_t *sc;
md_mod_conf_t *mc;
md_reg_t *reg;
const md_t *md;
apr_array_he... | 0 | [
"CWE-476"
] | mod_md | e71001955809247b3aa4d269e1e0741b4fe0fc3d | 185,970,501,981,112,050,000,000,000,000,000,000,000 | 116 | v1.1.12, notifycmd improvements |
void gf_bs_flush(GF_BitStream *bs)
{
if (!bs->stream) return;
if (bs->bsmode != GF_BITSTREAM_FILE_WRITE) return;
if (bs->cache_write)
bs_flush_write_cache(bs);
gf_fflush(bs->stream);
} | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 337,428,088,924,536,000,000,000,000,000,000,000,000 | 10 | fixed #2165 |
uint32_t nghttp2_get_uint32(const uint8_t *data) {
uint32_t n;
memcpy(&n, data, sizeof(uint32_t));
return ntohl(n);
} | 0 | [
"CWE-707"
] | nghttp2 | 336a98feb0d56b9ac54e12736b18785c27f75090 | 128,454,708,915,056,700,000,000,000,000,000,000,000 | 5 | Implement max settings option |
static int pptp_stop_ctrl_conn_rqst(struct pptp_conn_t *conn)
{
struct pptp_stop_ctrl_conn *msg = (struct pptp_stop_ctrl_conn *)conn->in_buf;
if (conf_verbose)
log_ppp_info2("recv [PPTP Stop-Ctrl-Conn-Request <Reason %i>]\n", msg->reason_result);
send_pptp_stop_ctrl_conn_rply(conn, PPTP_CONN_STOP_OK, 0);
return... | 0 | [
"CWE-787"
] | accel-ppp | a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f | 9,436,708,433,075,380,000,000,000,000,000,000,000 | 10 | Fix post_msg implementation bug
I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`:
https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L5... |
GF_Err gf_m4a_parse_config(GF_BitStream *bs, GF_M4ADecSpecInfo *cfg, Bool size_known)
{
u32 channel_configuration = 0;
memset(cfg, 0, sizeof(GF_M4ADecSpecInfo));
cfg->base_object_type = gf_bs_read_int(bs, 5);
/*extended object type*/
if (cfg->base_object_type==31) {
cfg->base_object_type = 32 + gf_bs_read_int(bs... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 188,396,231,600,659,760,000,000,000,000,000,000,000 | 188 | fix some exploitable overflows (#994, #997) |
static int platform_match(struct device *dev, struct device_driver *drv)
{
struct platform_device *pdev = to_platform_device(dev);
struct platform_driver *pdrv = to_platform_driver(drv);
/* When driver_override is set, only bind to the matching driver */
if (pdev->driver_override)
return !strcmp(pdev->driver_ove... | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 338,034,781,511,711,180,000,000,000,000,000,000,000 | 24 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
Item_decimal::Item_decimal(const uchar *bin, int precision, int scale)
{
binary2my_decimal(E_DEC_FATAL_ERROR, bin,
&decimal_value, precision, scale);
decimals= (uint8) decimal_value.frac;
fixed= 1;
max_length= my_decimal_precision_to_length_no_truncation(precision, decimals,
... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 323,545,325,619,580,970,000,000,000,000,000,000,000 | 9 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static long _perf_ioctl(struct perf_event *event, unsigned int cmd, unsigned long arg)
{
void (*func)(struct perf_event *);
u32 flags = arg;
switch (cmd) {
case PERF_EVENT_IOC_ENABLE:
func = _perf_event_enable;
break;
case PERF_EVENT_IOC_DISABLE:
func = _perf_event_disable;
break;
case PERF_EVENT_IOC_RES... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 318,980,122,540,127,600,000,000,000,000,000,000,000 | 66 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,
unsigned char *buffer)
{
unsigned char cmd[16];
struct scsi_sense_hdr sshdr;
int sense_valid = 0;
int the_result;
int retries = 3, reset_retries = READ_CAPACITY_RETRIES_ON_RESET;
unsigned int alignment;
unsigned long long lba;
un... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0bfc96cb77224736dfa35c3c555d37b3646ef35e | 134,384,224,010,415,060,000,000,000,000,000,000,000 | 92 | block: fail SCSI passthrough ioctls on partition devices
Linux allows executing the SG_IO ioctl on a partition or LVM volume, and
will pass the command to the underlying block device. This is
well-known, but it is also a large security problem when (via Unix
permissions, ACLs, SELinux or a combination thereof) a prog... |
isdn_net_swapbind(int drvidx)
{
isdn_net_dev *p;
#ifdef ISDN_DEBUG_NET_ICALL
printk(KERN_DEBUG "n_fi: swapping ch of %d\n", drvidx);
#endif
p = dev->netdev;
while (p) {
if (p->local->pre_device == drvidx)
switch (p->local->pre_channel) {
case 0:
p->local->pre_channel = 1;
break;
case 1:
... | 0 | [
"CWE-119"
] | linux-2.6 | 0f13864e5b24d9cbe18d125d41bfa4b726a82e40 | 209,091,125,486,578,830,000,000,000,000,000,000,000 | 21 | isdn: avoid copying overly-long strings
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
Status AuthorizationSessionImpl::checkAuthForCollMod(const NamespaceString& ns,
const BSONObj& cmdObj,
bool isMongos) {
if (!isAuthorizedForActionsOnNamespace(ns, ActionType::collMod)) {
return Status(E... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 211,477,422,684,851,560,000,000,000,000,000,000,000 | 26 | SERVER-38984 Validate unique User ID on UserCache hit |
xmlParseCharRef(xmlParserCtxtPtr ctxt) {
unsigned int val = 0;
int count = 0;
unsigned int outofrange = 0;
/*
* Using RAW/CUR/NEXT is okay since we are working on ASCII range here
*/
if ((RAW == '&') && (NXT(1) == '#') &&
(NXT(2) == 'x')) {
SKIP(3);
GROW;
while (RAW != ';') { /... | 0 | [
"CWE-125"
] | libxml2 | 77404b8b69bc122d12231807abf1a837d121b551 | 211,959,387,290,980,600,000,000,000,000,000,000,000 | 85 | Make sure the parser returns when getting a Stop order
patch backported from chromiun bug fixes, assuming author is Chris |
void drm_fb_release(struct drm_file *priv)
{
struct drm_device *dev = priv->minor->dev;
struct drm_framebuffer *fb, *tfb;
mutex_lock(&dev->mode_config.mutex);
list_for_each_entry_safe(fb, tfb, &priv->fbs, filp_head) {
list_del(&fb->filp_head);
fb->funcs->destroy(fb);
}
mutex_unlock(&dev->mode_config.mutex);
... | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 126,117,757,223,514,400,000,000,000,000,000,000,000 | 12 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... |
static void __copy_gigantic_page(struct page *dst, struct page *src,
int nr_pages)
{
int i;
struct page *dst_base = dst;
struct page *src_base = src;
for (i = 0; i < nr_pages; ) {
cond_resched();
copy_highpage(dst, src);
i++;
dst = mem_map_next(dst, dst_base, i);
src = mem_map_next(src, src_base, i)... | 0 | [
"CWE-476"
] | linux | 42cb14b110a5698ccf26ce59c4441722605a3743 | 228,677,112,279,374,480,000,000,000,000,000,000,000 | 16 | mm: migrate dirty page without clear_page_dirty_for_io etc
clear_page_dirty_for_io() has accumulated writeback and memcg subtleties
since v2.6.16 first introduced page migration; and the set_page_dirty()
which completed its migration of PageDirty, later had to be moderated to
__set_page_dirty_nobuffers(); then PageSwa... |
//! Return a pointer to the first pixel value \const.
const T* data() const {
return _data; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 302,023,705,615,833,600,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void __io_free_req_finish(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
__io_put_req_task(req);
if (likely(!io_is_fallback_req(req)))
kmem_cache_free(req_cachep, req);
else
clear_bit_unlock(0, (unsigned long *) &ctx->fallback_req);
percpu_ref_put(&ctx->refs);
} | 0 | [
"CWE-416"
] | linux | 6d816e088c359866f9867057e04f244c608c42fe | 296,393,598,954,435,040,000,000,000,000,000,000,000 | 11 | io_uring: hold 'ctx' reference around task_work queue + execute
We're holding the request reference, but we need to go one higher
to ensure that the ctx remains valid after the request has finished.
If the ring is closed with pending task_work inflight, and the
given io_kiocb finishes sync during issue, then we need a... |
hts_idx_t *bcf_index_load3(const char *fn, const char *fnidx, int flags)
{
return hts_idx_load3(fn, fnidx, HTS_FMT_CSI, flags);
} | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 264,081,641,512,075,670,000,000,000,000,000,000,000 | 4 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
asn1_get_oid(
unsigned char **buffer, /* IO - Pointer in buffer */
unsigned char *bufend, /* I - End of buffer */
unsigned length, /* I - Length of value */
int *oid, /* I - OID buffer */
int oidsize) /* I - Size of OID buffer */
{
unsigned char *valend; /* End ... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 169,940,146,931,975,270,000,000,000,000,000,000,000 | 50 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
static void vmx_set_apic_access_page_addr(struct kvm_vcpu *vcpu, hpa_t hpa)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
/*
* Currently we do not handle the nested case where L2 has an
* APIC access page of its own; that page is still pinned.
* Hence, we skip the case where the VCPU is in guest mode _and_
* L1 pre... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 47,899,292,137,308,370,000,000,000,000,000,000,000 | 24 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
static int irda_create(struct net *net, struct socket *sock, int protocol,
int kern)
{
struct sock *sk;
struct irda_sock *self;
if (protocol < 0 || protocol > SK_PROTOCOL_MAX)
return -EINVAL;
if (net != &init_net)
return -EAFNOSUPPORT;
/* Check for valid socket type */
switch (sock->type) {
case ... | 0 | [] | net | 79462ad02e861803b3840cc782248c7359451cd9 | 285,742,347,323,075,300,000,000,000,000,000,000,000 | 81 | net: add validation for the socket syscall protocol argument
郭永刚 reported that one could simply crash the kernel as root by
using a simple program:
int socket_fd;
struct sockaddr_in addr;
addr.sin_port = 0;
addr.sin_addr.s_addr = INADDR_ANY;
addr.sin_family = 10;
socket_fd = socket(10,3,0x40000000);
connect(s... |
static int __mpage_da_writepage(struct page *page,
struct writeback_control *wbc, void *data)
{
struct mpage_da_data *mpd = data;
struct inode *inode = mpd->inode;
struct buffer_head *bh, *head;
sector_t logical;
if (mpd->io_done) {
/*
* Rest of the page in the page_vec
* redirty then and skip then. W... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 104,566,494,720,768,820,000,000,000,000,000,000,000 | 99 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
int fuse_fs_release(struct fuse_fs *fs, const char *path,
struct fuse_file_info *fi)
{
fuse_get_context()->private_data = fs->user_data;
if (fs->op.release)
return fs->op.release(path, fi);
else
return 0;
} | 0 | [] | ntfs-3g | fb28eef6f1c26170566187c1ab7dc913a13ea43c | 162,713,604,125,719,960,000,000,000,000,000,000,000 | 9 | Hardened the checking of directory offset requested by a readdir
When asked for the next directory entries, make sure the chunk offset
is within valid values, otherwise return no more entries in chunk. |
xmlStopParser(xmlParserCtxtPtr ctxt) {
if (ctxt == NULL)
return;
xmlHaltParser(ctxt);
ctxt->errNo = XML_ERR_USER_STOP;
} | 0 | [
"CWE-119"
] | libxml2 | 28cd9cb747a94483f4aea7f0968d202c20bb4cfc | 82,628,500,857,378,040,000,000,000,000,000,000,000 | 6 | Add xmlHaltParser() to stop the parser
The problem is doing it in a consistent and safe fashion
It's more complex than just setting ctxt->instate = XML_PARSER_EOF
Update the public function to reuse that new internal routine |
void performance_monitor_exception(struct pt_regs *regs)
{
perf_irq(regs);
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | 6c4841c2b6c32a134f9f36e5e08857138cc12b10 | 297,821,327,964,343,130,000,000,000,000,000,000,000 | 4 | [POWERPC] Never panic when taking altivec exceptions from userspace
At the moment we rely on a cpu feature bit or a firmware property to
detect altivec. If we dont have either of these and the cpu does in fact
support altivec we can cause a panic from userspace.
It seems safer to always send a signal if we manage to ... |
inline SegmentId SegmentReader::getSegmentId() { return id; } | 0 | [
"CWE-20"
] | capnproto | 52bc956459a5e83d7c31be95763ff6399e064ae4 | 113,372,214,114,502,690,000,000,000,000,000,000,000 | 1 | SECURITY: Prevent compiler from eliding bounds checks.
Details: https://github.com/sandstorm-io/capnproto/blob/master/security-advisories/2017-04-17-0-apple-32bit-elides-bounds-check.md |
PHP_METHOD(Phar, __construct)
{
#if !HAVE_SPL
zend_throw_exception_ex(zend_ce_exception, 0, "Cannot instantiate Phar object without SPL extension");
#else
char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname;
size_t fname_len, alias_len = 0;
int arch_len, entry_len, is_data;
zend_long flags... | 1 | [
"CWE-20"
] | php-src | 1e9b175204e3286d64dfd6c9f09151c31b5e099a | 40,774,388,632,945,850,000,000,000,000,000,000,000 | 131 | Fix bug #71860: Require valid paths for phar filenames |
R_API RBinJavaStackMapFrame *r_bin_java_default_stack_frame() {
RBinJavaStackMapFrame *sf = R_NEW0 (RBinJavaStackMapFrame);
if (!sf) {
return NULL;
}
sf->metas = R_NEW0 (RBinJavaMetaInfo);
if (!sf->metas) {
free (sf);
return NULL;
}
sf->metas->type_info = (void *) &R_BIN_JAVA_STACK_MAP_FRAME_METAS[R_BIN_JA... | 0 | [
"CWE-125"
] | radare2 | e9ce0d64faf19fa4e9c260250fbdf25e3c11e152 | 80,074,577,306,770,335,000,000,000,000,000,000,000 | 18 | Fix #10498 - Fix crash in fuzzed java files (#10511) |
xmlParseStartTag(xmlParserCtxtPtr ctxt) {
const xmlChar *name;
const xmlChar *attname;
xmlChar *attvalue;
const xmlChar **atts = ctxt->atts;
int nbatts = 0;
int maxatts = ctxt->maxatts;
int i;
if (RAW != '<') return(NULL);
NEXT1;
name = xmlParseName(ctxt);
if (name == NULL)... | 0 | [
"CWE-703",
"CWE-835"
] | libxml2 | 899a5d9f0ed13b8e32449a08a361e0de127dd961 | 215,295,760,977,288,030,000,000,000,000,000,000,000 | 125 | Detect infinite recursion in parameter entities
When expanding a parameter entity in a DTD, infinite recursion could
lead to an infinite loop or memory exhaustion.
Thanks to Wei Lei for the first of many reports.
Fixes bug 759579. |
lookup_pi_state(u32 uval, struct futex_hash_bucket *hb,
union futex_key *key, struct futex_pi_state **ps)
{
struct futex_pi_state *pi_state = NULL;
struct futex_q *this, *next;
struct plist_head *head;
struct task_struct *p;
pid_t pid = uval & FUTEX_TID_MASK;
head = &hb->chain;
plist_for_each_entry_safe(this... | 0 | [] | linux-2.6 | 5ecb01cfdf96c5f465192bdb2a4fd4a61a24c6cc | 52,444,793,049,532,940,000,000,000,000,000,000,000 | 87 | futex_lock_pi() key refcnt fix
This fixes a futex key reference count bug in futex_lock_pi(),
where a key's reference count is incremented twice but decremented
only once, causing the backing object to not be released.
If the futex is created in a temporary file in an ext3 file system,
this bug causes the file's inod... |
static int io_read(struct io_kiocb *req, unsigned int issue_flags)
{
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct kiocb *kiocb = &req->rw.kiocb;
struct iov_iter __iter, *iter = &__iter;
struct io_async_rw *rw = req->async_data;
ssize_t io_size, ret, ret2;
bool force_nonblock = issue_flags &... | 1 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 9,767,670,992,332,380,000,000,000,000,000,000,000 | 97 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
static void dw_reader(struct dw_spi *dws)
{
u32 max;
u16 rxw;
spin_lock(&dws->buf_lock);
max = rx_max(dws);
while (max--) {
rxw = dw_read_io_reg(dws, DW_SPI_DR);
/* Care rx only if the transfer's original "rx" is not null */
if (dws->rx_end - dws->len) {
if (dws->n_bytes == 1)
*(u8 *)(dws->rx) = rxw;... | 0 | [
"CWE-662"
] | linux | 19b61392c5a852b4e8a0bf35aecb969983c5932d | 43,175,951,923,458,850,000,000,000,000,000,000,000 | 20 | spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls
dw_spi_irq() and dw_spi_transfer_one concurrent calls.
I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null,
dw->len==4, and dw->tx_end==1.
When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one
may concurrent... |
static inline void io_poll_remove_req(struct io_kiocb *req)
{
if (!RB_EMPTY_NODE(&req->rb_node)) {
rb_erase(&req->rb_node, &req->ctx->cancel_tree);
RB_CLEAR_NODE(&req->rb_node);
}
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 173,339,124,919,023,000,000,000,000,000,000,000,000 | 7 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
LibRaw::~LibRaw()
{
recycle();
delete tls;
#ifdef USE_RAWSPEED
if(_rawspeed_camerameta)
{
CameraMetaDataLR *cmeta = static_cast<CameraMetaDataLR*>(_rawspeed_camerameta);
delete cmeta;
_rawspeed_camerameta = NULL;
}
#endif
} | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 336,524,493,183,062,070,000,000,000,000,000,000,000 | 13 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef |
void connAccepted(
const std::shared_ptr<folly::AsyncSSLSocket>& s) noexcept override {
std::cerr << "HandshakeErrorCallback::connAccepted" << std::endl;
auto sock = std::static_pointer_cast<AsyncSSLSocket>(s);
hcb_->setSocket(sock);
sock->getEventBase()->tryRunAfterDelay(
[=] {
... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 218,169,556,293,415,200,000,000,000,000,000,000,000 | 21 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
GF_EXPORT
GF_Err gf_isom_box_write(GF_Box *a, GF_BitStream *bs)
{
GF_Err e;
u64 pos = gf_bs_get_position(bs);
if (!a) return GF_BAD_PARAM;
//box has been disabled, do not write
if (!a->size) return GF_OK;
if (a->registry->disabled) {
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[iso file] Box %s disabled registry... | 0 | [
"CWE-476"
] | gpac | 37592ad86c6ca934d34740012213e467acc4a3b0 | 319,883,805,427,345,220,000,000,000,000,000,000,000 | 27 | fixed #2163 |
TEST_F(HttpHealthCheckerImplTest, GoAwayProbeInProgressTimeout) {
setupHCHttp2();
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())};
EXPECT_CALL(runtime_.snapshot_, featureEnabled("health_check.verify_cluster", 100))
.WillRepeatedly(R... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 300,605,068,132,640,240,000,000,000,000,000,000,000 | 32 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
uint64 EbmlElementSize(uint64 type, float /* value */) {
// Size of EBML ID
uint64 ebml_size = GetUIntSize(type);
// Datasize
ebml_size += sizeof(float);
// Size of Datasize
ebml_size++;
return ebml_size;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 73,319,503,631,011,610,000,000,000,000,000,000,000 | 12 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
void rtrs_clt_close_conns(struct rtrs_clt_path *clt_path, bool wait)
{
if (rtrs_clt_change_state_get_old(clt_path, RTRS_CLT_CLOSING, NULL))
queue_work(rtrs_wq, &clt_path->close_work);
if (wait)
flush_work(&clt_path->close_work);
} | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 279,259,945,954,635,520,000,000,000,000,000,000,000 | 7 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable )
{
SQLHSTMT hStmt;
SQLTCHAR szSepLine[32001];
SQLTCHAR szUcSQL[32001];
SQLSMALLINT cols;
SQLINTEGER ret;
SQLLEN nRows = 0;
szSepL... | 0 | [
"CWE-119",
"CWE-369"
] | unixODBC | 45ef78e037f578b15fc58938a3a3251655e71d6f | 26,071,325,136,167,830,000,000,000,000,000,000,000 | 126 | New Pre Source |
LEX::sp_variable_declarations_cursor_rowtype_finalize(THD *thd, int nvars,
uint offset,
Item *def)
{
const sp_pcursor *pcursor= spcont->find_cursor(offset);
// Loop through all variables in the same declarat... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 231,625,206,227,463,320,000,000,000,000,000,000,000 | 29 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static void tcf_chain_tp_remove(struct tcf_chain *chain,
struct tcf_chain_info *chain_info,
struct tcf_proto *tp)
{
struct tcf_proto *next = tcf_chain_dereference(chain_info->next, chain);
tcf_proto_mark_delete(tp);
if (tp == chain->filter_chain)
tcf_chain0_head_change(chain, next);
RCU_INIT_POINTER(*cha... | 0 | [
"CWE-416"
] | linux | 04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5 | 103,659,332,966,402,330,000,000,000,000,000,000,000 | 11 | net: sched: fix use-after-free in tc_new_tfilter()
Whenever tc_new_tfilter() jumps back to replay: label,
we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free as in [1]
For consistency, apply the same fix in tc_ctl_chain()
BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1... |
file_accessible (char const *file)
{
# if defined _LIBC || HAVE_FACCESSAT
return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
# else
struct stat st;
return __stat (file, &st) == 0 || errno == EOVERFLOW;
# endif
} | 0 | [
"CWE-125"
] | glibc | ee8d5e33adb284601c00c94687bc907e10aec9bb | 319,536,802,741,247,060,000,000,000,000,000,000,000 | 9 | realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770]
realpath returns an allocated string when the result exceeds PATH_MAX,
which is unexpected when its second argument is not NULL. This results
in the second argument (resolved) being uninitialized and also results
in a memory leak since th... |
QPDFWriter::writeTrailer(trailer_e which, int size, bool xref_stream,
qpdf_offset_t prev, int linearization_pass)
{
QPDFObjectHandle trailer = getTrimmedTrailer();
if (! xref_stream)
{
writeString("trailer <<");
}
writeStringQDF("\n");
if (which == t_lin_second)
{
... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 201,781,823,996,537,400,000,000,000,000,000,000,000 | 85 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
void qpdf_set_preserve_unreferenced_objects(qpdf_data qpdf, QPDF_BOOL value)
{
QTC::TC("qpdf", "qpdf-c called qpdf_set_preserve_unreferenced_objects");
qpdf->qpdf_writer->setPreserveUnreferencedObjects(value);
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 264,710,663,741,700,300,000,000,000,000,000,000,000 | 5 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
INST_HANDLER (fmuls) { // FMULS Rd, Rr
int d = ((buf[0] >> 4) & 0x7) + 16;
int r = (buf[0] & 0x7) + 16;
ESIL_A ("1,");
ESIL_A ("r%d,DUP,0x80,&,?{,0xffff00,|,},", d); // sign extension Rd
ESIL_A ("r%d,DUP,0x80,&,?{,0xffff00,|,},", r); // sign extension Rr
ESIL_A ("*,<<,", r, d); // 0: (Rd*Rr)<<1
ESIL_A ("0xf... | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 182,188,888,817,736,370,000,000,000,000,000,000,000 | 15 | Fix crash in anal.avr |
void test_nghttp2_http_head_method_upgrade_workaround(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
const nghttp2_nv cl_resnv[] = {MAKE_NV(":status", "200"),
MAKE_NV("content-length", "1000000007")};
nghttp2_bufs bufs;
nghttp2_hd_deflater deflater;
n... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 60,044,605,284,325,820,000,000,000,000,000,000,000 | 41 | Add nghttp2_option_set_max_outbound_ack |
void add_device_randomness(const void *buf, unsigned int size)
{
unsigned long time = random_get_entropy() ^ jiffies;
unsigned long flags;
if (!crng_ready() && size)
crng_slow_load(buf, size);
trace_add_device_randomness(size, _RET_IP_);
spin_lock_irqsave(&input_pool.lock, flags);
_mix_pool_bytes(&input_pool,... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 188,574,140,712,632,430,000,000,000,000,000,000,000 | 14 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
PHP_FUNCTION(imagedestroy)
{
zval *IM;
gdImagePtr im;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &IM) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd);
zend_list_delete(Z_LVAL_P(IM));
RETURN_TRUE;
} | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 78,889,011,616,594,660,000,000,000,000,000,000,000 | 15 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
e_ews_backend_sync_folders_sync (EEwsBackend *backend,
GCancellable *cancellable,
GError **error)
{
EEwsConnection *connection;
GSList *folders_created = NULL;
GSList *folders_updated = NULL;
GSList *folders_deleted = NULL;
gboolean includes_last_fo... | 1 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 151,041,850,505,379,150,000,000,000,000,000,000,000 | 105 | 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 |
int ssl_derive_keys( ssl_context *ssl )
{
int ret = 0;
unsigned char tmp[64];
unsigned char keyblk[256];
unsigned char *key1;
unsigned char *key2;
unsigned char *mac_enc;
unsigned char *mac_dec;
size_t iv_copy_len;
const cipher_info_t *cipher_info;
const md_info_t *md_info;
... | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 240,294,758,199,985,800,000,000,000,000,000,000,000 | 451 | Added max length checking of hostname |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.