func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int __init nf_nat_snmp_basic_init(void)
{
int ret = 0;
ret = nf_conntrack_helper_register(&snmp_helper);
if (ret < 0)
return ret;
ret = nf_conntrack_helper_register(&snmp_trap_helper);
if (ret < 0) {
nf_conntrack_helper_unregister(&snmp_helper);
return ret;
}
return ret;
} | 0 | [
"CWE-119"
] | linux-2.6 | ddb2c43594f22843e9f3153da151deaba1a834c5 | 45,281,578,597,437,350,000,000,000,000,000,000,000 | 14 | asn1: additional sanity checking during BER decoding
- Don't trust a length which is greater than the working buffer.
An invalid length could cause overflow when calculating buffer size
for decoding oid.
- An oid length of zero is invalid and allows for an off-by-one error when
decoding oid because the first su... |
rsRetVal rsCStrAppendStr(cstr_t *pThis, uchar* psz)
{
return rsCStrAppendStrWithLen(pThis, psz, strlen((char*) psz));
} | 0 | [
"CWE-189"
] | rsyslog | 6bad782f154b7f838c7371bf99c13f6dc4ec4101 | 213,108,293,768,477,900,000,000,000,000,000,000,000 | 4 | bugfix: abort if imfile reads file line of more than 64KiB
Thanks to Peter Eisentraut for reporting and analysing this problem.
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=221 |
PHPAPI php_stream *_php_stream_temp_create(int mode, size_t max_memory_usage STREAMS_DC TSRMLS_DC)
{
php_stream_temp_data *self;
php_stream *stream;
self = ecalloc(1, sizeof(*self));
self->smax = max_memory_usage;
self->mode = mode;
self->meta = NULL;
stream = php_stream_alloc_rel(&php_stream_temp_ops, self, 0,... | 0 | [
"CWE-20"
] | php-src | 6297a117d77fa3a0df2e21ca926a92c231819cd5 | 164,271,776,471,202,500,000,000,000,000,000,000,000 | 16 | Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input |
static int qeth_core_prepare(struct ccwgroup_device *gdev)
{
struct qeth_card *card = dev_get_drvdata(&gdev->dev);
if (card->discipline && card->discipline->prepare)
return card->discipline->prepare(gdev);
return 0;
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 326,003,130,561,166,780,000,000,000,000,000,000,000 | 7 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static int lua_ap_scoreboard_process(lua_State *L)
{
int i;
process_score *ps_record;
luaL_checktype(L, 1, LUA_TUSERDATA);
luaL_checktype(L, 2, LUA_TNUMBER);
i = lua_tointeger(L, 2);
ps_record = ap_get_scoreboard_process(i);
if (ps_record) {
lua_newtable(L);
lua_pushstring... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 51,595,308,528,624,960,000,000,000,000,000,000,000 | 48 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
kvm_pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn)
{
return gfn_to_pfn_memslot(gfn_to_memslot(kvm, gfn), gfn); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 242,117,853,935,953,580,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... |
static bool ldm_validate_vmdb(struct parsed_partitions *state,
unsigned long base, struct ldmdb *ldb)
{
Sector sect;
u8 *data;
bool result = false;
struct vmdb *vm;
struct tocblock *toc;
BUG_ON (!state || !ldb);
vm = &ldb->vm;
toc = &ldb->toc;
data = read_part_sector(state, base + OFF_VMDB, §)... | 0 | [
"CWE-119",
"CWE-787"
] | linux | cae13fe4cc3f24820ffb990c09110626837e85d4 | 52,412,257,413,532,940,000,000,000,000,000,000,000 | 47 | Fix for buffer overflow in ldm_frag_add not sufficient
As Ben Hutchings discovered [1], the patch for CVE-2011-1017 (buffer
overflow in ldm_frag_add) is not sufficient. The original patch in
commit c340b1d64000 ("fs/partitions/ldm.c: fix oops caused by corrupted
partition table") does not consider that, for subsequen... |
char *getAPPNAME(msg_t *pM, sbool bLockMutex)
{
assert(pM != NULL);
prepareAPPNAME(pM, bLockMutex);
return (pM->pCSAPPNAME == NULL) ? "" : (char*) rsCStrGetSzStrNoNULL(pM->pCSAPPNAME);
} | 0 | [
"CWE-772"
] | rsyslog | 8083bd1433449fd2b1b79bf759f782e0f64c0cd2 | 312,893,415,878,789,900,000,000,000,000,000,000,000 | 6 | backporting abort condition fix from 5.7.7 |
void msg_file_was_renamed(struct messaging_context *msg,
void *private_data,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB *data)
{
files_struct *fsp;
char *frm = (char *)data->data;
struct file_id id;
const char *sharepath;
const char *base_name;
const char *stream_name;
struct sm... | 0 | [
"CWE-835"
] | samba | 10c3e3923022485c720f322ca4f0aca5d7501310 | 7,114,738,319,040,593,000,000,000,000,000,000,000 | 82 | s3: smbd: Don't loop infinitely on bad-symlink resolution.
In the FILE_OPEN_IF case we have O_CREAT, but not
O_EXCL. Previously we went into a loop trying first
~(O_CREAT|O_EXCL), and if that returned ENOENT
try (O_CREAT|O_EXCL). We kept looping indefinately
until we got an error, or the file was created or
opened.
T... |
static void set_col_tabstop(VTermState *state, int col)
{
unsigned char mask = 1 << (col & 7);
state->tabstops[col >> 3] |= mask;
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 70,662,861,706,154,020,000,000,000,000,000,000,000 | 5 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
TransitionState(const char* stateFrom, const char* stateTo)
{
sLog(log_info, "Transitioning from state %s to state %s. \n", stateFrom, stateTo);
// Create a file to indicate state to
if (stateTo) {
if (Touch(stateTo) == DEPLOY_ERROR) {
SetDeployError("Error creating new state %s. (%s)", stateTo... | 0 | [
"CWE-362"
] | open-vm-tools | c1304ce8bfd9c0c33999e496bf7049d5c3d45821 | 17,196,615,972,755,930,000,000,000,000,000,000,000 | 22 | randomly generate tmp directory name, and add StrUtil_ReplaceAll() function. |
static int dnxhd_decode_dct_block_10_444(const DNXHDContext *ctx,
RowContext *row, int n)
{
return dnxhd_decode_dct_block(ctx, row, n, 6, 32, 6, 0);
} | 0 | [
"CWE-125"
] | FFmpeg | f31fc4755f69ab26bf6e8be47875b7dcede8e29e | 187,802,886,765,027,470,000,000,000,000,000,000,000 | 5 | avcodec/dnxhddec: Move mb height check out of non hr branch
Fixes: out of array access
Fixes: poc.dnxhd
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 296debd213bd6dce7647cedd34eb64e5b94cdc92)
Signed-off-by: Michael Niedermayer <michael@nie... |
choose_enc(struct sshenc *enc, char *client, char *server)
{
char *name = match_list(client, server, NULL);
if (name == NULL)
return SSH_ERR_NO_CIPHER_ALG_MATCH;
if ((enc->cipher = cipher_by_name(name)) == NULL)
return SSH_ERR_INTERNAL_ERROR;
enc->name = name;
enc->enabled = 0;
enc->iv = NULL;
enc->iv_len =... | 0 | [
"CWE-522",
"CWE-399"
] | openssh-portable | ec165c392ca54317dbe3064a8c200de6531e89ad | 325,380,571,922,951,880,000,000,000,000,000,000,000 | 17 | upstream commit
Unregister the KEXINIT handler after message has been
received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed. Reported by
shilei-c at 360.cn
Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05 |
static void gf_dump_vrml_simple_field(GF_SceneDumper *sdump, GF_FieldInfo field, GF_Node *parent)
{
u32 i, sf_type;
GF_ChildNodeItem *list;
void *slot_ptr;
switch (field.fieldType) {
case GF_SG_VRML_SFNODE:
gf_dump_vrml_node(sdump, field.far_ptr ? *(GF_Node **)field.far_ptr : NULL, 0, NULL);
return;
case GF_... | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 327,725,283,416,002,740,000,000,000,000,000,000,000 | 53 | fixed #2232 |
print_server_response (const struct response *resp, const char *prefix)
{
int i;
if (!resp->headers)
return;
for (i = 0; resp->headers[i + 1]; i++)
{
const char *b = resp->headers[i];
const char *e = resp->headers[i + 1];
/* Skip CRLF */
if (b < e && e[-1] == '\n')
--e;
... | 0 | [
"CWE-20"
] | wget | 3e25a9817f47fbb8660cc6a3b2f3eea239526c6c | 310,787,513,603,045,080,000,000,000,000,000,000,000 | 17 | Introduce --trust-server-names. Close CVE-2010-2252. |
bson_iter_overwrite_int64 (bson_iter_t *iter, /* IN */
int64_t value) /* IN */
{
BSON_ASSERT (iter);
if (ITER_TYPE (iter) == BSON_TYPE_INT64) {
#if BSON_BYTE_ORDER != BSON_LITTLE_ENDIAN
value = BSON_UINT64_TO_LE (value);
#endif
memcpy ((void *) (iter->raw + iter->d1), &... | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 66,262,573,802,716,730,000,000,000,000,000,000,000 | 12 | CDRIVER-2269 Check for zero string length in codewscope |
BigInt square_mod_order(const BigInt& x) const
{
return m_mod_order.square(x);
} | 0 | [
"CWE-200"
] | botan | 48fc8df51d99f9d8ba251219367b3d629cc848e3 | 263,189,598,662,299,300,000,000,000,000,000,000,000 | 4 | Address DSA/ECDSA side channel |
int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
struct file *file,
struct snd_pcm_substream **rsubstream)
{
struct snd_pcm_str * pstr;
struct snd_pcm_substream *substream;
struct snd_pcm_runtime *runtime;
struct snd_card *card;
int prefer_subdevice;
size_t size;
if (snd_BUG_ON(!pcm... | 1 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 238,907,265,293,268,600,000,000,000,000,000,000,000 | 99 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
R_API RSocket *r_socket_new (bool is_ssl) {
return NULL;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 1,088,282,953,559,248,700,000,000,000,000,000,000 | 3 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
IntegrationCodecClient::IntegrationCodecClient(
Event::Dispatcher& dispatcher, Network::ClientConnectionPtr&& conn,
Upstream::HostDescriptionConstSharedPtr host_description, CodecClient::Type type)
: CodecClientProd(type, std::move(conn), host_description, dispatcher), dispatcher_(dispatcher),
callbac... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 85,235,859,745,730,090,000,000,000,000,000,000,000 | 9 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static int domain_prepare_identity_map(struct device *dev,
struct dmar_domain *domain,
unsigned long long start,
unsigned long long end)
{
/* For _hardware_ passthrough, don't bother. But for software
passthrough, we do it anyway -- it may indicate a memory
range which is reser... | 0 | [] | linux | fb58fdcd295b914ece1d829b24df00a17a9624bc | 83,860,088,188,502,135,000,000,000,000,000,000,000 | 39 | iommu/vt-d: Do not enable ATS for untrusted devices
Currently Linux automatically enables ATS (Address Translation Service)
for any device that supports it (and IOMMU is turned on). ATS is used to
accelerate DMA access as the device can cache translations locally so
there is no need to do full translation on IOMMU sid... |
void __ioat2_restart_chan(struct ioat2_dma_chan *ioat)
{
struct ioat_chan_common *chan = &ioat->base;
/* set the tail to be re-issued */
ioat->issued = ioat->tail;
ioat->dmacount = 0;
set_bit(IOAT_COMPLETION_PENDING, &chan->state);
mod_timer(&chan->timer, jiffies + COMPLETION_TIMEOUT);
dev_dbg(to_dev(chan),
... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 286,279,023,147,583,750,000,000,000,000,000,000,000 | 23 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
int tls1_set_curves(unsigned char **pext, size_t *pextlen,
int *curves, size_t ncurves)
{
unsigned char *clist, *p;
size_t i;
/*
* Bitmap of curves included to detect duplicates: only works while curve
* ids < 32
*/
unsigned long dup_list = 0;
# ifdef OPENSSL_NO_EC2M
... | 0 | [] | openssl | 76343947ada960b6269090638f5391068daee88d | 184,610,347,026,983,000,000,000,000,000,000,000,000 | 53 | Fix for CVE-2015-0291
If a client renegotiates using an invalid signature algorithms extension
it will crash a server with a NULL pointer dereference.
Thanks to David Ramos of Stanford University for reporting this bug.
CVE-2015-0291
Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
ssl/t1_lib.c |
ext4_readpages(struct file *file, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages)
{
return mpage_readpages(mapping, pages, nr_pages, ext4_get_block);
} | 0 | [
"CWE-399"
] | linux-2.6 | 06a279d636734da32bb62dd2f7b0ade666f65d7c | 139,793,074,965,310,840,000,000,000,000,000,000,000 | 5 | ext4: only use i_size_high for regular files
Directories are not allowed to be bigger than 2GB, so don't use
i_size_high for anything other than regular files. E2fsck should
complain about these inodes, but the simplest thing to do for the
kernel is to only use i_size_high for regular files.
This prevents an intenti... |
void putback_active_hugepage(struct page *page)
{
spin_lock_irq(&hugetlb_lock);
SetHPageMigratable(page);
list_move_tail(&page->lru, &(page_hstate(page))->hugepage_activelist);
spin_unlock_irq(&hugetlb_lock);
put_page(page);
} | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 339,232,350,552,422,750,000,000,000,000,000,000,000 | 8 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
memxor3(void *dst_in, const void *a_in, const void *b_in, size_t n)
{
unsigned char *dst = dst_in;
const unsigned char *a = a_in;
const unsigned char *b = b_in;
if (n >= WORD_T_THRESH)
{
unsigned i;
unsigned a_offset;
unsigned b_offset;
size_t nwords;
for (i = ALIGN_OFFSET(ds... | 0 | [] | nettle | 842abf376289059cd3dce34a851a3f701ad1f9b3 | 274,317,012,985,620,450,000,000,000,000,000,000,000 | 54 | Fixed out-of-bounds reads in memxor3. |
static int dib7070_tuner_reset(struct dvb_frontend *fe, int onoff)
{
struct dvb_usb_adapter *adap = fe->dvb->priv;
struct dib0700_adapter_state *state = adap->priv;
return state->dib7000p_ops.set_gpio(fe, 8, 0, !onoff);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3f190e3aec212fc8c61e202c51400afa7384d4bc | 96,303,574,487,867,550,000,000,000,000,000,000,000 | 7 | [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.
As dvb_usb_generic_rw handles a re... |
static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
{
struct tun_struct *tun;
struct tun_file *tfile = file->private_data;
struct net_device *dev;
int err;
if (tfile->detached)
return -EINVAL;
dev = __dev_get_by_name(net, ifr->ifr_name);
if (dev) {
if (ifr->ifr_flags & IFF_TUN_EXC... | 1 | [
"CWE-476"
] | linux | 5c25f65fd1e42685f7ccd80e0621829c105785d9 | 249,961,075,843,889,500,000,000,000,000,000,000,000 | 159 | tun: allow positive return values on dev_get_valid_name() call
If the name argument of dev_get_valid_name() contains "%d", it will try
to assign it a unit number in __dev__alloc_name() and return either the
unit number (>= 0) or an error code (< 0).
Considering positive values as error values prevent tun device creati... |
njs_generate_var_statement(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_int_t ret;
njs_variable_t *var;
njs_parser_node_t *lvalue, *expr;
lvalue = node->left;
ret = njs_generate_variable_wo_dest(vm, generator, lvalue,
... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 247,252,551,457,629,470,000,000,000,000,000,000,000 | 53 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
const char **argv) {
struct passwd *pw = NULL, pw_s;
const char *user = NULL;
cfg_t cfg_st;
cfg_t *cfg = &cfg_st;
char buffer[BUFSIZE];
char *buf = NULL;
char *authfile_dir;
size_t authfile_dir_len;
int pgu_ret,... | 1 | [
"CWE-200",
"CWE-59"
] | pam-u2f | 7db3386fcdb454e33a3ea30dcfb8e8960d4c3aa3 | 336,734,633,430,173,630,000,000,000,000,000,000,000 | 270 | Drop privileges by default when opening user-related files
The module is typically executed as root and would sometimes
open files or follow symlinks that could be controlled from the
outside.
Drop privileges to the target user before opening any files.
Fixes CVE-2019-12209.
Thanks to Matthias Gerstner of the SUSE ... |
static CPINLINE void seria_array_type(zend_array *ht, seriaString *buffer, size_t type_offset, size_t blen_offset)
{
buffer->offset = blen_offset;
if (ht->nNumOfElements <= 0xff)
{
((SBucketType*) (buffer->buffer + type_offset))->data_len = 1;
SERIA_SET_ENTRY_TYPE(buffer, ht->nNumOfElements)... | 0 | [
"CWE-200",
"CWE-502"
] | swoole-src | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | 64,211,886,490,326,300,000,000,000,000,000,000,000 | 19 | add buffer end check |
void* update_CheckReal( void *obj )
{
update_check_thread_t *p_uct = (update_check_thread_t *)obj;
bool b_ret;
int canc;
canc = vlc_savecancel ();
vlc_mutex_lock( &p_uct->p_update->lock );
EmptyRelease( p_uct->p_update );
b_ret = GetUpdateFile( p_uct->p_update );
vlc_mutex_unlock( &p_u... | 0 | [
"CWE-120",
"CWE-787"
] | vlc | fbe2837bc80f155c001781041a54c58b5524fc14 | 147,176,625,521,764,280,000,000,000,000,000,000,000 | 19 | misc: update: fix buffer overflow in updater
On 32 bit builds, parsing of update status files with a size of
4294967295 or more lead to an integer truncation in a call to malloc
and a subsequent buffer overflow. This happened prior to checking the
files' signature. The commit fixes this by disallowing overly large
sta... |
make_absent_tree_for_simple_one_char_repeat(Node** node, Node* absent, Node* quant,
Node* body, int possessive, ScanEnv* env)
{
int r;
int i;
int id1;
int lower, upper;
Node* x;
Node* ns[4];
*node = NULL_NODE;
r = ONIGERR_MEMORY;
ns[0] = ns[1] = NULL_NODE;
... | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 305,299,778,717,186,000,000,000,000,000,000,000,000 | 46 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
CImg<T>& RGBtoYUV() {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"RGBtoYUV(): Instance is not a RGB image.",
cimg_instance);
T *p1 = data(0,0,0,0), *p2 = data(0,0,0,1), *p3 = data(0,0,0,2);
const lon... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 215,893,693,834,124,700,000,000,000,000,000,000,000 | 21 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void term_refresh_thaw(void)
{
if (--freeze_counter == 0)
term_refresh(NULL);
} | 0 | [
"CWE-476"
] | irssi | 6c6c42e3d1b49d90aacc0b67f8540471cae02a1d | 279,522,254,685,403,500,000,000,000,000,000,000,000 | 5 | Merge branch 'security' into 'master'
See merge request !7 |
static void *DestroyRegistryNode(void *registry_info)
{
register RegistryInfo
*p;
p=(RegistryInfo *) registry_info;
switch (p->type)
{
case StringRegistryType:
default:
{
p->value=RelinquishMagickMemory(p->value);
break;
}
case ImageRegistryType:
{
p->value=(void *... | 0 | [
"CWE-476"
] | ImageMagick | cca91aa1861818342e3d072bb0fad7dc4ffac24a | 171,156,267,565,465,400,000,000,000,000,000,000,000 | 27 | https://github.com/ImageMagick/ImageMagick/issues/790 |
smpl_t aubio_onset_get_descriptor(const aubio_onset_t * o) {
return o->desc->data[0];
} | 0 | [] | aubio | e4e0861cffbc8d3a53dcd18f9ae85797690d67c7 | 138,836,054,448,178,180,000,000,000,000,000,000,000 | 3 | [onset] safer deletion method |
int sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, int optlen)
{
struct sock *sk=sock->sk;
int val;
int valbool;
struct linger ling;
int ret = 0;
/*
* Options without arguments
*/
if (optname == SO_BINDTODEVICE)
return sock_bindtodevice(sk, optval, optlen);
if (... | 0 | [
"CWE-264"
] | linux-2.6 | df0bca049d01c0ee94afb7cd5dfd959541e6c8da | 276,444,969,728,483,400,000,000,000,000,000,000,000 | 238 | net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.
This dummy code should trigger the bug:
int main(void)
{
unsigned char buf... |
int Ordered_key::cmp_key_with_search_key(rownum_t row_num)
{
/* The length in bytes of the rowids (positions) of tmp_table. */
uint rowid_length= tbl->file->ref_length;
uchar *cur_rowid= row_num_to_rowid + row_num * rowid_length;
int __attribute__((unused)) error;
int cmp_res;
if ((error= tbl->file->ha_rnd... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 170,247,914,563,959,150,000,000,000,000,000,000,000 | 26 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
virDomainInterfaceStats(virDomainPtr dom, const char *path,
virDomainInterfaceStatsPtr stats, size_t size)
{
virConnectPtr conn;
virDomainInterfaceStatsStruct stats2 = { -1, -1, -1, -1,
-1, -1, -1, -1 };
VIR_DOMAIN_DEBUG(dom, "path=%s, st... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 181,525,491,384,629,060,000,000,000,000,000,000,000 | 38 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
static int MqttClient_DecodePacket(MqttClient* client, byte* rx_buf,
word32 rx_len, void *packet_obj, MqttPacketType* ppacket_type,
MqttQoS* ppacket_qos, word16* ppacket_id)
{
int rc = MQTT_CODE_SUCCESS;
MqttPacket* header;
MqttPacketType packet_type;
MqttQoS packet_qos;
word16 packet_id = 0... | 0 | [
"CWE-787"
] | wolfMQTT | 84d4b53122e0fa0280c7872350b89d5777dabbb2 | 209,814,547,102,423,650,000,000,000,000,000,000,000 | 237 | Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free |
virDomainDiskIndexByAddress(virDomainDefPtr def,
virPCIDeviceAddressPtr pci_address,
unsigned int bus, unsigned int target,
unsigned int unit)
{
virDomainDiskDefPtr vdisk;
virDomainControllerDefPtr controller = NULL;
size_t ... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 163,801,586,301,295,590,000,000,000,000,000,000,000 | 30 | 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 unsigned int xdr_set_iov(struct xdr_stream *xdr, struct kvec *iov,
unsigned int base, unsigned int len)
{
if (len > iov->iov_len)
len = iov->iov_len;
if (unlikely(base > len))
base = len;
xdr->p = (__be32*)(iov->iov_base + base);
xdr->end = (__be32*)(iov->iov_base + len);
xdr->iov = iov;
xdr->page_... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | 49,060,835,101,314,210,000,000,000,000,000,000,000 | 13 | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... |
FindComm(str)
char *str;
{
int x, m, l = 0, r = ncommtab - 1;
while (l <= r)
{
m = (l + r) / 2;
x = strcmp(str, commtab[m]->name);
if (x > 0)
l = m + 1;
else if (x < 0)
r = m - 1;
else
return commtab[m];
}
return 0;
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 12,720,561,113,083,570,000,000,000,000,000,000,000 | 17 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
static void macsec_dellink(struct net_device *dev, struct list_head *head)
{
struct macsec_dev *macsec = macsec_priv(dev);
struct net_device *real_dev = macsec->real_dev;
struct macsec_rxh_data *rxd = macsec_data_rtnl(real_dev);
macsec_common_dellink(dev, head);
if (list_empty(&rxd->secys)) {
netdev_rx_handler... | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 130,539,989,588,948,640,000,000,000,000,000,000,000 | 13 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
static gint rtps_util_add_typecode(proto_tree *tree, tvbuff_t *tvb, gint offset, const guint encoding,
int indent_level, int is_pointer, guint16 bitfield, int is_key, const gint offset_begin,
char *name,
int seq_max_len, /* -1 = not ... | 0 | [
"CWE-401"
] | wireshark | 33e63d19e5496c151bad69f65cdbc7cba2b4c211 | 318,134,299,694,507,860,000,000,000,000,000,000,000 | 575 | RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.
Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating ... |
empathy_adium_data_new_with_info (const gchar *path, GHashTable *info)
{
EmpathyAdiumData *data;
gchar *template_html = NULL;
gchar *footer_html = NULL;
gchar *tmp;
g_return_val_if_fail (empathy_adium_path_is_valid (path), NULL);
data = g_slice_new0 (EmpathyAdiumData);
data->re... | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 227,344,489,854,077,700,000,000,000,000,000,000,000 | 138 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
void nghttp2_downcase(uint8_t *s, size_t len) {
size_t i;
for (i = 0; i < len; ++i) {
s[i] = DOWNCASE_TBL[s[i]];
}
} | 0 | [
"CWE-707"
] | nghttp2 | 336a98feb0d56b9ac54e12736b18785c27f75090 | 85,580,597,235,669,010,000,000,000,000,000,000,000 | 6 | Implement max settings option |
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
IS_CV != IS_CV &&
... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 62,126,413,233,479,840,000,000,000,000,000,000,000 | 21 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static sci_t make_sci(u8 *addr, __be16 port)
{
sci_t sci;
memcpy(&sci, addr, ETH_ALEN);
memcpy(((char *)&sci) + ETH_ALEN, &port, sizeof(port));
return sci;
} | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 232,221,338,199,650,100,000,000,000,000,000,000,000 | 9 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
bool Item_field::subst_argument_checker(uchar **arg)
{
return *arg &&
(*arg == (uchar *) Item::ANY_SUBST ||
result_type() != STRING_RESULT ||
(field->flags & BINARY_FLAG));
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 108,663,776,408,380,090,000,000,000,000,000,000,000 | 7 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
hb_set_previous (const hb_set_t *set,
hb_codepoint_t *codepoint)
{
return set->previous (codepoint);
} | 0 | [
"CWE-787"
] | harfbuzz | d3e09bf4654fe5478b6dbf2b26ebab6271317d81 | 181,864,351,845,817,800,000,000,000,000,000,000,000 | 5 | [set] Make all operators null-safe again
Changed my mind.
Also for hb_map_clear().
Part of https://github.com/harfbuzz/harfbuzz/pull/3162 |
void _clear() override {
assert(peering_queue.empty());
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 293,162,847,752,423,200,000,000,000,000,000,000,000 | 3 | 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 ... |
static int sixaxis_set_operational_bt(struct hid_device *hdev)
{
static const u8 report[] = { 0xf4, 0x42, 0x03, 0x00, 0x00 };
u8 *buf;
int ret;
buf = kmemdup(report, sizeof(report), GFP_KERNEL);
if (!buf)
return -ENOMEM;
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(report),
HID_FEATURE_REPORT, HID... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 138,368,686,232,267,330,000,000,000,000,000,000,000 | 17 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
LIEF::Binary::functions_t Binary::get_abstract_imported_functions() const {
LIEF::Binary::functions_t result;
it_const_imported_symbols syms = imported_symbols();
std::transform(std::begin(syms), std::end(syms),
std::back_inserter(result),
[] (const Symbol& s) {
... | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 148,913,296,954,643,780,000,000,000,000,000,000,000 | 11 | Resolve #764 |
bson_iter_init_find_case (bson_iter_t *iter, /* INOUT */
const bson_t *bson, /* IN */
const char *key) /* IN */
{
BSON_ASSERT (iter);
BSON_ASSERT (bson);
BSON_ASSERT (key);
return bson_iter_init (iter, bson) && bson_iter_find_case (iter, key);
} | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 277,580,594,909,329,220,000,000,000,000,000,000,000 | 10 | CDRIVER-2269 Check for zero string length in codewscope |
static json_t * get_cert_from_file_path(const char * path) {
gnutls_x509_crt_t cert = NULL;
gnutls_datum_t cert_dat = {NULL, 0}, export_dat = {NULL, 0};
FILE * fl;
size_t len, issued_for_len = 128;
char * cert_content, issued_for[128] = {};
json_t * j_return = NULL;
fl = fopen(path, "r");
if (fl != N... | 0 | [
"CWE-120",
"CWE-787"
] | glewlwyd | 0efd112bb62f566877750ad62ee828bff579b4e2 | 125,602,606,500,577,090,000,000,000,000,000,000,000 | 59 | Fix fido2 signature validation bug |
bool wsrep_sst_receive_address_check(sys_var *, THD *, set_var *var) {
char addr_buf[FN_REFLEN];
if ((!var->save_result.string_value.str) ||
(var->save_result.string_value.length > (FN_REFLEN - 1))) // safety
{
goto err;
}
memcpy(addr_buf, var->save_result.string_value.str,
var->save_res... | 0 | [
"CWE-77"
] | percona-xtradb-cluster | 8a338477c9184dd0e03a5c661e9c3a79456de8a4 | 317,832,517,379,282,430,000,000,000,000,000,000,000 | 21 | PXC-3392: Donor uses invalid SST methods |
INT8_Unmarshal(INT8 *target, BYTE **buffer, INT32 *size)
{
return UINT8_Unmarshal((UINT8 *)target, buffer, size);
} | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 203,459,445,975,119,850,000,000,000,000,000,000,000 | 4 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
getcoprocbypid (pid)
pid_t pid;
{
#if MULTIPLE_COPROCS
struct cpelement *p;
p = cpl_search (pid);
return (p ? p->coproc : 0);
#else
return (pid == sh_coproc.c_pid ? &sh_coproc : 0);
#endif
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 92,043,744,791,327,080,000,000,000,000,000,000,000 | 12 | bash-4.4-rc2 release |
char *sftp_canonicalize_path(sftp_session sftp, const char *path) {
sftp_status_message status = NULL;
sftp_message msg = NULL;
ssh_string name = NULL;
ssh_string pathstr;
ssh_buffer buffer;
char *cname;
uint32_t ignored;
uint32_t id;
if (sftp == NULL)
return NULL;
if (path == NULL) {
ssh_s... | 0 | [] | libssh | 4d8420f3282ed07fc99fc5e930c17df27ef1e9b2 | 19,798,492,401,528,422,000,000,000,000,000,000,000 | 86 | sftp: Fix bug in sftp_mkdir not returning on error.
resolves: #84
(cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44) |
static void macsec_dev_uninit(struct net_device *dev)
{
struct macsec_dev *macsec = macsec_priv(dev);
gro_cells_destroy(&macsec->gro_cells);
free_percpu(dev->tstats);
} | 0 | [
"CWE-119"
] | net | 5294b83086cc1c35b4efeca03644cf9d12282e5b | 265,444,147,792,501,930,000,000,000,000,000,000,000 | 7 | macsec: dynamically allocate space for sglist
We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80... |
void bpf_jit_binary_free(struct bpf_binary_header *hdr)
{
module_memfree(hdr);
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 19,224,752,305,028,913,000,000,000,000,000,000,000 | 4 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static int futex_wait(u32 __user *uaddr, int fshared,
u32 val, ktime_t *abs_time, u32 bitset, int clockrt)
{
struct hrtimer_sleeper timeout, *to = NULL;
struct restart_block *restart;
struct futex_hash_bucket *hb;
struct futex_q q;
int ret;
if (!bitset)
return -EINVAL;
q.pi_state = NULL;
q.bitset = ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7ada876a8703f23befbb20a7465a702ee39b1704 | 98,860,082,636,878,100,000,000,000,000,000,000,000 | 81 | futex: Fix errors in nested key ref-counting
futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, ... |
gluster_compare_hosts(gluster_hostdef *src_server, gluster_hostdef *dst_server)
{
if (src_server->type != dst_server->type)
return false;
switch (src_server->type) {
case GLUSTER_TRANSPORT_UNIX:
if (!strcmp(src_server->u.uds.socket, dst_server->u.uds.socket))
return true;
break;
case GLUSTER_TRANSPOR... | 0 | [
"CWE-200",
"CWE-119"
] | tcmu-runner | 61bd03e600d2abf309173e9186f4d465bb1b7157 | 314,928,035,903,746,600,000,000,000,000,000,000,000 | 23 | glfs: discard glfs_check_config
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> |
TEST(FormatterTest, CenterAlign) {
EXPECT_EQ(" 42 ", format("{0:^5}", 42));
EXPECT_EQ(" 42 ", format("{0:^5o}", 042));
EXPECT_EQ(" 42 ", format("{0:^5x}", 0x42));
EXPECT_EQ(" -42 ", format("{0:^5}", -42));
EXPECT_EQ(" 42 ", format("{0:^5}", 42u));
EXPECT_EQ(" -42 ", format("{0:^5}", -42l));
EXPECT_EQ(... | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 20,866,444,827,235,406,000,000,000,000,000,000,000 | 16 | Fix segfault on complex pointer formatting (#642) |
}
void dump_isom_saps(GF_ISOFile *file, GF_ISOTrackID trackID, u32 dump_saps_mode, char *inName, Bool is_final_name)
{
FILE *dump;
u32 i, count;
s64 media_offset=0;
u32 track = gf_isom_get_track_by_id(file, trackID);
if (inName) {
char szBuf[GF_MAX_PATH];
strcpy(szBuf, inName);
if (!is_final_name) sprintf(... | 0 | [
"CWE-476"
] | gpac | ce01bd15f711d4575b7424b54b3a395ec64c1784 | 40,658,136,751,991,500,000,000,000,000,000,000,000 | 79 | fixed #1566 |
static int list_well_known(struct transaction_t *txn)
{
static struct buf body = BUF_INITIALIZER;
static time_t lastmod = 0;
struct stat sbuf;
int precond;
/* stat() imapd.conf for Last-Modified and ETag */
stat(config_filename, &sbuf);
assert(!buf_len(&txn->buf));
buf_printf(&txn->... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 301,234,027,926,085,050,000,000,000,000,000,000,000 | 77 | HTTP: don't overrun buffer when parsing strings with sscanf() |
static void __wake_userfault(struct userfaultfd_ctx *ctx,
struct userfaultfd_wake_range *range)
{
spin_lock(&ctx->fault_pending_wqh.lock);
/* wake all in the range and autoremove */
if (waitqueue_active(&ctx->fault_pending_wqh))
__wake_up_locked_key(&ctx->fault_pending_wqh, TASK_NORMAL,
range);
i... | 0 | [
"CWE-416"
] | linux | 384632e67e0829deb8015ee6ad916b180049d252 | 141,888,970,559,832,450,000,000,000,000,000,000,000 | 12 | userfaultfd: non-cooperative: fix fork use after free
When reading the event from the uffd, we put it on a temporary
fork_event list to detect if we can still access it after releasing and
retaking the event_wqh.lock.
If fork aborts and removes the event from the fork_event all is fine as
long as we're still in the u... |
parse_user_host_path(const char *s, char **userp, char **hostp, char **pathp)
{
char *user = NULL, *host = NULL, *path = NULL;
char *sdup, *tmp;
int ret = -1;
if (userp != NULL)
*userp = NULL;
if (hostp != NULL)
*hostp = NULL;
if (pathp != NULL)
*pathp = NULL;
sdup = xstrdup(s);
/* Check for remote syn... | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 113,997,573,897,884,750,000,000,000,000,000,000,000 | 58 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
proto_item_get_parent_nth(proto_item *ti, int gen) {
if (!ti)
return NULL;
while (gen--) {
ti = ti->parent;
if (!ti)
return NULL;
}
return ti;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 295,263,345,433,783,360,000,000,000,000,000,000,000 | 10 | 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. |
void clientAcceptHandler(connection *conn) {
client *c = connGetPrivateData(conn);
if (connGetState(conn) != CONN_STATE_CONNECTED) {
serverLog(LL_WARNING,
"Error accepting a client connection: %s",
connGetLastError(conn));
freeClientAsync(c);
return;
... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 165,503,414,677,738,180,000,000,000,000,000,000,000 | 59 | 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... |
void ndpi_init_protocol_match(struct ndpi_detection_module_struct *ndpi_str, ndpi_protocol_match *match) {
u_int16_t no_master[2] = {NDPI_PROTOCOL_NO_MASTER_PROTO, NDPI_PROTOCOL_NO_MASTER_PROTO};
ndpi_port_range ports_a[MAX_DEFAULT_PORTS], ports_b[MAX_DEFAULT_PORTS];
if(ndpi_str->proto_defaults[match->protocol_i... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 239,369,185,377,392,070,000,000,000,000,000,000,000 | 22 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
MagickExport void XDestroyResourceInfo(XResourceInfo *resource_info)
{
if (resource_info->image_geometry != (char *) NULL)
resource_info->image_geometry=(char *)
RelinquishMagickMemory(resource_info->image_geometry);
if (resource_info->quantize_info != (QuantizeInfo *) NULL)
resource_info->quantize_in... | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 113,268,216,355,574,000,000,000,000,000,000,000,000 | 15 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
get_DW_SECT_short_name (unsigned int dw_sect)
{
static char buf[16];
switch (dw_sect)
{
case DW_SECT_INFO:
return "info";
case DW_SECT_TYPES:
return "types";
case DW_SECT_ABBREV:
return "abbrev";
case DW_SECT_LINE:
return "line";
case DW_SECT_LOC:
return "loc";
case DW_... | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 166,298,778,327,899,470,000,000,000,000,000,000,000 | 29 | 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 sc_card_driver * sc_get_driver(void)
{
struct sc_card_driver *iso_drv = sc_get_iso7816_driver();
if (iso_ops == NULL)
iso_ops = iso_drv->ops;
muscle_ops = *iso_drv->ops;
muscle_ops.check_sw = muscle_check_sw;
muscle_ops.pin_cmd = muscle_pin_cmd;
muscle_ops.match_card = muscle_match_card;
muscle_... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 114,084,044,020,062,650,000,000,000,000,000,000,000 | 30 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
xmlFAGenerateCountedTransition(xmlRegParserCtxtPtr ctxt,
xmlRegStatePtr from, xmlRegStatePtr to, int counter) {
if (to == NULL) {
to = xmlRegNewState(ctxt);
xmlRegStatePush(ctxt, to);
ctxt->state = to;
}
xmlRegStateAddTrans(ctxt, from, NULL, to, -1, counter);
} | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 164,021,989,240,220,800,000,000,000,000,000,000,000 | 9 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
QPDFObjectHandle::getArrayNItems()
{
if (isArray())
{
return dynamic_cast<QPDF_Array*>(m->obj.getPointer())->getNItems();
}
else
{
typeWarning("array", "treating as empty");
QTC::TC("qpdf", "QPDFObjectHandle array treating as empty");
return 0;
}
} | 0 | [
"CWE-399",
"CWE-674"
] | qpdf | b4d6cf6836ce025ba1811b7bbec52680c7204223 | 214,501,913,756,463,650,000,000,000,000,000,000,000 | 13 | Limit depth of nesting in direct objects (fixes #202)
This fixes CVE-2018-9918. |
int sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
int val;
int valbool;
struct linger ling;
int ret = 0;
/*
* Options without arguments
*/
if (optname == SO_BINDTODEVICE)
return sock_bindtodevice(sk, optval, optl... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 82981930125abfd39d7c8378a9cfdf5e1be2002b | 111,900,924,711,571,080,000,000,000,000,000,000,000 | 283 | net: cleanups in sock_setsockopt()
Use min_t()/max_t() macros, reformat two comments, use !!test_bit() to
match !!sock_flag()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
UriBool URI_FUNC(_TESTING_ONLY_ParseIpFour)(const URI_CHAR * text) {
unsigned char octets[4];
int res = URI_FUNC(ParseIpFourAddress)(octets, text, text + URI_STRLEN(text));
return (res == URI_SUCCESS) ? URI_TRUE : URI_FALSE;
} | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 123,377,083,710,111,560,000,000,000,000,000,000,000 | 5 | Fix uriParse*Ex* out-of-bounds read |
static int rtnl_fill_statsinfo(struct sk_buff *skb, struct net_device *dev,
int type, u32 pid, u32 seq, u32 change,
unsigned int flags, unsigned int filter_mask,
int *idxattr, int *prividx)
{
struct if_stats_msg *ifsm;
struct nlmsghdr *nlh;
struct nlattr *attr;
int s_prividx = *prividx... | 0 | [
"CWE-476"
] | linux | f428fe4a04cc339166c8bbd489789760de3a0cee | 244,952,148,007,118,620,000,000,000,000,000,000,000 | 147 | rtnetlink: give a user socket to get_target_net()
This function is used from two places: rtnl_dump_ifinfo and
rtnl_getlink. In rtnl_getlink(), we give a request skb into
get_target_net(), but in rtnl_dump_ifinfo, we give a response skb
into get_target_net().
The problem here is that NETLINK_CB() isn't initialized for ... |
static ext4_fsblk_t ext4_find_near(struct inode *inode, Indirect *ind)
{
struct ext4_inode_info *ei = EXT4_I(inode);
__le32 *start = ind->bh ? (__le32 *) ind->bh->b_data : ei->i_data;
__le32 *p;
/* Try to find previous block */
for (p = ind->p - 1; p >= start; p--) {
if (*p)
return le32_to_cpu(*p);
}
/* N... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 143,482,256,067,509,440,000,000,000,000,000,000,000 | 22 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
static void cm_init_av_for_response(struct cm_port *port, struct ib_wc *wc,
struct ib_grh *grh, struct cm_av *av)
{
av->port = port;
av->pkey_index = wc->pkey_index;
ib_init_ah_from_wc(port->cm_dev->ib_device, port->port_num, wc,
grh, &av->ah_attr);
} | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 304,173,565,696,619,400,000,000,000,000,000,000,000 | 8 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
super_90_allow_new_offset(struct md_rdev *rdev, unsigned long long new_offset)
{
/* non-zero offset changes not possible with v0.90 */
return new_offset == 0;
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 137,706,123,601,702,770,000,000,000,000,000,000,000 | 5 | 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... |
add_connection_items (NMDevice *device,
GSList *connections,
gboolean carrier,
NMConnection *active,
GtkWidget *menu,
NMApplet *applet)
{
GSList *iter;
WiredMenuItemInfo *info;
for (iter = connections; iter... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 317,328,154,608,511,200,000,000,000,000,000,000,000 | 36 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
static int compat_copy_entry_from_user(struct ipt_entry *e, void **dstptr,
unsigned int *size, const char *name,
struct xt_table_info *newinfo, unsigned char *base)
{
struct ipt_entry_target *t;
struct ipt_target *target;
struct ipt_entry *de;
unsigned int origsize;
int ret, h, j;
ret = 0;
origsize = *size;
... | 1 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 139,148,970,260,080,160,000,000,000,000,000,000,000 | 65 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
passGetDots ()
{
CharsString collectDots;
collectDots.length = 0;
while (passLinepos < passLine.length && (passLine.chars[passLinepos]
== '-'
|| (passLine.chars[passLinepos] >=
'0'
&& passLine.
chars[passLinepos] <= '9')
||
((passLine.
... | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 64,691,794,036,143,460,000,000,000,000,000,000,000 | 21 | Merge branch 'table_resolver' |
int is_valid_win32_path(const char *path)
{
int preceding_space_or_period = 0, i = 0, periods = 0;
if (!protect_ntfs)
return 1;
skip_dos_drive_prefix((char **)&path);
for (;;) {
char c = *(path++);
switch (c) {
case '\0':
case '/': case '\\':
/* cannot end in ` ` or `.`, except for `.` and `..` */
... | 0 | [
"CWE-706"
] | git | f82a97eb9197c1e3768e72648f37ce0ca3233734 | 137,588,085,589,266,200,000,000,000,000,000,000,000 | 43 | mingw: handle `subst`-ed "DOS drives"
Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path
names., 2008-03-05), Git was taught to handle absolute Windows paths,
i.e. paths that start with a drive letter and a colon.
Unbeknownst to us, while drive letters of physical drives are limited to
letters of th... |
void blk_mq_end_request(struct request *rq, int error)
{
if (blk_update_request(rq, error, blk_rq_bytes(rq)))
BUG();
__blk_mq_end_request(rq, error);
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 261,776,033,656,360,060,000,000,000,000,000,000,000 | 6 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
static bool vxlan_parse_gpe_hdr(struct vxlanhdr *unparsed,
__be16 *protocol,
struct sk_buff *skb, u32 vxflags)
{
struct vxlanhdr_gpe *gpe = (struct vxlanhdr_gpe *)unparsed;
/* Need to have Next Protocol set for interfaces in GPE mode. */
if (!gpe->np_applied)
return false;
/* "The initial version is 0. I... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 74,345,251,730,760,505,000,000,000,000,000,000,000 | 28 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
const char* pn_ssl_get_remote_subject(pn_ssl_t *ssl0)
{
// RFC 2253 compliant, but differs from openssl's subject string with space separators and
// ordering of multicomponent RDNs. Made to work as similarly as possible with choice of flags.
pni_ssl_t *ssl = get_ssl_internal(ssl0);
if (!ssl || !SecIsValidHand... | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 193,157,845,849,496,350,000,000,000,000,000,000,000 | 34 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
int Helper::processExec(QProcess *process, const QString &command, int timeout, QIODevice::OpenMode mode)
{
m_processStandardOutput.clear();
m_processStandardError.clear();
QEventLoop loop;
QTimer timer;
timer.setSingleShot(true);
timer.setInterval(timeout);
timer.connect(&timer, &QTimer:... | 0 | [
"CWE-59",
"CWE-61"
] | deepin-clone | e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab | 305,513,005,054,096,720,000,000,000,000,000,000,000 | 74 | fix: Do not use the "/tmp" directory
https://github.com/linuxdeepin/deepin-clone/issues/16
https://bugzilla.opensuse.org/show_bug.cgi?id=1130388 |
static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
mul_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRML... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 314,728,621,499,150,300,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static inline void *align_ptr(void *ptr)
{
return (void *)align_val((size_t)ptr);
} | 0 | [
"CWE-787"
] | linux | 4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a | 301,381,877,026,463,600,000,000,000,000,000,000,000 | 4 | dm ioctl: fix out of bounds array access when no devices
If there are not any dm devices, we need to zero the "dev" argument in
the first structure dm_name_list. However, this can cause out of
bounds write, because the "needed" variable is zero and len may be
less than eight.
Fix this bug by reporting DM_BUFFER_FULL_... |
timeout_connect(int sockfd, const struct sockaddr *serv_addr,
socklen_t addrlen, int *timeoutp)
{
fd_set *fdset;
struct timeval tv, t_start;
socklen_t optlen;
int optval, rc, result = -1;
gettimeofday(&t_start, NULL);
if (*timeoutp <= 0) {
result = connect(sockfd, serv_addr, addrlen);
goto done;
}
se... | 0 | [
"CWE-20"
] | openssh-portable | 7d6a9fb660c808882d064e152d6070ffc3844c3f | 305,874,841,344,155,500,000,000,000,000,000,000,000 | 81 | - djm@cvs.openbsd.org 2014/04/01 03:34:10
[sshconnect.c]
When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any
certificate keys to plain keys and attempt SSHFP resolution.
Prevents a server from skipping SSHFP lookup and forcing a new-hostkey
dialog by offering only certificate ... |
static ULONG ShallPassPacket(PARANDIS_ADAPTER *pContext, PNET_PACKET_INFO pPacketInfo)
{
ULONG i;
if (pPacketInfo->dataLength > pContext->MaxPacketSize.nMaxFullSizeOsRx + ETH_PRIORITY_HEADER_SIZE)
return FALSE;
if ((pPacketInfo->dataLength > pContext->MaxPacketSize.nMaxFullSizeOsRx) && !pPacketInf... | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 325,072,467,433,568,330,000,000,000,000,000,000,000 | 56 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
_window_started_loading_file (FrWindow *window,
GFile *file)
{
char *description;
description = get_action_description (window, FR_ACTION_LOADING_ARCHIVE, file);
fr_archive_message_cb (NULL, description, window);
g_free (description);
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 177,741,257,646,798,600,000,000,000,000,000,000,000 | 10 | libarchive: sanitize filenames before extracting |
size_t rand_pool_bytes_needed(RAND_POOL *pool, unsigned int entropy_factor)
{
size_t bytes_needed;
size_t entropy_needed = rand_pool_entropy_needed(pool);
if (entropy_factor < 1) {
RANDerr(RAND_F_RAND_POOL_BYTES_NEEDED, RAND_R_ARGUMENT_OUT_OF_RANGE);
return 0;
}
bytes_needed = ENTR... | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 330,889,541,775,357,030,000,000,000,000,000,000,000 | 25 | 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... |
upnp_event_notify_connect(struct upnp_event_notify * obj)
{
unsigned int i;
const char * p;
unsigned short port;
#ifdef ENABLE_IPV6
struct sockaddr_storage addr;
socklen_t addrlen;
#else
struct sockaddr_in addr;
socklen_t addrlen;
#endif
if(!obj)
return;
memset(&addr, 0, sizeof(addr));
i = 0;
if(obj->sub ... | 0 | [
"CWE-200",
"CWE-252"
] | miniupnp | bec6ccec63cadc95655721bc0e1dd49dac759d94 | 273,327,592,671,874,800,000,000,000,000,000,000,000 | 96 | upnp_event_prepare(): check the return value of snprintf() |
static void ext4_put_super(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int i, err;
flush_workqueue(sbi->dio_unwritten_wq);
destroy_workqueue(sbi->dio_unwritten_wq);
lock_super(sb);
lock_kernel();
if (sb->s_dirt)
ext4_commit_super(sb, 1);
if (s... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 339,793,879,034,634,070,000,000,000,000,000,000,000 | 85 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.