func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static bool torture_winbind_struct_setpwent(struct torture_context *torture)
{
struct winbindd_request req;
struct winbindd_response rep;
torture_comment(torture, "Running WINBINDD_SETPWENT (struct based)\n");
ZERO_STRUCT(req);
ZERO_STRUCT(rep);
DO_STRUCT_REQ_REP(WINBINDD_SETPWENT, &req, &rep);
return true;
... | 0 | [
"CWE-476"
] | samba | 0b259a48a70bde4dfd482e0720e593ae5a9c414a | 302,028,347,095,751,660,000,000,000,000,000,000,000 | 14 | CVE-2020-14323 torture4: Add a simple test for invalid lookup_sids winbind call
We can't add this test before the fix, add it to knownfail and have the fix
remove the knownfail entry again. As this crashes winbind, many tests after
this one will fail.
Reported by Bas Alberts of the GitHub Security Lab Team as GHSL-20... |
void Server::msgServerConfig(ServerUser *, MumbleProto::ServerConfig &) {
} | 0 | [
"CWE-20"
] | mumble | 6b33dda344f89e5a039b7d79eb43925040654242 | 315,830,777,610,104,800,000,000,000,000,000,000,000 | 2 | Don't crash on long usernames |
void fuse_fs_init(struct fuse_fs *fs, struct fuse_conn_info *conn)
{
fuse_get_context()->private_data = fs->user_data;
if (fs->op.init)
fs->user_data = fs->op.init(conn);
} | 0 | [] | ntfs-3g | fb28eef6f1c26170566187c1ab7dc913a13ea43c | 311,028,786,554,760,160,000,000,000,000,000,000,000 | 6 | 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. |
static void cirrus_bitblt_fill_nop(CirrusVGAState *s,
uint8_t *dst,
int dstpitch, int bltwidth,int bltheight)
{
} | 1 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 266,473,051,179,689,400,000,000,000,000,000,000,000 | 5 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
static int session_trailer_headers(nghttp2_session *session,
nghttp2_stream *stream,
nghttp2_frame *frame) {
if (!stream || frame->hd.type != NGHTTP2_HEADERS) {
return 0;
}
if (session->server) {
return frame->headers.cat == NGHTTP2_HCA... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 234,768,454,348,369,750,000,000,000,000,000,000,000 | 13 | Add nghttp2_option_set_max_outbound_ack |
STATIC I32
S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch,
regnode *first, regnode *last, regnode *tail,
U32 word_count, U32 flags, U32 depth)
{
/* first pass, loop through and scan words */
reg_trie_data *trie;
HV *widecharmap = NULL;
AV *revcharma... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 165,897,902,496,209,990,000,000,000,000,000,000,000 | 1,081 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
static int mutt_is_autoview (BODY *b)
{
char type[STRING];
int is_autoview = 0;
snprintf (type, sizeof (type), "%s/%s", TYPE (b), b->subtype);
if (option(OPTIMPLICITAUTOVIEW))
{
/* $implicit_autoview is essentially the same as "auto_view *" */
is_autoview = 1;
}
else
{
/* determine if this... | 0 | [
"CWE-120"
] | mutt | e5ed080c00e59701ca62ef9b2a6d2612ebf765a5 | 164,910,320,185,897,040,000,000,000,000,000,000,000 | 39 | Fix uudecode buffer overflow.
mutt_decode_uuencoded() used each line's initial "length character"
without any validation. It would happily read past the end of the
input line, and with a suitable value even past the length of the
input buffer.
As I noted in ticket 404, there are several other changes that could
be a... |
TEST(QuantizedUInt8PoolingOpTest, MaxPoolActivationRelu1) {
// Choose the input ranges carefully so that the dequantized output matches
// the results of the float model above.
// Input Range[-15.9375, 15.9375] --> [Scale{0.125}, zero_point{128}]
QuantizedPoolingOpModel m(
BuiltinOperator_MAX_POOL_2D,
... | 0 | [
"CWE-369"
] | tensorflow | 5f7975d09eac0f10ed8a17dbb6f5964977725adc | 318,692,494,860,953,180,000,000,000,000,000,000,000 | 30 | Prevent another div by 0 in optimized pooling implementations TFLite
PiperOrigin-RevId: 370800091
Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b |
static void SFDirClean(char *filename) {
DIR *dir;
struct dirent *ent;
char *buffer, *pt;
unlink(filename); /* Just in case it's a normal file, it shouldn't be, but just in case... */
dir = opendir(filename);
if ( dir==NULL )
return;
buffer = malloc(strlen(filename)+1+NAME_MAX+1);
whil... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 324,550,083,809,117,540,000,000,000,000,000,000,000 | 30 | 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 (... |
static int aes_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, size_t len)
{
EVP_AES_KEY *dat = (EVP_AES_KEY *) ctx->cipher_data;
if (dat->stream.cbc)
(*dat->stream.cbc) (in, out, len, &dat->ks, ctx->iv, ctx->encrypt);
else if (ctx->encrypt)
... | 0 | [] | openssl | 1a3701f4fe0530a40ec073cd78d02cfcc26c0f8e | 297,825,866,271,187,670,000,000,000,000,000,000,000 | 14 | Sanity check EVP_CTRL_AEAD_TLS_AAD
The various implementations of EVP_CTRL_AEAD_TLS_AAD expect a buffer of at
least 13 bytes long. Add sanity checks to ensure that the length is at
least that. Also add a new constant (EVP_AEAD_TLS1_AAD_LEN) to evp.h to
represent this length. Thanks to Kevin Wojtysiak (Int3 Solutions) ... |
void rfbClientCleanup(rfbClient* client) {
#ifdef LIBVNCSERVER_HAVE_LIBZ
#ifdef LIBVNCSERVER_HAVE_LIBJPEG
int i;
for ( i = 0; i < 4; i++ ) {
if (client->zlibStreamActive[i] == TRUE ) {
if (inflateEnd (&client->zlibStream[i]) != Z_OK &&
client->zlibStream[i].msg != NULL)
rfbClientLog("inflateEnd: %s\n... | 0 | [
"CWE-703",
"CWE-835"
] | libvncserver | 57433015f856cc12753378254ce4f1c78f5d9c7b | 192,986,706,407,984,320,000,000,000,000,000,000,000 | 60 | libvncclient: handle half-open TCP connections
When a connection is not reset properly at the TCP level (e.g. sudden
power loss or process crash) the TCP connection becomes half-open and
read() always returns -1 with errno = EAGAIN while select() always
returns 0. This leads to an infinite loop and can be fixed by clo... |
vmxnet3_io_bar0_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
VMXNET3State *s = opaque;
if (!s->device_active) {
return;
}
if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_TXPROD,
VMXNET3_DEVICE_MAX_TX_QUEUES, VMXNET3_REG_ALIGN)) {
... | 0 | [] | qemu | d05dcd94aee88728facafb993c7280547eb4d645 | 155,417,083,748,454,940,000,000,000,000,000,000,000 | 44 | net: vmxnet3: validate configuration values during activate (CVE-2021-20203)
While activating device in vmxnet3_acticate_device(), it does not
validate guest supplied configuration values against predefined
minimum - maximum limits. This may lead to integer overflow or
OOB access issues. Add checks to avoid it.
Fixes... |
static void MVGAppendColor(DrawingWand *wand,const PixelInfo *packet)
{
if ((packet->red == 0) && (packet->green == 0) && (packet->blue == 0) &&
(packet->alpha == (Quantum) TransparentAlpha))
(void) MVGPrintf(wand,"none");
else
{
char
tuple[MagickPathExtent];
PixelInfo
pix... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 18,528,553,529,127,162,000,000,000,000,000,000,000 | 25 | https://github.com/ImageMagick/ImageMagick/issues/716 |
mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image, MonoTypeNameParse *info, gboolean ignorecase, gboolean *type_resolve)
{
MonoType *type;
MonoReflectionAssembly *assembly;
GString *fullName;
GList *mod;
if (image && image->dynamic)
type = mono_reflection_get_type_internal_dynamic ... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 219,482,550,068,361,670,000,000,000,000,000,000,000 | 43 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static int MagickDLLCall PDFDelegateMessage(void *handle,const char *message,
int length)
{
char
**messages;
ssize_t
offset;
offset=0;
messages=(char **) handle;
if (*messages == (char *) NULL)
*messages=(char *) AcquireQuantumMemory(length+1,sizeof(char *));
else
{
offset=strlen(*... | 0 | [
"CWE-617"
] | ImageMagick | 2001aabeab8a921a4fa0b1932f565aef6ae69f84 | 61,218,930,784,472,370,000,000,000,000,000,000,000 | 23 | https://github.com/ImageMagick/ImageMagick/issues/674 |
ConnStateData::concurrentRequestQueueFilled() const
{
const int existingRequestCount = pipeline.count();
// default to the configured pipeline size.
// add 1 because the head of pipeline is counted in concurrent requests and not prefetch queue
#if USE_OPENSSL
const int internalRequest = (transparent() ... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 217,534,691,719,261,260,000,000,000,000,000,000,000 | 22 | Handle more Range requests (#790)
Also removed some effectively unused code. |
static void xfrm6_tunnel_free_spi(struct net *net, xfrm_address_t *saddr)
{
struct xfrm6_tunnel_net *xfrm6_tn = xfrm6_tunnel_pernet(net);
struct xfrm6_tunnel_spi *x6spi;
struct hlist_node *n;
spin_lock_bh(&xfrm6_tunnel_spi_lock);
hlist_for_each_entry_safe(x6spi, n,
&xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_ha... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 7,384,838,260,721,877,000,000,000,000,000,000,000 | 23 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static int get_options(int *argc, char ***argv)
{
int ho_error;
MYSQL_PARAMETERS *mysql_params= mysql_get_parameters();
opt_max_allowed_packet= *mysql_params->p_max_allowed_packet;
opt_net_buffer_length= *mysql_params->p_net_buffer_length;
md_result_file= stdout;
my_getopt_use_args_separator= TRUE;
if (... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 182,513,969,517,960,050,000,000,000,000,000,000,000 | 101 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static void do_pcd_read(void)
{
pcd_busy = 1;
pcd_retries = 0;
pcd_transfer();
if (!pcd_count) {
next_request(0);
return;
}
pi_do_claimed(pcd_current->pi, pcd_start);
} | 0 | [
"CWE-476"
] | linux | f0d1762554014ce0ae347b9f0d088f2c157c8c72 | 132,041,271,641,910,080,000,000,000,000,000,000,000 | 12 | paride/pcd: Fix potential NULL pointer dereference and mem leak
Syzkaller report this:
pcd: pcd version 1.07, major 46, nice 0
pcd0: Autoprobe failed
pcd: No CD-ROM drive found
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP... |
explicit TSingleProtocolFactory(std::shared_ptr<Factory_> factory)
: factory_(factory) {} | 0 | [
"CWE-20",
"CWE-755"
] | fbthrift | 01686e15ec77ccb4d49a77d5bce3a01601e54d64 | 218,271,706,568,733,870,000,000,000,000,000,000,000 | 2 | Throw on skipping an invalid type.
Summary:
Certain values (e.g.) T_STOP should not appear as a skip type. Allowing them to
can cause thrift to loop unboundedly.
Reviewed By: spalamarchuk
Differential Revision: D15102451
fbshipit-source-id: c08d52f44f37e9c212d3480233ac217105586c9f |
Napi::Value Statement::All(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Statement* stmt = this;
Baton* baton = stmt->Bind<RowsBaton>(info);
if (baton == NULL) {
Napi::Error::New(env, "Data type is not supported").ThrowAsJavaScriptException();
return env.Null();
}
... | 0 | [] | node-sqlite3 | 593c9d498be2510d286349134537e3bf89401c4a | 225,458,421,335,097,300,000,000,000,000,000,000,000 | 14 | bug: fix segfault of invalid toString() object (#1450)
* bug: verify toString() returns valid data
* test: faulty toString test |
static int ssl3_read_internal(SSL *s, void *buf, int len, int peek)
{
int ret;
clear_sys_error();
if (s->s3->renegotiate) ssl3_renegotiate_check(s);
s->s3->in_read_app_data=1;
ret=s->method->ssl_read_bytes(s,SSL3_RT_APPLICATION_DATA,buf,len,peek);
if ((ret == -1) && (s->s3->in_read_app_data == 2))
{
/* ssl... | 0 | [
"CWE-310"
] | openssl | ca989269a2876bae79393bd54c3e72d49975fc75 | 65,360,275,529,140,920,000,000,000,000,000,000,000 | 24 | Use version in SSL_METHOD not SSL structure.
When deciding whether to use TLS 1.2 PRF and record hash algorithms
use the version number in the corresponding SSL_METHOD structure
instead of the SSL structure. The SSL structure version is sometimes
inaccurate. Note: OpenSSL 1.0.2 and later effectively do this already.
(... |
void MirrorJob::HandleChdir(FileAccessRef& session, int &redirections)
{
if(!session->IsOpen())
return;
int res=session->Done();
if(res<0)
{
if(res==FA::FILE_MOVED)
{
// cd to another url.
const char *loc_c=session->GetNewLocation();
int max_redirections=ResMgr::Query("xfer:max-redir... | 0 | [
"CWE-20",
"CWE-401"
] | lftp | a27e07d90a4608ceaf928b1babb27d4d803e1992 | 323,793,081,102,683,200,000,000,000,000,000,000,000 | 73 | mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452) |
cupsdSetJobState(
cupsd_job_t *job, /* I - Job to cancel */
ipp_jstate_t newstate, /* I - New job state */
cupsd_jobaction_t action, /* I - Action to take */
const char *message, /* I - Message to log */
...) /* I - Additional arguments as needed */
{
int i; /* Looping ... | 0 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 193,451,374,151,881,400,000,000,000,000,000,000,000 | 240 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
static MagickBooleanType WriteMATImage(const ImageInfo *image_info,Image *image)
{
char
MATLAB_HDR[0x80];
ExceptionInfo
*exception;
MagickBooleanType
status;
MagickOffsetType
scene;
size_t
imageListLength;
struct tm
utc_time;
time_t
current_time;
/*
Open output ima... | 0 | [
"CWE-416"
] | ImageMagick6 | 5caef6e97f3f575cf7bea497865a4c1e624b8010 | 132,970,190,326,299,160,000,000,000,000,000,000,000 | 154 | https://github.com/ImageMagick/ImageMagick/issues/1554 |
int GetProfileColorSpace(cmsHPROFILE hProfile)
{
cmsColorSpaceSignature ProfileSpace = cmsGetColorSpace(hProfile);
return _cmsLCMScolorSpace(ProfileSpace);
}
| 0 | [] | Little-CMS | 06d4557477e7ab3330a24d69af4c67adcac9acdf | 93,138,972,353,492,880,000,000,000,000,000,000,000 | 6 | utils/jpgicc/jpgicc.c: Fix fprintf parameter number |
xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
const xmlChar *name;
xmlEntityPtr entity = NULL;
xmlParserInputPtr input;
if (RAW != '%') return;
switch(ctxt->instate) {
case XML_PARSER_CDATA_SECTION:
return;
case XML_PARSER_COMMENT:
return;
case XML_PARSER_START_TAG:
r... | 0 | [] | libxml2 | 9cd1c3cfbd32655d60572c0a413e017260c854df | 195,420,527,464,619,600,000,000,000,000,000,000,000 | 179 | Do not fetch external parameter entities
Unless explicitely asked for when validating or replacing entities
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com> |
#ifdef CONFIG_SYSFS
static int netif_alloc_rx_queues(struct net_device *dev)
{
unsigned int i, count = dev->num_rx_queues;
struct netdev_rx_queue *rx;
size_t sz = count * sizeof(*rx);
BUG_ON(count < 1);
rx = kvzalloc(sz, GFP_KERNEL | __GFP_RETRY_MAYFAIL);
if (!rx)
return -ENOMEM;
dev->_rx = rx;
for (i = 0... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 201,179,416,406,170,800,000,000,000,000,000,000,000 | 18 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
SPL_METHOD(DirectoryIterator, seek)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
zval *retval = NULL;
long pos;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &pos) == FAILURE) {
return;
}
if (i... | 0 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 326,862,484,525,023,100,000,000,000,000,000,000,000 | 36 | Fix bug #72262 - do not overflow int |
static void handle_xdg_output_done(void *data, struct zxdg_output_v1 *output) {
// Who cares
} | 0 | [
"CWE-703"
] | swaylock | 1d1c75b6316d21933069a9d201f966d84099f6ca | 62,543,416,657,862,700,000,000,000,000,000,000,000 | 3 | Add support for ext-session-lock-v1
This is a new protocol to lock the session [1]. It should be more
reliable than layer-shell + input-inhibitor.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131 |
nfsd4_getattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_getattr *getattr)
{
__be32 status;
status = fh_verify(rqstp, &cstate->current_fh, 0, NFSD_MAY_NOP);
if (status)
return status;
if (getattr->ga_bmval[1] & NFSD_WRITEONLY_ATTRS_WORD1)
return nfserr_inval;
getattr->g... | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 152,968,315,806,923,030,000,000,000,000,000,000,000 | 19 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
dirserv_set_router_is_running(routerinfo_t *router, time_t now)
{
/*XXXX023 This function is a mess. Separate out the part that calculates
whether it's reachable and the part that tells rephist that the router was
unreachable.
*/
int answer;
if (router_is_me(router)) {
/* We always know if we are... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 123,754,374,608,986,960,000,000,000,000,000,000,000 | 43 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
int tcp_v4_md5_do_del(struct sock *sk, __be32 addr)
{
struct tcp_sock *tp = tcp_sk(sk);
int i;
for (i = 0; i < tp->md5sig_info->entries4; i++) {
if (tp->md5sig_info->keys4[i].addr == addr) {
/* Free the key */
kfree(tp->md5sig_info->keys4[i].base.key);
tp->md5sig_info->entries4--;
if (tp->md5sig_info... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 228,836,200,288,169,160,000,000,000,000,000,000,000 | 28 | 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... |
static int realloc_func_state(struct bpf_func_state *state, int stack_size,
int refs_size, bool copy_old)
{
int err = realloc_reference_state(state, refs_size, copy_old);
if (err)
return err;
return realloc_stack_state(state, stack_size, copy_old);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 | 60,266,894,054,999,200,000,000,000,000,000,000,000 | 8 | bpf: prevent out of bounds speculation on pointer arithmetic
Jann reported that the original commit back in b2157399cc98
("bpf: prevent out-of-bounds speculation") was not sufficient
to stop CPU from speculating out of bounds memory access:
While b2157399cc98 only focussed on masking array map access
for unprivileged ... |
impl_import (EphyCertificateManager *manager,
const gchar *file)
{
return TRUE;
} | 0 | [] | epiphany | 3e0f7dea754381c5ad11a06ccc62eb153382b498 | 164,499,865,294,913,340,000,000,000,000,000,000,000 | 5 | Report broken certs through the padlock icon
This uses a new feature in libsoup that reports through a
SoupMessageFlag whether the message is talking to a server that has a
trusted server.
Bug #600663 |
void reset(char *found_semicolon, unsigned int length)
{
m_lip.reset(found_semicolon, length);
m_yacc.reset();
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 30,565,071,413,446,514,000,000,000,000,000,000,000 | 5 | 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... |
SetFormatAndEncodings(rfbClient* client)
{
rfbSetPixelFormatMsg spf;
char buf[sz_rfbSetEncodingsMsg + MAX_ENCODINGS * 4];
rfbSetEncodingsMsg *se = (rfbSetEncodingsMsg *)buf;
uint32_t *encs = (uint32_t *)(&buf[sz_rfbSetEncodingsMsg]);
int len = 0;
rfbBool requestCompressLevel = FALSE;
rfbBool requestQuali... | 0 | [
"CWE-119"
] | libvncserver | 5418e8007c248bf9668d22a8c1fa9528149b69f2 | 331,008,556,016,014,330,000,000,000,000,000,000,000 | 207 | Fix heap overflows in the various rectangle fill functions
Altough rfbproto.c does check whether the overall FramebufferUpdate rectangle is
too large, some of the individual encoding decoders do not, which allows a
malicious server to overwrite parts of the heap. |
imapx_untagged_fetch (CamelIMAPXServer *is,
GInputStream *input_stream,
GCancellable *cancellable,
GError **error)
{
struct _fetch_info *finfo;
gboolean got_body_header;
g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE);
finfo = imapx_parse_... | 0 | [
"CWE-476"
] | evolution-data-server | 2cc39592b532cf0dc994fd3694b8e6bf924c9ab5 | 91,348,493,100,022,800,000,000,000,000,000,000,000 | 401 | I#189 - Crash on malformed server response with minimal capabilities
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189 |
virSecuritySELinuxSetMemoryLabel(virSecurityManager *mgr,
virDomainDef *def,
virDomainMemoryDef *mem)
{
virSecurityLabelDef *seclabel;
switch (mem->model) {
case VIR_DOMAIN_MEMORY_MODEL_NVDIMM:
case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM:
... | 0 | [
"CWE-732"
] | libvirt | 15073504dbb624d3f6c911e85557019d3620fdb2 | 238,686,783,427,356,150,000,000,000,000,000,000,000 | 26 | security: fix SELinux label generation logic
A process can access a file if the set of MCS categories
for the file is equal-to *or* a subset-of, the set of
MCS categories for the process.
If there are two VMs:
a) svirt_t:s0:c117
b) svirt_t:s0:c117,c720
Then VM (b) is able to access files labelled for VM (a).
I... |
getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
{
callbacks++;
if (quiet)
return(NULL);
fprintf(SAXdebug, "SAX.getEntity(%s)\n", name);
return(NULL);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 297,010,485,540,053,500,000,000,000,000,000,000,000 | 8 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
static int br_mdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
{
struct net_device *dev;
struct net *net = sock_net(skb->sk);
struct nlmsghdr *nlh = NULL;
int idx = 0, s_idx;
s_idx = cb->args[0];
rcu_read_lock();
/* In theory this could be wrapped to 0... */
cb->seq = net->dev_base_seq + br_mdb_reh... | 0 | [
"CWE-399"
] | linux-2.6 | c085c49920b2f900ba716b4ca1c1a55ece9872cc | 190,799,138,680,487,570,000,000,000,000,000,000,000 | 49 | bridge: fix mdb info leaks
The bridging code discloses heap and stack bytes via the RTM_GETMDB
netlink interface and via the notify messages send to group RTNLGRP_MDB
afer a successful add/del.
Fix both cases by initializing all unset members/padding bytes with
memset(0).
Cc: Stephen Hemminger <stephen@networkplumbe... |
static void scrub_pending_bio_dec(struct scrub_ctx *sctx)
{
atomic_dec(&sctx->bios_in_flight);
wake_up(&sctx->list_wait);
scrub_put_ctx(sctx);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 38,307,639,362,160,050,000,000,000,000,000,000,000 | 6 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
static void selinux_d_instantiate(struct dentry *dentry, struct inode *inode)
{
if (inode)
inode_doinit_with_dentry(inode, dentry);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 296,527,842,176,231,730,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
virDomainNetDefPostParse(virDomainNetDefPtr net)
{
if (!virDomainNetIsVirtioModel(net) &&
virDomainCheckVirtioOptions(net->virtio) < 0) {
return -1;
}
return 0;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 199,430,457,582,629,640,000,000,000,000,000,000,000 | 9 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static void _slurm_rpc_update_layout(slurm_msg_t * msg)
{
int error_code = SLURM_SUCCESS;
Buf buffer;
DEF_TIMERS;
update_layout_msg_t *msg_ptr = (update_layout_msg_t *) msg->data;
int shrink_size;
/* Locks: Write job and write node */
uid_t uid = g_slurm_auth_get_uid(msg->auth_cred,
slurmctld_config.auth_... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 318,190,893,140,933,000,000,000,000,000,000,000,000 | 42 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
bool JBIG2Stream::readULong(unsigned int *x)
{
int c0, c1, c2, c3;
if ((c0 = curStr->getChar()) == EOF || (c1 = curStr->getChar()) == EOF || (c2 = curStr->getChar()) == EOF || (c3 = curStr->getChar()) == EOF) {
return false;
}
byteCounter += 4;
*x = (unsigned int)((c0 << 24) | (c1 << 16) | ... | 0 | [
"CWE-476",
"CWE-190"
] | poppler | 27354e9d9696ee2bc063910a6c9a6b27c5184a52 | 156,433,312,974,006,030,000,000,000,000,000,000,000 | 11 | JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up |
query (void)
{
static GimpParamDef load_args[] =
{
{ GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" },
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_STRING, "raw_filename", "The name entered" }
};
static GimpParamDef load_return_vals[] =
{
{ GIMP_PDB_I... | 0 | [
"CWE-20"
] | gimp | cac290d093d0c318bbe33a4ff290c2abbd9698d3 | 246,517,341,576,257,900,000,000,000,000,000,000,000 | 31 | When initializing the LZW state, watch out for a completely bogus
* plug-ins/common/gifload.c: When initializing the LZW state,
watch out for a completely bogus input_code_size [based on fix
by Raphael Quinet] Also, fix a stupid old bug when clearing the
code table between subimages. (Enables us to deal better ... |
static uint32_t cirrus_vga_mem_readw(void *opaque, target_phys_addr_t addr)
{
uint32_t v;
#ifdef TARGET_WORDS_BIGENDIAN
v = cirrus_vga_mem_readb(opaque, addr) << 8;
v |= cirrus_vga_mem_readb(opaque, addr + 1);
#else
v = cirrus_vga_mem_readb(opaque, addr);
v |= cirrus_vga_mem_readb(opaque, addr + 1) ... | 0 | [
"CWE-787"
] | qemu | b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef | 77,170,989,280,376,340,000,000,000,000,000,000,000 | 12 | CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow
I have just noticed that patch for CVE-2007-1320 has never been applied
to the QEMU CVS. Please find it below.
| Multiple heap-based buffer overflows in the cirrus_invalidate_region
| function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and
| possib... |
static bool fix_max_connections(sys_var *self, THD *thd, enum_var_type type)
{
#ifndef EMBEDDED_LIBRARY
resize_thr_alarm(max_connections +
global_system_variables.max_insert_delayed_threads + 10);
#endif
return false;
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 135,697,306,497,949,030,000,000,000,000,000,000,000 | 8 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
build_qfs_info_req(struct kvec *iov, struct cifs_tcon *tcon, int level,
int outbuf_len, u64 persistent_fid, u64 volatile_fid)
{
int rc;
struct smb2_query_info_req *req;
unsigned int total_len;
cifs_dbg(FYI, "Query FSInfo level %d\n", level);
if ((tcon->ses == NULL) || (tcon->ses->server == NULL))
return -... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 139,390,403,614,132,750,000,000,000,000,000,000,000 | 31 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
static CPINLINE void swoole_make_bigger_filter_size()
{
if (FILTER_SIZE <= swSeriaG.filter.mini_fillter_miss_cnt &&
swSeriaG.filter.mini_fillter_find_cnt < swSeriaG.filter.mini_fillter_miss_cnt)
// if (FILTER_SIZE <= swSeriaG.filter.mini_fillter_miss_cnt &&
// (swSe... | 0 | [
"CWE-200",
"CWE-502"
] | swoole-src | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | 124,997,929,626,622,950,000,000,000,000,000,000,000 | 12 | add buffer end check |
static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip,
mz_uint32 flags) {
mz_uint cdir_size, num_this_disk, cdir_disk_index;
mz_uint64 cdir_ofs;
mz_int64 cur_file_ofs;
const mz_uint8 *p;
mz_uint32 buf_u32[4096 / sizeof(mz_uint32)];
mz_uint8 *pBuf = ... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 100,128,818,739,107,550,000,000,000,000,000,000,000 | 128 | Make line_no with too large value(2**20) invalid. Fixes #124 |
TEST_F(RouterTest, InternalRedirectRejectedWithoutCompleteRequest) {
enableRedirects();
sendRequest(false);
EXPECT_CALL(callbacks_, recreateStream(_)).Times(0);
response_decoder_->decodeHeaders(std::move(redirect_headers_), false);
Buffer::OwnedImpl data("1234567890");
response_decoder_->decodeData(data,... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 245,631,231,865,410,580,000,000,000,000,000,000,000 | 14 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
static void cdrom_sysctl_unregister(void)
{
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 244,139,792,335,803,100,000,000,000,000,000,000,000 | 3 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
inline bool IsUnreserved(int c) {
return IsAlNum((unsigned char)c) || c == '-' || c == '.' || c == '_' ||
c == '~';
} | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 123,323,184,686,284,280,000,000,000,000,000,000,000 | 4 | fix static file serving security issue; fix url path encoding issue |
static void daemonize(void)
{
switch (fork()) {
case 0:
break;
case -1:
die("fork failed: %s", strerror(errno));
default:
exit(0);
}
if (setsid() == -1)
die("setsid failed: %s", strerror(errno));
close(0);
close(1);
close(2);
sanitize_stdfds();
} | 0 | [] | git | 73bb33a94ec67a53e7d805b12ad9264fa25f4f8d | 147,878,173,056,177,130,000,000,000,000,000,000,000 | 17 | daemon: Strictly parse the "extra arg" part of the command
Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon")
git daemon enters an infinite loop and never terminates if a client
hides any extra arguments in the initial request line which is not
exactly "\0host=blah\0".
Since that change, a client m... |
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
printing::mojom::MarginType* out) {
std::string type;
if (ConvertFromV8(isolate, val, &type)) {
if (type == "default") {
*out = printing::mojom::MarginType::kDefaultMargins;
retur... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 207,231,614,443,086,700,000,000,000,000,000,000,000 | 24 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static inline void sctp_sysctl_net_unregister(struct net *net) { return; } | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 221,748,656,835,529,300,000,000,000,000,000,000,000 | 1 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
AlterObjectTypeCommandTag(ObjectType objtype)
{
const char *tag;
switch (objtype)
{
case OBJECT_AGGREGATE:
tag = "ALTER AGGREGATE";
break;
case OBJECT_ATTRIBUTE:
tag = "ALTER TYPE";
break;
case OBJECT_CAST:
tag = "ALTER CAST";
break;
case OBJECT_COLLATION:
tag = "ALTER COLLATION";
br... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 75,707,314,111,669,260,000,000,000,000,000,000,000 | 118 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
qtdemux_expose_streams (GstQTDemux * qtdemux)
{
gint i;
GSList *oldpads = NULL;
GSList *iter;
GST_DEBUG_OBJECT (qtdemux, "exposing streams");
for (i = 0; i < qtdemux->n_streams; i++) {
QtDemuxStream *stream = qtdemux->streams[i];
GstPad *oldpad = stream->pad;
GstTagList *list;
GST_DEBUG_OBJ... | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 52,476,883,262,447,895,000,000,000,000,000,000,000 | 77 | qtdemux: Fix out of bounds read in tag parsing code
We can't simply assume that the length of the tag value as given
inside the stream is correct but should also check against the amount of
data we have actually available.
https://bugzilla.gnome.org/show_bug.cgi?id=775451 |
proto_can_toggle_protocol(const int proto_id)
{
protocol_t *protocol;
protocol = find_protocol_by_id(proto_id);
//parent protocol determines toggling for helper dissectors
if (proto_is_pino(protocol))
return proto_can_toggle_protocol(protocol->parent_proto_id);
return protocol->can_toggle;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 101,445,025,814,845,880,000,000,000,000,000,000,000 | 11 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static void oz_urb_cancel_tasklet(unsigned long unused)
{
unsigned long irq_state;
struct urb *urb;
struct oz_urb_link *urbl, *n;
struct oz_hcd *ozhcd = oz_hcd_claim();
if (ozhcd == NULL)
return;
spin_lock_irqsave(&g_tasklet_lock, irq_state);
list_for_each_entry_safe(urbl, n, &ozhcd->urb_cancel_list, link) {
... | 0 | [
"CWE-703",
"CWE-189"
] | linux | b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c | 119,041,865,707,385,660,000,000,000,000,000,000,000 | 22 | ozwpan: Use unsigned ints to prevent heap overflow
Using signed integers, the subtraction between required_size and offset
could wind up being negative, resulting in a memcpy into a heap buffer
with a negative length, resulting in huge amounts of network-supplied
data being copied into the heap, which could potentiall... |
Controller::sendHeaderToApp(Client *client, Request *req) {
TRACE_POINT();
SKC_TRACE(client, 2, "Sending headers to application with " <<
req->session->getProtocol() << " protocol");
req->state = Request::SENDING_HEADER_TO_APP;
/**
* HTTP does not formally support half-closing, and Node.js treats a
* half-cl... | 0 | [
"CWE-20",
"CWE-476"
] | passenger | ddb8ecc4ebf260e4967f57f271d4f5761abeac3e | 156,505,140,623,844,080,000,000,000,000,000,000,000 | 49 | Fix CVE-2015-7519 header collision vulnerability |
static void sasl_input(sasl_message_t *smsg)
{
sasl_session_t *p = make_session(smsg->uid, smsg->server);
int len = strlen(smsg->buf);
char *tmpbuf;
int tmplen;
switch(smsg->mode)
{
case 'H':
/* (H)ost information */
p->host = sstrdup(smsg->buf);
p->ip = sstrdup(smsg->ext);
return;
case 'S':
/* (S... | 1 | [
"CWE-288"
] | atheme | de2ba3ca8f6c39b41431d989f3ac66002a487839 | 266,890,029,516,636,560,000,000,000,000,000,000,000 | 67 | modules/saslserv/main: backport 7.3 commits for pending EID login
This backports commits 4e664c75d0b280a052eb & ceb0235695e6736ce2ab
from the master branch.
The IRCv3.1 SASL specification contains the following wording:
If the client completes registration (with CAP END, NICK, USER
and any other necessary me... |
static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
struct _fpstate_ia32 __user *fpstate,
struct pt_regs *regs, unsigned int mask)
{
int tmp, err = 0;
tmp = 0;
__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
__asm__("movl %%fs,%0" : ... | 0 | [
"CWE-399"
] | linux-2.6 | e40cd10ccff3d9fbffd57b93780bee4b7b9bff51 | 56,510,713,223,428,390,000,000,000,000,000,000,000 | 48 | x86: clear DF before calling signal handler
The Linux kernel currently does not clear the direction flag before
calling a signal handler, whereas the x86/x86-64 ABI requires that.
Linux had this behavior/bug forever, but this becomes a real problem
with gcc version 4.3, which assumes that the direction flag is
correc... |
void OSDService::expand_pg_num(OSDMapRef old_map,
OSDMapRef new_map)
{
Mutex::Locker l(in_progress_split_lock);
for (set<spg_t>::iterator i = in_progress_splits.begin();
i != in_progress_splits.end();
) {
if (!new_map->have_pg_pool(i->pool())) {
in_progress_splits.erase(i++);
} el... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 108,847,090,202,175,820,000,000,000,000,000,000,000 | 26 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
MonoArray *
mono_reflection_sighelper_get_signature_field (MonoReflectionSigHelper *sig)
{
MonoDynamicImage *assembly = sig->module->dynamic_image;
guint32 na = sig->arguments ? mono_array_length (sig->arguments) : 0;
guint32 buflen, i;
MonoArray *result;
SigBuffer buf;
check_array_for_usertypes (sig->arguments)... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 51,593,767,122,663,940,000,000,000,000,000,000,000 | 25 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static void vfio_pci_request(void *device_data, unsigned int count)
{
struct vfio_pci_device *vdev = device_data;
mutex_lock(&vdev->igate);
if (vdev->req_trigger) {
if (!(count % 10))
dev_notice_ratelimited(&vdev->pdev->dev,
"Relaying device request to user (#%u)\n",
count);
eventfd_signal(vdev->req... | 0 | [
"CWE-399",
"CWE-190"
] | linux | 05692d7005a364add85c6e25a6c4447ce08f913a | 256,802,611,435,177,320,000,000,000,000,000,000,000 | 19 | vfio/pci: Fix integer overflows, bitmask check
The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize
user-supplied integers, potentially allowing memory corruption. This
patch adds appropriate integer overflow checks, checks the range bounds
for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element... |
static inline void expand(struct zone *zone, struct page *page,
int low, int high, struct free_area *area,
int migratetype)
{
unsigned long size = 1 << high;
while (high > low) {
area--;
high--;
size >>= 1;
VM_BUG_ON_PAGE(bad_range(zone, &page[size]), &page[size]);
/*
* Mark as guard pages (or page),... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 97,222,657,455,215,900,000,000,000,000,000,000,000 | 26 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
void gf_filter_set_session_caps(GF_Filter *filter, GF_FilterSessionCaps *caps)
{
if (caps && filter) {
filter->session->caps = (*caps);
//TODO fire event
}
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 195,782,861,307,456,700,000,000,000,000,000,000,000 | 7 | fixed crashes for very long path - cf #1908 |
void rand_drbg_cleanup_entropy(RAND_DRBG *drbg,
unsigned char *out, size_t outlen)
{
if (drbg->seed_pool == NULL) {
if (drbg->secure)
OPENSSL_secure_clear_free(out, outlen);
else
OPENSSL_clear_free(out, outlen);
}
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 68,481,359,880,542,680,000,000,000,000,000,000,000 | 10 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
PJ_DECL(void) pjsip_tpmgr_fla2_param_default(pjsip_tpmgr_fla2_param *prm)
{
pj_bzero(prm, sizeof(*prm));
} | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 100,173,530,520,499,950,000,000,000,000,000,000,000 | 4 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
GF_Err av1dmx_check_format(GF_Filter *filter, GF_AV1DmxCtx *ctx, GF_BitStream *bs, u32 *last_obu_end)
{
GF_Err e;
if (last_obu_end) (*last_obu_end) = 0;
//probing av1 bs mode
if (ctx->bsmode != NOT_SET) return GF_OK;
if (!ctx->state.config)
ctx->state.config = gf_odf_av1_cfg_new();
ctx->is_av1 = ctx->is_vp9 ... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | 13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec | 38,647,925,056,818,504,000,000,000,000,000,000,000 | 106 | fixed #1719 |
xmlOutputBufferClose(xmlOutputBufferPtr out)
{
int written;
int err_rc = 0;
if (out == NULL)
return (-1);
if (out->writecallback != NULL)
xmlOutputBufferFlush(out);
if (out->closecallback != NULL) {
err_rc = out->closecallback(out->context);
}
written = out->written;... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 39,014,750,569,188,410,000,000,000,000,000,000,000 | 30 | 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. |
gst_message_new_mpegts_section (GstObject * parent, GstMpegtsSection * section)
{
GstMessage *msg;
GstStructure *st;
st = _mpegts_section_get_structure (section);
msg = gst_message_new_element (parent, st);
return msg;
} | 0 | [
"CWE-125"
] | gst-plugins-bad | d58f668ece8795bddb3316832e1848c7b7cf38ac | 245,485,309,565,856,250,000,000,000,000,000,000,000 | 11 | mpegtssection: Add more section size checks
The smallest section ever needs to be at least 3 bytes (i.e. just the short
header).
Non-short headers need to be at least 11 bytes long (3 for the minimum header,
5 for the non-short header, and 4 for the CRC).
https://bugzilla.gnome.org/show_bug.cgi?id=775048 |
connection_set_status (struct connection *conn, int value)
{
if (conn->nworkers)
pthread_mutex_lock (&conn->status_lock);
if (value < conn->status)
conn->status = value;
if (conn->nworkers)
pthread_mutex_unlock (&conn->status_lock);
return value;
} | 0 | [
"CWE-406"
] | nbdkit | 22b30adb796bb6dca264a38598f80b8a234ff978 | 118,074,359,202,496,490,000,000,000,000,000,000,000 | 10 | server: Wait until handshake complete before calling .open callback
Currently we call the plugin .open callback as soon as we receive a
TCP connection:
$ nbdkit -fv --tls=require --tls-certificates=tests/pki null \
--run "telnet localhost 10809"
[...]
Trying ::1...
Connected to localhost.
Escape ... |
static void kvm_sched_out(struct preempt_notifier *pn,
struct task_struct *next)
{
struct kvm_vcpu *vcpu = preempt_notifier_to_vcpu(pn);
if (current->on_rq) {
WRITE_ONCE(vcpu->preempted, true);
WRITE_ONCE(vcpu->ready, true);
}
kvm_arch_vcpu_put(vcpu);
__this_cpu_write(kvm_running_vcpu, NULL); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 145,206,457,061,988,580,000,000,000,000,000,000,000 | 12 | 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... |
int ParseEXRHeaderFromMemory(EXRHeader *exr_header, const EXRVersion *version,
const unsigned char *memory, size_t size,
const char **err) {
if (memory == NULL || exr_header == NULL) {
tinyexr::SetErrorMessage(
"Invalid argument. `memory` or `exr_h... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 83,592,453,634,799,010,000,000,000,000,000,000,000 | 40 | Make line_no with too large value(2**20) invalid. Fixes #124 |
keyring_search_reset (KEYRING_HANDLE hd)
{
assert (hd);
hd->current.kr = NULL;
iobuf_close (hd->current.iobuf);
hd->current.iobuf = NULL;
hd->current.eof = 0;
hd->current.error = 0;
hd->found.kr = NULL;
hd->found.offset = 0;
return 0;
} | 0 | [
"CWE-416"
] | gnupg | f0f71a721ccd7ab9e40b8b6b028b59632c0cc648 | 324,450,629,594,852,300,000,000,000,000,000,000,000 | 14 | 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... |
static void v9fs_create(void *opaque)
{
int32_t fid;
int err = 0;
size_t offset = 7;
V9fsFidState *fidp;
V9fsQID qid;
int32_t perm;
int8_t mode;
V9fsPath path;
struct stat stbuf;
V9fsString name;
V9fsString extension;
int iounit;
V9fsPDU *pdu = opaque;
v9fs_path_... | 0 | [
"CWE-399",
"CWE-772"
] | qemu | e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 327,326,558,311,054,400,000,000,000,000,000,000,000 | 179 | 9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
static int ng_pkt(git_pkt **out, const char *line, size_t len)
{
git_pkt_ng *pkt;
const char *ptr;
size_t alloclen;
pkt = git__malloc(sizeof(*pkt));
GITERR_CHECK_ALLOC(pkt);
pkt->ref = NULL;
pkt->type = GIT_PKT_NG;
if (len < 3)
goto out_err;
line += 3; /* skip "ng " */
len -= 3;
if (!(ptr = memchr(line,... | 0 | [
"CWE-20",
"CWE-125"
] | libgit2 | 1f9a8510e1d2f20ed7334eeeddb92c4dd8e7c649 | 61,701,735,237,642,340,000,000,000,000,000,000,000 | 51 | smart_pkt: fix potential OOB-read when processing ng packet
OSS-fuzz has reported a potential out-of-bounds read when processing a
"ng" smart packet:
==1==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6310000249c0 at pc 0x000000493a92 bp 0x7ffddc882cd0 sp 0x7ffddc882480
READ of size 65529 at 0x631000024... |
http_release_parsed_uri (parsed_uri_t uri)
{
if (uri)
{
uri_tuple_t r, r2;
for (r = uri->params; r; r = r2)
{
r2 = r->next;
xfree (r);
}
for (r = uri->query; r; r = r2)
{
r2 = r->next;
xfree (r);
}
xfree (uri);
}
} | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 251,732,421,897,054,850,000,000,000,000,000,000,000 | 19 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
static int udf_encode_fh(struct inode *inode, __u32 *fh, int *lenp,
struct inode *parent)
{
int len = *lenp;
struct kernel_lb_addr location = UDF_I(inode)->i_location;
struct fid *fid = (struct fid *)fh;
int type = FILEID_UDF_WITHOUT_PARENT;
if (parent && (len < 5)) {
*lenp = 5;
return FILEID_INVALID;
} ... | 0 | [
"CWE-17"
] | linux | 0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14 | 303,287,800,264,130,130,000,000,000,000,000,000,000 | 33 | udf: Check path length when reading symlink
Symlink reading code does not check whether the resulting path fits into
the page provided by the generic code. This isn't as easy as just
checking the symlink size because of various encoding conversions we
perform on path. So we have to check whether there is still enough ... |
static inline char *_validate_env(const char *env)
{
char *res, *c;
if (env)
res = g_strdup(env);
else
res = g_strdup("");
for (c = res; *c; c++)
if (*c == '\n' || *c == '\t')
*c = ' ';
return res;
} | 0 | [
"CWE-20"
] | menu-cache | 56f66684592abf257c4004e6e1fff041c64a12ce | 154,968,410,662,197,800,000,000,000,000,000,000,000 | 13 | Fix potential access violation, use runtime user dir instead of tmp dir.
Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0. |
rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag)
{
rb_encoding *enc;
VALUE w;
long width, len, flen = 1, fclen = 1;
VALUE res;
char *p;
const char *f = " ";
long n, llen, rlen;
volatile VALUE pad;
int singlebyte = 1, cr;
rb_scan_args(argc, argv, "11", &w, &pad);
... | 1 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 26,901,884,064,724,767,000,000,000,000,000,000,000 | 83 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
bool Item::eq(const Item *item, bool binary_cmp) const
{
/*
Note, that this is never TRUE if item is a Item_param:
for all basic constants we have special checks, and Item_param's
type() can be only among basic constant types.
*/
return type() == item->type() && name.str && item->name.str &&
!lex_... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 221,099,431,485,502,100,000,000,000,000,000,000,000 | 10 | 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. |
nautilus_directory_remove_file_monitors (NautilusDirectory *directory,
NautilusFile *file)
{
GList *result, **list, *node, *next;
Monitor *monitor;
g_assert (NAUTILUS_IS_DIRECTORY (directory));
g_assert (NAUTILUS_IS_FILE (file));
g_assert (file->details... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 272,335,347,940,563,630,000,000,000,000,000,000,000 | 33 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
void PackSettings(const FunctionCallbackInfo<Value>& args) {
Http2State* state = Environment::GetBindingData<Http2State>(args);
args.GetReturnValue().Set(Http2Settings::Pack(state));
} | 0 | [
"CWE-416"
] | node | a3c33d4ce78f74d1cf1765704af5b427aa3840a6 | 98,077,567,698,025,410,000,000,000,000,000,000,000 | 4 | http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.
The changes will remove dependency on the stream state that may allow
bypassing the checks in certai... |
START_TEST(test_users_waiting)
{
in_addr_t ip;
ip = inet_addr("127.0.0.1");
init_users(ip, 27);
fail_unless(users_waiting_on_reply() == 0);
users[3].active = 1;
fail_unless(users_waiting_on_reply() == 0);
users[3].last_pkt = time(NULL);
fail_unless(users_waiting_on_reply() == 0);
users[3].conn = CONN_DN... | 0 | [] | iodine | b715be5cf3978fbe589b03b09c9398d0d791f850 | 69,173,175,222,816,845,000,000,000,000,000,000,000 | 22 | Fix authentication bypass bug
The client could bypass the password check by continuing after getting error
from the server and guessing the network parameters. The server would still
accept the rest of the setup and also network traffic.
Add checks for normal and raw mode that user has authenticated before allowing
a... |
int dd_rename(struct dump_dir *dd, const char *new_path)
{
int res = rename(dd->dd_dirname, new_path);
if (res == 0)
{
free(dd->dd_dirname);
dd->dd_dirname = rm_trailing_slashes(new_path);
}
return res;
} | 0 | [
"CWE-264"
] | libreport | 3bbf961b1884dd32654dd39b360dd78ef294b10a | 162,870,829,355,858,590,000,000,000,000,000,000,000 | 10 | never follow symlinks rhbz#887866
- use lchown instead chown and O_NOFOLLOW where we use open |
static NTSTATUS smb1cli_conn_signv(struct smbXcli_conn *conn,
struct iovec *iov, int iov_count,
uint32_t *seqnum,
bool one_way_seqnum)
{
TALLOC_CTX *frame = NULL;
uint8_t *buf;
/*
* Obvious optimization: Make cli_calculate_sign_mac work with struct
* iovec directly. MD5Update would do that ... | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 328,740,561,319,440,220,000,000,000,000,000,000,000 | 46 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
static int __io_register_rsrc_update(struct io_ring_ctx *ctx, unsigned type,
struct io_uring_rsrc_update2 *up,
unsigned nr_args)
{
__u32 tmp;
int err;
if (check_add_overflow(up->offset, nr_args, &tmp))
return -EOVERFLOW;
err = io_rsrc_node_switch_start(ctx);
if (err)
return err;
switch (t... | 0 | [
"CWE-909",
"CWE-94"
] | linux | 32452a3eb8b64e01e2be717f518c0be046975b9d | 320,901,904,277,818,000,000,000,000,000,000,000,000 | 21 | io_uring: fix uninitialized field in rw io_kiocb
io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll
reads kiocb->private it can contain uninitialized data.
Fixes: 3e08773c3841 ("block: switch polling to be bio based")
Signed-off-by: Joseph Ravichandran <jravi@mit.edu>
Signed-off-by: Jens Axbo... |
static int atl2_nway_reset(struct net_device *netdev)
{
struct atl2_adapter *adapter = netdev_priv(netdev);
if (netif_running(netdev))
atl2_reinit_locked(adapter);
return 0;
} | 0 | [
"CWE-200"
] | linux | f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 | 80,732,310,768,028,950,000,000,000,000,000,000,000 | 7 | atl2: Disable unimplemented scatter/gather feature
atl2 includes NETIF_F_SG in hw_features even though it has no support
for non-linear skbs. This bug was originally harmless since the
driver does not claim to implement checksum offload and that used to
be a requirement for SG.
Now that SG and checksum offload are i... |
static int segmented_cmpxchg(struct x86_emulate_ctxt *ctxt,
struct segmented_address addr,
const void *orig_data, const void *data,
unsigned size)
{
int rc;
ulong linear;
rc = linearize(ctxt, addr, size, true, &linear);
if (rc != X86EMUL_CONTINUE)
return rc;
return ctxt->ops->cmpxchg_emu... | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 150,704,161,329,539,470,000,000,000,000,000,000,000 | 14 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
AndPredicate(const std::shared_ptr<Ope> &ope) : ope_(ope) {} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 279,799,449,127,533,930,000,000,000,000,000,000,000 | 1 | Fix #122 |
coproc_alloc (name, pid)
char *name;
pid_t pid;
{
struct coproc *cp;
#if MULTIPLE_COPROCS
cp = (struct coproc *)xmalloc (sizeof (struct coproc));
#else
cp = &sh_coproc;
#endif
coproc_init (cp);
cp->c_lock = 2;
cp->c_pid = pid;
cp->c_name = savestring (name);
#if MULTIPLE_COPROCS
cpl_add (cp)... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 292,097,876,088,323,170,000,000,000,000,000,000,000 | 22 | bash-4.4-rc2 release |
png_icc_tag_name(char *name, png_uint_32 tag)
{
name[0] = '\'';
name[1] = png_icc_tag_char(tag >> 24);
name[2] = png_icc_tag_char(tag >> 16);
name[3] = png_icc_tag_char(tag >> 8);
name[4] = png_icc_tag_char(tag );
name[5] = '\'';
} | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 140,270,388,029,100,470,000,000,000,000,000,000,000 | 9 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
int ssl3_read_n(SSL *s, int n, int max, int extend)
{
/* If extend == 0, obtain new n-byte packet; if extend == 1, increase
* packet by another n bytes.
* The packet will be in the sub-array of s->s3->rbuf.buf specified
* by s->packet and s->packet_length.
* (If s->read_ahead is set, 'max' bytes may be stored... | 1 | [] | openssl | 8671b898609777c95aedf33743419a523874e6e8 | 48,198,967,715,435,410,000,000,000,000,000,000,000 | 126 | Memory saving patch. |
bit_read_RLL (Bit_Chain *dat)
{
BITCODE_RL word1, word2;
// least significant word first
word1 = bit_read_RL (dat);
word2 = bit_read_RL (dat);
return ((((uint64_t)word2) << 32) | ((uint64_t)word1));
} | 0 | [
"CWE-703",
"CWE-125"
] | libredwg | 95cc9300430d35feb05b06a9badf678419463dbe | 132,196,729,027,348,240,000,000,000,000,000,000,000 | 9 | encode: protect from stack under-flow
From GH #178 fuzzing |
static void simple_decode_row(x3f_info_t *I, x3f_directory_entry_t *DE,
int bits, int row, int row_stride)
{
x3f_directory_entry_header_t *DEH = &DE->header;
x3f_image_data_t *ID = &DEH->data_subsection.image_data;
x3f_huffman_t *HUF = ID->huffman;
if (row*row_stride > ID->data_si... | 0 | [
"CWE-125"
] | LibRaw | 5ab45b085898e379fedc6b113e2e82a890602b1e | 287,655,781,042,132,330,000,000,000,000,000,000,000 | 70 | X3F/simple_decode_row: check for data offset limit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.