func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int avcodec_is_open(AVCodecContext *s)
{
return !!s->internal;
} | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 199,208,475,737,606,630,000,000,000,000,000,000,000 | 4 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static Image *ReadYCBCRImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
const unsigned char
*pixels;
Image
*canvas_image,
*image;
MagickBooleanType
status;
MagickOffsetType
scene;
QuantumInfo
*quantum_info;
QuantumType
quantum_type;
register const Quantum
... | 1 | [
"CWE-703",
"CWE-772"
] | ImageMagick | 241988ca28139ad970c1d9717c419f41e360ddb0 | 49,630,969,466,193,730,000,000,000,000,000,000,000 | 801 | fix memory leak in ReadYCBCRImage as SetImageExtent failure |
void connectErr(const AsyncSocketException& ex) noexcept override {
FAIL() << ex.what();
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 46,121,104,482,095,360,000,000,000,000,000,000,000 | 3 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
unsigned long arg)
{
cd_dbg(CD_DO_IOCTL, "entering CDROM_DRIVE_STATUS\n");
if (!(cdi->ops->capability & CDC_DRIVE_STATUS))
return -ENOSYS;
if (!CDROM_CAN(CDC_SELECT_DISC) ||
(arg == CDSL_CURRENT || arg == CDSL_NONE))
return cdi->ops->driv... | 1 | [
"CWE-200"
] | linux | 8f3fafc9c2f0ece10832c25f7ffcb07c97a32ad4 | 167,994,840,583,310,140,000,000,000,000,000,000,000 | 14 | cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
Like d88b6d04: "cdrom: information leak in cdrom_ioctl_media_changed()"
There is another cast from unsigned long to int which causes
a bounds check to fail with specially crafted input. The value is
then used as an index in the slot array in cdrom_slot_status(... |
void msetCommand(client *c) {
msetGenericCommand(c,0);
} | 0 | [
"CWE-190"
] | redis | 92e3b1802f72ca0c5b0bde97f01d9b57a758d85c | 302,176,494,076,094,500,000,000,000,000,000,000,000 | 3 | Fix integer overflow in STRALGO LCS (CVE-2021-29477)
An integer overflow bug in Redis version 6.0 or newer could be exploited using
the STRALGO LCS command to corrupt the heap and potentially result with remote
code execution.
(cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9) |
pk_transaction_search_names (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
PkBitfield filter;
gchar **values;
_cleanup_error_free_ GError *error = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->tid != ... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 79,177,312,085,502,580,000,000,000,000,000,000,000 | 45 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
static void GetMeanPixelList(PixelList *pixel_list,MagickPixelPacket *pixel)
{
MagickRealType
sum;
SkipList
*list;
ssize_t
channel;
size_t
color;
ssize_t
count;
unsigned short
channels[ListChannels];
/*
Find the mean value for each of the color.
*/
for (channel=0; cha... | 0 | [] | ImageMagick6 | 072d7b10dbe74d1cf4ec0d008990c1a28c076f9e | 53,683,059,156,547,425,000,000,000,000,000,000,000 | 44 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
void kernel_fp_unavailable_exception(struct pt_regs *regs)
{
enum ctx_state prev_state = exception_enter();
printk(KERN_EMERG "Unrecoverable FP Unavailable Exception "
"%lx at %lx\n", regs->trap, regs->nip);
die("Unrecoverable FP Unavailable Exception", regs, SIGABRT);
exception_exit(prev_state);
} | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 331,671,713,591,214,200,000,000,000,000,000,000,000 | 10 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
void seq_printf(struct seq_file *m, const char *f, ...)
{
va_list args;
va_start(args, f);
seq_vprintf(m, f, args);
va_end(args);
} | 0 | [
"CWE-120",
"CWE-787"
] | linux | 8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b | 38,706,273,330,734,113,000,000,000,000,000,000,000 | 8 | seq_file: disallow extremely large seq buffer allocations
There is no reasonable need for a buffer larger than this, and it avoids
int overflow pitfalls.
Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Qualys Security Advisory <qsa@qualy... |
static const char * const *paged_copy_attrs(TALLOC_CTX *mem_ctx,
const char * const *attrs) {
int i;
const char **new_attrs;
if (attrs == NULL) {
return NULL;
}
new_attrs = ldb_attr_list_copy(mem_ctx, attrs);
for (i=0; attrs[i] != NULL; i++) {
new_attrs[i] = talloc_strdup(mem_ctx, attrs[i]);
}
new... | 0 | [
"CWE-416"
] | samba | 32c333def9ad5a1c67abee320cf5f3c4f2cb1e5c | 210,971,971,515,548,700,000,000,000,000,000,000,000 | 15 | CVE-2020-10760 dsdb: Ensure a proper talloc tree for saved controls
Otherwise a paged search on the GC port will fail as the ->data was
not kept around for the second page of searches.
An example command to produce this is
bin/ldbsearch --paged -H ldap://$SERVER:3268 -U$USERNAME%$PASSWORD
This shows up later in the... |
static void add_extra_have(struct extra_have_objects *extra, unsigned char *sha1)
{
ALLOC_GROW(extra->array, extra->nr + 1, extra->alloc);
hashcpy(&(extra->array[extra->nr][0]), sha1);
extra->nr++;
} | 0 | [] | git | 73bb33a94ec67a53e7d805b12ad9264fa25f4f8d | 129,929,289,945,710,140,000,000,000,000,000,000,000 | 6 | 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 int rsi_mac80211_cancel_roc(struct ieee80211_hw *hw)
{
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
rsi_dbg(INFO_ZONE, "Cancel remain on channel\n");
mutex_lock(&common->mutex);
if (!timer_pending(&common->roc_timer)) {
mutex_unlock(&common->mutex);
return 0;
}
del_... | 0 | [
"CWE-416"
] | linux | abd39c6ded9db53aa44c2540092bdd5fb6590fa8 | 258,436,340,765,509,170,000,000,000,000,000,000,000 | 20 | rsi: add fix for crash during assertions
Observed crash in some scenarios when assertion has occurred,
this is because hw structure is freed and is tried to get
accessed in some functions where null check is already
present. So, avoided the crash by making the hw to NULL after
freeing.
Signed-off-by: Sanjay Konduri <... |
void ide_data_writew(void *opaque, uint32_t addr, uint32_t val)
{
IDEBus *bus = opaque;
IDEState *s = idebus_active_if(bus);
uint8_t *p;
/* PIO data access allowed only when DRQ bit is set. The result of a write
* during PIO out is indeterminate, just ignore it. */
if (!(s->status & DRQ_STAT) ... | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 165,166,056,378,601,000,000,000,000,000,000,000,000 | 19 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z)
{
return stbi__zeof(z) ? 0 : *z->zbuffer++;
} | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 89,446,173,075,858,160,000,000,000,000,000,000,000 | 4 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
static inline u64 gfs2_bit_search(const __le64 *ptr, u64 mask, u8 state)
{
u64 tmp;
static const u64 search[] = {
[0] = 0xffffffffffffffffULL,
[1] = 0xaaaaaaaaaaaaaaaaULL,
[2] = 0x5555555555555555ULL,
[3] = 0x0000000000000000ULL,
};
tmp = le64_to_cpu(*ptr) ^ search[state];
tmp &= (tmp >> 1);
tmp &= mask;
... | 0 | [
"CWE-416"
] | linux | 36e4ad0316c017d5b271378ed9a1c9a4b77fab5f | 212,625,131,402,811,900,000,000,000,000,000,000,000 | 14 | GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
Before this patch, function read_rindex_entry would set a rgrp
glock's gl_object pointer to itself before inserting the rgrp into
the rgrp rbtree. The problem is: if another process was also reading
the rgrp in, and had already inserted its newly create... |
cmsBool Type_Data_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsICCData* BinData = (cmsICCData*) Ptr;
if (!_cmsWriteUInt32Number(io, BinData ->flag)) return FALSE;
return io ->Write(io, BinData ->len, BinData ->data);
cmsUNUSED_PARAMETER(nItems);
... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 119,238,076,155,990,850,000,000,000,000,000,000,000 | 11 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
set_op_var(int optype)
{
char_u opchars[3];
if (optype == OP_NOP)
set_vim_var_string(VV_OP, NULL, 0);
else
{
opchars[0] = get_op_char(optype);
opchars[1] = get_extra_op_char(optype);
opchars[2] = NUL;
set_vim_var_string(VV_OP, opchars, -1);
}
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 125,894,272,254,193,470,000,000,000,000,000,000,000 | 14 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
{
tga_source_ptr source = (tga_source_ptr) sinfo;
U_CHAR targaheader[18];
int idlen, cmaptype, subtype, flags, interlace_type, components;
unsigned int width, height, maplen;
boolean is_bottom_up;
#define GET_2B(offset) ((unsigned int) UCH(targa... | 1 | [
"CWE-369"
] | libjpeg-turbo | 82923eb93a2eacf4a593e00e3e672bbb86a8a3a0 | 1,784,441,243,207,830,000,000,000,000,000,000,000 | 133 | Check image size when reading targa file
Throw an error when image width or height is 0.
Fixes mozilla/mozjpeg#140, closes #7. |
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, int motorola_intel TSRMLS_DC)
{
size_t idex;
void *vptr;
image_info_value *info_value;
image_info_data *info_data;
image_info_data *list;
if (length < 0) {
return;
}
lis... | 1 | [
"CWE-119"
] | php-src | 9667ee4f72c7dafce993b71104a52beb7c3aff15 | 147,382,201,336,637,320,000,000,000,000,000,000,000 | 127 | improve the check, avoid strlen on NULL |
static int selinux_set_mnt_opts(struct super_block *sb,
struct security_mnt_opts *opts,
unsigned long kern_flags,
unsigned long *set_kern_flags)
{
const struct cred *cred = current_cred();
int rc = 0, i;
struct superblock_security_struct *sbsec = sb->s_security;
const char *name = sb->s_type->name;
str... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 95,383,335,636,659,110,000,000,000,000,000,000,000 | 247 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
bool FromkLinuxSockAddr(const struct klinux_sockaddr *input,
socklen_t input_len, struct sockaddr *output,
socklen_t *output_len,
void (*abort_handler)(const char *)) {
if (!input || !output || !output_len || input_len == 0) {
output = nullpt... | 1 | [
"CWE-787"
] | asylo | bda9772e7872b0d2b9bee32930cf7a4983837b39 | 25,761,054,693,871,755,000,000,000,000,000,000,000 | 69 | Check input length in FromLinuxSockAddr
PiperOrigin-RevId: 333785506
Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9 |
void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname)
{
__rpc_init_priority_wait_queue(queue, qname, 1);
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 204,156,874,703,450,120,000,000,000,000,000,000,000 | 4 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
extern int totem_config_read (
struct totem_config *totem_config,
const char **error_string,
uint64_t *warnings)
{
int res = 0;
char *str;
unsigned int ringnumber = 0;
int member_count = 0;
icmap_iter_t iter, member_iter;
const char *iter_key;
const char *member_iter_key;
char ringnumber_key[ICMAP_KEYNAME_MA... | 0 | [] | corosync | 55dc09ea237482f827333759fd45608bc9518d64 | 261,666,127,374,973,200,000,000,000,000,000,000,000 | 268 | totemconfig: enforce hmac config when crypto is enabled
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com> |
pcl_echo(pcl_args_t * pargs, pcl_state_t * pcs)
{
stream st;
status_begin(&st, pcs);
stprintf(&st, "ECHO %d\r\n", int_arg(pargs));
status_end(&st, pcs);
return 0;
} | 0 | [
"CWE-787"
] | ghostpdl | e1134d375e2ca176068e19a2aa9b040baffe1c22 | 238,946,018,256,892,500,000,000,000,000,000,000,000 | 9 | Bug 705156(1): Avoid double free of PCL error buffer |
httpd_request(isc_nmhandle_t *handle, isc_result_t eresult,
isc_region_t *region, void *arg) {
isc_result_t result;
isc_httpd_t *httpd = NULL;
isc_httpdmgr_t *mgr = (isc_httpdmgr_t *)arg;
isc_buffer_t *databuffer = NULL;
isc_httpdurl_t *url = NULL;
isc_time_t now;
isc_region_t r;
bool is_compressed = fal... | 0 | [] | bind9 | d4c5d1c650ae0e97a083b0ce7a705c20fc001f07 | 115,909,518,741,901,890,000,000,000,000,000,000,000 | 160 | Fix statistics channel multiple request processing with non-empty bodies
When the HTTP request has a body part after the HTTP headers, it is
not getting processed and is being prepended to the next request's data,
which results in an error when trying to parse it.
Improve the httpd.c:process_request() function with t... |
void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl)
{
memset(rl->read_sequence, 0, sizeof(rl->read_sequence));
} | 0 | [
"CWE-20"
] | openssl | 63658103d4441924f8dbfc517b99bb54758a98b9 | 42,612,940,533,569,450,000,000,000,000,000,000,000 | 4 | Fix a hang with SSL_peek()
If while calling SSL_peek() we read an empty record then we go into an
infinite loop, continually trying to read data from the empty record and
never making any progress. This could be exploited by a malicious peer in
a Denial Of Service attack.
CVE-2016-6305
GitHub Issue #1563
Reviewed-b... |
TORRENT_TEST(non_owning_refs)
{
char b1[] = "d1:ai1e1:b3:foo1:cli1ei2ee1:dd1:xi1eee";
bdecode_node e1;
error_code ec;
int ret = bdecode(b1, b1 + sizeof(b1)-1, e1, ec);
TEST_EQUAL(ret, 0);
TEST_EQUAL(e1.type(), bdecode_node::dict_t);
printf("%s\n", print_entry(e1).c_str());
bdecode_node e2 = e1.non_owning();
... | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 278,275,654,201,521,200,000,000,000,000,000,000,000 | 20 | fix out-of-bounds read in bdecode
Fixes #2099 |
u32 gf_isom_get_track_by_id(GF_ISOFile *the_file, GF_ISOTrackID trackID)
{
u32 count;
u32 i;
if (the_file == NULL) return 0;
count = gf_isom_get_track_count(the_file);
if (!count) return 0;
for (i = 0; i < count; i++) {
GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, i+1);
if (!trak || !trak->Heade... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 279,996,402,544,381,400,000,000,000,000,000,000,000 | 15 | fixed #1706 |
record_proto_stats(
char *str /* text string */
)
{
l_fp now;
u_long day;
if (!stats_control)
return;
get_systime(&now);
filegen_setup(&protostats, now.l_ui);
day = now.l_ui / 86400 + MJD_1900;
now.l_ui %= 86400;
if (protostats.fp != NULL) {
fprintf(protostats.fp, "%lu %s %s\n", day,
ulfptoa(&now... | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 32,732,391,558,039,664,000,000,000,000,000,000,000 | 20 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
TFE_Context* InputTFE_Context(const py::handle& ctx) {
return static_cast<TFE_Context*>(PyCapsule_GetPointer(ctx.ptr(), nullptr));
} | 0 | [
"CWE-20",
"CWE-476",
"CWE-908"
] | tensorflow | 22e07fb204386768e5bcbea563641ea11f96ceb8 | 278,941,598,374,452,600,000,000,000,000,000,000,000 | 3 | Fix multiple vulnerabilities in `tf.experimental.dlpack.to_dlpack`.
We have a use after free caused by memory coruption, a segmentation fault caused by memory corruption, several memory leaks and an undefined behavior when taking the reference of a nullptr.
PiperOrigin-RevId: 332568894
Change-Id: Ife0fc05e103b3532509... |
adjust_shell_level (change)
int change;
{
char new_level[5], *old_SHLVL;
intmax_t old_level;
SHELL_VAR *temp_var;
old_SHLVL = get_string_value ("SHLVL");
if (old_SHLVL == 0 || *old_SHLVL == '\0' || legal_number (old_SHLVL, &old_level) == 0)
old_level = 0;
shell_level = old_level + change;
if (s... | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 30,759,006,024,286,135,000,000,000,000,000,000,000 | 44 | commit bash-20120224 snapshot |
virSecuritySELinuxRestoreInputLabel(virSecurityManager *mgr,
virDomainDef *def,
virDomainInputDef *input)
{
int rc = 0;
virSecurityLabelDef *seclabel;
seclabel = virDomainDefGetSecurityLabelDef(def, SECURITY_SELINUX_NAME);
if (secl... | 0 | [
"CWE-732"
] | libvirt | 15073504dbb624d3f6c911e85557019d3620fdb2 | 135,097,313,265,891,090,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... |
static void get_cvs_excludes(uint32 rflags)
{
static int initialized = 0;
char *p, fname[MAXPATHLEN];
if (initialized)
return;
initialized = 1;
parse_filter_str(&cvs_filter_list, default_cvsignore(),
rule_template(rflags | (protocol_version >= 30 ? FILTRULE_PERISHABLE : 0)),
0);
p = module_id >= 0 &&... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 329,851,406,822,853,250,000,000,000,000,000,000,000 | 19 | Some extra file-list safety checks. |
GF_Err schi_dump(GF_Box *a, FILE * trace)
{
GF_SchemeInformationBox *p;
p = (GF_SchemeInformationBox *)a;
gf_isom_box_dump_start(a, "SchemeInformationBox", trace);
fprintf(trace, ">\n");
if (p->ikms) gf_isom_box_dump(p->ikms, trace);
if (p->isfm) gf_isom_box_dump(p->isfm, trace);
if (p->islt) gf_isom_box_dump(p-... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 149,383,490,288,122,530,000,000,000,000,000,000,000 | 15 | fixed 2 possible heap overflows (inc. #1088) |
static BOOL gdi_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
{
gdiBitmap* gdi_bitmap = (gdiBitmap*) bitmap;
UINT32 width = bitmap->right - bitmap->left + 1;
UINT32 height = bitmap->bottom - bitmap->top + 1;
return gdi_BitBlt(context->gdi->primary->hdc,
bitmap->left, bitmap->top,
... | 0 | [
"CWE-190",
"CWE-787"
] | FreeRDP | 09b9d4f1994a674c4ec85b4947aa656eda1aed8a | 163,057,130,124,786,520,000,000,000,000,000,000,000 | 10 | Fixed CVE-2018-8787
Thanks to Eyal Itkin from Check Point Software Technologies. |
GF_FileType get_file_type_by_ext(char *inName)
{
GF_FileType type = GF_FILE_TYPE_NOT_SUPPORTED;
char *ext = strrchr(inName, '.');
if (ext) {
char *sep;
if (!strcmp(ext, ".gz")) ext = strrchr(ext-1, '.');
ext+=1;
sep = strchr(ext, '.');
if (sep) sep[0] = 0;
if (!stricmp(ext, "mp4") || !stricmp(ext, "3gp... | 0 | [
"CWE-787"
] | gpac | 4e56ad72ac1afb4e049a10f2d99e7512d7141f9d | 172,648,920,740,627,000,000,000,000,000,000,000,000 | 37 | fixed #2216 |
static int exec_child(
Unit *unit,
const ExecCommand *command,
const ExecContext *context,
const ExecParameters *params,
ExecRuntime *runtime,
DynamicCreds *dcreds,
int socket_fd,
int named_io... | 1 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 224,159,142,193,443,750,000,000,000,000,000,000,000 | 850 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
void optimize_wo_join_buffering(JOIN *join, uint first_tab, uint last_tab,
table_map last_remaining_tables,
bool first_alt, uint no_jbuf_before,
double *outer_rec_count, double *reopt_cost)
{
double cost, rec_count;
ta... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 186,993,162,052,931,070,000,000,000,000,000,000,000 | 79 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
int __init ip_rt_init(void)
{
int cpu;
ip_idents = kmalloc_array(IP_IDENTS_SZ, sizeof(*ip_idents),
GFP_KERNEL);
if (!ip_idents)
panic("IP: failed to allocate ip_idents\n");
prandom_bytes(ip_idents, IP_IDENTS_SZ * sizeof(*ip_idents));
ip_tstamps = kcalloc(IP_IDENTS_SZ, sizeof(*ip_tstamps), GFP_KERNEL);
... | 1 | [
"CWE-327"
] | linux | aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba | 69,652,649,385,743,010,000,000,000,000,000,000,000 | 61 | inet: use bigger hash table for IP ID generation
In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
I used a very small hash table that could be abused
by patient attackers to reveal sensitive information.
Switch to a dynamic sizing, depending on RAM size.
Typical big hosts will now use 128x more storage (2... |
static int shutdown_interception(struct kvm_vcpu *vcpu)
{
struct kvm_run *kvm_run = vcpu->run;
struct vcpu_svm *svm = to_svm(vcpu);
/*
* The VM save area has already been encrypted so it
* cannot be reinitialized - just terminate.
*/
if (sev_es_guest(vcpu->kvm))
return -EINVAL;
/*
* VMCB is undefined a... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 338,044,328,129,482,740,000,000,000,000,000,000,000 | 22 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
const envoy::config::core::v3::Metadata& dynamicMetadata() const override { return metadata_; }; | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 151,907,564,968,611,820,000,000,000,000,000,000,000 | 1 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static int sof_set_get_large_ctrl_data(struct snd_sof_dev *sdev,
struct sof_ipc_ctrl_data *cdata,
struct sof_ipc_ctrl_data_params *sparams,
bool send)
{
struct sof_ipc_ctrl_data *partdata;
size_t send_bytes;
size_t offset = 0;
size_t msg_bytes;
size_t pl_size;
int err;
int i;
/... | 1 | [
"CWE-400",
"CWE-401"
] | linux | 45c1380358b12bf2d1db20a5874e9544f56b34ab | 333,872,713,963,216,720,000,000,000,000,000,000,000 | 68 | ASoC: SOF: ipc: Fix memory leak in sof_set_get_large_ctrl_data
In the implementation of sof_set_get_large_ctrl_data() there is a memory
leak in case an error. Release partdata if sof_get_ctrl_copy_params()
fails.
Fixes: 54d198d5019d ("ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly")
Signed-off-by: Nav... |
int main(int argc, const char **argv)
{
int force = 0;
int skip_state_lock = 0;
const char *stateFile = STATEFILE;
const char *logFile = NULL;
FILE *logFd = NULL;
int rc = 0;
int arg;
const char **files;
poptContext optCon;
struct logInfo *log;
struct poptOption options[] = ... | 0 | [
"CWE-732"
] | logrotate | f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25 | 90,810,770,361,273,100,000,000,000,000,000,000,000 | 137 | Lock state file to prevent parallel execution
Running multiple instances of logrotate on the same set of log-files
might have undesirable effects.
Add command line option --skip-state-lock to skip locking the state
file, for example if locking is unsupported or prohibited.
Fixes: https://github.com/logrotate/logrota... |
GF_Box *dmlp_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_TrueHDConfigBox, GF_ISOM_BOX_TYPE_DMLP);
return (GF_Box *)tmp; | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 106,105,245,024,371,640,000,000,000,000,000,000,000 | 5 | fixed #1757 |
static inline void ptlock_cache_init(void)
{
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 306,740,633,736,186,900,000,000,000,000,000,000,000 | 3 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static PixelList **AcquirePixelListThreadSet(const size_t width,
const size_t height)
{
PixelList
**pixel_list;
register ssize_t
i;
size_t
number_threads;
number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
pixel_list=(PixelList **) AcquireQuantumMemory(number_threads,
sizeof(... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 157,074,532,132,940,310,000,000,000,000,000,000,000 | 26 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
CImgDisplay& resize(const int nwidth, const int nheight, const bool force_redraw=true) {
if (!nwidth || !nheight || (is_empty() && (nwidth<0 || nheight<0))) return assign();
if (is_empty()) return assign(nwidth,nheight);
Display *const dpy = cimg::X11_attr().display;
const unsigned int
... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 329,175,694,881,281,200,000,000,000,000,000,000,000 | 34 | . |
void PE_(r_bin_pe_check_sections)(struct PE_(r_bin_pe_obj_t)* bin, struct r_bin_pe_section_t* * sects) {
int i = 0;
struct r_bin_pe_section_t* sections = *sects;
ut64 addr_beg, addr_end, new_section_size, new_perm, base_addr;
struct r_bin_pe_addr_t* entry = PE_(r_bin_pe_get_entrypoint) (bin);
if (!entry) {
retu... | 0 | [
"CWE-125"
] | radare2 | 4e1cf0d3e6f6fe2552a269def0af1cd2403e266c | 271,514,205,513,576,100,000,000,000,000,000,000,000 | 96 | Fix crash in pe |
static void mark_ptr_or_null_reg(struct bpf_func_state *state,
struct bpf_reg_state *reg, u32 id,
bool is_null)
{
if (type_may_be_null(reg->type) && reg->id == id &&
!WARN_ON_ONCE(!reg->id)) {
/* Old offset (both fixed and variable parts) should
* have been known-zero, because we don't allow pointe... | 0 | [] | linux | 34d3a78c681e8e7844b43d1a2f4671a04249c821 | 162,792,486,156,827,440,000,000,000,000,000,000,000 | 41 | bpf: Make per_cpu_ptr return rdonly PTR_TO_MEM.
Tag the return type of {per, this}_cpu_ptr with RDONLY_MEM. The
returned value of this pair of helpers is kernel object, which
can not be updated by bpf programs. Previously these two helpers
return PTR_OT_MEM for kernel objects of scalar type, which allows
one to direct... |
struct usb_device *usb_alloc_dev(struct usb_device *parent,
struct usb_bus *bus, unsigned port1)
{
struct usb_device *dev;
struct usb_hcd *usb_hcd = bus_to_hcd(bus);
unsigned root_hub = 0;
unsigned raw_port = port1;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return NULL;
if (!usb_get_hcd(usb_hcd... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 126,118,799,736,883,390,000,000,000,000,000,000,000 | 119 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
static int empty(Renode *node)
{
if (!node) return 1;
switch (node->type) {
default: return 1;
case P_CAT: return empty(node->x) && empty(node->y);
case P_ALT: return empty(node->x) || empty(node->y);
case P_REP: return empty(node->x) || node->m == 0;
case P_PAR: return empty(node->x);
case P_REF: return empty(... | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 49,170,431,721,441,510,000,000,000,000,000,000,000 | 13 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. |
ext2_get_acl(struct inode *inode, int type)
{
int name_index;
char *value = NULL;
struct posix_acl *acl;
int retval;
switch (type) {
case ACL_TYPE_ACCESS:
name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS;
break;
case ACL_TYPE_DEFAULT:
name_index = EXT2_XATTR_INDEX_POSIX_ACL_DEFAULT;
break;
default:
BUG... | 0 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 86,140,792,304,977,670,000,000,000,000,000,000,000 | 34 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
ulong get_column_grant(THD *thd, GRANT_INFO *grant,
const char *db_name, const char *table_name,
const char *field_name)
{
GRANT_TABLE *grant_table;
GRANT_COLUMN *grant_column;
ulong priv;
mysql_rwlock_rdlock(&LOCK_grant);
/* reload table if someone has modified ... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 156,169,526,850,109,500,000,000,000,000,000,000,000 | 34 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
boolop(PG_FUNCTION_ARGS)
{
ArrayType *val = PG_GETARG_ARRAYTYPE_P_COPY(0);
QUERYTYPE *query = PG_GETARG_QUERYTYPE_P(1);
CHKVAL chkval;
bool result;
CHECKARRVALID(val);
PREPAREARR(val);
chkval.arrb = ARRPTR(val);
chkval.arre = chkval.arrb + ARRNELEMS(val);
result = execute(GETQUERY(query) + query->size - 1... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 226,333,697,688,073,500,000,000,000,000,000,000,000 | 19 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
static struct sock *udp4_lib_lookup2(struct net *net,
__be32 saddr, __be16 sport,
__be32 daddr, unsigned int hnum, int dif,
struct udp_hslot *hslot2, unsigned int slot2)
{
struct sock *sk, *result;
struct hlist_nulls_node *node;
int score, badness, matches = 0, reuseport = 0;
u32 hash = 0;
begin:
result = N... | 0 | [
"CWE-358"
] | linux | 197c949e7798fbf28cfadc69d9ca0c2abbf93191 | 51,503,942,840,605,650,000,000,000,000,000,000,000 | 50 | udp: properly support MSG_PEEK with truncated buffers
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, s... |
void read_args(int f_in, char *mod_name, char *buf, size_t bufsiz, int rl_nulls,
char ***argv_p, int *argc_p, char **request_p)
{
int maxargs = MAX_ARGS;
int dot_pos = 0, argc = 0, request_len = 0;
char **argv, *p;
int rl_flags = (rl_nulls ? RL_EOL_NULLS : 0);
#ifdef ICONV_OPTION
rl_flags |= (protect_args... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 122,866,692,651,463,870,000,000,000,000,000,000,000 | 55 | Some extra file-list safety checks. |
static ULONG STDMETHODCALLTYPE stm_addref(IStream *This)
{
FETCH_STM();
return InterlockedIncrement(&stm->refcount);
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 60,668,867,611,868,580,000,000,000,000,000,000,000 | 6 | - 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 enum auth_passdb_skip auth_passdb_skip_parse(const char *str)
{
if (strcmp(str, "never") == 0)
return AUTH_PASSDB_SKIP_NEVER;
if (strcmp(str, "authenticated") == 0)
return AUTH_PASSDB_SKIP_AUTHENTICATED;
if (strcmp(str, "unauthenticated") == 0)
return AUTH_PASSDB_SKIP_UNAUTHENTICATED;
i_unreached();
} | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 279,240,571,210,976,220,000,000,000,000,000,000,000 | 10 | auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter fro... |
SAPI_API int sapi_get_target_gid(gid_t *obj TSRMLS_DC)
{
if (sapi_module.get_target_gid) {
return sapi_module.get_target_gid(obj TSRMLS_CC);
} else {
return FAILURE;
}
} | 0 | [
"CWE-190",
"CWE-79"
] | php-src | 996faf964bba1aec06b153b370a7f20d3dd2bb8b | 226,584,800,594,260,120,000,000,000,000,000,000,000 | 8 | Update header handling to RFC 7230 |
DocumentSourceMatch::DocumentSourceMatch(const BSONObj& query,
const intrusive_ptr<ExpressionContext>& expCtx)
: DocumentSource(kStageName, expCtx) {
rebuild(query);
} | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 89,969,257,135,417,120,000,000,000,000,000,000,000 | 5 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
evdev_scroll_get_default_button(struct libinput_device *device)
{
struct evdev_device *evdev = evdev_device(device);
unsigned int code;
if (libevdev_has_event_code(evdev->evdev, EV_KEY, BTN_MIDDLE))
return BTN_MIDDLE;
for (code = BTN_SIDE; code <= BTN_TASK; code++) {
if (libevdev_has_event_code(evdev->evdev, ... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 157,025,501,976,511,820,000,000,000,000,000,000,000 | 18 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
int security_inode_unlink(struct inode *dir, struct dentry *dentry)
{
if (unlikely(IS_PRIVATE(dentry->d_inode)))
return 0;
return security_ops->inode_unlink(dir, dentry);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 122,123,619,556,583,660,000,000,000,000,000,000,000 | 6 | 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... |
int seq_open(struct file *file, const struct seq_operations *op)
{
struct seq_file *p;
WARN_ON(file->private_data);
p = kmem_cache_zalloc(seq_file_cache, GFP_KERNEL);
if (!p)
return -ENOMEM;
file->private_data = p;
mutex_init(&p->lock);
p->op = op;
// No refcounting: the lifetime of 'p' is constrained
/... | 0 | [
"CWE-120",
"CWE-787"
] | linux | 8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b | 79,283,736,653,584,720,000,000,000,000,000,000,000 | 31 | seq_file: disallow extremely large seq buffer allocations
There is no reasonable need for a buffer larger than this, and it avoids
int overflow pitfalls.
Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Qualys Security Advisory <qsa@qualy... |
static void destroy_raw_packet_qp_tir(struct mlx5_ib_dev *dev,
struct mlx5_ib_rq *rq)
{
mlx5_core_destroy_tir(dev->mdev, rq->tirn);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 318,139,574,738,679,560,000,000,000,000,000,000,000 | 5 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
void clear_rulist(rzip_control *control)
{
while (control->ruhead) {
struct runzip_node *node = control->ruhead;
struct stream_info *sinfo = node->sinfo;
dealloc(sinfo->ucthreads);
dealloc(node->pthreads);
dealloc(sinfo->s);
dealloc(sinfo);
control->ruhead = node->prev;
dealloc(node);
}
} | 0 | [
"CWE-703"
] | lrzip | 4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4 | 324,387,204,732,677,980,000,000,000,000,000,000,000 | 14 | Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. |
mISDN_sock_create(struct net *net, struct socket *sock, int proto, int kern)
{
int err = -EPROTONOSUPPORT;
switch (proto) {
case ISDN_P_BASE:
err = base_sock_create(net, sock, proto);
break;
case ISDN_P_TE_S0:
case ISDN_P_NT_S0:
case ISDN_P_TE_E1:
case ISDN_P_NT_E1:
case ISDN_P_LAPD_TE:
case ISDN_P_LAPD_N... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 325,922,453,705,696,850,000,000,000,000,000,000,000 | 28 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file,
struct snd_ctl_tlv __user *_tlv,
int op_flag)
{
struct snd_card *card = file->card;
struct snd_ctl_tlv tlv;
struct snd_kcontrol *kctl;
struct snd_kcontrol_volatile *vd;
unsigned int len;
int err = 0;
... | 1 | [
"CWE-416",
"CWE-415"
] | linux | fd9f26e4eca5d08a27d12c0933fceef76ed9663d | 277,631,818,239,839,500,000,000,000,000,000,000,000 | 60 | ALSA: control: Don't access controls outside of protected regions
A control that is visible on the card->controls list can be freed at any time.
This means we must not access any of its memory while not holding the
controls_rw_lock. Otherwise we risk a use after free access.
Signed-off-by: Lars-Peter Clausen <lars@me... |
static int dns_transaction_requires_nsec(DnsTransaction *t) {
char key_str[DNS_RESOURCE_KEY_STRING_MAX];
DnsTransaction *dt;
const char *name;
uint16_t type = 0;
Iterator i;
int r;
assert(t);
/* Checks if we need to insist on NSEC/NSEC3 RRs for proving
... | 0 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 65,090,679,620,385,620,000,000,000,000,000,000,000 | 82 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
static void TransformSignature(SignatureInfo *signature_info)
{
#define Ch(x,y,z) (((x) & (y)) ^ (~(x) & (z)))
#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
#define RotateRight(x,n) (Trunc32(((x) >> n) | ((x) << (32-n))))
#define Sigma0(x) (RotateRight(x,7) ^ RotateRight(x,18) ^ Trunc32((x) >> 3))
#d... | 1 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 32,440,767,756,566,317,000,000,000,000,000,000,000 | 150 | possible divide by zero + clear buffers |
COMPAT_SYSCALL_DEFINE2(rt_sigsuspend, compat_sigset_t __user *, unewset, compat_size_t, sigsetsize)
{
#ifdef __BIG_ENDIAN
sigset_t newset;
compat_sigset_t newset32;
/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;
if (copy_from_user(&newset32, ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 301,177,039,007,451,600,000,000,000,000,000,000,000 | 19 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
dissect_rach_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, struct fp_info *p_fp_info, void *data)
{
gboolean is_control_frame;
guint16 header_crc = 0;
proto_item * header_crc_pi = NULL;
guint header_length = 0;
/* Header CRC */
header_cr... | 0 | [
"CWE-20"
] | wireshark | 7d7190695ce2ff269fdffb04e87139995cde21f4 | 46,351,223,698,895,675,000,000,000,000,000,000,000 | 250 | UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at
0; since all the other values seem to be offset-by-one, just take the modulus
0xf to avoid running off the end of the table.
Bug: 12191
Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0
Reviewed... |
static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
int vector, int level, int trig_mode,
unsigned long *dest_map)
{
int result = 0;
struct kvm_vcpu *vcpu = apic->vcpu;
switch (delivery_mode) {
case APIC_DM_LOWEST:
vcpu->arch.apic_arb_prio++;
case APIC_DM_FIXED:
/* FIXME ad... | 0 | [
"CWE-703",
"CWE-189"
] | linux | b963a22e6d1a266a67e9eecc88134713fd54775c | 223,279,023,510,528,780,000,000,000,000,000,000,000 | 92 | KVM: x86: Fix potential divide by 0 in lapic (CVE-2013-6367)
Under guest controllable circumstances apic_get_tmcct will execute a
divide by zero and cause a crash. If the guest cpuid support
tsc deadline timers and performs the following sequence of requests
the host will crash.
- Set the mode to periodic
- Set the T... |
cdf_dump_stream(const cdf_header_t *h, const cdf_stream_t *sst)
{
size_t ss = sst->sst_dirlen < h->h_min_size_standard_stream ?
CDF_SHORT_SEC_SIZE(h) : CDF_SEC_SIZE(h);
cdf_dump(sst->sst_tab, ss * sst->sst_len);
} | 0 | [
"CWE-119"
] | file | 1859fdb4e67c49c463c4e0078054335cd46ba295 | 227,745,216,108,433,880,000,000,000,000,000,000,000 | 6 | add more check found by cert's fuzzer. |
static vm_fault_t __do_huge_pmd_anonymous_page(struct vm_fault *vmf,
struct page *page, gfp_t gfp)
{
struct vm_area_struct *vma = vmf->vma;
struct mem_cgroup *memcg;
pgtable_t pgtable;
unsigned long haddr = vmf->address & HPAGE_PMD_MASK;
vm_fault_t ret = 0;
VM_BUG_ON_PAGE(!PageCompound(page), page);
if (mem... | 0 | [
"CWE-459"
] | linux | eb66ae030829605d61fbef1909ce310e29f78821 | 125,527,722,980,910,700,000,000,000,000,000,000,000 | 78 | mremap: properly flush TLB before releasing the page
Jann Horn points out that our TLB flushing was subtly wrong for the
mremap() case. What makes mremap() special is that we don't follow the
usual "add page to list of pages to be freed, then flush tlb, and then
free pages". No, mremap() obviously just _moves_ the p... |
static void vmx_disable_shadow_vmcs(struct vcpu_vmx *vmx)
{
vmcs_clear_bits(SECONDARY_VM_EXEC_CONTROL, SECONDARY_EXEC_SHADOW_VMCS);
vmcs_write64(VMCS_LINK_POINTER, -1ull);
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 106,701,305,814,417,830,000,000,000,000,000,000,000 | 5 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
int BZ_API(nsis_BZ2_bzDecompress) ( nsis_bzstream *strm )
{
Bool corrupt;
DState* s;
if (strm == NULL) return BZ_PARAM_ERROR;
s = strm->state;
if (s == NULL) return BZ_PARAM_ERROR;
if (s->strm != strm) return BZ_PARAM_ERROR;
while (True) {
if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERR... | 0 | [] | clamav-devel | fcd8091474d12592d509adcfd0bdd0b0dc8835f5 | 194,666,641,718,835,840,000,000,000,000,000,000,000 | 54 | bb#2230-2231 |
void ext4_block_bitmap_set(struct super_block *sb,
struct ext4_group_desc *bg, ext4_fsblk_t blk)
{
bg->bg_block_bitmap_lo = cpu_to_le32((u32)blk);
if (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT)
bg->bg_block_bitmap_hi = cpu_to_le32(blk >> 32);
} | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 178,633,176,690,275,350,000,000,000,000,000,000,000 | 7 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
struct picolcd_pending *picolcd_send_and_wait(struct hid_device *hdev,
int report_id, const u8 *raw_data, int size)
{
struct picolcd_data *data = hid_get_drvdata(hdev);
struct picolcd_pending *work;
struct hid_report *report = picolcd_out_report(report_id, hdev);
unsigned long flags;
int i, j, k;
if (!report |... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 844817e47eef14141cf59b8d5ac08dd11c0a9189 | 311,240,495,463,049,130,000,000,000,000,000,000,000 | 44 | HID: picolcd: sanity check report size in raw_event() callback
The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that raw_data
that we hold in picolcd_pending structure are always kept within proper
bounds.
Cc: stable@vger.kernel.org
Reported-... |
RemoteFsDevice::RemoteFsDevice(MusicLibraryModel *m, const Details &d)
: FsDevice(m, d.name, createUdi(d.name))
, mountToken(0)
, currentMountStatus(false)
, details(d)
, proc(0)
, messageSent(false)
{
// details.path=Utils::fixPath(details.path);
setup();
icn=MonoIcon::icon(details.i... | 0 | [
"CWE-20",
"CWE-22"
] | cantata | afc4f8315d3e96574925fb530a7004cc9e6ce3d3 | 159,541,942,672,915,400,000,000,000,000,000,000,000 | 16 | Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested |
*/
void
xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt) {
if ((ctxt == NULL) || (ctxt->context == NULL)) return;
CAST_TO_NUMBER;
CHECK_TYPE(XPATH_NUMBER);
if (xmlXPathIsNaN(ctxt->value->floatval))
ctxt->value->floatval=xmlXPathNAN;
else if (xmlXPathIsInf(ctxt->value->floatval) == 1)
... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 297,268,001,997,818,950,000,000,000,000,000,000,000 | 19 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static int parse_address_key(const char **p, const char *key, char **value) {
size_t l, n = 0, allocated = 0;
_cleanup_free_ char *r = NULL;
const char *a;
assert(p);
assert(*p);
assert(value);
if (key) {
l = strlen(key);
if (strn... | 0 | [
"CWE-416"
] | systemd | 1068447e6954dc6ce52f099ed174c442cb89ed54 | 340,247,181,576,710,580,000,000,000,000,000,000,000 | 67 | sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueu... |
static ssize_t write_full(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
return -ENOSPC;
} | 0 | [
"CWE-200",
"CWE-732"
] | linux | a4866aa812518ed1a37d8ea0c881dc946409de94 | 109,965,041,552,074,610,000,000,000,000,000,000,000 | 5 | mm: Tighten x86 /dev/mem with zeroing reads
Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is
disallowed. However, on x86, the first 1MB was always allowed for BIOS
and similar things, regardless of it actually being System RAM. It was
possible for heap to end up getting allocated in low 1MB RAM, and ... |
__releases(¤t->sighand->siglock)
{
struct signal_struct *sig = current->signal;
if (!(current->jobctl & JOBCTL_STOP_PENDING)) {
unsigned long gstop = JOBCTL_STOP_PENDING | JOBCTL_STOP_CONSUME;
struct task_struct *t;
/* signr will be recorded in task->jobctl for retries */
WARN_ON_ONCE(signr & ~JOBCTL... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 273,925,241,666,205,700,000,000,000,000,000,000,000 | 100 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
static CURLcode imap_perform_search(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
struct IMAP *imap = conn->data->req.protop;
/* Check we have a query string */
if(!imap->query) {
failf(conn->data, "Cannot SEARCH without a query string.");
return CURLE_URL_MALFORMAT;
}
/* Send the SEARCH... | 0 | [
"CWE-119"
] | curl | 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 | 142,996,654,581,493,290,000,000,000,000,000,000,000 | 19 | imap: if a FETCH response has no size, don't call write callback
CVE-2017-1000257
Reported-by: Brian Carpenter and 0xd34db347
Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586 |
static int fp_read_radix(fp_int *a, const char *str, int radix)
{
int y, neg;
char ch;
/* set the integer to the default of zero */
fp_zero (a);
#if DIGIT_BIT == 64 || DIGIT_BIT == 32
if (radix == 16)
return fp_read_radix_16(a, str);
#endif
/* make sure the radix is ok */
if (radix < 2 || ... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 125,380,559,186,596,600,000,000,000,000,000,000,000 | 60 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
int main(int argc, char **argv)
{
char bin_log_name[FN_REFLEN];
int exit_code;
int consistent_binlog_pos= 0;
MY_INIT(argv[0]);
sf_leaking_memory=1; /* don't report memory leaks on early exits */
compatible_mode_normal_str[0]= 0;
default_charset= (char *)mysql_universal_client_charset;
bzero((char*) &ig... | 0 | [] | server | 5a43a31ee81bc181eeb5ef2bf0704befa6e0594d | 269,338,176,063,049,500,000,000,000,000,000,000,000 | 179 | mysqldump: comments and identifiers with new lines
don't let identifiers with new lines to break a comment |
void imap_hcache_close(struct ImapData *idata)
{
if (!idata->hcache)
return;
mutt_hcache_close(idata->hcache);
idata->hcache = NULL;
} | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | e52393740334443ae0206cab2d7caef381646725 | 162,795,243,989,042,190,000,000,000,000,000,000,000 | 8 | quote imap strings more carefully
Co-authored-by: JerikoOne <jeriko.one@gmx.us> |
router_get_hash_impl_helper(const char *s, size_t s_len,
const char *start_str,
const char *end_str, char end_c,
const char **start_out, const char **end_out)
{
const char *start, *end;
start = tor_memstr(s, s_len, start_str);
if ... | 0 | [
"CWE-399"
] | tor | 57e35ad3d91724882c345ac709666a551a977f0f | 67,481,291,835,337,640,000,000,000,000,000,000,000 | 34 | Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha. |
static double mp_display_memory(_cimg_math_parser& mp) {
cimg::unused(mp);
std::fputc('\n',cimg::output());
mp.mem.display("[" cimg_appname "_math_parser] Memory snapshot");
return cimg::type<double>::nan(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 250,429,741,372,858,030,000,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
GF_Err traf_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_TrackFragmentBox *ptr = (GF_TrackFragmentBox *)s;
GF_Err e = gf_isom_box_array_read(s, bs, traf_on_child_box);
if (e) return e;
if (!ptr->tfhd) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Missing TrackFragmentHeaderBox \n"));
return GF_ISOM_INVAL... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 313,153,561,012,775,460,000,000,000,000,000,000,000 | 12 | fixed #1587 |
getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
XML_Parser rootParser = parser;
unsigned int stepsTakenUpwards = 0;
while (rootParser->m_parentParser) {
rootParser = rootParser->m_parentParser;
stepsTakenUpwards++;
}
assert(! rootParser->m_parentParser);
if (outLevelDiff != NULL) {
... | 0 | [
"CWE-400",
"CWE-703"
] | libexpat | 9b4ce651b26557f16103c3a366c91934ecd439ab | 207,300,068,496,266,720,000,000,000,000,000,000,000 | 13 | Prevent stack exhaustion in build_model
It is possible to trigger stack exhaustion in build_model function if
depth of nested children in DTD element is large enough. This happens
because build_node is a recursively called function within build_model.
The code has been adjusted to run iteratively. It uses the already... |
static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg)
{
struct crypto_stat_compress rcomp;
memset(&rcomp, 0, sizeof(rcomp));
strscpy(rcomp.type, "compression", sizeof(rcomp.type));
rcomp.stat_compress_cnt = atomic64_read(&alg->stats.compress.compress_cnt);
rcomp.stat_compress_tlen = atomic64... | 0 | [
"CWE-400",
"CWE-284",
"CWE-401"
] | linux | c03b04dcdba1da39903e23cc4d072abf8f68f2dd | 189,614,837,089,352,500,000,000,000,000,000,000,000 | 15 | crypto: user - fix memory leak in crypto_reportstat
In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is
leaked if crypto_reportstat_alg() fails. Required release for skb is
added.
Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics")
Cc: <stable@vger.kernel.org>
Signed-off-by... |
hup_void_fdecl_int(arg)
int arg UNUSED;
{
return;
} | 0 | [
"CWE-120",
"CWE-269"
] | NetHack | f3def5c0b999478da2d0a8f0b6a7c370a2065f77 | 17,007,334,398,922,182,000,000,000,000,000,000,000 | 5 | command line triggered buffer overruns
Prevent extremely long command line arguments from overflowing local
buffers in raw_printf or config_error_add. The increased buffer
sizes they recently got to deal with long configuration file values
aren't sufficient to handle command line induced overflows.
choose_windows(co... |
static void GTextFieldGrabSelection(GTextField *gt, enum selnames sel ) {
if ( gt->sel_start!=gt->sel_end ) {
unichar_t *temp;
char *ctemp, *ctemp2;
int i;
uint16 *u2temp;
GDrawGrabSelection(gt->g.base,sel);
temp = malloc((gt->sel_end-gt->sel_start + 2)*sizeof(unichar_t));
temp[0] = 0xfeff; /* KDE expects... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 96,390,667,679,450,100,000,000,000,000,000,000,000 | 39 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
PyString_FromFormatV(const char *format, va_list vargs)
{
va_list count;
Py_ssize_t n = 0;
const char* f;
char *s;
PyObject* string;
#ifdef VA_LIST_IS_ARRAY
Py_MEMCPY(count, vargs, sizeof(va_list));
#else
#ifdef __va_copy
__va_copy(count, vargs);
#else
count = vargs;
#endif
#endif
... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 148,789,266,654,107,200,000,000,000,000,000,000,000 | 230 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
pk_transaction_required_by (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
guint length;
PkBitfield filter;
gboolean recursive;
g_autoptr(GError) error = NULL;
g_autofree gchar **package_ids = NULL;
g_autofree gchar *package_ids_temp = NULL;
g_retu... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 232,407,847,376,976,200,000,000,000,000,000,000,000 | 66 | Do not set JUST_REINSTALL on any kind of auth failure
If we try to continue the auth queue when it has been cancelled (or failed)
then we fall upon the obscure JUST_REINSTALL transaction flag which only the
DNF backend actually verifies.
Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem. |
static int complete_sev_es_emulated_outs(struct kvm_vcpu *vcpu)
{
int size = vcpu->arch.pio.size;
int port = vcpu->arch.pio.port;
vcpu->arch.pio.count = 0;
if (vcpu->arch.sev_pio_count)
return kvm_sev_es_outs(vcpu, size, port);
return 1;
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 151,776,298,897,124,950,000,000,000,000,000,000,000 | 10 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
GF_Err audio_sample_entry_Read(GF_Box *s, GF_BitStream *bs)
{
GF_MPEGAudioSampleEntryBox *ptr;
char *data;
u8 a, b, c, d;
u32 i, size, v, nb_alnum;
GF_Err e;
u64 pos, start;
ptr = (GF_MPEGAudioSampleEntryBox *)s;
start = gf_bs_get_position(bs);
gf_bs_seek(bs, start + 8);
v = gf_bs_read_u16(bs);
if (v)
pt... | 0 | [
"CWE-416"
] | gpac | 6063b1a011c3f80cee25daade18154e15e4c058c | 212,130,110,910,457,580,000,000,000,000,000,000,000 | 78 | fix UAF in audio_sample_entry_Read (#1440) |
bool Item_outer_ref::check_inner_refs_processor(void *arg)
{
List_iterator_fast<Item_outer_ref> *it=
((List_iterator_fast<Item_outer_ref> *) arg);
Item_outer_ref *tmp_ref;
while ((tmp_ref= (*it)++))
{
if (tmp_ref == this)
{
tmp_ref->found_in_group_by= 1;
break;
}
}
(*it).rewind()... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 251,914,925,057,008,800,000,000,000,000,000,000,000 | 16 | 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. |
TEST(UriParseSingleSuite, Success) {
UriUriA uri;
EXPECT_EQ(uriParseSingleUriA(&uri, "file:///home/user/song.mp3", NULL),
URI_SUCCESS);
uriFreeUriMembersA(&uri);
} | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 4,954,266,926,024,871,300,000,000,000,000,000,000 | 8 | Fix uriParse*Ex* out-of-bounds read |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.