func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static uint16_t tsc2102_audio_register_read(TSC210xState *s, int reg)
{
int l_ch, r_ch;
uint16_t val;
switch (reg) {
case 0x00: /* Audio Control 1 */
return s->audio_ctrl1;
case 0x01:
return 0xff00;
case 0x02: /* DAC Volume Control */
return s->volume;
case 0x03:
... | 0 | [
"CWE-119"
] | qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | 213,021,621,324,938,600,000,000,000,000,000,000,000 | 80 | tsc210x: fix buffer overrun on invalid state load
CVE-2013-4539
s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.
Validate after load to avoid buffer overrun.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst... |
static int stbi__cpuid3(void)
{
int res;
__asm {
mov eax,1
cpuid
mov res,edx
}
return res;
} | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 156,711,858,641,022,150,000,000,000,000,000,000,000 | 10 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
int CephxSessionHandler::sign_message(Message *m)
{
// If runtime signing option is off, just return success without signing.
if (!cct->_conf->cephx_sign_messages) {
return 0;
}
uint64_t sig;
int r = _calc_signature(m, &sig);
if (r < 0)
return r;
ceph_msg_footer& f = m->get_footer();
f.sig = s... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 8f396cf35a3826044b089141667a196454c0a587 | 120,522,896,284,131,660,000,000,000,000,000,000,000 | 19 | auth/cephx/CephxSessionHandler: implement CEPHX_V2 calculation mode
Derive the signature from the entire buffer (both cipher blocks).
Signed-off-by: Sage Weil <sage@redhat.com> |
void addReplyPushLen(client *c, long length) {
serverAssert(c->resp >= 3);
addReplyAggregateLen(c,length,'>');
} | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 315,831,822,806,756,640,000,000,000,000,000,000,000 | 4 | 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 char *_xml_decode_tag(xml_parser *parser, const char *tag)
{
char *newstr;
int out_len;
newstr = xml_utf8_decode(tag, strlen(tag), &out_len, parser->target_encoding);
if (parser->case_folding) {
php_strtoupper(newstr, out_len);
}
return newstr;
} | 0 | [
"CWE-787"
] | php-src | 7d163e8a0880ae8af2dd869071393e5dc07ef271 | 248,483,712,481,804,180,000,000,000,000,000,000,000 | 13 | truncate results at depth of 255 to prevent corruption |
flatpak_dir_find_remote_refs (FlatpakDir *self,
const char *remote,
const char *name,
const char *opt_branch,
const char *opt_default_branch,
... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 260,794,347,971,241,360,000,000,000,000,000,000,000 | 42 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
Status ConnectionImpl::onMessageBegin() {
ENVOY_CONN_LOG(trace, "message begin", connection_);
// Make sure that if HTTP/1.0 and HTTP/1.1 requests share a connection Envoy correctly sets
// protocol for each request. Envoy defaults to 1.1 but sets the protocol to 1.0 where applicable
// in onHeadersCompleteBase... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 73,869,044,353,621,835,000,000,000,000,000,000,000 | 11 | 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> |
str_time(pg_time_t tnow)
{
static char buf[128];
pg_strftime(buf, sizeof(buf),
"%Y-%m-%d %H:%M:%S %Z",
pg_localtime(&tnow, log_timezone));
return buf;
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 115,694,313,666,752,480,000,000,000,000,000,000,000 | 10 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
MemoryAllocator* memory_allocator() {
return memory_allocator_;
} | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 151,693,370,268,084,880,000,000,000,000,000,000,000 | 3 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
void ResizeImage(typename TTypes<T, 4>::ConstTensor images,
const int batch_size, const int64 in_height,
const int64 in_width, const int64 out_height,
const int64 out_width, const int channels,
const float height_scale, const float width_scale,
... | 0 | [
"CWE-787"
] | tensorflow | f6c40f0c6cbf00d46c7717a26419f2062f2f8694 | 30,619,112,308,258,730,000,000,000,000,000,000,000 | 12 | Validate min and max arguments to `QuantizedResizeBilinear`.
PiperOrigin-RevId: 369765091
Change-Id: I33be8b78273ab7d08b97541692fe05cb7f94963a |
int pop_fetch_data(struct PopAccountData *adata, const char *query,
struct Progress *progress, pop_fetch_t callback, void *data)
{
char buf[1024];
long pos = 0;
size_t lenbuf = 0;
mutt_str_strfcpy(buf, query, sizeof(buf));
int rc = pop_query(adata, buf, sizeof(buf));
if (rc < 0)
retu... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 59,473,687,921,904,020,000,000,000,000,000,000,000 | 56 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
static void ims_pcu_buffers_free(struct ims_pcu *pcu)
{
usb_kill_urb(pcu->urb_in);
usb_free_urb(pcu->urb_in);
usb_free_coherent(pcu->udev, pcu->max_out_size,
pcu->urb_in_buf, pcu->read_dma);
kfree(pcu->urb_out_buf);
usb_kill_urb(pcu->urb_ctrl);
usb_free_urb(pcu->urb_ctrl);
usb_free_coherent(pcu->udev, ... | 0 | [
"CWE-703"
] | linux | a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff | 6,228,071,656,811,553,000,000,000,000,000,000,000 | 16 | Input: ims-pcu - sanity check against missing interfaces
A malicious device missing interface can make the driver oops.
Add sanity checking.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> |
MagickExport MagickBooleanType XGetWindowColor(Display *display,
XWindows *windows,char *name)
{
int
x,
y;
PixelPacket
pixel;
RectangleInfo
crop_info;
Status
status;
Window
child,
client_window,
root_window,
target_window;
XColor
color;
XImage
*ximage;
... | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 209,033,255,810,454,000,000,000,000,000,000,000,000 | 86 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static void entropy_decode_stereo_3860(APEContext *ctx, int blockstodecode)
{
int32_t *decoded0 = ctx->decoded[0];
int32_t *decoded1 = ctx->decoded[1];
int blocks = blockstodecode;
while (blockstodecode--)
*decoded0++ = ape_decode_value_3860(ctx, &ctx->gb, &ctx->riceY);
while (blocks--)
... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 263,924,049,691,283,500,000,000,000,000,000,000,000 | 11 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
void read_prediction_unit_SKIP(thread_context* tctx,
int x0, int y0,
int nPbW, int nPbH)
{
int merge_idx = decode_merge_idx(tctx);
tctx->motion.merge_idx = merge_idx;
tctx->motion.merge_flag = true;
logtrace(LogSlice,"prediction skip 2Nx2N, merge_i... | 0 | [] | libde265 | e83f3798dd904aa579425c53020c67e03735138d | 129,813,988,843,136,170,000,000,000,000,000,000,000 | 11 | fix check for valid PPS idx (#298) |
static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
{
DIR *dir;
char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
struct stat sbuf;
char buf[MAXPATHLEN];
time_t now;
int nrdels = 0;
size_t dirname_len;
dir = opendir(dirname);
if (!d... | 0 | [] | php-src | a793b709086eed655bc98f933d838b8679b28920 | 287,856,849,781,260,050,000,000,000,000,000,000,000 | 52 | refix bug #69111, crash in 5.6 only |
void md_stop_writes(struct mddev *mddev)
{
mddev_lock_nointr(mddev);
__md_stop_writes(mddev);
mddev_unlock(mddev);
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 321,773,243,007,714,300,000,000,000,000,000,000,000 | 6 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
explicit BufferBase(Allocator* alloc, void* data_ptr)
: TensorBuffer(data_ptr), alloc_(alloc) {} | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 311,903,436,283,083,160,000,000,000,000,000,000,000 | 2 | 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 |
_TIFFprintAscii(FILE* fd, const char* cp)
{
_TIFFprintAsciiBounded( fd, cp, strlen(cp));
} | 0 | [
"CWE-476"
] | libtiff | c6f41df7b581402dfba3c19a1e3df4454c551a01 | 126,779,770,880,881,710,000,000,000,000,000,000,000 | 4 | libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770 |
**/
CImg<T> get_slice(const int z0) const {
return get_slices(z0,z0); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 337,195,331,405,727,500,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
{
hm_fragment *frag = NULL;
pitem *item = NULL;
int i = -1, is_complete;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len, max_len;
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
goto err;
/* Determine maximum... | 1 | [
"CWE-119",
"CWE-120"
] | openssl | 1632ef744872edc2aa2a53d487d3e79c965a4ad3 | 6,698,459,094,252,552,000,000,000,000,000,000,000 | 100 | Fix for CVE-2014-0195
A buffer overrun attack can be triggered by sending invalid DTLS fragments
to an OpenSSL DTLS client or server. This is potentially exploitable to
run arbitrary code on a vulnerable client or server.
Fixed by adding consistency check for DTLS fragments.
Thanks to Jüri Aedla for reporting this i... |
const Type_handler *type_handler() const { return &type_handler_int24; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 188,278,858,300,827,270,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
int SSL_do_handshake(SSL* ssl)
{
if (ssl->getSecurity().get_parms().entity_ == client_end)
return SSL_connect(ssl);
else
return SSL_accept(ssl);
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 169,181,106,466,470,300,000,000,000,000,000,000,000 | 7 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
{
va_list ap;
int count, i;
const char *attrs[2] = { NULL, NULL };
struct ldb_message **res = NULL;
attrs[0] = attr_name;
va_start(ap, format);
count = gendb_search_v(sam_ldb, mem_ctx, basedn, &res, attrs, format, ap);
va_end(ap);
if (count <= 0) {
retu... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 265,199,905,749,222,700,000,000,000,000,000,000,000 | 40 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static void nvme_irq_check(NvmeCtrl *n)
{
uint32_t intms = ldl_le_p(&n->bar.intms);
if (msix_enabled(&(n->parent_obj))) {
return;
}
if (~intms & n->irq_status) {
pci_irq_assert(&n->parent_obj);
} else {
pci_irq_deassert(&n->parent_obj);
}
} | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 75,923,063,282,943,090,000,000,000,000,000,000,000 | 13 | hw/nvme: fix CVE-2021-3929
This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the
device itself. This still allows DMA to MMIO regions of other devices
(e.g. doing P2P DMA to the controller memory buffer of another NVMe
device).
Fixes: CVE-2021-3929
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Review... |
static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags)
{
struct inode *inode;
int retval = -EOPNOTSUPP;
struct p9_fid *v9fid, *dfid;
struct v9fs_session_info *v9ses;
p9_debug(P9_DEBUG_VFS, "inode: %p dentry: %p rmdir: %x\n",
dir, dentry, flags);
v9ses = v9fs_inode2v9ses(dir);
inode = d_... | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 112,993,163,127,267,920,000,000,000,000,000,000,000 | 44 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
static NTSTATUS idmap_xid_to_sid(struct idmap_context *idmap_ctx,
TALLOC_CTX *mem_ctx,
struct unixid *unixid,
struct dom_sid **sid)
{
int ret;
NTSTATUS status;
struct ldb_context *ldb = idmap_ctx->ldb_ctx;
struct ldb_result *res = NULL;
struct ldb_message *msg;
const struct dom_sid *unix_sid;
stru... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 47,353,274,487,421,400,000,000,000,000,000,000,000 | 168 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
unsigned int language_index,
unsigned int *feature_index)
{
const LangSys &l = get_gsubgpos_table (face, table_tag).get_script (script_index).get_lang_sys (langua... | 0 | [
"CWE-119"
] | pango | 797d46714d27f147277fdd5346648d838c68fb8c | 295,736,534,146,586,540,000,000,000,000,000,000,000 | 12 | [HB/GDEF] Fix bug in building synthetic GDEF table |
static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,
struct sk_buff *skb,
const void *daddr)
{
struct net_device *dev = dst->dev;
const __be32 *pkey = daddr;
const struct rtable *rt;
struct neighbour *n;
rt = (const struct rtable *) dst;
if (rt->rt_gateway)
pkey = (const __be... | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 65,792,586,387,933,060,000,000,000,000,000,000,000 | 20 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
find_cu_tu_set (void *file, unsigned int shndx)
{
unsigned int i;
if (! load_cu_tu_indexes (file))
return NULL;
/* Find SHNDX in the shndx pool. */
for (i = 0; i < shndx_pool_used; i++)
if (shndx_pool [i] == shndx)
break;
if (i >= shndx_pool_used)
return NULL;
/* Now backup to find th... | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 179,207,790,974,705,500,000,000,000,000,000,000,000 | 21 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
static struct fib6_node* fib6_backtrack(struct fib6_node *fn,
struct in6_addr *saddr)
{
struct fib6_node *pn;
while (1) {
if (fn->fn_flags & RTN_TL_ROOT)
return NULL;
pn = fn->parent;
if (FIB6_SUBTREE(pn) && FIB6_SUBTREE(pn) != fn)
fn = fib6_lookup(FIB6_SUBTREE(pn), NULL, saddr);
else
fn = pn;
... | 0 | [
"CWE-17"
] | linux-stable | 9d289715eb5c252ae15bd547cb252ca547a3c4f2 | 54,801,594,327,459,850,000,000,000,000,000,000,000 | 16 | ipv6: stop sending PTB packets for MTU < 1280
Reduce the attack vector and stop generating IPv6 Fragment Header for
paths with an MTU smaller than the minimum required IPv6 MTU
size (1280 byte) - called atomic fragments.
See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1]
for more information and h... |
template<typename T>
inline CImg<_cimg_Tfloat> log(const CImg<T>& instance) {
return instance.get_log(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 28,724,605,231,452,150,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline u64 kvm_guest_supported_xcr0(struct kvm_vcpu *vcpu)
{
return vcpu->arch.guest_fpu.fpstate->user_xfeatures;
} | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 142,826,802,876,157,830,000,000,000,000,000,000,000 | 4 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
void ClientConnectionImpl::onBody(Buffer::Instance& data) {
ASSERT(!deferred_end_stream_headers_);
if (pending_response_.has_value()) {
ASSERT(!pending_response_done_);
pending_response_.value().decoder_->decodeData(data, false);
}
} | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 139,000,558,096,919,850,000,000,000,000,000,000,000 | 7 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
TEST_P(Http2UpstreamIntegrationTest, LargeSimultaneousRequestWithBufferLimits) {
config_helper_.setBufferLimits(1024, 1024); // Set buffer limits upstream and downstream.
simultaneousRequest(1024 * 20, 1024 * 14 + 2, 1024 * 10 + 5, 1024 * 16);
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 296,215,839,022,455,580,000,000,000,000,000,000,000 | 4 | 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... |
u_freeentry(u_entry_T *uep, long n)
{
while (n > 0)
vim_free(uep->ue_array[--n].ul_line);
vim_free((char_u *)uep->ue_array);
#ifdef U_DEBUG
uep->ue_magic = 0;
#endif
vim_free((char_u *)uep);
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | 8d02ce1ed75d008c34a5c9aaa51b67cbb9d33baa | 257,020,227,296,306,280,000,000,000,000,000,000,000 | 10 | patch 8.2.4217: illegal memory access when undo makes Visual area invalid
Problem: Illegal memory access when undo makes Visual area invalid.
Solution: Correct the Visual area after undo. |
static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
int switch_expr_is_overloaded=0;
zend_free_op free_op1;
if (IS_TMP_VAR==IS_VAR) {
if (EX_T(opline->op1.u.var).var.ptr_ptr) {
PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
} else {
switch_expr_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 113,904,471,152,167,250,000,000,000,000,000,000,000 | 30 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
vector<string> get_zone_names_from_ids(rgw::sal::RGWRadosStore *store,
const set<rgw_zone_id>& zone_ids) const {
vector<string> names;
for (auto& id : zone_ids) {
RGWZone *zone;
if (store->svc()->zone->find_zone(id, &zone)) {
names.em... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 140,067,828,601,482,140,000,000,000,000,000,000,000 | 13 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
ASC_dropSCPAssociation(T_ASC_Association * association, int timeout)
{
/* if already dead don't worry */
if (association == NULL) return EC_Normal;
if (association->DULassociation == NULL) return EC_Normal;
ASC_dataWaiting(association, timeout);
OFCondition cond = DUL_DropAssociation(&association->... | 0 | [
"CWE-415",
"CWE-703",
"CWE-401"
] | dcmtk | a9697dfeb672b0b9412c00c7d36d801e27ec85cb | 321,091,758,287,673,800,000,000,000,000,000,000,000 | 11 | Fixed poss. NULL pointer dereference/double free.
Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches. |
SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname)
{
return sys_renameat2(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
} | 0 | [
"CWE-416"
] | linux | f15133df088ecadd141ea1907f2c96df67c729f0 | 245,714,100,026,479,760,000,000,000,000,000,000,000 | 4 | path_openat(): fix double fput()
path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
aspath_highest (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
as_t highest = 0;
unsigned int i;
while (seg)
{
for (i = 0; i < seg->length; i++)
if (seg->as[i] > highest
&& !BGP_AS_IS_PRIVATE(seg->as[i]))
highest = seg->as[i];
seg = seg->next;
}... | 0 | [
"CWE-20"
] | quagga | 7a42b78be9a4108d98833069a88e6fddb9285008 | 242,351,090,258,026,550,000,000,000,000,000,000,000 | 16 | bgpd: Fix AS_PATH size calculation for long paths
If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up. The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message. This patch addresses... |
XmlDocument::Initialize(v8::Local<v8::Object> target)
{
Nan::HandleScope scope;
v8::Local<v8::FunctionTemplate> tmpl =
Nan::New<v8::FunctionTemplate>(New);
tmpl->SetClassName(Nan::New<v8::String>("Document").ToLocalChecked());
constructor_template.Reset( tmpl);
tmpl->InstanceTemplate()->SetI... | 0 | [
"CWE-400"
] | libxmljs | 2501807bde9b38cfaed06d1e140487516d91379d | 333,713,086,327,483,200,000,000,000,000,000,000,000 | 51 | Ensure parseXml/parseHtml input is string or buffer (#594) |
static void hns_ppe_set_qid(struct ppe_common_cb *ppe_common, u32 qid)
{
u32 qid_mod = dsaf_read_dev(ppe_common, PPE_COM_CFG_QID_MODE_REG);
if (!dsaf_get_field(qid_mod, PPE_CFG_QID_MODE_DEF_QID_M,
PPE_CFG_QID_MODE_DEF_QID_S)) {
dsaf_set_field(qid_mod, PPE_CFG_QID_MODE_DEF_QID_M,
PPE_CFG_QID_MODE_D... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 291,336,532,625,339,620,000,000,000,000,000,000,000 | 11 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
char *pointer(const char *fmt, char *buf, char *end, void *ptr,
struct printf_spec spec)
{
const int default_width = 2 * sizeof(void *);
if (!ptr && *fmt != 'K') {
/*
* Print (null) with the same width as a pointer so it makes
* tabular output look nice.
*/
if (spec.field_width == -1)
spec.fie... | 0 | [
"CWE-200"
] | linux | ad67b74d2469d9b82aaa572d76474c95bc484d57 | 69,168,966,627,178,865,000,000,000,000,000,000,000 | 117 | printk: hash addresses printed with %p
Currently there exist approximately 14 000 places in the kernel where
addresses are being printed using an unadorned %p. This potentially
leaks sensitive information regarding the Kernel layout in memory. Many
of these calls are stale, instead of fixing every call lets hash the
a... |
void ConnectionManagerImpl::ActiveStream::decodeData(
ActiveStreamDecoderFilter* filter, Buffer::Instance& data, bool end_stream,
FilterIterationStartState filter_iteration_start_state) {
ScopeTrackerScopeState scope(this,
connection_manager_.read_callbacks_->connection().dispat... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 12,202,286,085,743,331,000,000,000,000,000,000,000 | 112 | 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... |
static void check_ept_pointer_match(struct kvm *kvm)
{
struct kvm_vcpu *vcpu;
u64 tmp_eptp = INVALID_PAGE;
int i;
kvm_for_each_vcpu(i, vcpu, kvm) {
if (!VALID_PAGE(tmp_eptp)) {
tmp_eptp = to_vmx(vcpu)->ept_pointer;
} else if (tmp_eptp != to_vmx(vcpu)->ept_pointer) {
to_kvm_vmx(kvm)->ept_pointers_match
... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 197,912,658,110,050,640,000,000,000,000,000,000,000 | 18 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
g_file_read(int fd, char* ptr, int len)
{
#if defined(_WIN32)
if (ReadFile((HANDLE)fd, (LPVOID)ptr, (DWORD)len, (LPDWORD)&len, 0))
{
return len;
}
else
{
return -1;
}
#else
return read(fd, ptr, len);
#endif
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 67,099,790,627,240,190,000,000,000,000,000,000,000 | 15 | move temp files from /tmp to /tmp/.xrdp |
*to_f_printer_opts(struct config_item *item)
{
return container_of(to_config_group(item), struct f_printer_opts,
func_inst.group);
} | 0 | [
"CWE-416"
] | linux | e8d5f92b8d30bb4ade76494490c3c065e12411b1 | 338,104,580,324,347,140,000,000,000,000,000,000,000 | 5 | usb: gadget: function: printer: fix use-after-free in __lock_acquire
Fix this by increase object reference count.
BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180
kernel/locking/lockdep.c:3831
Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377
CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain... |
keydb_new (void)
{
KEYDB_HANDLE hd;
int i, j;
if (DBG_CLOCK)
log_clock ("keydb_new");
hd = xmalloc_clear (sizeof *hd);
hd->found = -1;
assert (used_resources <= MAX_KEYDB_RESOURCES);
for (i=j=0; i < used_resources; i++)
{
switch (all_resources[i].type)
{
case KEYDB_RESOURC... | 0 | [
"CWE-416"
] | gnupg | f0f71a721ccd7ab9e40b8b6b028b59632c0cc648 | 74,147,028,297,949,480,000,000,000,000,000,000,000 | 46 | gpg: Prevent an invalid memory read using a garbled keyring.
* g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
types.
* g10/keydb.c (parse_keyblock_image): Ditto.
--
The keyring DB code did not reject packets which don't belong into a
keyring. If for example the keyblock contains a literal data packet... |
download_data( struct net_device *dev, u32 *crc_p )
{
struct net_local *nl = (struct net_local *) dev->priv;
struct sk_buff *skb = nl->tx_buf_p;
unsigned len = min_t(unsigned int, skb->len - nl->outpos, nl->framelen);
outsb( dev->base_addr + DAT, skb->data + nl->outpos, len );
*crc_p = calc_crc32( *c... | 0 | [
"CWE-264"
] | linux-2.6 | f2455eb176ac87081bbfc9a44b21c7cd2bc1967e | 15,169,222,793,996,351,000,000,000,000,000,000,000 | 15 | wan: Missing capability checks in sbni_ioctl()
There are missing capability checks in the following code:
1300 static int
1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd)
1302 {
[...]
1319 case SIOCDEVRESINSTATS :
1320 if( current->euid != 0 ) /* root only */
1321 ... |
void Item_func::count_only_length(Item **item, uint nitems)
{
uint32 char_length= 0;
unsigned_flag= 0;
for (uint i= 0; i < nitems ; i++)
{
set_if_bigger(char_length, item[i]->max_char_length());
set_if_bigger(unsigned_flag, item[i]->unsigned_flag);
}
fix_char_length(char_length);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 187,795,675,323,742,000,000,000,000,000,000,000,000 | 11 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static inline bool __io_fill_cqe_req_filled(struct io_ring_ctx *ctx,
struct io_kiocb *req)
{
struct io_uring_cqe *cqe;
trace_io_uring_complete(req->ctx, req, req->cqe.user_data,
req->cqe.res, req->cqe.flags, 0, 0);
/*
* If we can't get a cq entry, userspace overflowed the
* submission (by quite a ... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 193,726,020,130,478,300,000,000,000,000,000,000,000 | 21 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
static void mld_send_initial_cr(struct inet6_dev *idev)
{
struct sk_buff *skb;
struct ifmcaddr6 *pmc;
int type;
if (mld_in_v1_mode(idev))
return;
skb = NULL;
for_each_mc_mclock(idev, pmc) {
if (pmc->mca_sfcount[MCAST_EXCLUDE])
type = MLD2_CHANGE_TO_EXCLUDE;
else
type = MLD2_ALLOW_NEW_SOURCES;
skb ... | 0 | [
"CWE-703"
] | linux | 2d3916f3189172d5c69d33065c3c21119fe539fc | 214,669,226,462,940,620,000,000,000,000,000,000,000 | 20 | ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report()
While investigating on why a synchronize_net() has been added recently
in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report()
might drop skbs in some cases.
Discussion about removing synchronize_net() from ipv6_mc_down()
will ha... |
card_start( struct net_device *dev )
{
struct net_local *nl = (struct net_local *) dev->priv;
nl->timer_ticks = CHANGE_LEVEL_START_TICKS;
nl->state &= ~(FL_WAIT_ACK | FL_NEED_RESEND);
nl->state |= FL_PREV_OK;
nl->inppos = nl->outpos = 0;
nl->wait_frameno = 0;
nl->tx_frameno = 0;
nl->framelen = 0;
outb( ... | 0 | [
"CWE-264"
] | linux-2.6 | f2455eb176ac87081bbfc9a44b21c7cd2bc1967e | 53,319,060,515,251,240,000,000,000,000,000,000,000 | 16 | wan: Missing capability checks in sbni_ioctl()
There are missing capability checks in the following code:
1300 static int
1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd)
1302 {
[...]
1319 case SIOCDEVRESINSTATS :
1320 if( current->euid != 0 ) /* root only */
1321 ... |
MONGO_EXPORT const bson *mongo_cursor_bson( mongo_cursor *cursor ) {
return (const bson *)&(cursor->current);
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 38,353,095,436,773,250,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
unsigned long cma_get_size(const struct cma *cma)
{
return cma->count << PAGE_SHIFT;
} | 0 | [
"CWE-682"
] | linux | 67a2e213e7e937c41c52ab5bc46bf3f4de469f6e | 281,242,572,737,654,780,000,000,000,000,000,000,000 | 4 | mm: cma: fix incorrect type conversion for size during dma allocation
This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.
show_stack+0x10/0x1c
dump_stack+0x74/0xc8
kasan_report_error+0x2b0/0x408
kasan_report+0x34/0x40
__asan_storeN... |
EXPORTED int mboxlist_alluser(user_cb *proc, void *rock)
{
struct alluser_rock urock;
int r = 0;
urock.prev = NULL;
urock.proc = proc;
urock.rock = rock;
r = mboxlist_allmbox(NULL, alluser_cb, &urock, /*flags*/0);
free(urock.prev);
return r;
} | 0 | [
"CWE-20"
] | cyrus-imapd | 6bd33275368edfa71ae117de895488584678ac79 | 21,889,173,868,680,580,000,000,000,000,000,000,000 | 11 | mboxlist: fix uninitialised memory use where pattern is "Other Users" |
static OPJ_BOOL opj_j2k_read_ppt ( opj_j2k_t *p_j2k,
OPJ_BYTE * p_header_data,
OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager
)
{
opj_cp_t *l_cp = 00;
opj_tcp_t *l_tc... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 118,442,646,644,080,460,000,000,000,000,000,000,000 | 75 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
static char *find_conversion(const SERVER_REC *server, const char *target)
{
char *conv = NULL;
if (server != NULL && target != NULL) {
char *tagtarget = g_strdup_printf("%s/%s", server->tag, target);
conv = iconfig_get_str("conversions", tagtarget, NULL);
g_free(tagtarget);
}
if (conv == NULL && target != N... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 90,657,451,829,480,050,000,000,000,000,000,000,000 | 15 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
static UChar32 leftArrowKeyRoutine(UChar32 c) {
return thisKeyMetaCtrl | LEFT_ARROW_KEY;
} | 0 | [
"CWE-200"
] | mongo | 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0 | 320,498,531,478,067,300,000,000,000,000,000,000,000 | 3 | SERVER-25335 avoid group and other permissions when creating .dbshell history file |
prologInitProcessor(XML_Parser parser,
const char *s,
const char *end,
const char **nextPtr)
{
enum XML_Error result = initializeEncoding(parser);
if (result != XML_ERROR_NONE)
return result;
processor = prologProcessor;
return prologProcessor(pars... | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 67,023,122,293,533,180,000,000,000,000,000,000,000 | 11 | CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/ |
static int rev_compare_tree(struct rev_info *revs,
struct commit *parent, struct commit *commit)
{
struct tree *t1 = parent->tree;
struct tree *t2 = commit->tree;
if (!t1)
return REV_TREE_NEW;
if (!t2)
return REV_TREE_OLD;
if (revs->simplify_by_decoration) {
/*
* If we are simplifying by decorati... | 0 | [] | git | a937b37e766479c8e780b17cce9c4b252fd97e40 | 176,876,557,274,830,100,000,000,000,000,000,000,000 | 36 | revision: quit pruning diff more quickly when possible
When the revision traversal machinery is given a pathspec,
we must compute the parent-diff for each commit to determine
which ones are TREESAME. We set the QUICK diff flag to avoid
looking at more entries than we need; we really just care
whether there are any cha... |
Tfloat linear_atXY_p(const float fx, const float fy, const int z=0, const int c=0) const {
if (is_empty())
throw CImgInstanceException(_cimg_instance
"linear_atXY_p(): Empty instance.",
cimg_instance);
return _linear_atXY_p... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 73,962,874,262,486,290,000,000,000,000,000,000,000 | 8 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static unsigned long fli_read_long(FILE *f)
{
unsigned char b[4];
fread(&b,1,4,f);
return (unsigned long)(b[3]<<24) | (b[2]<<16) | (b[1]<<8) | b[0];
} | 0 | [
"CWE-787"
] | GIMP | edb251a7ef1602d20a5afcbf23f24afb163de63b | 52,315,749,696,843,860,000,000,000,000,000,000,000 | 6 | Bug 739133 - (CVE-2017-17785) Heap overflow while parsing FLI files.
It is possible to trigger a heap overflow while parsing FLI files. The
RLE decoder is vulnerable to out of boundary writes due to lack of
boundary checks.
The variable "framebuf" points to a memory area which was allocated
with fli_header->width * f... |
virtual bool is_next_file_to_upload() {
return false;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 68,848,095,365,572,630,000,000,000,000,000,000,000 | 3 | 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 <... |
DeepTiledInputFile::numLevels () const
{
if (levelMode() == RIPMAP_LEVELS)
THROW (IEX_NAMESPACE::LogicExc, "Error calling numLevels() on image "
"file \"" << fileName() << "\" "
"(numLevels() is not defined for files "
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 267,823,336,831,691,700,000,000,000,000,000,000,000 | 10 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
void lftp_ssl_base::set_cert_error(const char *s)
{
bool verify=ResMgr::QueryBool("ssl:verify-certificate",hostname);
const char *const warn=verify?"ERROR":"WARNING";
Log::global->Format(0,"%s: Certificate verification: %s\n",warn,s);
if(verify && !error)
{
set_error("Certificate verification",s);
... | 0 | [
"CWE-310"
] | lftp | 6357bed2583171b7515af6bb6585cf56d2117e3f | 287,999,831,442,904,500,000,000,000,000,000,000,000 | 12 | use hostmatch function from latest curl (addresses CVE-2014-0139) |
const uint8_t* decodeVarint(const uint8_t* pos, const uint8_t* end, uint32_t* out) {
uint32_t ret = 0;
int shift = 0;
while (pos < end && (*pos & 0x80)) {
ret |= (*pos & 0x7f) << shift;
shift += 7;
pos++;
}
if (pos < end) {
ret |= *pos << shift;
pos++;
}
*out = ret;
return pos;
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 213,889,875,998,904,670,000,000,000,000,000,000,000 | 15 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
const char *name, unsigned int flags,
struct path *path)
{
struct path root = {.mnt = mnt, .dentry = dentry};
/* the first argument of filename_lookup() is ignored with root */
return filename_lookup(AT_FDCWD, getname_kernel(name),
... | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 313,868,203,443,789,030,000,000,000,000,000,000,000 | 9 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
BSONObj spec() {
return BSON("$and" << BSON_ARRAY(false));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 64,720,615,724,573,140,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
onig_copy_encoding(OnigEncoding to, OnigEncoding from)
{
*to = *from;
} | 0 | [
"CWE-125"
] | oniguruma | 690313a061f7a4fa614ec5cc8368b4f2284e059b | 150,263,257,304,803,400,000,000,000,000,000,000,000 | 4 | fix #57 : DATA_ENSURE() check must be before data access |
set_num_712(unsigned char *p, char value)
{
*((char *)p) = value;
} | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 115,032,655,388,252,050,000,000,000,000,000,000,000 | 4 | 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... |
append_opt(char *s, const char *opt, const char *val)
{
if (!opt)
return s;
if (!s) {
if (!val)
return xstrdup(opt); /* opt */
return xstrconcat3(NULL, opt, val); /* opt=val */
}
if (!val)
return xstrconcat3(s, ",", opt); /* s,opt */
return xstrconcat4(s, ",", opt, val); /* s,opt=val */
} | 0 | [
"CWE-200"
] | util-linux | 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8 | 1,756,430,711,982,231,000,000,000,000,000,000,000 | 15 | mount: (deprecated) drop --guess-fstype
The option is undocumented and unnecessary.
Signed-off-by: Karel Zak <kzak@redhat.com> |
double64_le_write (double in, unsigned char *out)
{ int exponent, mantissa ;
memset (out, 0, sizeof (double)) ;
if (fabs (in) < 1e-30)
return ;
if (in < 0.0)
{ in *= -1.0 ;
out [7] |= 0x80 ;
} ;
in = frexp (in, &exponent) ;
exponent += 1022 ;
out [7] |= (exponent >> 4) & 0x7F ;
out [6] |= (exponent... | 0 | [
"CWE-369"
] | libsndfile | 85c877d5072866aadbe8ed0c3e0590fbb5e16788 | 288,613,418,754,216,640,000,000,000,000,000,000,000 | 38 | double64_init: Check psf->sf.channels against upper bound
This prevents division by zero later in the code.
While the trivial case to catch this (i.e. sf.channels < 1) has already
been covered, a crafted file may report a number of channels that is
so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets
miscal... |
static void i40e_reenable_fdir_atr(struct i40e_pf *pf)
{
if (test_and_clear_bit(__I40E_FD_ATR_AUTO_DISABLED, pf->state)) {
/* ATR uses the same filtering logic as SB rules. It only
* functions properly if the input set mask is at the default
* settings. It is safe to restore the default input set
* because ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 285,717,879,842,811,740,000,000,000,000,000,000,000 | 17 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
xmlSchemaGetComponentQName(xmlChar **buf,
void *item)
{
return (xmlSchemaFormatQName(buf,
xmlSchemaGetComponentTargetNs((xmlSchemaBasicItemPtr) item),
xmlSchemaGetComponentName((xmlSchemaBasicItemPtr) item)));
} | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 332,671,199,305,603,970,000,000,000,000,000,000,000 | 7 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
int cil_resolve_userprefix(struct cil_tree_node *current, void *extra_args)
{
struct cil_userprefix *userprefix = current->data;
struct cil_symtab_datum *user_datum = NULL;
struct cil_tree_node *user_node = NULL;
int rc = SEPOL_ERR;
rc = cil_resolve_name(current, userprefix->user_str, CIL_SYM_USERS, extra_args, &... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 111,789,474,804,201,940,000,000,000,000,000,000,000 | 25 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
**/
int window_x() const {
return _window_x; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 183,609,786,632,527,600,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int flags)
{
char *tmp_s = s;
apr_status_t rv;
apr_size_t len;
apr_bucket_brigade *tmp_bb;
if (n < 1) {
/* Can't work since we always NUL terminate */
return -1;
}
tmp_bb = apr_brigade_create(r->pool, r->connection-... | 0 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 194,230,737,327,922,240,000,000,000,000,000,000,000 | 28 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
static int ethtool_get_sg(struct net_device *dev, char __user *useraddr)
{
struct ethtool_value edata = { ETHTOOL_GSG };
if (!dev->ethtool_ops->get_sg)
return -EOPNOTSUPP;
edata.data = dev->ethtool_ops->get_sg(dev);
if (copy_to_user(useraddr, &edata, sizeof(edata)))
return -EFAULT;
return 0;
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 149,244,057,656,677,690,000,000,000,000,000,000,000 | 13 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
static bool ipv6_hop_ra(struct sk_buff *skb, int optoff)
{
const unsigned char *nh = skb_network_header(skb);
if (nh[optoff + 1] == 2) {
IP6CB(skb)->flags |= IP6SKB_ROUTERALERT;
memcpy(&IP6CB(skb)->ra, nh + optoff + 2, sizeof(IP6CB(skb)->ra));
return true;
}
net_dbg_ratelimited("ipv6_hop_ra: wrong RA length ... | 0 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 154,749,292,740,750,080,000,000,000,000,000,000,000 | 14 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
srs_parse_shortcut(srs_t *srs, char *buf, unsigned buflen, char *senduser)
{
char *srshash;
char *srsstamp;
char *srshost;
char *srsuser;
int ret;
if (strncasecmp(senduser, SRS0TAG, 4) == 0) {
srshash = senduser + 5;
if (!STRINGP(srshash))
return SRS_ENOSRS0HASH;
srsstamp = strchr(srshash, SRSSEP);
... | 0 | [
"CWE-400",
"CWE-703",
"CWE-834"
] | postsrsd | 4733fb11f6bec6524bb8518c5e1a699288c26bac | 85,081,223,926,989,970,000,000,000,000,000,000,000 | 37 | SECURITY: Fix potential denial of service attack against PostSRSd
I discovered that PostSRSd could be tricked into consuming a lot of CPU
time with an SRS address that has an excessively long time stamp tag,
e.g.
SRS0=HHHH=TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT=0@example.com |
num_stmts(const node *n)
{
int i, l;
node *ch;
switch (TYPE(n)) {
case single_input:
if (TYPE(CHILD(n, 0)) == NEWLINE)
return 0;
else
return num_stmts(CHILD(n, 0));
case file_input:
l = 0;
for (i = 0; i < NCH(n)... | 1 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 79,279,365,935,195,720,000,000,000,000,000,000,000 | 44 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static ssize_t description_show(struct mdev_type *mtype,
struct mdev_type_attribute *attr, char *buf)
{
const struct mbochs_type *type =
&mbochs_types[mtype_get_type_group_id(mtype)];
return sprintf(buf, "virtual display, %d MB video memory\n",
type ? type->mbytes : 0);
} | 0 | [
"CWE-200",
"CWE-401"
] | linux | de5494af4815a4c9328536c72741229b7de88e7f | 318,294,626,200,601,660,000,000,000,000,000,000,000 | 9 | vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes
Convert mbochs to use an atomic scheme for this like mtty was changed
into. The atomic fixes various race conditions with probing. Add the
missing error unwind. Also add the missing kfree of mdev_state->pages.
Fixes: 681c1615f891 ("vfio/mbochs: Convert to us... |
pch_line_len (lin line)
{
return p_len[line];
} | 0 | [
"CWE-59"
] | patch | 44a987e02f04b9d81a0db4a611145cad1093a2d3 | 304,279,172,750,217,730,000,000,000,000,000,000,000 | 4 | Add line number overflow checking
* bootstrap.conf: use intprops module.
* src/common.h: Define LINENUM_MIN and LINENUM_MAX macros.
* src/pch.c (another_hunk): Add line number overflow checking. Based on Robert
C. Seacord's INT32-C document for integer overflow checking and Tobias
Stoeckmann's "integer overflows and ... |
void responseAction(StreamState& state,
const test::common::http::ResponseAction& response_action) {
const bool end_stream = response_action.end_stream();
switch (response_action.response_action_selector_case()) {
case test::common::http::ResponseAction::kContinueHeaders: {
if ... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 225,834,781,086,448,530,000,000,000,000,000,000,000 | 60 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void intel_hda_set_state_sts(IntelHDAState *d, const IntelHDAReg *reg, uint32_t old)
{
intel_hda_update_irq(d);
} | 0 | [
"CWE-787"
] | qemu | 79fa99831debc9782087e834382c577215f2f511 | 115,047,933,504,602,860,000,000,000,000,000,000,000 | 4 | hw/audio/intel-hda: Restrict DMA engine to memories (not MMIO devices)
Issue #542 reports a reentrancy problem when the DMA engine accesses
the HDA controller I/O registers. Fix by restricting the DMA engine
to memories regions (forbidding MMIO devices such the HDA controller).
Reported-by: OSS-Fuzz (Issue 28435)
Rep... |
DEFUN(ldDL, DOWNLOAD_LIST, "Display downloads panel")
{
Buffer *buf;
int replace = FALSE, new_tab = FALSE;
#ifdef USE_ALARM
int reload;
#endif
if (Currentbuf->bufferprop & BP_INTERNAL &&
!strcmp(Currentbuf->buffername, DOWNLOAD_LIST_TITLE))
replace = TRUE;
if (!FirstDL) {
if (replace) {
if ... | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 141,493,665,809,358,680,000,000,000,000,000,000,000 | 50 | Make temporary directory safely when ~/.w3m is unwritable |
PHP_METHOD(Phar, unlinkArchive)
{
char *fname, *error, *zname, *arch, *entry;
size_t fname_len;
int zname_len, arch_len, entry_len;
phar_archive_data *phar;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "p", &fname, &fname_len) == FAILURE) {
RETURN_FALSE;
}
if (ZEND_SIZE_T_INT_OVFL(fname_len)) {
RETURN_FALSE;... | 0 | [
"CWE-281"
] | php-src | e5c95234d87fcb8f6b7569a96a89d1e1544749a6 | 304,928,975,150,475,500,000,000,000,000,000,000,000 | 64 | Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions |
receive_check_fs(int msg_size)
{
int space, inodes;
if (check_spool_space > 0 || msg_size > 0 || check_spool_inodes > 0)
{
space = receive_statvfs(TRUE, &inodes);
DEBUG(D_receive)
debug_printf("spool directory space = %dK inodes = %d "
"check_space = %dK inodes = %d msg_size = %d\n",
space, inod... | 0 | [
"CWE-416"
] | exim | 4e6ae6235c68de243b1c2419027472d7659aa2b4 | 281,366,162,610,758,980,000,000,000,000,000,000,000 | 42 | Avoid release of store if there have been later allocations. Bug 2199 |
vte_sequence_handler_ke (VteTerminal *terminal, GValueArray *params)
{
terminal->pvt->keypad_mode = VTE_KEYMODE_NORMAL;
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 17,064,873,316,150,595,000,000,000,000,000,000,000 | 4 | fix bug #548272
svn path=/trunk/; revision=2365 |
static int key_notify_policy_flush(const struct km_event *c)
{
struct sk_buff *skb_out;
struct sadb_msg *hdr;
skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC);
if (!skb_out)
return -ENOBUFS;
hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg));
hdr->sadb_msg_type = SADB_X_SPDFLUSH;
... | 1 | [
"CWE-119",
"CWE-787"
] | linux | a5cc68f3d63306d0d288f31edfc2ae6ef8ecd887 | 67,521,643,653,864,070,000,000,000,000,000,000,000 | 20 | af_key: fix info leaks in notify messages
key_notify_sa_flush() and key_notify_policy_flush() miss to initialize
the sadb_msg_reserved member of the broadcasted message and thereby
leak 2 bytes of heap memory to listeners. Fix that.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.... |
void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
{
void *ret = slab_alloc(cachep, flags, _RET_IP_);
kasan_slab_alloc(cachep, ret, flags);
trace_kmem_cache_alloc(_RET_IP_, ret,
cachep->object_size, cachep->size, flags);
return ret;
} | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 280,068,590,080,228,900,000,000,000,000,000,000,000 | 10 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
bool build_huffcodes( unsigned char *clen, uint32_t clenlen, unsigned char *cval, uint32_t cvallen, huffCodes *hc, huffTree *ht )
{
int nextfree;
int code;
int node;
int i, j, k;
// fill with zeroes
memset( hc->clen, 0, 256 * sizeof( short ) );
memset( hc->cval, 0, 256 * sizeof( short ) );... | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 28,059,520,828,356,880,000,000,000,000,000,000,000 | 93 | fix #111 |
__fastcall TSaveSessionDialog::TSaveSessionDialog(TComponent* /*AOwner*/) :
TCustomDialog(HELP_SESSION_SAVE)
{
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 11,193,945,879,152,044,000,000,000,000,000,000,000 | 4 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
tsize_t t2p_write_pdf_string(char* pdfstr, TIFF* output)
{
tsize_t written = 0;
uint32 i = 0;
char buffer[64];
size_t len = 0;
len = strlen(pdfstr);
written += t2pWriteFile(output, (tdata_t) "(", 1);
for (i=0; i<len; i++) {
if((pdfstr[i]&0x80) || (pdfstr[i]==127) || (pdfstr[i]<32)){
snprintf(buffer, sizeo... | 0 | [
"CWE-119"
] | libtiff | b5d6803f0898e931cf772d3d0755704ab8488e63 | 21,737,954,374,050,646,000,000,000,000,000,000,000 | 48 | * tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG
compressed images. Reported by Tyler Bohan of Cisco Talos as
TALOS-CAN-0187 / CVE-2016-5652.
Also prevents writing 2 extra uninitialized bytes to the file stream. |
static Param parse(Buf handshakeMsg, Buf original) {
auto msg = decode<T>(std::move(handshakeMsg));
msg.originalEncoding = std::move(original);
return std::move(msg);
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-770"
] | fizz | 3eaddb33619eaaf74a760872850c550ad8f5c52f | 238,477,068,436,613,080,000,000,000,000,000,000,000 | 5 | Coalesce handshake buffers
Summary:
It is possible that a peer might send us records in a manner such
that there is a 16KB record and only 1 byte of handshake message in
each record. Since we normally just trim the IOBuf, we would end up
holding 16K of data per actual byte of data. To prevent this we allocate a contig... |
sql_real_connect(char *host,char *database,char *user,char *password,
uint silent)
{
if (connected)
{
connected= 0;
mysql_close(&mysql);
}
mysql_init(&mysql);
if (opt_init_command)
mysql_options(&mysql, MYSQL_INIT_COMMAND, opt_init_command);
if (opt_connect_timeout)
{
uint timeout=opt_c... | 0 | [] | server | 383007c75d6ef5043fa5781956a6a02b24e2b79e | 339,290,687,733,768,720,000,000,000,000,000,000,000 | 88 | mysql cli: fix USE command quoting
* use proper sql quoting rules for USE, while preserving
as much of historical behavior as possible
* short commands (\u) behave as before |
static void hci_keypress_notify_evt(struct hci_dev *hdev, struct sk_buff *skb)
{
struct hci_ev_keypress_notify *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s", hdev->name);
conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
if (!conn)
return;
switch (ev->type) {
case HCI_KEYPRESS_STAR... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 168,478,325,647,714,800,000,000,000,000,000,000,000 | 37 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct svm_cpu_data *sd = per_cpu(svm_data, cpu);
if (sd->current_vmcb != svm->vmcb) {
sd->current_vmcb = svm->vmcb;
indirect_branch_prediction_barrier();
}
if (kvm_vcpu_apicv_active(vcpu))
__avic_vcpu_load(vcpu... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 249,070,661,730,025,950,000,000,000,000,000,000,000 | 12 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.